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 * SPDX-License-Identifier: GPL-2.0-or-later*/
16 #endif /* __cplusplus */
19 * "Configuration Profiles" dialog box
20 * @ingroup dialog_group
23 #define PROF_STAT_DEFAULT 1
24 #define PROF_STAT_EXISTS 2
25 #define PROF_STAT_NEW 3
26 #define PROF_STAT_CHANGED 4
27 #define PROF_STAT_COPY 5
30 char *name; /* profile name */
31 char *reference; /* profile reference */
38 * "Configuration Profiles" utility routines
39 * @ingroup utility_group
42 /** Initialize the profile list. Can be called more than once.
44 void init_profile_list(void);
46 /** User requested the "Configuration Profiles" popup menu.
48 * @param name Profile name
49 * @param parent Parent profile name
50 * @param status Current status
51 * @param is_global Profile is in the global configuration directory
52 * @param from_global Profile is copied from the global configuration directory
54 * @return A pointer to the new profile list
56 GList *add_to_profile_list(const char *name, const char *parent, int status,
57 gboolean is_global, gboolean from_global);
59 /** Refresh the current (non-edited) profile list.
61 void copy_profile_list(void);
63 /** Clear out the profile list
65 * @param edit_list Remove edited entries
67 void empty_profile_list(gboolean edit_list);
69 /** Remove an entry from the profile list.
71 * @param fl_entry Profile list entry
73 void remove_from_profile_list(GList *fl_entry);
75 /** Current profile list
77 * @return The head of the current profile list
79 GList *current_profile_list(void);
81 /** Edited profile list
83 * @return The head of the edited profile list
85 GList * edited_profile_list(void);
87 /** Apply the changes in the edited profile list
88 * @return NULL if the operation was successful or an error message otherwise.
89 * The error message must be freed by the caller.
91 gchar *apply_profile_changes(void);
93 /** Given a profile name, return the name of its parent profile.
95 * @param profilename Child profile name
97 * @return Parent profile name
99 const gchar *get_profile_parent (const gchar *profilename);
101 /** Check the validity of a profile name.
103 * @param name Profile name
104 * @return NULL if the name is valid or an error message otherwise.
106 gchar *profile_name_is_valid(const gchar *name);
108 /** Remove the current profile.
110 * @return TRUE if the current profile exists and was successfully deleted
111 * or FALSE otherwise.
113 gboolean delete_current_profile(void);
117 #endif /* __cplusplus */
119 #endif /* __PROFILE_H__ */
122 * Editor modelines - http://www.wireshark.org/tools/modelines.html
127 * indent-tabs-mode: nil
130 * vi: set shiftwidth=4 tabstop=8 expandtab:
131 * :indentSize=4:tabSize=8:noTabs=true: