Back to index

lightdm  1.3.2
test-script-hook.c
Go to the documentation of this file.
00001 #include <stdlib.h>
00002 #include <glib.h>
00003 #include <glib-object.h>
00004 
00005 #include "status.h"
00006 
00007 static GKeyFile *config;
00008 
00009 static void
00010 request_cb (const gchar *message)
00011 {
00012 }
00013 
00014 int
00015 main (int argc, char **argv)
00016 {
00017     g_type_init ();
00018 
00019     status_connect (request_cb);
00020 
00021     config = g_key_file_new ();
00022     g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
00023   
00024     if (argc < 2)
00025     {
00026         g_printerr ("Usage: %s text [return-value]\n", argv[0]);
00027         return EXIT_FAILURE;
00028     }
00029 
00030     status_notify ("SCRIPT-HOOK %s", argv[1]);
00031 
00032     if (argc > 2)
00033         return atoi (argv[2]);
00034     else
00035         return EXIT_SUCCESS;
00036 }