libcaptive-gnomevfs.so now accepts popt args instead of just fs_path string
[captive.git] / src / libcaptive / include / captive / client.h
index 84fbe3b..8bafa11 100644 (file)
 #include <glib/gmacros.h>
 #include <glib/gtypes.h>
 #include <glib/giochannel.h>
+#include <popt.h>
 
 
 G_BEGIN_DECLS
 
-gboolean captive_init(const gchar *fs_path,GIOChannel *image_iochannel);
-gboolean captive_cleanup(void);
+extern const struct poptOption captive_popt[];
+#define CAPTIVE_POPT_INCLUDE \
+               { NULL,'\0',POPT_ARG_INCLUDE_TABLE,(struct poptOption *)&captive_popt,0,"Captive" }
+
+extern gchar *captive_option_filesystem;
+enum captive_option_rwmode {
+               CAPTIVE_OPTION_RWMODE_RO,
+               CAPTIVE_OPTION_RWMODE_BLIND,
+               CAPTIVE_OPTION_RWMODE_RW,
+               };
+extern enum captive_option_rwmode captive_option_rwmode;
+extern GIOChannel *captive_image_iochannel;
+/**
+ * captive_image_size:
+ * Size of #captive_image_iochannel. Empty files are rejected and therefore
+ * this value is always >0 after successful captive_init().
+ * Value is detected by captive_giochannel_size(captive_image_iochannel).
+ */
+extern guint64 captive_image_size;
+
+
+gboolean captive_init(const gchar *captive_args,GIOChannel *image_iochannel);
 
 G_END_DECLS