2 * Definitions for dialog box for profiles editing.
3 * Stig Bjorlykke <stig@bjorlykke.org>, 2008
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 #endif /* __cplusplus */
32 * "Configuration Profiles" dialog box
33 * @ingroup dialog_group
36 #define PROF_STAT_DEFAULT 1
37 #define PROF_STAT_EXISTS 2
38 #define PROF_STAT_NEW 3
39 #define PROF_STAT_CHANGED 4
40 #define PROF_STAT_COPY 5
43 char *name; /* profile name */
44 char *reference; /* profile reference */
51 * "Configuration Profiles" utility routines
52 * @ingroup utility_group
55 /** Initialize the profile list. Can be called more than once.
57 void init_profile_list(void);
59 /** User requested the "Configuration Profiles" popup menu.
61 * @param name Profile name
62 * @param parent Parent profile name
63 * @param status Current status
64 * @param is_global Profile is in the global configuration directory
65 * @param from_global Profile is copied from the global configuration directory
67 * @return A pointer to the new profile list
69 GList *add_to_profile_list(const char *name, const char *parent, int status,
70 gboolean is_global, gboolean from_global);
72 /** Refresh the current (non-edited) profile list.
74 void copy_profile_list(void);
76 /** Clear out the profile list
78 * @param edit_list Remove edited entries
80 void empty_profile_list(gboolean edit_list);
82 /** Remove an entry from the profile list.
84 * @param fl_entry Profile list entry
86 void remove_from_profile_list(GList *fl_entry);
88 /** Current profile list
90 * @return The head of the current profile list
92 GList *current_profile_list(void);
94 /** Edited profile list
96 * @return The head of the edited profile list
98 GList * edited_profile_list(void);
100 /** Apply the changes in the edited profile list
101 * @return NULL if the operation was successful or an error message otherwise.
103 const gchar *apply_profile_changes(void);
105 /** Given a profile name, return the name of its parent profile.
107 * @param profilename Child profile name
109 * @return Parent profile name
111 const gchar *get_profile_parent (const gchar *profilename);
113 /** Check the validity of a profile name.
115 * @param name Profile name
116 * @return NULL if the name is valid or an error message otherwise.
118 gchar *profile_name_is_valid(const gchar *name);
120 /** Remove the current profile.
122 * @return TRUE if the current profile exists and was successfully deleted
123 * or FALSE otherwise.
125 gboolean delete_current_profile(void);
129 #endif /* __cplusplus */
131 #endif /* __PROFILE_H__ */
134 * Editor modelines - http://www.wireshark.org/tools/modelines.html
139 * indent-tabs-mode: nil
142 * vi: set shiftwidth=4 tabstop=8 expandtab:
143 * :indentSize=4:tabSize=8:noTabs=true: