diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libirecovery.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index d30dd73..2ef1ae3 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h @@ -19,6 +19,10 @@ #ifndef LIBIRECOVERY_H #define LIBIRECOVERY_H +#ifdef __cplusplus +extern "C" { +#endif + #include <libusb-1.0/libusb.h> #define APPLE_VENDOR_ID 0x05AC @@ -80,25 +84,29 @@ struct irecv_client { irecv_event_cb_t disconnected_callback; }; -irecv_error_t irecv_event_subscribe(irecv_client_t client, irecv_event_type type, irecv_event_cb_t callback, void *user_data); -irecv_error_t irecv_event_unsubscribe(irecv_client_t client, irecv_event_type type); -irecv_error_t irecv_setenv(irecv_client_t client, const char* variable, const char* value); +void irecv_set_debug_level(int level); +const char* irecv_strerror(irecv_error_t error); irecv_error_t irecv_open(irecv_client_t* client); irecv_error_t irecv_reset(irecv_client_t client); irecv_error_t irecv_close(irecv_client_t client); irecv_error_t irecv_receive(irecv_client_t client); irecv_error_t irecv_send_exploit(irecv_client_t client); -void irecv_set_debug_level(int level); -irecv_error_t irecv_execute_script(irecv_client_t client, const char* filename); -irecv_error_t irecv_getenv(irecv_client_t client, const char* variable, char** value); irecv_error_t irecv_get_cpid(irecv_client_t client, unsigned int* cpid); irecv_error_t irecv_get_bdid(irecv_client_t client, unsigned int* bdid); -irecv_error_t irecv_get_ecid(irecv_client_t client, unsigned long long* ecid); irecv_error_t irecv_send_file(irecv_client_t client, const char* filename); +irecv_error_t irecv_get_ecid(irecv_client_t client, unsigned long long* ecid); +irecv_error_t irecv_execute_script(irecv_client_t client, const char* filename); irecv_error_t irecv_send_command(irecv_client_t client, unsigned char* command); irecv_error_t irecv_set_configuration(irecv_client_t client, int configuration); +irecv_error_t irecv_event_unsubscribe(irecv_client_t client, irecv_event_type type); +irecv_error_t irecv_getenv(irecv_client_t client, const char* variable, char** value); +irecv_error_t irecv_setenv(irecv_client_t client, const char* variable, const char* value); irecv_error_t irecv_set_interface(irecv_client_t client, int interface, int alt_interface); irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* buffer, unsigned int length); -const char* irecv_strerror(irecv_error_t error); +irecv_error_t irecv_event_subscribe(irecv_client_t client, irecv_event_type type, irecv_event_cb_t callback, void *user_data); + +#ifdef __cplusplus +} +#endif #endif |