summaryrefslogtreecommitdiffstats
path: root/src/lockdown.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-05-15 15:45:04 +0200
committerGravatar Martin Szulecki2010-05-15 15:45:04 +0200
commit6820b067e3f0282e38b7450f46c6fcb8167a573b (patch)
treeb53ca331a16c1a6ff2adfb8450e7ec340d9178bb /src/lockdown.c
parent6d3c5f4f182b73dbaabfe6b51d560e707b3462d1 (diff)
downloadlibimobiledevice-6820b067e3f0282e38b7450f46c6fcb8167a573b.tar.gz
libimobiledevice-6820b067e3f0282e38b7450f46c6fcb8167a573b.tar.bz2
Add documentation for lockdownd_get_sync_data_classes/data_classes_free()
Diffstat (limited to 'src/lockdown.c')
-rw-r--r--src/lockdown.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 0d92b5d..3f03eab 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -1526,6 +1526,20 @@ static void str_remove_spaces(char *source)
1526 *dest = 0; 1526 *dest = 0;
1527} 1527}
1528 1528
1529/**
1530 * Calculates and returns the data classes the device supports and which are
1531 * enabled for synchronization from lockdownd.
1532 *
1533 * @param client An initialized lockdownd client.
1534 * @param classes A pointer to store an array of class names. The caller is responsible
1535 * for freeing the memory which can be done using mobilesync_data_classes_free().
1536 * @param count The number of items in the classes array.
1537 *
1538 * @return LOCKDOWN_E_SUCCESS on success,
1539 * LOCKDOWN_E_INVALID_ARG when client is NULL,
1540 * LOCKDOWN_E_NO_RUNNING_SESSION if no session is open,
1541 * LOCKDOWN_E_PLIST_ERROR if the received plist is broken
1542 */
1529lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count) 1543lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count)
1530{ 1544{
1531 if (!client) 1545 if (!client)
@@ -1609,6 +1623,14 @@ lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, cha
1609 return LOCKDOWN_E_SUCCESS; 1623 return LOCKDOWN_E_SUCCESS;
1610} 1624}
1611 1625
1626
1627/**
1628 * Frees memory of an allocated array of data classes as returned by lockdownd_get_sync_data_classes()
1629 *
1630 * @param classes An array of class names to free.
1631 *
1632 * @return LOCKDOWN_E_SUCCESS on success
1633 */
1612lockdownd_error_t lockdownd_data_classes_free(char **classes) 1634lockdownd_error_t lockdownd_data_classes_free(char **classes)
1613{ 1635{
1614 if (classes) { 1636 if (classes) {