From f364f1984e3d3ea2baa18ec7e939f912ddc06dbf Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Wed, 17 Feb 2010 16:25:51 +0100 Subject: New mobile_image_mounter interface plus ideviceimagemounter tool --- include/libimobiledevice/mobile_image_mounter.h | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 include/libimobiledevice/mobile_image_mounter.h (limited to 'include/libimobiledevice') diff --git a/include/libimobiledevice/mobile_image_mounter.h b/include/libimobiledevice/mobile_image_mounter.h new file mode 100644 index 0000000..63dcb14 --- /dev/null +++ b/include/libimobiledevice/mobile_image_mounter.h @@ -0,0 +1,56 @@ +/** + * @file libimobiledevice/mobile_image_mounter.h + * @brief Implementation of the mobile image mounter service. + * \internal + * + * Copyright (c) 2010 Nikias Bassen All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef MOBILE_IMAGE_MOUNTER_H +#define MOBILE_IMAGE_MOUNTER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* Error Codes */ +#define MOBILE_IMAGE_MOUNTER_E_SUCCESS 0 +#define MOBILE_IMAGE_MOUNTER_E_INVALID_ARG -1 +#define MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR -2 +#define MOBILE_IMAGE_MOUNTER_E_CONN_FAILED -3 + +#define MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR -256 + +typedef int16_t mobile_image_mounter_error_t; + +struct mobile_image_mounter_client_int; +typedef struct mobile_image_mounter_client_int *mobile_image_mounter_client_t; + +/* Interface */ +mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, uint16_t port, mobile_image_mounter_client_t *client); +mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client); +mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result); +mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result); +mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.1-32-gdbae