MSWSP: WIP: dissect_CPMSetBindings()
[wireshark-wip.git] / ui / profile.h
blobf8bbab1b33eb390c23801941e759a0dd2bd63833
1 /* profile.h
2 * Definitions for dialog box for profiles editing.
3 * Stig Bjorlykke <stig@bjorlykke.org>, 2008
5 * $Id$
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #ifndef __PROFILE_H__
27 #define __PROFILE_H__
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
33 /** @file
34 * "Configuration Profiles" dialog box
35 * @ingroup dialog_group
38 #define PROF_STAT_DEFAULT 1
39 #define PROF_STAT_EXISTS 2
40 #define PROF_STAT_NEW 3
41 #define PROF_STAT_CHANGED 4
42 #define PROF_STAT_COPY 5
44 typedef struct {
45 char *name; /* profile name */
46 char *reference; /* profile reference */
47 int status;
48 gboolean is_global;
49 gboolean from_global;
50 } profile_def;
52 /** @file
53 * "Configuration Profiles" utility routines
54 * @ingroup utility_group
57 /** Initialize the profile list. Can be called more than once.
59 void init_profile_list(void);
61 /** User requested the "Configuration Profiles" popup menu.
63 * @param name Profile name
64 * @param parent Parent profile name
65 * @param status Current status
66 * @param is_global Profile is in the global configuration directory
67 * @param from_global Profile is copied from the global configuration directory
69 * @return A pointer to the new profile list
71 GList * add_to_profile_list(const char *name, const char *parent, int status,
72 gboolean is_global, gboolean from_global);
74 /** Refresh the current (non-edited) profile list.
76 void copy_profile_list(void);
78 /** Clear out the profile list
80 * @param edit_list Remove edited entries
82 void empty_profile_list(gboolean edit_list);
84 /** Remove an entry from the profile list.
86 * @param fl_entry Profile list entry
88 void remove_from_profile_list(GList *fl_entry);
90 /** Current profile list
92 * @return The head of the current profile list
94 GList * current_profile_list(void);
96 /** Edited profile list
98 * @return The head of the edited profile list
100 GList * edited_profile_list(void);
102 /** Apply the changes in the edited profile list
103 * @return NULL if the operation was successful or an error message otherwise.
105 const gchar *apply_profile_changes(void);
107 /** Given a profile name, return the name of its parent profile.
109 * @param profilename Child profile name
111 * @return Parent profile name
113 const gchar *get_profile_parent (const gchar *profilename);
115 /** Check the validity of a profile name.
117 * @param name Profile name
118 * @return NULL if the name is valid or an error message otherwise.
120 const gchar *profile_name_is_valid(const gchar *name);
122 /** Remove the current profile.
124 * @return TRUE if the current profile exists and was successfully deleted
125 * or FALSE otherwise.
127 gboolean delete_current_profile(void);
129 #ifdef __cplusplus
131 #endif /* __cplusplus */
133 #endif /* __PROFILE_H__ */