Lines Matching full:adb
24 #include "android/adb-server.h"
36 /* ADB guest connection descriptor. */
38 /* Entry in the list of pending or connected ADB guests.
43 /* ADB server for this guest. */
45 /* ADB host connected with this ADB guest. */
47 /* Callback routines for the ADB guest. */
49 /* ADB guest connection status. If 0 indicates that ADB guest is not yet
54 /* ADB host connection descriptor. */
56 /* Entry in the list of pending or connected ADB hosts.
59 /* ADB server for this host. */
61 /* ADB socket connected with the host. */
65 /* ADB guest connected with this ADB host. */
79 /* ADB server descriptor. */
81 /* ADB socket address. */
83 /* Looper for async I/O on ADB server socket. */
85 /* I/O port for asynchronous I/O on ADB server socket. */
87 /* ADB port. */
91 /* List of connected ADB hosts. */
93 /* List of connected ADB guests. */
95 /* List of ADB hosts pending connection with ADB guest. */
97 /* List of ADB guests pending connection with ADB host. */
101 /* One and only one ADB server instance. */
103 /* ADB server initialization flag. */
107 * ADB host API
153 printf("Append %d bytes to ADB host buffer.\n", msglen);
169 D("Unable to allocate %d bytes for pending ADB host data.",
181 /* Connects ADB host with ADB guest. */
185 D("Connecting ADB host %p(so=%d) with ADB guest %p(o=%p)",
193 /* Callback invoked when ADB host socket gets disconnected. */
199 /* Notify the ADB guest that the host got disconnected. */
201 D("Disconnecting ADB host %p(so=%d) from ADB guest %p(o=%p)",
207 D("Disconnecting ADB host %p(so=%d)", adb_host, adb_host->host_so);
220 /* Read I/O callback on ADB host socket. */
229 D("Error while reading from ADB host %p(so=%d). Error: %s",
235 D("%s %d bytes received from ADB host %p(so=%d): %s",
239 /* Lets see if there is an ADB guest associated with this host, and it
258 D("Unable to (re)allocate %d bytes for pending ADB host data",
265 /* Write I/O callback on ADB host socket. */
278 D("Unable to send pending data to the ADB host: %s",
311 /* I/O callback on ADB host socket. */
328 * ADB guest API
356 * ADB server internals
359 /* I/O callback on ADB server socket. */
370 D("Unexpected write I/O on ADB server socket");
380 D("Unable to accept ADB connection: %s", strerror(errno));
389 /* Lets see if there is an ADB guest waiting for a host connection. */
392 /* Tie up ADB host with the ADB guest. */
398 D("Pend ADB host %p(so=%d)", adb_host, adb_host->host_so);
407 * ADB server API
424 E("Unable to create I/O looper for ADB server");
428 /* Create loopback server socket for the ADB port. */
433 E("Unable to create ADB server socket: %s", strerror(errno));
443 D("ADB server has been initialized for port %d. Socket: %d",
464 /* Create and initialize ADB guest descriptor. */
469 /* Lets see if there is a pending ADB host for the new guest. */
472 /* Tie up ADB host with the ADB guest. */
478 D("Pend ADB guest %p(o=%p)", adb_guest, adb_guest->opaque);
484 D("%s is called on an uninitialized ADB server.", __FUNCTION__);
501 D("Pushing %d bytes of the pending ADB host data.",
519 D("Sending %d bytes to the ADB host: %s", msglen, QB(msg, msglen));
529 D("Unable to send data to ADB host: %s", strerror(errno));
544 D("ADB host is disconneted and can't accept %d bytes in %s",