diff options
Diffstat (limited to 'src/screenshotr.c')
| -rw-r--r-- | src/screenshotr.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/screenshotr.c b/src/screenshotr.c index a1b5759..e92fe9f 100644 --- a/src/screenshotr.c +++ b/src/screenshotr.c | |||
| @@ -58,21 +58,6 @@ static screenshotr_error_t screenshotr_error(device_link_service_error_t err) | |||
| 58 | return SCREENSHOTR_E_UNKNOWN_ERROR; | 58 | return SCREENSHOTR_E_UNKNOWN_ERROR; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | /** | ||
| 62 | * Connects to the screenshotr service on the specified device. | ||
| 63 | * | ||
| 64 | * @param device The device to connect to. | ||
| 65 | * @param service The service descriptor returned by lockdownd_start_service. | ||
| 66 | * @param client Pointer that will be set to a newly allocated | ||
| 67 | * screenshotr_client_t upon successful return. | ||
| 68 | * | ||
| 69 | * @note This service is only available if a developer disk image has been | ||
| 70 | * mounted. | ||
| 71 | * | ||
| 72 | * @return SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID ARG if one | ||
| 73 | * or more parameters are invalid, or SCREENSHOTR_E_CONN_FAILED if the | ||
| 74 | * connection to the device could not be established. | ||
| 75 | */ | ||
| 76 | screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 61 | screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 77 | screenshotr_client_t * client) | 62 | screenshotr_client_t * client) |
| 78 | { | 63 | { |
| @@ -101,19 +86,6 @@ screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_d | |||
| 101 | return ret; | 86 | return ret; |
| 102 | } | 87 | } |
| 103 | 88 | ||
| 104 | /** | ||
| 105 | * Starts a new screenshotr service on the specified device and connects to it. | ||
| 106 | * | ||
| 107 | * @param device The device to connect to. | ||
| 108 | * @param client Pointer that will point to a newly allocated | ||
| 109 | * screenshotr_client_t upon successful return. Must be freed using | ||
| 110 | * screenshotr_client_free() after use. | ||
| 111 | * @param label The label to use for communication. Usually the program name. | ||
| 112 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 113 | * | ||
| 114 | * @return SCREENSHOTR_E_SUCCESS on success, or an SCREENSHOTR_E_* error | ||
| 115 | * code otherwise. | ||
| 116 | */ | ||
| 117 | screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t * client, const char* label) | 89 | screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t * client, const char* label) |
| 118 | { | 90 | { |
| 119 | screenshotr_error_t err = SCREENSHOTR_E_UNKNOWN_ERROR; | 91 | screenshotr_error_t err = SCREENSHOTR_E_UNKNOWN_ERROR; |
| @@ -121,15 +93,6 @@ screenshotr_error_t screenshotr_client_start_service(idevice_t device, screensho | |||
| 121 | return err; | 93 | return err; |
| 122 | } | 94 | } |
| 123 | 95 | ||
| 124 | /** | ||
| 125 | * Disconnects a screenshotr client from the device and frees up the | ||
| 126 | * screenshotr client data. | ||
| 127 | * | ||
| 128 | * @param client The screenshotr client to disconnect and free. | ||
| 129 | * | ||
| 130 | * @return SCREENSHOTR_E_SUCCESS on success, or SCREENSHOTR_E_INVALID_ARG | ||
| 131 | * if client is NULL. | ||
| 132 | */ | ||
| 133 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) | 96 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) |
| 134 | { | 97 | { |
| 135 | if (!client) | 98 | if (!client) |
| @@ -140,20 +103,6 @@ screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) | |||
| 140 | return err; | 103 | return err; |
| 141 | } | 104 | } |
| 142 | 105 | ||
| 143 | /** | ||
| 144 | * Get a screen shot from the connected device. | ||
| 145 | * | ||
| 146 | * @param client The connection screenshotr service client. | ||
| 147 | * @param imgdata Pointer that will point to a newly allocated buffer | ||
| 148 | * containing TIFF image data upon successful return. It is up to the | ||
| 149 | * caller to free the memory. | ||
| 150 | * @param imgsize Pointer to a uint64_t that will be set to the size of the | ||
| 151 | * buffer imgdata points to upon successful return. | ||
| 152 | * | ||
| 153 | * @return SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID_ARG if | ||
| 154 | * one or more parameters are invalid, or another error code if an | ||
| 155 | * error occured. | ||
| 156 | */ | ||
| 157 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize) | 106 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize) |
| 158 | { | 107 | { |
| 159 | if (!client || !client->parent || !imgdata) | 108 | if (!client || !client->parent || !imgdata) |
