diff options
Diffstat (limited to 'src/file_relay.c')
| -rw-r--r-- | src/file_relay.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/file_relay.c b/src/file_relay.c index 2b45d70..eacaa11 100644 --- a/src/file_relay.c +++ b/src/file_relay.c | |||
| @@ -57,6 +57,26 @@ file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_des | |||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | /** | 59 | /** |
| 60 | * Starts a new file_relay service on the specified device and connects to it. | ||
| 61 | * | ||
| 62 | * @param device The device to connect to. | ||
| 63 | * @param client Pointer that will point to a newly allocated | ||
| 64 | * file_relay_client_t upon successful return. Must be freed using | ||
| 65 | * file_relay_client_free() after use. | ||
| 66 | * @param label The label to use for communication. Usually the program name. | ||
| 67 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 68 | * | ||
| 69 | * @return FILE_RELAY_E_SUCCESS on success, or an FILE_RELAY_E_* error | ||
| 70 | * code otherwise. | ||
| 71 | */ | ||
| 72 | file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t * client, const char* label) | ||
| 73 | { | ||
| 74 | file_relay_error_t err = FILE_RELAY_E_UNKNOWN_ERROR; | ||
| 75 | service_client_factory_start_service(device, FILE_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(file_relay_client_new), &err); | ||
| 76 | return err; | ||
| 77 | } | ||
| 78 | |||
| 79 | /** | ||
| 60 | * Disconnects a file_relay client from the device and frees up the file_relay | 80 | * Disconnects a file_relay client from the device and frees up the file_relay |
| 61 | * client data. | 81 | * client data. |
| 62 | * | 82 | * |
