diff options
author | 2025-06-28 21:01:42 +0200 | |
---|---|---|
committer | 2025-06-28 21:01:42 +0200 | |
commit | 9049ffb7eaab5a75018bb8fb1a54a9c9903daf00 (patch) | |
tree | 2b97019f5bf6e6986ec9a4e377b8de3062c34fc5 /include/libimobiledevice | |
parent | 39357c0eb4122eaf58382e921496984e6d0a7d5d (diff) | |
download | libimobiledevice-9049ffb7eaab5a75018bb8fb1a54a9c9903daf00.tar.gz libimobiledevice-9049ffb7eaab5a75018bb8fb1a54a9c9903daf00.tar.bz2 |
afc: Add afc_get_file_info_plist and afc_get_device_info_plist functions
These functions are like afc_get_file_info/afc_get_device_info but the
data is returned as a plist_t dictionary instead of a string list.
Diffstat (limited to 'include/libimobiledevice')
-rw-r--r-- | include/libimobiledevice/afc.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h index 4ad3dbd..3dcb5da 100644 --- a/include/libimobiledevice/afc.h +++ b/include/libimobiledevice/afc.h @@ -145,6 +145,20 @@ LIBIMOBILEDEVICE_API afc_error_t afc_client_free(afc_client_t client); LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info(afc_client_t client, char ***device_information); /** + * Get device information for a connected client. The device information + * returned is the device model as well as the free space, the total capacity + * and blocksize on the accessed disk partition. + * + * @param client The client to get device info for. + * @param device_information A pointer to a plist_t that will be populated + * with key-value pairs (dictionary) representing the device’s + * storage and model information. Free with plist_free(). + * + * @return AFC_E_SUCCESS on success or an AFC_E_* error value. + */ +LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info_plist(afc_client_t client, plist_t *device_information); + +/** * Gets a directory listing of the directory requested. * * @param client The client to get a directory listing from. @@ -163,7 +177,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const c * @param client The client to use to get the information of the file. * @param path The fully-qualified path to the file. * @param file_information Pointer to a buffer that will be filled with a - * NULL-terminated list of strings with the file information. Set to NULL + * NULL-terminated list of strings with the file attributes. Set to NULL * before calling this function. Free with afc_dictionary_free(). * * @return AFC_E_SUCCESS on success or an AFC_E_* error value. @@ -171,6 +185,19 @@ LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const c LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information); /** + * Gets information about a specific file. + * + * @param client The client to use to get the information of the file. + * @param path The fully-qualified path to the file. + * @param file_information A pointer to a plist_t that will be populated + * with key-value pairs (dictionary) representing the file attributes. + * Free with plist_free(). + * + * @return AFC_E_SUCCESS on success or an AFC_E_* error value. + */ +LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info_plist(afc_client_t client, const char *path, plist_t *file_information); + +/** * Opens a file on the device. * * @param client The client to use to open the file. |