summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice')
-rw-r--r--include/libimobiledevice/bt_packet_logger.h20
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 */
36typedef enum { 37typedef 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
47typedef struct {
48 uint32_t length;
49 uint32_t ts_secs;
50 uint32_t ts_usecs;
51} bt_packet_logger_header_t;
52
46typedef struct bt_packet_logger_client_private bt_packet_logger_client_private; 53typedef struct bt_packet_logger_client_private bt_packet_logger_client_private;
47typedef bt_packet_logger_client_private *bt_packet_logger_client_t; /**< The client handle. */ 54typedef 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 */
142bt_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); 149bt_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 */
156bt_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}