+Option '--debug-messages' (default off) - variable 'captive_debug_messages'
[captive.git] / src / libcaptive / include / captive / client.h
1 /* $Id$
2  * Include file with client-application access to libcaptive
3  * Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
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
8  * 
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.
13  * 
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
17  */
18
19
20 #ifndef _CAPTIVE_CLIENT_H
21 #define _CAPTIVE_CLIENT_H 1
22
23
24 #include <glib/gmacros.h>
25 #include <glib/gtypes.h>
26 #include <glib/giochannel.h>
27 #include <popt.h>
28
29
30 G_BEGIN_DECLS
31
32 extern const struct poptOption captive_popt[];
33 #define CAPTIVE_POPT_INCLUDE \
34                 { NULL,'\0',POPT_ARG_INCLUDE_TABLE,(struct poptOption *)&captive_popt,0,"Captive" }
35
36 extern gchar *captive_option_filesystem;
37 enum captive_option_rwmode {
38                 CAPTIVE_OPTION_RWMODE_RO,
39                 CAPTIVE_OPTION_RWMODE_BLIND,
40                 CAPTIVE_OPTION_RWMODE_RW,
41                 };
42 extern enum captive_option_rwmode captive_option_rwmode;
43 enum captive_option_media {
44                 CAPTIVE_OPTION_MEDIA_CDROM,
45                 CAPTIVE_OPTION_MEDIA_DISK,
46                 };
47 extern enum captive_option_media captive_option_media;
48 extern gboolean captive_debug_messages;
49 extern GIOChannel *captive_image_iochannel;
50 /**
51  * captive_image_size:
52  * Size of #captive_image_iochannel. Empty files are rejected and therefore
53  * this value is always >0 after successful captive_init().
54  * Value is detected by captive_giochannel_size(captive_image_iochannel).
55  */
56 extern guint64 captive_image_size;
57
58
59 gboolean captive_init(const gchar *captive_args,GIOChannel *image_iochannel);
60 gboolean captive_shutdown(void);
61
62 G_END_DECLS
63
64
65 #endif /* _CAPTIVE_CLIENT_H */