libimobiledevice 1.3.0

Typedefs | Enumerations | Functions
property_list_service.h File Reference

Definitions for the PropertyList service. More...

## Typedefs
typedef struct property_list_service_client_private | property_list_service_private
typedef property_list_service_private * | property_list_service_client_t
| The client handle.

## Enumerations
enum | property_list_service_error_t { PROPERTY_LIST_SERVICE_E_SUCCESS = 0, PROPERTY_LIST_SERVICE_E_INVALID_ARG = -1, PROPERTY_LIST_SERVICE_E_PLIST_ERROR = -2, PROPERTY_LIST_SERVICE_E_MUX_ERROR = -3, PROPERTY_LIST_SERVICE_E_SSL_ERROR = -4, PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT = -5, PROPERTY_LIST_SERVICE_E_NOT_ENOUGH_DATA = -6, PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR = -256 }

## Functions
property_list_service_error_t | property_list_service_client_new (idevice_t device, lockdownd_service_descriptor_t service, property_list_service_client_t *client)
| Creates a new property list service for the specified port. More...
property_list_service_error_t | property_list_service_client_free (property_list_service_client_t client)
| Frees a PropertyList service. More...
property_list_service_error_t | property_list_service_send_xml_plist (property_list_service_client_t client, plist_t plist)
| Sends an XML plist. More...
property_list_service_error_t | property_list_service_send_binary_plist (property_list_service_client_t client, plist_t plist)
| Sends a binary plist. More...
property_list_service_error_t | property_list_service_receive_plist_with_timeout (property_list_service_client_t client, plist_t *plist, unsigned int timeout)
| Receives a plist using the given property list service client with specified timeout. More...
property_list_service_error_t | property_list_service_receive_plist (property_list_service_client_t client, plist_t *plist)
| Receives a plist using the given property list service client. More...
property_list_service_error_t | property_list_service_enable_ssl (property_list_service_client_t client)
| Enable SSL for the given property list service client. More...
property_list_service_error_t | property_list_service_disable_ssl (property_list_service_client_t client)
| Disable SSL for the given property list service client. More...

## Detailed Description

Definitions for the PropertyList service.

## Function Documentation

## ◆ property_list_service_client_free()

property_list_service_error_t property_list_service_client_free | ( | property_list_service_client_t | client | ) |

Frees a PropertyList service.

Parameters

  client | The property list service to free.

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG when client is invalid, or a PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when another error occurred.

## ◆ property_list_service_client_new()

property_list_service_error_t property_list_service_client_new | ( | idevice_t | device,
|  | lockdownd_service_descriptor_t | service,
|  | property_list_service_client_t * | client
| ) |  |

Creates a new property list service for the specified port.

Parameters

  device | The device to connect to.
  service | The service descriptor returned by lockdownd_start_service.
  client | Pointer that will be set to a newly allocated property_list_service_client_t upon successful return.

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG when one of the arguments is invalid, or PROPERTY_LIST_SERVICE_E_MUX_ERROR when connecting to the device failed.

## ◆ property_list_service_disable_ssl()

property_list_service_error_t property_list_service_disable_ssl | ( | property_list_service_client_t | client | ) |

Disable SSL for the given property list service client.

Parameters

  client | The connected property list service client for which SSL should be disabled.

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is NULL, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.

## ◆ property_list_service_enable_ssl()

property_list_service_error_t property_list_service_enable_ssl | ( | property_list_service_client_t | client | ) |

Enable SSL for the given property list service client.

Parameters

  client | The connected property list service client for which SSL should be enabled.

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is NULL, PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.

## ◆ property_list_service_receive_plist()

property_list_service_error_t property_list_service_receive_plist | ( | property_list_service_client_t | client,
|  | plist_t * | plist
| ) |  |

Receives a plist using the given property list service client.

Binary or XML plists are automatically handled.

This function is like property_list_service_receive_plist_with_timeout using a timeout of 10 seconds.

See also
  property_list_service_receive_plist_with_timeout

Parameters

  client | The property list service client to use for receiving
  plist | pointer to a plist_t that will point to the received plist upon successful return

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or *plist is NULL, PROPERTY_LIST_SERVICE_E_NOT_ENOUGH_DATA when not enough data received, PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT when the connection times out, PROPERTY_LIST_SERVICE_E_PLIST_ERROR when the received data cannot be converted to a plist, PROPERTY_LIST_SERVICE_E_MUX_ERROR when a communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs.

## ◆ property_list_service_receive_plist_with_timeout()

property_list_service_error_t property_list_service_receive_plist_with_timeout | ( | property_list_service_client_t | client,
|  | plist_t * | plist,
|  | unsigned int | timeout
| ) |  |

Receives a plist using the given property list service client with specified timeout.

Binary or XML plists are automatically handled.

Parameters

  client | The property list service client to use for receiving
  plist | pointer to a plist_t that will point to the received plist upon successful return
  timeout | Maximum time in milliseconds to wait for data.

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG when connection or *plist is NULL, PROPERTY_LIST_SERVICE_E_PLIST_ERROR when the received data cannot be converted to a plist, PROPERTY_LIST_SERVICE_E_MUX_ERROR when a communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs.

## ◆ property_list_service_send_binary_plist()

property_list_service_error_t property_list_service_send_binary_plist | ( | property_list_service_client_t | client,
|  | plist_t | plist
| ) |  |

Sends a binary plist.

Parameters

  client | The property list service client to use for sending.
  plist | plist to send

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or plist is NULL, PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs.

## ◆ property_list_service_send_xml_plist()

property_list_service_error_t property_list_service_send_xml_plist | ( | property_list_service_client_t | client,
|  | plist_t | plist
| ) |  |

Sends an XML plist.

Parameters

  client | The property list service client to use for sending.
  plist | plist to send

Returns
  PROPERTY_LIST_SERVICE_E_SUCCESS on success, PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or plist is NULL, PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs.