summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/afc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice/afc.h')
-rw-r--r--include/libimobiledevice/afc.h46
1 files changed, 23 insertions, 23 deletions
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h
index a2d70d3..0086eb6 100644
--- a/include/libimobiledevice/afc.h
+++ b/include/libimobiledevice/afc.h
@@ -107,7 +107,7 @@ typedef afc_client_private *afc_client_t; /**< The client handle. */
107 * invalid, AFC_E_MUX_ERROR if the connection cannot be established, 107 * invalid, AFC_E_MUX_ERROR if the connection cannot be established,
108 * or AFC_E_NO_MEM if there is a memory allocation problem. 108 * or AFC_E_NO_MEM if there is a memory allocation problem.
109 */ 109 */
110afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t *client); 110LIBIMOBILEDEVICE_API afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t *client);
111 111
112/** 112/**
113 * Starts a new AFC service on the specified device and connects to it. 113 * Starts a new AFC service on the specified device and connects to it.
@@ -120,7 +120,7 @@ afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t serv
120 * 120 *
121 * @return AFC_E_SUCCESS on success, or an AFC_E_* error code otherwise. 121 * @return AFC_E_SUCCESS on success, or an AFC_E_* error code otherwise.
122 */ 122 */
123afc_error_t afc_client_start_service(idevice_t device, afc_client_t* client, const char* label); 123LIBIMOBILEDEVICE_API afc_error_t afc_client_start_service(idevice_t device, afc_client_t* client, const char* label);
124 124
125/** 125/**
126 * Frees up an AFC client. If the connection was created by the client itself, 126 * Frees up an AFC client. If the connection was created by the client itself,
@@ -128,7 +128,7 @@ afc_error_t afc_client_start_service(idevice_t device, afc_client_t* client, con
128 * 128 *
129 * @param client The client to free. 129 * @param client The client to free.
130 */ 130 */
131afc_error_t afc_client_free(afc_client_t client); 131LIBIMOBILEDEVICE_API afc_error_t afc_client_free(afc_client_t client);
132 132
133/** 133/**
134 * Get device information for a connected client. The device information 134 * Get device information for a connected client. The device information
@@ -142,7 +142,7 @@ afc_error_t afc_client_free(afc_client_t client);
142 * 142 *
143 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 143 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
144 */ 144 */
145afc_error_t afc_get_device_info(afc_client_t client, char ***device_information); 145LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info(afc_client_t client, char ***device_information);
146 146
147/** 147/**
148 * Gets a directory listing of the directory requested. 148 * Gets a directory listing of the directory requested.
@@ -155,7 +155,7 @@ afc_error_t afc_get_device_info(afc_client_t client, char ***device_information)
155 * 155 *
156 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 156 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
157 */ 157 */
158afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information); 158LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information);
159 159
160/** 160/**
161 * Gets information about a specific file. 161 * Gets information about a specific file.
@@ -168,7 +168,7 @@ afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***di
168 * 168 *
169 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 169 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
170 */ 170 */
171afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information); 171LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information);
172 172
173/** 173/**
174 * Opens a file on the device. 174 * Opens a file on the device.
@@ -180,7 +180,7 @@ afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***fil
180 * 180 *
181 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 181 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
182 */ 182 */
183afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle); 183LIBIMOBILEDEVICE_API afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle);
184 184
185/** 185/**
186 * Closes a file on the device. 186 * Closes a file on the device.
@@ -188,7 +188,7 @@ afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mo
188 * @param client The client to close the file with. 188 * @param client The client to close the file with.
189 * @param handle File handle of a previously opened file. 189 * @param handle File handle of a previously opened file.
190 */ 190 */
191afc_error_t afc_file_close(afc_client_t client, uint64_t handle); 191LIBIMOBILEDEVICE_API afc_error_t afc_file_close(afc_client_t client, uint64_t handle);
192 192
193/** 193/**
194 * Locks or unlocks a file on the device. 194 * Locks or unlocks a file on the device.
@@ -202,7 +202,7 @@ afc_error_t afc_file_close(afc_client_t client, uint64_t handle);
202 * AFC_LOCK_SH (shared lock), AFC_LOCK_EX (exclusive lock), or 202 * AFC_LOCK_SH (shared lock), AFC_LOCK_EX (exclusive lock), or
203 * AFC_LOCK_UN (unlock). 203 * AFC_LOCK_UN (unlock).
204 */ 204 */
205afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation); 205LIBIMOBILEDEVICE_API afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation);
206 206
207/** 207/**
208 * Attempts to the read the given number of bytes from the given file. 208 * Attempts to the read the given number of bytes from the given file.
@@ -215,7 +215,7 @@ afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t op
215 * 215 *
216 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 216 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
217 */ 217 */
218afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read); 218LIBIMOBILEDEVICE_API afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read);
219 219
220/** 220/**
221 * Writes a given number of bytes to a file. 221 * Writes a given number of bytes to a file.
@@ -228,7 +228,7 @@ afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint
228 * 228 *
229 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 229 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
230 */ 230 */
231afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written); 231LIBIMOBILEDEVICE_API afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written);
232 232
233/** 233/**
234 * Seeks to a given position of a pre-opened file on the device. 234 * Seeks to a given position of a pre-opened file on the device.
@@ -240,7 +240,7 @@ afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *dat
240 * 240 *
241 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 241 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
242 */ 242 */
243afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence); 243LIBIMOBILEDEVICE_API afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence);
244 244
245/** 245/**
246 * Returns current position in a pre-opened file on the device. 246 * Returns current position in a pre-opened file on the device.
@@ -251,7 +251,7 @@ afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset,
251 * 251 *
252 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 252 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
253 */ 253 */
254afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position); 254LIBIMOBILEDEVICE_API afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position);
255 255
256/** 256/**
257 * Sets the size of a file on the device. 257 * Sets the size of a file on the device.
@@ -265,7 +265,7 @@ afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *positi
265 * @note This function is more akin to ftruncate than truncate, and truncate 265 * @note This function is more akin to ftruncate than truncate, and truncate
266 * calls would have to open the file before calling this, sadly. 266 * calls would have to open the file before calling this, sadly.
267 */ 267 */
268afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize); 268LIBIMOBILEDEVICE_API afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize);
269 269
270/** 270/**
271 * Deletes a file or directory. 271 * Deletes a file or directory.
@@ -275,7 +275,7 @@ afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t new
275 * 275 *
276 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 276 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
277 */ 277 */
278afc_error_t afc_remove_path(afc_client_t client, const char *path); 278LIBIMOBILEDEVICE_API afc_error_t afc_remove_path(afc_client_t client, const char *path);
279 279
280/** 280/**
281 * Renames a file or directory on the device. 281 * Renames a file or directory on the device.
@@ -286,7 +286,7 @@ afc_error_t afc_remove_path(afc_client_t client, const char *path);
286 * 286 *
287 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 287 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
288 */ 288 */
289afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to); 289LIBIMOBILEDEVICE_API afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to);
290 290
291/** 291/**
292 * Creates a directory on the device. 292 * Creates a directory on the device.
@@ -297,7 +297,7 @@ afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *t
297 * 297 *
298 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 298 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
299 */ 299 */
300afc_error_t afc_make_directory(afc_client_t client, const char *path); 300LIBIMOBILEDEVICE_API afc_error_t afc_make_directory(afc_client_t client, const char *path);
301 301
302/** 302/**
303 * Sets the size of a file on the device without prior opening it. 303 * Sets the size of a file on the device without prior opening it.
@@ -308,7 +308,7 @@ afc_error_t afc_make_directory(afc_client_t client, const char *path);
308 * 308 *
309 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 309 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
310 */ 310 */
311afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize); 311LIBIMOBILEDEVICE_API afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize);
312 312
313/** 313/**
314 * Creates a hard link or symbolic link on the device. 314 * Creates a hard link or symbolic link on the device.
@@ -320,7 +320,7 @@ afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize
320 * 320 *
321 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 321 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
322 */ 322 */
323afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname); 323LIBIMOBILEDEVICE_API afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname);
324 324
325/** 325/**
326 * Sets the modification time of a file on the device. 326 * Sets the modification time of a file on the device.
@@ -331,7 +331,7 @@ afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const c
331 * 331 *
332 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 332 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
333 */ 333 */
334afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime); 334LIBIMOBILEDEVICE_API afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime);
335 335
336/** 336/**
337 * Deletes a file or directory including possible contents. 337 * Deletes a file or directory including possible contents.
@@ -343,7 +343,7 @@ afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mt
343 * 343 *
344 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 344 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
345 */ 345 */
346afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path); 346LIBIMOBILEDEVICE_API afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path);
347 347
348/* Helper functions */ 348/* Helper functions */
349 349
@@ -358,7 +358,7 @@ afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path);
358 * 358 *
359 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 359 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
360 */ 360 */
361afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value); 361LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value);
362 362
363/** 363/**
364 * Frees up a char dictionary as returned by some AFC functions. 364 * Frees up a char dictionary as returned by some AFC functions.
@@ -367,7 +367,7 @@ afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char *
367 * 367 *
368 * @return AFC_E_SUCCESS on success or an AFC_E_* error value. 368 * @return AFC_E_SUCCESS on success or an AFC_E_* error value.
369 */ 369 */
370afc_error_t afc_dictionary_free(char **dictionary); 370LIBIMOBILEDEVICE_API afc_error_t afc_dictionary_free(char **dictionary);
371 371
372#ifdef __cplusplus 372#ifdef __cplusplus
373} 373}