summaryrefslogtreecommitdiff
path: root/src/bin/eeze_scanner.h
blob: 54320ebf1ddb54913d09291b296117382e9fdd88 (plain)
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
#ifndef EEZE_SCANNER_H
#define EEZE_SCANNER_H

#include <Eeze.h>

#define EEZE_SCANNER_EDD_SETUP(edd) \
  EET_DATA_DESCRIPTOR_ADD_BASIC((edd), Eeze_Scanner_Event, "device", device, EET_T_INLINED_STRING); \
  EET_DATA_DESCRIPTOR_ADD_BASIC((edd), Eeze_Scanner_Event, "type", type, EET_T_UINT); \
  EET_DATA_DESCRIPTOR_ADD_BASIC((edd), Eeze_Scanner_Event, "volume", volume, EET_T_UCHAR)

typedef enum
{
   EEZE_SCANNER_EVENT_TYPE_NONE,
   EEZE_SCANNER_EVENT_TYPE_ADD = EEZE_UDEV_EVENT_ADD,
   EEZE_SCANNER_EVENT_TYPE_REMOVE = EEZE_UDEV_EVENT_REMOVE,
   EEZE_SCANNER_EVENT_TYPE_CHANGE = EEZE_UDEV_EVENT_CHANGE
} Eeze_Scanner_Event_Type;

typedef struct
{
   const char *device;
   Eeze_Scanner_Event_Type type;
   Eina_Bool volume;
} Eeze_Scanner_Event;

typedef struct
{
   const char *device;
   Eina_Bool mounted : 1;
} Eeze_Scanner_Device;

#endif