diff options
| author | 2015-01-27 21:58:25 +0100 | |
|---|---|---|
| committer | 2015-01-27 22:01:24 +0100 | |
| commit | 2bff6193d141abec45aa7040fcadc50607d9b4e8 (patch) | |
| tree | a4d56e16ae85d83d0ba56a4e005357981f125eee /src | |
| parent | a6fcb3fd337bf63aba9237f54e4ecb8c737e984c (diff) | |
| download | libimobiledevice-2bff6193d141abec45aa7040fcadc50607d9b4e8.tar.gz libimobiledevice-2bff6193d141abec45aa7040fcadc50607d9b4e8.tar.bz2 | |
sbservices: Use more consistent name for lock/unlock methods
Diffstat (limited to 'src')
| -rw-r--r-- | src/sbservices.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/sbservices.c b/src/sbservices.c index ffe3d1a..798e38a 100644 --- a/src/sbservices.c +++ b/src/sbservices.c | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | * | 33 | * |
| 34 | * @param client sbservices client to lock. | 34 | * @param client sbservices client to lock. |
| 35 | */ | 35 | */ |
| 36 | static void sbs_lock(sbservices_client_t client) | 36 | static void sbservices_lock(sbservices_client_t client) |
| 37 | { | 37 | { |
| 38 | debug_info("Locked"); | 38 | debug_info("Locked"); |
| 39 | mutex_lock(&client->mutex); | 39 | mutex_lock(&client->mutex); |
| @@ -44,7 +44,7 @@ static void sbs_lock(sbservices_client_t client) | |||
| 44 | * | 44 | * |
| 45 | * @param client sbservices client to unlock | 45 | * @param client sbservices client to unlock |
| 46 | */ | 46 | */ |
| 47 | static void sbs_unlock(sbservices_client_t client) | 47 | static void sbservices_unlock(sbservices_client_t client) |
| 48 | { | 48 | { |
| 49 | debug_info("Unlocked"); | 49 | debug_info("Unlocked"); |
| 50 | mutex_unlock(&client->mutex); | 50 | mutex_unlock(&client->mutex); |
| @@ -125,7 +125,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_state(sbservices_cli | |||
| 125 | plist_dict_set_item(dict, "formatVersion", plist_new_string(format_version)); | 125 | plist_dict_set_item(dict, "formatVersion", plist_new_string(format_version)); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | sbs_lock(client); | 128 | sbservices_lock(client); |
| 129 | 129 | ||
| 130 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); | 130 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); |
| 131 | if (res != SBSERVICES_E_SUCCESS) { | 131 | if (res != SBSERVICES_E_SUCCESS) { |
| @@ -148,7 +148,7 @@ leave_unlock: | |||
| 148 | if (dict) { | 148 | if (dict) { |
| 149 | plist_free(dict); | 149 | plist_free(dict); |
| 150 | } | 150 | } |
| 151 | sbs_unlock(client); | 151 | sbservices_unlock(client); |
| 152 | return res; | 152 | return res; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| @@ -163,7 +163,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_icon_state(sbservices_cli | |||
| 163 | plist_dict_set_item(dict, "command", plist_new_string("setIconState")); | 163 | plist_dict_set_item(dict, "command", plist_new_string("setIconState")); |
| 164 | plist_dict_set_item(dict, "iconState", plist_copy(newstate)); | 164 | plist_dict_set_item(dict, "iconState", plist_copy(newstate)); |
| 165 | 165 | ||
| 166 | sbs_lock(client); | 166 | sbservices_lock(client); |
| 167 | 167 | ||
| 168 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); | 168 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); |
| 169 | if (res != SBSERVICES_E_SUCCESS) { | 169 | if (res != SBSERVICES_E_SUCCESS) { |
| @@ -174,7 +174,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_icon_state(sbservices_cli | |||
| 174 | if (dict) { | 174 | if (dict) { |
| 175 | plist_free(dict); | 175 | plist_free(dict); |
| 176 | } | 176 | } |
| 177 | sbs_unlock(client); | 177 | sbservices_unlock(client); |
| 178 | return res; | 178 | return res; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| @@ -189,7 +189,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_pngdata(sbservices_c | |||
| 189 | plist_dict_set_item(dict, "command", plist_new_string("getIconPNGData")); | 189 | plist_dict_set_item(dict, "command", plist_new_string("getIconPNGData")); |
| 190 | plist_dict_set_item(dict, "bundleId", plist_new_string(bundleId)); | 190 | plist_dict_set_item(dict, "bundleId", plist_new_string(bundleId)); |
| 191 | 191 | ||
| 192 | sbs_lock(client); | 192 | sbservices_lock(client); |
| 193 | 193 | ||
| 194 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); | 194 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); |
| 195 | if (res != SBSERVICES_E_SUCCESS) { | 195 | if (res != SBSERVICES_E_SUCCESS) { |
| @@ -211,7 +211,7 @@ leave_unlock: | |||
| 211 | if (dict) { | 211 | if (dict) { |
| 212 | plist_free(dict); | 212 | plist_free(dict); |
| 213 | } | 213 | } |
| 214 | sbs_unlock(client); | 214 | sbservices_unlock(client); |
| 215 | return res; | 215 | return res; |
| 216 | } | 216 | } |
| 217 | 217 | ||
| @@ -225,7 +225,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_interface_orientation(sbs | |||
| 225 | plist_t dict = plist_new_dict(); | 225 | plist_t dict = plist_new_dict(); |
| 226 | plist_dict_set_item(dict, "command", plist_new_string("getInterfaceOrientation")); | 226 | plist_dict_set_item(dict, "command", plist_new_string("getInterfaceOrientation")); |
| 227 | 227 | ||
| 228 | sbs_lock(client); | 228 | sbservices_lock(client); |
| 229 | 229 | ||
| 230 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); | 230 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); |
| 231 | if (res != SBSERVICES_E_SUCCESS) { | 231 | if (res != SBSERVICES_E_SUCCESS) { |
| @@ -249,7 +249,7 @@ leave_unlock: | |||
| 249 | if (dict) { | 249 | if (dict) { |
| 250 | plist_free(dict); | 250 | plist_free(dict); |
| 251 | } | 251 | } |
| 252 | sbs_unlock(client); | 252 | sbservices_unlock(client); |
| 253 | return res; | 253 | return res; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| @@ -263,7 +263,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_home_screen_wallpaper_png | |||
| 263 | plist_t dict = plist_new_dict(); | 263 | plist_t dict = plist_new_dict(); |
| 264 | plist_dict_set_item(dict, "command", plist_new_string("getHomeScreenWallpaperPNGData")); | 264 | plist_dict_set_item(dict, "command", plist_new_string("getHomeScreenWallpaperPNGData")); |
| 265 | 265 | ||
| 266 | sbs_lock(client); | 266 | sbservices_lock(client); |
| 267 | 267 | ||
| 268 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); | 268 | res = sbservices_error(property_list_service_send_binary_plist(client->parent, dict)); |
| 269 | if (res != SBSERVICES_E_SUCCESS) { | 269 | if (res != SBSERVICES_E_SUCCESS) { |
| @@ -285,6 +285,6 @@ leave_unlock: | |||
| 285 | if (dict) { | 285 | if (dict) { |
| 286 | plist_free(dict); | 286 | plist_free(dict); |
| 287 | } | 287 | } |
| 288 | sbs_unlock(client); | 288 | sbservices_unlock(client); |
| 289 | return res; | 289 | return res; |
| 290 | } | 290 | } |
