Home
last modified time | relevance | path

Searched refs:ShellProtocol (Results 1 – 6 of 6) sorted by relevance

/system/core/adb/
Dshell_service_protocol_test.cpp48 write_protocol_ = new ShellProtocol(write_fd_); in SetUp()
51 read_protocol_ = new ShellProtocol(read_fd_); in SetUp()
63 for (ShellProtocol* protocol : {read_protocol_, write_protocol_}) { in TearDown()
80 ShellProtocol *read_protocol_ = nullptr, *write_protocol_ = nullptr;
90 bool PacketEquals(const ShellProtocol* protocol, ShellProtocol::Id id, in PacketEquals()
102 ShellProtocol::Id id = ShellProtocol::kIdStdout; in TEST_F()
114 ShellProtocol::Id id = ShellProtocol::kIdStdin; in TEST_F()
130 ShellProtocol::Id id = ShellProtocol::kIdStderr; in TEST_F()
141 ASSERT_TRUE(write_protocol_->Write(ShellProtocol::kIdExit, 1)); in TEST_F()
144 ASSERT_EQ(ShellProtocol::kIdExit, read_protocol_->id()); in TEST_F()
[all …]
Dshell_service_protocol.cpp25 ShellProtocol::ShellProtocol(borrowed_fd fd) : fd_(fd) { in ShellProtocol() function in ShellProtocol
29 ShellProtocol::~ShellProtocol() { in ~ShellProtocol()
32 bool ShellProtocol::Read() { in Read()
56 bool ShellProtocol::Write(Id id, size_t length) { in Write()
Dshell_protocol.h41 class ShellProtocol {
64 explicit ShellProtocol(borrowed_fd fd);
65 virtual ~ShellProtocol();
117 DISALLOW_COPY_AND_ASSIGN(ShellProtocol);
/system/core/adb/daemon/
Dshell_service_test.cpp101 auto protocol = std::make_unique<ShellProtocol>(fd.get()); in ReadShellProtocol()
104 case ShellProtocol::kIdStdout: in ReadShellProtocol()
107 case ShellProtocol::kIdStderr: in ReadShellProtocol()
110 case ShellProtocol::kIdExit: in ReadShellProtocol()
211 ShellProtocol* protocol = new ShellProtocol(command_fd_); in TEST_F()
216 ASSERT_TRUE(protocol->Write(ShellProtocol::kIdStdin, command.length())); in TEST_F()
237 ShellProtocol* protocol = new ShellProtocol(command_fd_); in TEST_F()
239 ASSERT_TRUE(protocol->Write(ShellProtocol::kIdStdin, input.length())); in TEST_F()
240 ASSERT_TRUE(protocol->Write(ShellProtocol::kIdCloseStdin, 0)); in TEST_F()
310 auto write_protocol = std::make_unique<ShellProtocol>(command_fd_); in TEST_F()
[all …]
Dshell_service.cpp198 unique_fd* PassOutput(unique_fd* sfd, ShellProtocol::Id id);
210 std::unique_ptr<ShellProtocol> input_, output_;
477 input_ = std::make_unique<ShellProtocol>(protocol_sfd_); in ConnectProtocolEndpoints()
478 output_ = std::make_unique<ShellProtocol>(protocol_sfd_); in ConnectProtocolEndpoints()
620 dead_sfd = PassOutput(&stdinout_sfd_, ShellProtocol::kIdStdout); in PollLoop()
625 dead_sfd = PassOutput(&stderr_sfd_, ShellProtocol::kIdStderr); in PollLoop()
684 case ShellProtocol::kIdWindowSizeChange: in PassInput()
696 case ShellProtocol::kIdStdin: in PassInput()
699 case ShellProtocol::kIdCloseStdin: in PassInput()
739 unique_fd* Subprocess::PassOutput(unique_fd* sfd, ShellProtocol::Id id) { in PassOutput()
[all …]
/system/core/adb/client/
Dcommandline.cpp283 std::unique_ptr<ShellProtocol> protocol; in read_and_dump()
289 protocol = std::make_unique<ShellProtocol>(fd); in read_and_dump()
304 case ShellProtocol::kIdStdout: in read_and_dump()
307 case ShellProtocol::kIdStderr: in read_and_dump()
310 case ShellProtocol::kIdExit: in read_and_dump()
416 static void send_window_size_change(int fd, std::unique_ptr<ShellProtocol>& shell) { in send_window_size_change()
456 shell->Write(ShellProtocol::kIdWindowSizeChange, l + 1); in send_window_size_change()
463 std::unique_ptr<ShellProtocol> protocol;
528 args->protocol->Write(ShellProtocol::kIdCloseStdin, 0); in stdin_read_thread_loop()
565 if (!args->protocol->Write(ShellProtocol::kIdStdin, r)) { in stdin_read_thread_loop()
[all …]