~ubuntu-branches/ubuntu/trusty/libimobiledevice/trusty-proposed

« back to all changes in this revision

Viewing changes to include/libimobiledevice/mobilebackup2.h

  • Committer: Package Import Robot
  • Author(s): Julien Lavergne
  • Date: 2011-09-16 00:01:44 UTC
  • mfrom: (1.1.8 upstream) (6.1.6 experimental)
  • Revision ID: package-import@ubuntu.com-20110916000144-13otcnnzl0rapoly
Tags: 1.1.1-2
* Upload to unstable, most of the API should be stable now.
* debian/patches/
 - 02-add-missing-linking.patch: Refresh
 - 03_ac_pkg_swig_m4_fixed.patch: Fix building python bindings. Thanks
   Sebastian Ramacher for the patch (Closes: #631821).
 - 04_libplist_DSO_linking.patch: Add libplist to LDFLAGS.
* debian/control:
 - Build-depends on dh-autoreconf for 03_ac_pkg_swig_m4_fixed.patch.
 - Add DM-Upload-Allowed: yes
* debian/rules:
 - Run dh --with autoreconf for 03_ac_pkg_swig_m4_fixed.patch.
 - Remove .la files for python bindings also.
 - Remove .a files from python bindings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file libimobiledevice/mobilebackup2.h
 
3
 * @brief Backup and restore of all device data (mobilebackup2, iOS4+ only)
 
4
 * \internal
 
5
 *
 
6
 * Copyright (c) 2010 Nikias Bassen All Rights Reserved.
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2.1 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library; if not, write to the Free Software
 
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
21
 */
 
22
 
 
23
#ifndef IMOBILEBACKUP2_H
 
24
#define IMOBILEBACKUP2_H
 
25
 
 
26
#ifdef __cplusplus
 
27
extern "C" {
 
28
#endif
 
29
 
 
30
#include <libimobiledevice/libimobiledevice.h>
 
31
 
 
32
/** @name Error Codes */
 
33
/*@{*/
 
34
#define MOBILEBACKUP2_E_SUCCESS                0
 
35
#define MOBILEBACKUP2_E_INVALID_ARG           -1
 
36
#define MOBILEBACKUP2_E_PLIST_ERROR           -2
 
37
#define MOBILEBACKUP2_E_MUX_ERROR             -3
 
38
#define MOBILEBACKUP2_E_BAD_VERSION           -4
 
39
#define MOBILEBACKUP2_E_REPLY_NOT_OK          -5
 
40
#define MOBILEBACKUP2_E_NO_COMMON_VERSION     -6
 
41
 
 
42
#define MOBILEBACKUP2_E_UNKNOWN_ERROR       -256
 
43
/*@}*/
 
44
 
 
45
/** Represents an error code. */
 
46
typedef int16_t mobilebackup2_error_t;
 
47
 
 
48
typedef struct mobilebackup2_client_private mobilebackup2_client_private;
 
49
typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */
 
50
 
 
51
mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, uint16_t port, mobilebackup2_client_t * client);
 
52
mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client);
 
53
mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage);
 
54
mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes);
 
55
mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes);
 
56
mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version);
 
57
mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options);
 
58
mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2);
 
59
 
 
60
#ifdef __cplusplus
 
61
}
 
62
#endif
 
63
 
 
64
#endif