diff options
Diffstat (limited to 'src/reverse_proxy.h')
-rw-r--r-- | src/reverse_proxy.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/reverse_proxy.h b/src/reverse_proxy.h new file mode 100644 index 0000000..17eabac --- /dev/null +++ b/src/reverse_proxy.h | |||
@@ -0,0 +1,50 @@ | |||
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 "libimobiledevice/reverse_proxy.h" | ||
26 | #include "service.h" | ||
27 | |||
28 | struct reverse_proxy_client_private { | ||
29 | service_client_t parent; | ||
30 | char* label; | ||
31 | int type; | ||
32 | int protoversion; | ||
33 | THREAD_T th_ctrl; | ||
34 | uint16_t conn_port; | ||
35 | reverse_proxy_log_cb_t log_cb; | ||
36 | void* log_cb_user_data; | ||
37 | reverse_proxy_data_cb_t data_cb; | ||
38 | void* data_cb_user_data; | ||
39 | reverse_proxy_status_cb_t status_cb; | ||
40 | void* status_cb_user_data; | ||
41 | }; | ||
42 | |||
43 | reverse_proxy_error_t reverse_proxy_send(reverse_proxy_client_t client, const char* data, uint32_t len, uint32_t* sent); | ||
44 | reverse_proxy_error_t reverse_proxy_receive(reverse_proxy_client_t client, char* buffer, uint32_t len, uint32_t* received); | ||
45 | 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); | ||
46 | reverse_proxy_error_t reverse_proxy_send_plist(reverse_proxy_client_t client, plist_t plist); | ||
47 | reverse_proxy_error_t reverse_proxy_receive_plist(reverse_proxy_client_t client, plist_t* plist); | ||
48 | reverse_proxy_error_t reverse_proxy_receive_plist_with_timeout(reverse_proxy_client_t client, plist_t * plist, uint32_t timeout_ms); | ||
49 | |||
50 | #endif | ||