#include #include #include #include #include #include "gvfsdaemon.h" #include "gvfsbackendtest.h" #include int main (int argc, char *argv[]) { GMainLoop *loop; GVfsDaemon *daemon; gboolean replace; GError *error; GOptionContext *context; const GOptionEntry options[] = { { "replace", 'r', 0, G_OPTION_ARG_NONE, &replace, N_("Replace old daemon."), NULL }, { NULL } }; g_set_application_name (_("GVFS Daemon")); context = g_option_context_new (_("")); g_option_context_set_summary (context, "Main daemon for GVFS"); g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); replace = FALSE; error = NULL; if (!g_option_context_parse (context, &argc, &argv, &error)) { g_print ("%s, use --help for usage\n", error->message); g_error_free (error); return 1; } g_thread_init (NULL); g_type_init (); daemon = g_vfs_daemon_new (TRUE, replace); if (daemon == NULL) return 1; loop = g_main_loop_new (NULL, FALSE); g_print ("Entering mainloop\n"); g_main_loop_run (loop); return 0; }