2 * filesystem sandbox server stub for libcaptive
3 * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <glib/gmessages.h>
24 #include <glib/giochannel.h>
25 #include <glib/gerror.h>
30 #include "captive/options.h"
31 #include <glib-object.h>
34 GQuark sandbox_server_main_error_quark(void)
39 r=g_quark_from_static_string("sandbox-server");
45 static const struct poptOption popt_table[]={
52 int main(int argc,char **argv)
57 struct captive_options options;
59 /* Initialize the i18n stuff */
61 bindtextdomain(PACKAGE,LOCALEDIR);
64 /* Initialize GObject subsystem of GLib. */
67 captive_options_init(&options);
68 captive_options=&options; /* for parsing by 'CAPTIVE_POPT_INCLUDE' */
70 context=poptGetContext(
72 argc,(/*en-const*/const char **)argv, /* argc,argv */
73 popt_table, /* options */
74 POPT_CONTEXT_POSIXMEHARDER); /* flags; && !POPT_CONTEXT_KEEP_FIRST */
76 g_assert_not_reached(); /* argument recognization args_error */
79 errint=poptReadDefaultConfig(context,
82 g_assert_not_reached(); /* argument recognization args_error */
85 errint=poptGetNextOpt(context);
87 g_assert_not_reached(); /* some non-callbacked argument reached */
90 cmd_arg=poptPeekArg(context);
92 g_assert_not_reached(); /* some non-option argument reached */
95 /* 'cmd_arg'-style args gets cleared by 'poptFreeContext(context);' below */
96 poptFreeContext(context);
98 captive_options=NULL; /* already parsed by 'CAPTIVE_POPT_INCLUDE' */
100 captive_corba_sandbox_child();
102 g_assert_not_reached();