entrance: void++

This commit is contained in:
Michael Bouchaud 2014-01-09 00:04:44 +01:00
parent ccdf5ab8f5
commit 5fbad35901
19 changed files with 65 additions and 63 deletions

View File

@ -33,6 +33,6 @@ extern time_t current_time;
extern struct tm *local_time;
extern char entrance_time_d[4096];
int entrance_client_main();
int entrance_client_main(void);
#endif /* ENTRANCE_H_ */

View File

@ -56,8 +56,8 @@ static void _entrance_conf_bg_sel(void *data, Evas_Object *obj, void *event_info
static Eina_Bool _entrance_conf_bg_fill_cb(void *data, Elm_Object_Item *it);
static Eina_Bool _entrance_conf_user_bg_fill_cb(void *data, Elm_Object_Item *it);
static void _entrance_conf_user_bg_sel(void *data, Evas_Object *obj, void *event_info);
static void _entrance_conf_changed();
static void _entrance_conf_apply();
static void _entrance_conf_changed(void);
static void _entrance_conf_apply(void);
static Evas_Object *_entrance_conf_user_build(Evas_Object *obj);
static void _entrance_conf_user_build_cb(Evas_Object *t, Entrance_Login *eu);
@ -316,7 +316,7 @@ _entrance_conf_backgrounds_get(Evas_Object *obj, const char *user)
}
static void
_entrance_conf_apply()
_entrance_conf_apply(void)
{
Entrance_Conf_Gui_Event conf;
@ -664,7 +664,6 @@ _entrance_conf_changed(void)
|| (_entrance_int_conf->elm_profile != elm_config_profile_get())
|| (_entrance_int_conf->vkbd_enabled != entrance_gui_vkbd_enabled_get()))
|| ((_entrance_int_conf->user.orig) &&
((_entrance_int_conf->user.orig->bg.path != _entrance_int_conf->user.bg.path)
|| (_entrance_int_conf->user.orig->bg.group != _entrance_int_conf->user.bg.group)
|| (_entrance_int_conf->user.orig->image.path != _entrance_int_conf->user.image.path)

View File

@ -171,7 +171,7 @@ entrance_connect_auth_cb_del(void *auth)
}
void
entrance_connect_init()
entrance_connect_init(void)
{
Ecore_Event_Handler *h;
ecore_con_init();
@ -196,7 +196,7 @@ entrance_connect_init()
}
void
entrance_connect_shutdown()
entrance_connect_shutdown(void)
{
Ecore_Event_Handler *h;
EINA_LIST_FREE(_handlers, h)

View File

@ -3,11 +3,11 @@
typedef void (*Entrance_Connect_Auth_Cb)(void *data, const char *login, Eina_Bool granted);
void entrance_connect_init();
void entrance_connect_init(void);
void entrance_connect_auth_send(const char *login, const char *password, const char *session, Eina_Bool open_session);
void entrance_connect_action_send(unsigned char id);
void entrance_connect_conf_send(Entrance_Conf_Gui_Event *conf);
void *entrance_connect_auth_cb_add(Entrance_Connect_Auth_Cb func, void *data);
void entrance_connect_auth_cb_del(void *list);
void entrance_connect_shutdown();
void entrance_connect_shutdown(void);
#endif /* ENTRANCE_CONNECT_ */

View File

@ -159,7 +159,7 @@ entrance_gui_init(const char *theme)
}
void
entrance_gui_shutdown()
entrance_gui_shutdown(void)
{
Entrance_Screen *screen;
Entrance_Xsession *xsession;

View File

@ -4,9 +4,9 @@
#define ENTRANCE_CONFIG_KEY "config"
static void _defaults_set(Entrance_Config *config);
static void _users_get();
static void _users_get(void);
static void _config_free(Entrance_Config *config);
static Entrance_Config *_cache_get();
static Entrance_Config *_cache_get(void);
static Eet_Data_Descriptor *_entrance_config_descriptor;
@ -36,7 +36,7 @@ _defaults_set(Entrance_Config *config)
static void
_users_get()
_users_get(void)
{
Eet_File *ef;
FILE *f;
@ -85,7 +85,7 @@ _users_get()
}
static Entrance_Config *
_cache_get()
_cache_get(void)
{
Entrance_Config *config = NULL;
Eet_File *file;

View File

@ -45,8 +45,8 @@ struct _Entrance_Config
Eina_Bool vkbd_enabled;
};
void entrance_config_init();
void entrance_config_shutdown();
void entrance_config_init(void);
void entrance_config_shutdown(void);
void entrance_config_set(const Entrance_Conf_Gui_Event *conf);
Entrance_Config *entrance_config;

View File

@ -3,10 +3,10 @@
#define ENTRANCE_SESSION_KEY "session"
#define ENTRANCE_HISTORY_FILE "entrance.hst"
static void _entrance_history_read();
static void _entrance_history_write();
static void _entrance_user_init();
static void _entrance_user_shutdown();
static void _entrance_history_read(void);
static void _entrance_history_write(void);
static void _entrance_user_init(void);
static void _entrance_user_shutdown(void);
const char *_entrance_history_match(const char *login);
@ -16,7 +16,7 @@ static Eina_List *_lusers = NULL;
static Eina_Bool _history_update = EINA_FALSE;
void
entrance_history_init()
entrance_history_init(void)
{
Eet_Data_Descriptor *edd;
Eet_Data_Descriptor_Class eddc;
@ -35,20 +35,20 @@ entrance_history_init()
}
Eina_List
*entrance_history_get()
*entrance_history_get(void)
{
return _lusers;
}
void
entrance_history_shutdown()
entrance_history_shutdown(void)
{
_entrance_history_write();
_entrance_user_shutdown();
}
static void
_entrance_history_read()
_entrance_history_read(void)
{
Eet_File *ef;
@ -63,7 +63,7 @@ _entrance_history_read()
}
static void
_entrance_history_write()
_entrance_history_write(void)
{
Eet_File *ef;
Entrance_Login *el;
@ -154,7 +154,7 @@ _entrance_history_match(const char *login)
}
static void
_entrance_user_init()
_entrance_user_init(void)
{
char buf[PATH_MAX];
FILE *f;
@ -197,7 +197,7 @@ _entrance_user_init()
}
static void
_entrance_user_shutdown()
_entrance_user_shutdown(void)
{
Entrance_Login *eu;
EINA_LIST_FREE(_lusers, eu)

View File

@ -1,10 +1,10 @@
#ifndef ENTRANCE_HISTORY_
#define ENTRANCE_HISTORY_
void entrance_history_init();
void entrance_history_shutdown();
void entrance_history_init(void);
void entrance_history_shutdown(void);
void entrance_history_push(const char *login, const char *session);
Eina_List *entrance_history_get();
Eina_List *entrance_history_get(void);
typedef struct _Entrance_History Entrance_History;

View File

@ -306,12 +306,14 @@ entrance_pam_env_set(const char *env, const char *value)
}
char **
entrance_pam_env_list_get() {
entrance_pam_env_list_get(void)
{
return pam_getenvlist(_pam_handle);
}
void
entrance_pam_shutdown() {
entrance_pam_shutdown(void)
{
}
int
@ -324,3 +326,4 @@ entrance_pam_auth_set(const char *login, const char *passwd)
_passwd = strdup(passwd);
return 0;
}

View File

@ -129,7 +129,7 @@ _entrance_server_write_cb(const void *data, size_t size, void *user_data EINA_UN
}
void
entrance_server_init()
entrance_server_init(void)
{
Ecore_Event_Handler *h;
ecore_con_init();
@ -154,7 +154,7 @@ entrance_server_init()
}
void
entrance_server_shutdown()
entrance_server_shutdown(void)
{
Ecore_Event_Handler *h;
if (_entrance_server)
@ -166,7 +166,7 @@ entrance_server_shutdown()
}
void
entrance_server_client_wait()
entrance_server_client_wait(void)
{
Entrance_Event eev;
eev.type = ENTRANCE_EVENT_MAXTRIES;

View File

@ -1,8 +1,8 @@
#ifndef ENTRANCE_SERVER_
#define ENTRANCE_SERVER_
void entrance_server_init();
void entrance_server_client_wait();
void entrance_server_shutdown();
void entrance_server_init(void);
void entrance_server_client_wait(void);
void entrance_server_shutdown(void);
#endif /* ENTRANCE_SERVER_ */

View File

@ -24,13 +24,13 @@ static void _entrance_session_run(struct passwd *pwd, const char *cmd, const cha
static void _entrance_session_desktops_scan_file(const char *path);
static void _entrance_session_desktops_scan(const char *dir);
static void _entrance_session_desktops_init();
//static void _entrance_session_desktops_shutdown();
static void _entrance_session_desktops_init(void);
//static void _entrance_session_desktops_shutdown(void);
static const char *_entrance_session_find_command(const char *path, const char *session);
static struct passwd *_entrance_session_session_open();
long
entrance_session_seed_get()
entrance_session_seed_get(void)
{
struct timespec ts;
long pid = getpid();
@ -222,7 +222,7 @@ entrance_session_pid_set(pid_t pid)
}
pid_t
entrance_session_pid_get()
entrance_session_pid_get(void)
{
return _session_pid;
}
@ -264,7 +264,7 @@ entrance_session_init(const char *dname)
}
void
entrance_session_shutdown()
entrance_session_shutdown(void)
{
Entrance_Xsession *xsession;
@ -314,7 +314,7 @@ entrance_session_authenticate(const char *login, const char *passwd)
}
static struct passwd *
_entrance_session_session_open()
_entrance_session_session_open(void)
{
#ifdef HAVE_PAM
if (!entrance_pam_open_session())
@ -411,25 +411,25 @@ _entrance_session_find_command(const char *path, const char *session)
}
char *
entrance_session_login_get()
entrance_session_login_get(void)
{
return _login;
}
int
entrance_session_logged_get()
entrance_session_logged_get(void)
{
return !!_logged;
}
Eina_List *
entrance_session_list_get()
entrance_session_list_get(void)
{
return _xsessions;
}
static void
_entrance_session_desktops_init()
_entrance_session_desktops_init(void)
{
char buf[PATH_MAX];
Eina_List *dirs;

View File

@ -4,15 +4,15 @@
void entrance_session_init(const char *dname);
void entrance_session_end(const char *login);
void entrance_session_shutdown();
void entrance_session_shutdown(void);
Eina_Bool entrance_session_authenticate(const char *login, const char *pwd);
void entrance_session_close(Eina_Bool opened);
Eina_Bool entrance_session_login(const char *command, Eina_Bool push);
void entrance_session_pid_set(pid_t pid);
pid_t entrance_session_pid_get();
long entrance_session_seed_get();
char *entrance_session_login_get();
int entrance_session_logged_get();
Eina_List *entrance_session_list_get();
pid_t entrance_session_pid_get(void);
long entrance_session_seed_get(void);
char *entrance_session_login_get(void);
int entrance_session_logged_get(void);
Eina_List *entrance_session_list_get(void);
#endif /* ENTRANCE_SESSION_H_ */

View File

@ -22,7 +22,7 @@ _entrance_wait_action(int sig, siginfo_t * si __UNUSED__, void *data __UNUSED__)
}
static void
kill_wait()
kill_wait(void)
{
kill(_x_pid, SIGTERM);
}

View File

@ -29,7 +29,7 @@ _env_set(const char *dname)
}
static int
_xserver_start()
_xserver_start(void)
{
char *buf = NULL;
char **args = NULL;
@ -124,14 +124,14 @@ entrance_xserver_init(Entrance_X_Cb start, const char *dname)
}
void
entrance_xserver_end()
entrance_xserver_end(void)
{
PT("xserver end\n");
unsetenv("ENTRANCE_XPID");
}
void
entrance_xserver_shutdown()
entrance_xserver_shutdown(void)
{
eina_stringshare_del(_xserver->dname);
free(_xserver);

View File

@ -2,7 +2,7 @@
#define ENTRANCE_XLIB_H_
typedef Eina_Bool (*Entrance_X_Cb)(const char *data);
int entrance_xserver_init(Entrance_X_Cb start, const char *dname);
void entrance_xserver_wait();
void entrance_xserver_end();
void entrance_xserver_shutdown();
void entrance_xserver_wait(void);
void entrance_xserver_end(void);
void entrance_xserver_shutdown(void);
#endif /* ENTRANCE_XLIB_H_ */

View File

@ -333,7 +333,7 @@ entrance_event_received(const void *data, size_t size)
}
Eet_Data_Descriptor *
entrance_event_user_dd()
entrance_event_user_dd(void)
{
return _entrance_event_user_dd();
}

View File

@ -116,5 +116,5 @@ void entrance_event_init(Eet_Read_Cb func_read_cb, Eet_Write_Cb func_write_cb, v
void entrance_event_shutdown(void);
void entrance_event_send(const Entrance_Event *data);
void entrance_event_received(const void *data, size_t size);
Eet_Data_Descriptor *entrance_event_user_dd();
Eet_Data_Descriptor *entrance_event_user_dd(void);
#endif /* ENTRANCE_EVENT_ */