summaryrefslogtreecommitdiffstats
path: root/src/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/client.h b/src/client.h
new file mode 100644
index 0000000..6cac4db
--- /dev/null
+++ b/src/client.h
@@ -0,0 +1,47 @@
1/*
2 * client.h
3 *
4 * Copyright (C) 2009 Hector Martin <hector@marcansoft.com>
5 * Copyright (C) 2009 Nikias Bassen <nikias@gmx.li>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 2 or version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef CLIENT_H
22#define CLIENT_H
23
24#include <stdint.h>
25#include "usbmuxd-proto.h"
26
27struct device_info;
28struct mux_client;
29
30int client_read(struct mux_client *client, void *buffer, uint32_t len);
31int client_write(struct mux_client *client, void *buffer, uint32_t len);
32int client_set_events(struct mux_client *client, short events);
33void client_close(struct mux_client *client);
34int client_notify_connect(struct mux_client *client, enum usbmuxd_result result);
35
36void client_device_add(struct device_info *dev);
37void client_device_remove(int device_id);
38void client_device_paired(int device_id);
39
40int client_accept(int fd);
41void client_get_fds(struct fdlist *list);
42void client_process(int fd, short events);
43
44void client_init(void);
45void client_shutdown(void);
46
47#endif