diff options
| author | 2021-03-07 10:03:55 -0800 | |
|---|---|---|
| committer | 2022-05-05 18:54:55 +0200 | |
| commit | aee82afabfcf763618f58c95f9613b40dcf334b0 (patch) | |
| tree | 16508d80b64f52d915e5bf122a0c4cf6d0aca85f /include | |
| parent | a070a2e0b8774132a2c90822ba22580c4d1842da (diff) | |
| download | libimobiledevice-aee82afabfcf763618f58c95f9613b40dcf334b0.tar.gz libimobiledevice-aee82afabfcf763618f58c95f9613b40dcf334b0.tar.bz2 | |
idevicebtlogger: Cleanup warnings, todos and magic numbers
Diffstat (limited to 'include')
| -rw-r--r-- | include/libimobiledevice/bt_packet_logger.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/include/libimobiledevice/bt_packet_logger.h b/include/libimobiledevice/bt_packet_logger.h index 697e879..8916219 100644 --- a/include/libimobiledevice/bt_packet_logger.h +++ b/include/libimobiledevice/bt_packet_logger.h | |||
| @@ -31,6 +31,7 @@ extern "C" { | |||
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | 32 | ||
| 33 | #define BT_PACKETLOGGER_SERVICE_NAME "com.apple.bluetooth.BTPacketLogger" | 33 | #define BT_PACKETLOGGER_SERVICE_NAME "com.apple.bluetooth.BTPacketLogger" |
| 34 | #define BT_MAX_PACKET_SIZE 65535 | ||
| 34 | 35 | ||
| 35 | /** Error Codes */ | 36 | /** Error Codes */ |
| 36 | typedef enum { | 37 | typedef enum { |
| @@ -43,6 +44,12 @@ typedef enum { | |||
| 43 | BT_PACKET_LOGGER_E_UNKNOWN_ERROR = -256 | 44 | BT_PACKET_LOGGER_E_UNKNOWN_ERROR = -256 |
| 44 | } bt_packet_logger_error_t; | 45 | } bt_packet_logger_error_t; |
| 45 | 46 | ||
| 47 | typedef struct { | ||
| 48 | uint32_t length; | ||
| 49 | uint32_t ts_secs; | ||
| 50 | uint32_t ts_usecs; | ||
| 51 | } bt_packet_logger_header_t; | ||
| 52 | |||
| 46 | typedef struct bt_packet_logger_client_private bt_packet_logger_client_private; | 53 | typedef struct bt_packet_logger_client_private bt_packet_logger_client_private; |
| 47 | typedef bt_packet_logger_client_private *bt_packet_logger_client_t; /**< The client handle. */ | 54 | typedef bt_packet_logger_client_private *bt_packet_logger_client_t; /**< The client handle. */ |
| 48 | 55 | ||
| @@ -141,19 +148,6 @@ bt_packet_logger_error_t bt_packet_logger_stop_capture(bt_packet_logger_client_t | |||
| 141 | */ | 148 | */ |
| 142 | bt_packet_logger_error_t bt_packet_logger_receive_with_timeout(bt_packet_logger_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); | 149 | bt_packet_logger_error_t bt_packet_logger_receive_with_timeout(bt_packet_logger_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); |
| 143 | 150 | ||
| 144 | /** | ||
| 145 | * Receives data from the service. | ||
| 146 | * | ||
| 147 | * @param client The bt_packet_logger client | ||
| 148 | * @param data Buffer that will be filled with the data received | ||
| 149 | * @param size Number of bytes to receive | ||
| 150 | * @param received Number of bytes received (can be NULL to ignore) | ||
| 151 | * @param timeout Maximum time in milliseconds to wait for data. | ||
| 152 | * | ||
| 153 | * @return BT_PACKET_LOGGER_E_SUCCESS on success, | ||
| 154 | * BT_PACKET_LOGGER_E_INVALID_ARG when client or plist is NULL | ||
| 155 | */ | ||
| 156 | bt_packet_logger_error_t bt_packet_logger_receive(bt_packet_logger_client_t client, char *data, uint32_t size, uint32_t *received); | ||
| 157 | 151 | ||
| 158 | #ifdef __cplusplus | 152 | #ifdef __cplusplus |
| 159 | } | 153 | } |
