2012-08-09 13:15:30 -07:00
|
|
|
#ifndef ENTRANCE_EVENT_
|
|
|
|
#define ENTRANCE_EVENT_
|
|
|
|
|
|
|
|
typedef enum Entrance_Event_Type_
|
|
|
|
{
|
|
|
|
ENTRANCE_EVENT_UNKNOWN,
|
|
|
|
ENTRANCE_EVENT_AUTH,
|
|
|
|
ENTRANCE_EVENT_STATUS,
|
|
|
|
ENTRANCE_EVENT_XSESSIONS,
|
|
|
|
ENTRANCE_EVENT_USERS,
|
2014-01-09 15:10:30 -08:00
|
|
|
ENTRANCE_EVENT_CONF_USER,
|
2012-08-09 13:15:30 -07:00
|
|
|
ENTRANCE_EVENT_ACTIONS,
|
|
|
|
ENTRANCE_EVENT_ACTION,
|
2013-09-03 11:08:37 -07:00
|
|
|
ENTRANCE_EVENT_MAXTRIES,
|
|
|
|
ENTRANCE_EVENT_CONF_GUI,
|
2014-05-14 02:54:07 -07:00
|
|
|
ENTRANCE_EVENT_POOLS
|
2012-08-09 13:15:30 -07:00
|
|
|
} Entrance_Event_Type;
|
|
|
|
|
|
|
|
typedef struct Entrance_Xsession_
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
const char *command;
|
|
|
|
const char *icon;
|
|
|
|
} Entrance_Xsession;
|
|
|
|
|
|
|
|
typedef struct Entrance_Xsessions_Event_
|
|
|
|
{
|
|
|
|
Eina_List *xsessions;
|
|
|
|
} Entrance_Xsessions_Event;
|
|
|
|
|
|
|
|
typedef struct Entrance_Auth_Event_
|
|
|
|
{
|
|
|
|
const char *login;
|
|
|
|
const char *password;
|
|
|
|
const char *session;
|
2013-09-03 11:08:37 -07:00
|
|
|
Eina_Bool open_session;
|
2012-08-09 13:15:30 -07:00
|
|
|
} Entrance_Auth_Event;
|
|
|
|
|
|
|
|
typedef struct Entrance_Maxtries_Event_
|
|
|
|
{
|
2013-09-03 20:05:53 -07:00
|
|
|
int maxtries;
|
2012-08-09 13:15:30 -07:00
|
|
|
} Entrance_Maxtries_Event;
|
|
|
|
|
|
|
|
typedef struct Entrance_Status_Event_
|
|
|
|
{
|
2013-10-29 11:26:56 -07:00
|
|
|
const char *login;
|
2013-09-03 20:05:53 -07:00
|
|
|
int granted;
|
2012-08-09 13:15:30 -07:00
|
|
|
} Entrance_Status_Event;
|
|
|
|
|
|
|
|
typedef struct Entrance_Action_Event_
|
|
|
|
{
|
2013-09-03 11:08:37 -07:00
|
|
|
unsigned char action;
|
2012-08-09 13:15:30 -07:00
|
|
|
} Entrance_Action_Event;
|
|
|
|
|
|
|
|
typedef struct Entrance_Users_Event_
|
|
|
|
{
|
|
|
|
Eina_List *users;
|
|
|
|
} Entrance_Users_Event;
|
|
|
|
|
|
|
|
typedef struct Entrance_Action_
|
|
|
|
{
|
2013-09-03 11:08:37 -07:00
|
|
|
unsigned char id;
|
2012-08-09 13:15:30 -07:00
|
|
|
const char *label;
|
|
|
|
} Entrance_Action;
|
|
|
|
|
|
|
|
typedef struct Entrance_Actions_Event_
|
|
|
|
{
|
|
|
|
Eina_List *actions;
|
|
|
|
} Entrance_Actions_Event;
|
|
|
|
|
2013-09-03 11:08:37 -07:00
|
|
|
typedef struct Entrance_Conf_Gui_Event_
|
|
|
|
{
|
|
|
|
Eina_Bool enabled;
|
|
|
|
const char *theme;
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
const char *group;
|
|
|
|
const char *path;
|
|
|
|
} bg;
|
|
|
|
Eina_Bool vkbd_enabled;
|
|
|
|
} Entrance_Conf_Gui_Event;
|
|
|
|
|
|
|
|
|
2014-03-06 05:09:37 -08:00
|
|
|
typedef struct Entrance_Image_
|
2013-10-29 11:26:56 -07:00
|
|
|
{
|
|
|
|
const char *group;
|
|
|
|
const char *path;
|
2014-03-06 05:09:37 -08:00
|
|
|
} Entrance_Image;
|
2013-10-29 11:26:56 -07:00
|
|
|
|
|
|
|
typedef struct Entrance_Login_
|
|
|
|
{
|
|
|
|
const char *login;
|
|
|
|
const char *lsess;
|
2014-03-06 05:09:37 -08:00
|
|
|
Entrance_Image bg;
|
|
|
|
Entrance_Image image;
|
2013-10-29 11:26:56 -07:00
|
|
|
Eina_Bool remember_session;
|
2014-05-14 01:11:59 -07:00
|
|
|
} Entrance_Login;
|
2013-09-03 11:08:37 -07:00
|
|
|
|
2014-05-14 02:54:07 -07:00
|
|
|
typedef struct Entrance_User_Pool_
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
Eina_List *icon_pool;
|
|
|
|
Eina_List *background_pool;
|
|
|
|
} Entrance_User_Pool;
|
|
|
|
|
|
|
|
typedef struct Entrance_Pools_
|
|
|
|
{
|
|
|
|
Eina_List *icon_pool;
|
|
|
|
Eina_List *background_pool;
|
|
|
|
Eina_List *user_pools;
|
|
|
|
} Entrance_Pools;
|
|
|
|
|
2012-08-09 13:15:30 -07:00
|
|
|
typedef struct Entrance_Event_
|
|
|
|
{
|
|
|
|
Entrance_Event_Type type;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
Entrance_Xsessions_Event xsessions;
|
|
|
|
Entrance_Auth_Event auth;
|
|
|
|
Entrance_Maxtries_Event maxtries;
|
|
|
|
Entrance_Status_Event status;
|
|
|
|
Entrance_Users_Event users;
|
2014-01-09 15:10:30 -08:00
|
|
|
Entrance_Login conf_user;
|
2012-08-09 13:15:30 -07:00
|
|
|
Entrance_Actions_Event actions;
|
|
|
|
Entrance_Action_Event action;
|
2013-09-03 11:08:37 -07:00
|
|
|
Entrance_Conf_Gui_Event conf_gui;
|
2014-05-14 02:54:07 -07:00
|
|
|
Entrance_Pools pools;
|
2012-08-09 13:15:30 -07:00
|
|
|
} event;
|
|
|
|
} Entrance_Event;
|
|
|
|
|
2013-09-03 11:08:37 -07:00
|
|
|
void entrance_event_init(Eet_Read_Cb func_read_cb, Eet_Write_Cb func_write_cb, void *func_data);
|
|
|
|
void entrance_event_shutdown(void);
|
|
|
|
void entrance_event_send(const Entrance_Event *data);
|
|
|
|
void entrance_event_received(const void *data, size_t size);
|
2014-01-08 15:04:44 -08:00
|
|
|
Eet_Data_Descriptor *entrance_event_user_dd(void);
|
2012-08-09 13:15:30 -07:00
|
|
|
#endif /* ENTRANCE_EVENT_ */
|