summaryrefslogtreecommitdiffstats
path: root/lockdown.h
diff options
context:
space:
mode:
authorGravatar Zach C2008-07-29 01:11:02 -0700
committerGravatar Matt Colyer2008-07-29 01:11:02 -0700
commite2ff1128351d75eafd5426af7f96f9719c1af3e6 (patch)
treec1c460b4de78cd5645d6d12e83d2646f56f30363 /lockdown.h
downloadlibimobiledevice-e2ff1128351d75eafd5426af7f96f9719c1af3e6.tar.gz
libimobiledevice-e2ff1128351d75eafd5426af7f96f9719c1af3e6.tar.bz2
First released version, 0.089.
Diffstat (limited to 'lockdown.h')
-rw-r--r--lockdown.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/lockdown.h b/lockdown.h
new file mode 100644
index 0000000..0acd624
--- /dev/null
+++ b/lockdown.h
@@ -0,0 +1,36 @@
+/*
+ * lockdown.h
+ * Defines lockdown stuff, like the client struct.
+ */
+
+#ifndef LOCKDOWND_H
+#define LOCKDOWND_H
+
+#include "plist.h"
+
+#include <gnutls/gnutls.h>
+#include <string.h>
+
+typedef struct {
+ usbmux_tcp_header *connection;
+ gnutls_session_t *ssl_session;
+ iPhone *iphone;
+ int in_SSL;
+ char *gtls_buffer_hack;
+ int gtls_buffer_hack_len;
+} lockdownd_client;
+
+lockdownd_client *new_lockdownd_client(iPhone *phone);
+int lockdownd_hello(lockdownd_client *control);
+int lockdownd_recv(lockdownd_client *control, char **dump_data);
+int lockdownd_send(lockdownd_client *control, char *raw_data, uint32 length);
+void lockdownd_close(lockdownd_client *control);
+
+// SSL functions
+int lockdownd_start_SSL_session(lockdownd_client *control, const char *HostID);
+ssize_t lockdownd_securead(gnutls_transport_ptr_t transport, char *buffer, size_t length);
+ssize_t lockdownd_secuwrite(gnutls_transport_ptr_t transport, char *buffer, size_t length);
+
+// Higher-level lockdownd stuff
+int lockdownd_start_service(lockdownd_client *control, const char *service);
+#endif