summaryrefslogtreecommitdiffstats
path: root/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'device.c')
-rw-r--r--device.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/device.c b/device.c
new file mode 100644
index 0000000..659f4ae
--- /dev/null
+++ b/device.c
@@ -0,0 +1,56 @@
1/*
2 usbmuxd - iPhone/iPod Touch USB multiplex server daemon
3
4Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com>
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 2 or version 3.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19*/
20
21#ifdef HAVE_CONFIG_H
22#include <config.h>
23#endif
24
25#include <stdlib.h>
26#include "device.h"
27#include "usb.h"
28#include "log.h"
29
30int device_id;
31/*
32int get_next_device_id(void)
33{
34 int i;
35 while(1) {
36 for(i=0; i<num_devs; i++) {
37 if(device_list[i].dev && device_list[i].id == device_id) {
38 device_id++;
39 break;
40 }
41 }
42 if(i < num_devs)
43 break;
44 }
45 return device_id++;
46}
47*/
48void device_add(struct usb_device *dev)
49{
50 usbmuxd_log(LL_NOTICE, "Connected to new device on location 0x%x with serial number %s", usb_get_location(dev), usb_get_serial(dev));
51}
52
53void device_remove(struct usb_device *dev)
54{
55 usbmuxd_log(LL_NOTICE, "Removed device on location 0x%x with serial number %s", usb_get_location(dev), usb_get_serial(dev));
56}