diff options
Diffstat (limited to 'cython/installation_proxy.pxi')
| -rw-r--r-- | cython/installation_proxy.pxi | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cython/installation_proxy.pxi b/cython/installation_proxy.pxi index ff541df..d2d9b38 100644 --- a/cython/installation_proxy.pxi +++ b/cython/installation_proxy.pxi | |||
| @@ -15,6 +15,7 @@ cdef extern from "libimobiledevice/installation_proxy.h": | |||
| 15 | 15 | ||
| 16 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t descriptor, instproxy_client_t *client) | 16 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t descriptor, instproxy_client_t *client) |
| 17 | instproxy_error_t instproxy_client_free(instproxy_client_t client) | 17 | instproxy_error_t instproxy_client_free(instproxy_client_t client) |
| 18 | instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path) | ||
| 18 | 19 | ||
| 19 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist.plist_t client_options, plist.plist_t *result) | 20 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist.plist_t client_options, plist.plist_t *result) |
| 20 | instproxy_error_t instproxy_install(instproxy_client_t client, char *pkg_path, plist.plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 21 | instproxy_error_t instproxy_install(instproxy_client_t client, char *pkg_path, plist.plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
| @@ -59,6 +60,24 @@ cdef class InstallationProxyClient(PropertyListService): | |||
| 59 | err = instproxy_client_free(self._c_client) | 60 | err = instproxy_client_free(self._c_client) |
| 60 | self.handle_error(err) | 61 | self.handle_error(err) |
| 61 | 62 | ||
| 63 | cpdef get_path_for_bundle_identifier(self, bytes bundle_id): | ||
| 64 | cdef: | ||
| 65 | char* c_bundle_id = bundle_id | ||
| 66 | char* c_path = NULL | ||
| 67 | bytes result | ||
| 68 | |||
| 69 | try: | ||
| 70 | self.handle_error(instproxy_client_get_path_for_bundle_identifier(self._c_client, c_bundle_id, &c_path)) | ||
| 71 | if c_path != NULL: | ||
| 72 | result = c_path | ||
| 73 | return result | ||
| 74 | else: | ||
| 75 | return None | ||
| 76 | except BaseError, e: | ||
| 77 | raise | ||
| 78 | finally: | ||
| 79 | free(c_path) | ||
| 80 | |||
| 62 | cpdef plist.Node browse(self, object client_options): | 81 | cpdef plist.Node browse(self, object client_options): |
| 63 | cdef: | 82 | cdef: |
| 64 | plist.Node options | 83 | plist.Node options |
