2012-08-09 13:15:30 -07:00
|
|
|
#include "entrance_client.h"
|
|
|
|
#include <Ecore.h>
|
|
|
|
#include <Ecore_X.h>
|
|
|
|
#include <Ecore_Getopt.h>
|
|
|
|
|
2012-09-11 12:52:26 -07:00
|
|
|
time_t current_time;
|
|
|
|
struct tm *local_time;
|
|
|
|
char entrance_time_d[4096];
|
|
|
|
|
2012-08-09 13:15:30 -07:00
|
|
|
static const Ecore_Getopt options =
|
|
|
|
{
|
|
|
|
"entrance_client",
|
|
|
|
"%prog [options]",
|
|
|
|
VERSION,
|
|
|
|
"(C) 2011 Enlightenment, see AUTHORS.",
|
|
|
|
"GPL, see COPYING",
|
|
|
|
"Launch gui client.",
|
|
|
|
EINA_TRUE,
|
|
|
|
{
|
|
|
|
ECORE_GETOPT_STORE_STR('d', "display", "specify the display to use"),
|
|
|
|
ECORE_GETOPT_STORE_STR('t', "theme", "specify the theme to use"),
|
|
|
|
ECORE_GETOPT_HELP ('h', "help"),
|
|
|
|
ECORE_GETOPT_VERSION('V', "version"),
|
|
|
|
ECORE_GETOPT_COPYRIGHT('R', "copyright"),
|
|
|
|
ECORE_GETOPT_LICENSE('L', "license"),
|
|
|
|
ECORE_GETOPT_SENTINEL
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
int args;
|
|
|
|
unsigned char quit_option = 0;
|
|
|
|
char *display = NULL;
|
|
|
|
char *theme = NULL;
|
|
|
|
|
|
|
|
Ecore_Getopt_Value values[] =
|
|
|
|
{
|
|
|
|
ECORE_GETOPT_VALUE_STR(display),
|
|
|
|
ECORE_GETOPT_VALUE_STR(theme),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option),
|
|
|
|
ECORE_GETOPT_VALUE_BOOL(quit_option)
|
|
|
|
};
|
|
|
|
args = ecore_getopt_parse(&options, values, argc, argv);
|
|
|
|
if (args < 0)
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
if (quit_option)
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
if (!display)
|
|
|
|
{
|
2012-09-11 12:52:26 -07:00
|
|
|
fprintf(stderr, "A display is required!\n");
|
2012-08-09 13:15:30 -07:00
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
|
|
|
eina_init();
|
|
|
|
ecore_init();
|
2013-09-03 11:08:37 -07:00
|
|
|
ecore_x_init(display);
|
2012-08-09 13:15:30 -07:00
|
|
|
elm_init(argc, argv);
|
2013-09-03 11:08:37 -07:00
|
|
|
PT("login init\n");
|
|
|
|
entrance_login_init();
|
2013-09-03 17:10:38 -07:00
|
|
|
PT("gui init\n");
|
2013-09-03 11:08:37 -07:00
|
|
|
if (!entrance_gui_init(theme)) return EXIT_FAILURE;
|
2014-03-19 17:44:20 -07:00
|
|
|
PT("conf init\n");
|
|
|
|
entrance_conf_init();
|
2013-09-03 17:10:38 -07:00
|
|
|
PT("connect init\n");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_connect_init();
|
|
|
|
elm_run();
|
2013-09-03 17:10:38 -07:00
|
|
|
PT("connect shutdown\n");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_connect_shutdown();
|
2014-03-19 17:44:20 -07:00
|
|
|
PT("conf shutdown\n");
|
|
|
|
entrance_conf_init();
|
2013-09-03 17:10:38 -07:00
|
|
|
PT("gui shutdown\n");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_gui_shutdown();
|
2013-09-03 17:10:38 -07:00
|
|
|
PT("login shutdown\n");
|
2013-09-03 11:08:37 -07:00
|
|
|
entrance_login_shutdown();
|
2012-08-09 13:15:30 -07:00
|
|
|
elm_shutdown();
|
|
|
|
ecore_x_shutdown();
|
|
|
|
ecore_shutdown();
|
|
|
|
eina_shutdown();
|
2013-09-03 17:10:38 -07:00
|
|
|
PT("exit\n");
|
2012-08-09 13:15:30 -07:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|
2013-09-03 11:08:37 -07:00
|
|
|
|