diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/installation_proxy.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index e279edf..3d9d314 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -578,6 +578,27 @@ LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, . | |||
| 578 | va_end(args); | 578 | va_end(args); |
| 579 | } | 579 | } |
| 580 | 580 | ||
| 581 | LIBIMOBILEDEVICE_API void instproxy_client_options_set_return_attributes(plist_t client_options, ...) | ||
| 582 | { | ||
| 583 | if (!client_options) | ||
| 584 | return; | ||
| 585 | |||
| 586 | plist_t return_attributes = plist_new_array(); | ||
| 587 | |||
| 588 | va_list args; | ||
| 589 | va_start(args, client_options); | ||
| 590 | char *arg = va_arg(args, char*); | ||
| 591 | while (arg) { | ||
| 592 | char *attribute = strdup(arg); | ||
| 593 | plist_array_append_item(return_attributes, plist_new_string(attribute)); | ||
| 594 | free(attribute); | ||
| 595 | arg = va_arg(args, char*); | ||
| 596 | } | ||
| 597 | va_end(args); | ||
| 598 | |||
| 599 | plist_dict_set_item(client_options, "ReturnAttributes", return_attributes); | ||
| 600 | } | ||
| 601 | |||
| 581 | LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options) | 602 | LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options) |
| 582 | { | 603 | { |
| 583 | if (client_options) { | 604 | if (client_options) { |
