summaryrefslogtreecommitdiff
path: root/src/bin/eeze/eeze_scanner.h
blob: a9757931af00730fbf6aaee9f7323c33316e19c2 (plain) (blame)
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
#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
{
   Ecore_Poller *poller;
   const char *device;
   Eina_Bool mounted;
} Eeze_Scanner_Device;

#endif