diff options
author | Nikias Bassen | 2010-07-12 11:30:12 +0200 |
---|---|---|
committer | Nikias Bassen | 2010-07-12 11:30:12 +0200 |
commit | aa25d87ae9b166919cf2ac273e673ac35333accc (patch) | |
tree | 574afd73fef339d91d71bd12d51cb9bd3d1b5d88 /src | |
parent | 31ec3f32bb828a5851f920c51c8e8e6b8f1f682b (diff) | |
download | libimobiledevice-aa25d87ae9b166919cf2ac273e673ac35333accc.tar.gz libimobiledevice-aa25d87ae9b166919cf2ac273e673ac35333accc.tar.bz2 |
sbservices: allow passing formatVersion when requesting icon state
Diffstat (limited to 'src')
-rw-r--r-- | src/sbservices.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sbservices.c b/src/sbservices.c index e6342d1..3596cbd 100644 --- a/src/sbservices.c +++ b/src/sbservices.c @@ -140,11 +140,15 @@ sbservices_error_t sbservices_client_free(sbservices_client_t client) * @param client The connected sbservices client to use. * @param state Pointer that will point to a newly allocated plist containing * the current icon state. It is up to the caller to free the memory. + * @param format_version A string to be passed as formatVersion along with + * the request, or NULL if no formatVersion should be passed. This is only + * supported since iOS 4.0 so for older firmware versions this must be set + * to NULL. * * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when * client or state is invalid, or an SBSERVICES_E_* error code otherwise. */ -sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state) +sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version) { if (!client || !client->parent || !state) return SBSERVICES_E_INVALID_ARG; @@ -153,6 +157,9 @@ sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t plist_t dict = plist_new_dict(); plist_dict_insert_item(dict, "command", plist_new_string("getIconState")); + if (format_version) { + plist_dict_insert_item(dict, "formatVersion", plist_new_string(format_version)); + } sbs_lock(client); |