diff options
| author | 2014-03-27 10:07:09 -0400 | |
|---|---|---|
| committer | 2014-03-27 21:40:43 -0400 | |
| commit | 2342dc5b4ef148b993fbe3816f3facdef8365546 (patch) | |
| tree | 69f812d91b2fc07db0fad5dcba6c80d2f8b6849e /include/libimobiledevice/sbservices.h | |
| parent | ee82e861a8c942b5013accd7589cf898d1f97167 (diff) | |
| download | libimobiledevice-2342dc5b4ef148b993fbe3816f3facdef8365546.tar.gz libimobiledevice-2342dc5b4ef148b993fbe3816f3facdef8365546.tar.bz2 | |
Moved Doxygen comments from source files to public headers.
Conflicts:
include/libimobiledevice/afc.h
Diffstat (limited to 'include/libimobiledevice/sbservices.h')
| -rw-r--r-- | include/libimobiledevice/sbservices.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/include/libimobiledevice/sbservices.h b/include/libimobiledevice/sbservices.h index f9d131b..f0bf2c4 100644 --- a/include/libimobiledevice/sbservices.h +++ b/include/libimobiledevice/sbservices.h | |||
| @@ -60,14 +60,116 @@ typedef struct sbservices_client_private sbservices_client_private; | |||
| 60 | typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */ | 60 | typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */ |
| 61 | 61 | ||
| 62 | /* Interface */ | 62 | /* Interface */ |
| 63 | |||
| 64 | /** | ||
| 65 | * Connects to the springboardservices service on the specified device. | ||
| 66 | * | ||
| 67 | * @param device The device to connect to. | ||
| 68 | * @param service The service descriptor returned by lockdownd_start_service. | ||
| 69 | * @param client Pointer that will point to a newly allocated | ||
| 70 | * sbservices_client_t upon successful return. | ||
| 71 | * | ||
| 72 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | ||
| 73 | * client is NULL, or an SBSERVICES_E_* error code otherwise. | ||
| 74 | */ | ||
| 63 | sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client); | 75 | sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client); |
| 76 | |||
| 77 | /** | ||
| 78 | * Starts a new sbservices service on the specified device and connects to it. | ||
| 79 | * | ||
| 80 | * @param device The device to connect to. | ||
| 81 | * @param client Pointer that will point to a newly allocated | ||
| 82 | * sbservices_client_t upon successful return. Must be freed using | ||
| 83 | * sbservices_client_free() after use. | ||
| 84 | * @param label The label to use for communication. Usually the program name. | ||
| 85 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 86 | * | ||
| 87 | * @return SBSERVICES_E_SUCCESS on success, or an SBSERVICES_E_* error | ||
| 88 | * code otherwise. | ||
| 89 | */ | ||
| 64 | sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t* client, const char* label); | 90 | sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t* client, const char* label); |
| 91 | |||
| 92 | /** | ||
| 93 | * Disconnects an sbservices client from the device and frees up the | ||
| 94 | * sbservices client data. | ||
| 95 | * | ||
| 96 | * @param client The sbservices client to disconnect and free. | ||
| 97 | * | ||
| 98 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | ||
| 99 | * client is NULL, or an SBSERVICES_E_* error code otherwise. | ||
| 100 | */ | ||
| 65 | sbservices_error_t sbservices_client_free(sbservices_client_t client); | 101 | sbservices_error_t sbservices_client_free(sbservices_client_t client); |
| 66 | 102 | ||
| 103 | |||
| 104 | /** | ||
| 105 | * Gets the icon state of the connected device. | ||
| 106 | * | ||
| 107 | * @param client The connected sbservices client to use. | ||
| 108 | * @param state Pointer that will point to a newly allocated plist containing | ||
| 109 | * the current icon state. It is up to the caller to free the memory. | ||
| 110 | * @param format_version A string to be passed as formatVersion along with | ||
| 111 | * the request, or NULL if no formatVersion should be passed. This is only | ||
| 112 | * supported since iOS 4.0 so for older firmware versions this must be set | ||
| 113 | * to NULL. | ||
| 114 | * | ||
| 115 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | ||
| 116 | * client or state is invalid, or an SBSERVICES_E_* error code otherwise. | ||
| 117 | */ | ||
| 67 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version); | 118 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version); |
| 119 | |||
| 120 | /** | ||
| 121 | * Sets the icon state of the connected device. | ||
| 122 | * | ||
| 123 | * @param client The connected sbservices client to use. | ||
| 124 | * @param newstate A plist containing the new iconstate. | ||
| 125 | * | ||
| 126 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | ||
| 127 | * client or newstate is NULL, or an SBSERVICES_E_* error code otherwise. | ||
| 128 | */ | ||
| 68 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); | 129 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); |
| 130 | |||
| 131 | /** | ||
| 132 | * Get the icon of the specified app as PNG data. | ||
| 133 | * | ||
| 134 | * @param client The connected sbservices client to use. | ||
| 135 | * @param bundleId The bundle identifier of the app to retrieve the icon for. | ||
| 136 | * @param pngdata Pointer that will point to a newly allocated buffer | ||
| 137 | * containing the PNG data upon successful return. It is up to the caller | ||
| 138 | * to free the memory. | ||
| 139 | * @param pngsize Pointer to a uint64_t that will be set to the size of the | ||
| 140 | * buffer pngdata points to upon successful return. | ||
| 141 | * | ||
| 142 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | ||
| 143 | * client, bundleId, or pngdata are invalid, or an SBSERVICES_E_* error | ||
| 144 | * code otherwise. | ||
| 145 | */ | ||
| 69 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize); | 146 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize); |
| 147 | |||
| 148 | /** | ||
| 149 | * Gets the interface orientation of the device. | ||
| 150 | * | ||
| 151 | * @param client The connected sbservices client to use. | ||
| 152 | * @param interface_orientation The interface orientation upon successful return. | ||
| 153 | * | ||
| 154 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | ||
| 155 | * client or state is invalid, or an SBSERVICES_E_* error code otherwise. | ||
| 156 | */ | ||
| 70 | sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation); | 157 | sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation); |
| 158 | |||
| 159 | /** | ||
| 160 | * Get the home screen wallpaper as PNG data. | ||
| 161 | * | ||
| 162 | * @param client The connected sbservices client to use. | ||
| 163 | * @param pngdata Pointer that will point to a newly allocated buffer | ||
| 164 | * containing the PNG data upon successful return. It is up to the caller | ||
| 165 | * to free the memory. | ||
| 166 | * @param pngsize Pointer to a uint64_t that will be set to the size of the | ||
| 167 | * buffer pngdata points to upon successful return. | ||
| 168 | * | ||
| 169 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | ||
| 170 | * client or pngdata are invalid, or an SBSERVICES_E_* error | ||
| 171 | * code otherwise. | ||
| 172 | */ | ||
| 71 | sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize); | 173 | sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize); |
| 72 | 174 | ||
| 73 | #ifdef __cplusplus | 175 | #ifdef __cplusplus |
