-
Notifications
You must be signed in to change notification settings - Fork 130
/
pdevice_monitor.h
58 lines (46 loc) · 1.08 KB
/
pdevice_monitor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#pragma once
#ifndef _PDEVICE_MONITOR
#define _PDEVICE_MONITOR
#include <stdint.h>
typedef enum {
Dev_Types_UsbRemovableDisk = 1,
Dev_Types_UsbFixedDisk,
Dev_Types_CDRomMedia,
Dev_Types_CameraDevice,
Dev_Types_AndroidDevice
} pdevice_types;
typedef enum {
Dev_Event_arrival = 1,
Dev_Event_removed
} device_event;
typedef struct _pdevice_info pdevice_info;
struct _pdevice_info {
pdevice_types type;
device_event event;
int size;
int isextended;
char * filesystem_path;
pdevice_info *me;
};
typedef struct _pdevice_extended_info pdevice_extended_info;
struct _pdevice_extended_info {
pdevice_types type;
device_event event;
int size;
int isextended;
char *filesystem_path;
char *vendor;
char *product;
char *device_id;
pdevice_extended_info * me;
};
typedef void(*device_event_callback)(void * device_info_);
#ifdef __cplusplus
extern "C" {
#endif
void padd_monitor_callback(device_event_callback callback);
void pinit_device_monitor();
#ifdef __cplusplus
}
#endif
#endif //_PDEVICE_MONITOR