summaryrefslogtreecommitdiffstats
path: root/libusbmuxd.h
blob: 82f9a474a099f9576b02a2732c2bf382f276b830 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef __LIBUSBMUXD_H
#define __LIBUSBMUXD_H

#include <usbmuxd.h>

/**
 * Contacts usbmuxd via it's unix domain socket and performs a scan for
 *  connected devices.
 *
 * @param devices Pointer to an array of usbmuxd_device_t.
 * 	 Assumed initially NULL, will be allocated by this function.
 *
 * @return number of devices found, negative on error
 */
int usbmuxd_scan(usbmuxd_device_t **devices);

/**
 * Performs the connect procedure via usbmuxd.
 *
 * @param device_id USB device number of the device to connect to
 * @param port Port number to connect to
 *
 * @return socket of the connection, negative on error
 */
int usbmuxd_connect(uint32_t device_id, uint16_t port);

#endif /* __LIBUSBMUXD_H */