From Edgar Gladkich:
[obnox/wireshark/wip.git] / filters.h
index 5569d6226a6f78c83cdf175bd7d00725ba88e551..78a59a483fe71742e3d6126f062449058db70aab 100644 (file)
--- a/filters.h
+++ b/filters.h
@@ -1,10 +1,10 @@
-/* filters.c
+/* filters.h
  * Declarations of routines for reading and writing the filters file.
  *
- * $Id: filters.h,v 1.3 2002/08/28 21:00:06 jmayer Exp $
+ * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  *
  * Filter lists.
  */
 typedef enum {
-       CFILTER_LIST,   /* capture filter list */
-       DFILTER_LIST    /* display filter list */
+       CFILTER_LIST,           /* capture filter list - saved */
+       DFILTER_LIST,           /* display filter list - saved */
+       CFILTER_EDITED_LIST,    /* capture filter list - currently edited */
+       DFILTER_EDITED_LIST     /* display filter list - currently edited */
 } filter_list_type_t;
 
 /*
@@ -47,7 +49,7 @@ typedef struct {
  * the file we tried to read - it should be freed by our caller -
  * and "*errno_return" is set to the error.
  */
-void read_filter_list(filter_list_type_t list, char **pref_path_return,
+void read_filter_list(filter_list_type_t list_type, char **pref_path_return,
     int *errno_return);
 
 /*
@@ -59,8 +61,8 @@ GList *get_filter_list_first(filter_list_type_t list);
  * Add a new filter to the end of a list.
  * Returns a pointer to the newly-added entry.
  */
-GList *add_to_filter_list(filter_list_type_t list, char *name,
-    char *expression);
+GList *add_to_filter_list(filter_list_type_t list, const char *name,
+    const char *expression);
 
 /*
  * Remove a filter from a list.
@@ -75,5 +77,11 @@ void remove_from_filter_list(filter_list_type_t list, GList *fl_entry);
  * the file we tried to read - it should be freed by our caller -
  * and "*errno_return" is set to the error.
  */
-void save_filter_list(filter_list_type_t list, char **pref_path_return,
+void save_filter_list(filter_list_type_t list_type, char **pref_path_return,
     int *errno_return);
+
+/*
+ * Clone the filter list so it can be edited.
+ */
+void copy_filter_list(filter_list_type_t dest_type, filter_list_type_t src_type);
+