EXTCAP_SENTENCE_UNKNOWN,
EXTCAP_SENTENCE_ARG,
EXTCAP_SENTENCE_VALUE,
- EXTCAP_SENTENCE_FLAG,
+ EXTCAP_SENTENCE_EXTCAP,
EXTCAP_SENTENCE_INTERFACE,
EXTCAP_SENTENCE_DLT
} extcap_sentence_type;
EXTCAP_ARG_BOOLEAN,
EXTCAP_ARG_BOOLFLAG,
EXTCAP_ARG_STRING,
+ EXTCAP_ARG_PASSWORD,
/* Complex GUI types which are populated with value sentences */
- EXTCAP_ARG_MENU,
EXTCAP_ARG_SELECTOR,
EXTCAP_ARG_RADIO,
EXTCAP_ARG_MULTICHECK,
EXTCAP_PARAM_NAME,
EXTCAP_PARAM_ENABLED,
EXTCAP_PARAM_FILE_MUSTEXIST,
- EXTCAP_PARAM_PARENT
+ EXTCAP_PARAM_FILE_EXTENSION,
+ EXTCAP_PARAM_PARENT,
+ EXTCAP_PARAM_REQUIRED,
+ EXTCAP_PARAM_SAVE,
+ EXTCAP_PARAM_VALIDATION,
+ EXTCAP_PARAM_VERSION
} extcap_param_type;
/* Values for a given sentence; values are all stored as a call
/* Complex-ish struct for storing complex values */
typedef struct _extcap_complex {
extcap_arg_type complex_type;
- union {
- int int_value;
- unsigned int uint_value;
- long long_value;
- double double_value;
- gboolean bool_value;
- gchar *string_value;
- } complex_value;
- gboolean value_filled;
+ gchar * _val;
} extcap_complex;
/* An argument sentence and accompanying options */
gchar *call;
gchar *display;
gchar *tooltip;
+
+ gchar * fileextension;
gboolean fileexists;
+ gboolean is_required;
+ gboolean save;
+
+ gchar * regexp;
+
extcap_arg_type arg_type;
extcap_complex *range_start;
extcap_complex *range_end;
extcap_complex *default_complex;
+ gchar * storeval;
+
GList * values;
} extcap_arg;
typedef struct _extcap_interface {
gchar *call;
gchar *display;
+ gchar *version;
+ extcap_sentence_type if_type;
struct _extcap_interface *next_interface;
} extcap_interface;
-extcap_interface *extcap_new_interface(void);
-void extcap_free_interface(extcap_interface *interface);
-
typedef struct _extcap_dlt {
gint number;
gchar *name;
struct _extcap_dlt *next_dlt;
} extcap_dlt;
-extcap_dlt *extcap_new_dlt(void);
-void extcap_free_dlt(extcap_dlt *dlt);
-
/* Parser internals */
typedef struct _extcap_token_param {
gchar *arg;
struct _extcap_token_sentence *next_sentence;
} extcap_token_sentence;
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extcap_interface *extcap_new_interface(void);
+void extcap_free_interface(extcap_interface *interface);
+
+extcap_dlt *extcap_new_dlt(void);
+void extcap_free_dlt(extcap_dlt *dlt);
+
/* Parse a string into a complex type */
extcap_complex *extcap_parse_complex(extcap_arg_type complex_type,
const gchar *data);
*/
gchar *extcap_get_complex_as_string(extcap_complex *comp);
-int extcap_complex_get_int(extcap_complex *comp);
-unsigned int extcap_complex_get_uint(extcap_complex *comp);
-long extcap_complex_get_long(extcap_complex *comp);
-double extcap_complex_get_double(extcap_complex *comp);
+gint extcap_complex_get_int(extcap_complex *comp);
+guint extcap_complex_get_uint(extcap_complex *comp);
+gint64 extcap_complex_get_long(extcap_complex *comp);
+gdouble extcap_complex_get_double(extcap_complex *comp);
gboolean extcap_complex_get_bool(extcap_complex *comp);
gchar *extcap_complex_get_string(extcap_complex *comp);
void extcap_free_value(extcap_value *v);
-extcap_arg *extcap_new_arg(void);
-
/* Free a single argument */
void extcap_free_arg(extcap_arg *a);
/* Parse all sentences for DLTs */
int extcap_parse_dlts(extcap_token_sentence *first_s, extcap_dlt **first_dlt);
+#ifdef __cplusplus
+}
+#endif
+
#endif
/*