diff options
Diffstat (limited to 'src/reverse_proxy.h')
-rw-r--r-- | src/reverse_proxy.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/reverse_proxy.h b/src/reverse_proxy.h new file mode 100644 index 0000000..7f441bd --- /dev/null +++ b/src/reverse_proxy.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * reverse_proxy.h | ||
3 | * com.apple.PurpleReverseProxy service header file. | ||
4 | * | ||
5 | * Copyright (c) 2021 Nikias Bassen, All Rights Reserved. | ||
6 | * | ||
7 | * This library is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU Lesser General Public | ||
9 | * License as published by the Free Software Foundation; either | ||
10 | * version 2.1 of the License, or (at your option) any later version. | ||
11 | * | ||
12 | * This library is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * Lesser General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with this library; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | */ | ||
21 | |||
22 | #ifndef __REVERSE_PROXY_H | ||
23 | #define __REVERSE_PROXY_H | ||
24 | |||
25 | #include "idevice.h" | ||
26 | #include "libimobiledevice/reverse_proxy.h" | ||
27 | #include "service.h" | ||
28 | |||
29 | struct reverse_proxy_client_private { | ||
30 | service_client_t parent; | ||
31 | char* label; | ||
32 | int type; | ||
33 | int protoversion; | ||
34 | THREAD_T th_ctrl; | ||
35 | uint16_t conn_port; | ||
36 | reverse_proxy_log_cb_t log_cb; | ||
37 | void* log_cb_user_data; | ||
38 | reverse_proxy_data_cb_t data_cb; | ||
39 | void* data_cb_user_data; | ||
40 | reverse_proxy_status_cb_t status_cb; | ||
41 | void* status_cb_user_data; | ||
42 | }; | ||
43 | |||
44 | reverse_proxy_error_t reverse_proxy_send(reverse_proxy_client_t client, const char* data, uint32_t len, uint32_t* sent); | ||
45 | reverse_proxy_error_t reverse_proxy_receive(reverse_proxy_client_t client, char* buffer, uint32_t len, uint32_t* received); | ||
46 | reverse_proxy_error_t reverse_proxy_receive_with_timeout(reverse_proxy_client_t client, char* buffer, uint32_t len, uint32_t* received, unsigned int timeout); | ||
47 | reverse_proxy_error_t reverse_proxy_send_plist(reverse_proxy_client_t client, plist_t plist); | ||
48 | reverse_proxy_error_t reverse_proxy_receive_plist(reverse_proxy_client_t client, plist_t* plist); | ||
49 | reverse_proxy_error_t reverse_proxy_receive_plist_with_timeout(reverse_proxy_client_t client, plist_t * plist, uint32_t timeout_ms); | ||
50 | |||
51 | #endif | ||