diff options
| author | 2010-03-16 03:13:38 +0100 | |
|---|---|---|
| committer | 2010-03-16 03:13:38 +0100 | |
| commit | 08d2af5d611319748afba2aaba5e6c8a99f1b396 (patch) | |
| tree | 8bf4a3533f2acf11368dc37a9c653689ace99b77 /src/mobilebackup.c | |
| parent | 3e0c5021100c879ff7d0776d4c7bb4f0ec88e0d7 (diff) | |
| download | libimobiledevice-08d2af5d611319748afba2aaba5e6c8a99f1b396.tar.gz libimobiledevice-08d2af5d611319748afba2aaba5e6c8a99f1b396.tar.bz2 | |
Complete documentation of public interface and fix a lot of bogus comments
This change unifies the documentation comment syntax, fixes a few bad
documentation comments and completes documentation where it was missing.
Diffstat (limited to 'src/mobilebackup.c')
| -rw-r--r-- | src/mobilebackup.c | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index c5f0a84..15da0a1 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
| @@ -59,6 +59,18 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
| 59 | return MOBILEBACKUP_E_UNKNOWN_ERROR; | 59 | return MOBILEBACKUP_E_UNKNOWN_ERROR; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | /** | ||
| 63 | * Connects to the mobilebackup service on the specified device. | ||
| 64 | * | ||
| 65 | * @param device The device to connect to. | ||
| 66 | * @param port Destination port (usually given by lockdownd_start_service). | ||
| 67 | * @param client Pointer that will be set to a newly allocated | ||
| 68 | * mobilebackup_client_t upon successful return. | ||
| 69 | * | ||
| 70 | * @return MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID ARG if one | ||
| 71 | * or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if | ||
| 72 | * the mobilebackup version on the device is newer. | ||
| 73 | */ | ||
| 62 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, | 74 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, |
| 63 | mobilebackup_client_t * client) | 75 | mobilebackup_client_t * client) |
| 64 | { | 76 | { |
| @@ -87,6 +99,15 @@ mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, | |||
| 87 | return ret; | 99 | return ret; |
| 88 | } | 100 | } |
| 89 | 101 | ||
| 102 | /** | ||
| 103 | * Disconnects a mobilebackup client from the device and frees up the | ||
| 104 | * mobilebackup client data. | ||
| 105 | * | ||
| 106 | * @param client The mobilebackup client to disconnect and free. | ||
| 107 | * | ||
| 108 | * @return MOBILEBACKUP_E_SUCCESS on success, or MOBILEBACKUP_E_INVALID_ARG | ||
| 109 | * if client is NULL. | ||
| 110 | */ | ||
| 90 | mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) | 111 | mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) |
| 91 | { | 112 | { |
| 92 | if (!client) | 113 | if (!client) |
| @@ -97,9 +118,10 @@ mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) | |||
| 97 | return err; | 118 | return err; |
| 98 | } | 119 | } |
| 99 | 120 | ||
| 100 | /** Polls the device for MobileBackup data. | 121 | /** |
| 122 | * Polls the device for mobilebackup data. | ||
| 101 | * | 123 | * |
| 102 | * @param client The MobileBackup client | 124 | * @param client The mobilebackup client |
| 103 | * @param plist A pointer to the location where the plist should be stored | 125 | * @param plist A pointer to the location where the plist should be stored |
| 104 | * | 126 | * |
| 105 | * @return an error code | 127 | * @return an error code |
| @@ -112,12 +134,13 @@ mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t | |||
| 112 | return ret; | 134 | return ret; |
| 113 | } | 135 | } |
| 114 | 136 | ||
| 115 | /** Sends MobileBackup data to the device | 137 | /** |
| 138 | * Sends mobilebackup data to the device | ||
| 116 | * | 139 | * |
| 117 | * @note This function is low-level and should only be used if you need to send | 140 | * @note This function is low-level and should only be used if you need to send |
| 118 | * a new type of message. | 141 | * a new type of message. |
| 119 | * | 142 | * |
| 120 | * @param client The MobileBackup client | 143 | * @param client The mobilebackup client |
| 121 | * @param plist The location of the plist to send | 144 | * @param plist The location of the plist to send |
| 122 | * | 145 | * |
| 123 | * @return an error code | 146 | * @return an error code |
