92 bool Write(
Id id,
size_t length);
constexpr size_t MAX_PAYLOAD
Definition: adb.h:34
Definition: shell_protocol.h:41
size_t bytes_left_
Definition: shell_protocol.h:109
ShellProtocol(borrowed_fd fd)
Definition: shell_service_protocol.cpp:25
char * data()
Definition: shell_protocol.h:69
size_t data_length() const
Definition: shell_protocol.h:87
DISALLOW_COPY_AND_ASSIGN(ShellProtocol)
@ kHeaderSize
Definition: shell_protocol.h:104
@ kBufferSize
Definition: shell_protocol.h:101
uint32_t length_t
Definition: shell_protocol.h:96
char * buffer_end_
Definition: shell_protocol.h:113
const char * data() const
Definition: shell_protocol.h:68
borrowed_fd fd_
Definition: shell_protocol.h:107
Id
Definition: shell_protocol.h:44
@ kIdStdout
Definition: shell_protocol.h:46
@ kIdExit
Definition: shell_protocol.h:48
@ kIdWindowSizeChange
Definition: shell_protocol.h:54
@ kIdInvalid
Definition: shell_protocol.h:57
@ kIdCloseStdin
Definition: shell_protocol.h:51
@ kIdStdin
Definition: shell_protocol.h:45
@ kIdStderr
Definition: shell_protocol.h:47
bool Read()
Definition: shell_service_protocol.cpp:32
char buffer_[kBufferSize]
Definition: shell_protocol.h:108
friend class ShellProtocolTest
Definition: shell_protocol.h:115
int id() const
Definition: shell_protocol.h:84
bool Write(Id id, size_t length)
Definition: shell_service_protocol.cpp:56
size_t data_length_
Definition: shell_protocol.h:109
size_t data_capacity() const
Definition: shell_protocol.h:72
virtual ~ShellProtocol()
Definition: shell_service_protocol.cpp:29
Definition: unique_fd.h:292