nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | /* profile.h |
2 | * Definitions for dialog box for profiles editing. |
||
3 | * Stig Bjorlykke <stig@bjorlykke.org>, 2008 |
||
4 | * |
||
5 | * Wireshark - Network traffic analyzer |
||
6 | * By Gerald Combs <gerald@wireshark.org> |
||
7 | * Copyright 1998 Gerald Combs |
||
8 | * |
||
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. |
||
13 | * |
||
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. |
||
18 | * |
||
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. |
||
22 | */ |
||
23 | |||
24 | #ifndef __PROFILE_H__ |
||
25 | #define __PROFILE_H__ |
||
26 | |||
27 | #ifdef __cplusplus |
||
28 | extern "C" { |
||
29 | #endif /* __cplusplus */ |
||
30 | |||
31 | /** @file |
||
32 | * "Configuration Profiles" dialog box |
||
33 | * @ingroup dialog_group |
||
34 | */ |
||
35 | |||
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 |
||
41 | |||
42 | typedef struct { |
||
43 | char *name; /* profile name */ |
||
44 | char *reference; /* profile reference */ |
||
45 | int status; |
||
46 | gboolean is_global; |
||
47 | gboolean from_global; |
||
48 | } profile_def; |
||
49 | |||
50 | /** @file |
||
51 | * "Configuration Profiles" utility routines |
||
52 | * @ingroup utility_group |
||
53 | */ |
||
54 | |||
55 | /** Initialize the profile list. Can be called more than once. |
||
56 | */ |
||
57 | void init_profile_list(void); |
||
58 | |||
59 | /** User requested the "Configuration Profiles" popup menu. |
||
60 | * |
||
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 |
||
66 | * |
||
67 | * @return A pointer to the new profile list |
||
68 | */ |
||
69 | GList *add_to_profile_list(const char *name, const char *parent, int status, |
||
70 | gboolean is_global, gboolean from_global); |
||
71 | |||
72 | /** Refresh the current (non-edited) profile list. |
||
73 | */ |
||
74 | void copy_profile_list(void); |
||
75 | |||
76 | /** Clear out the profile list |
||
77 | * |
||
78 | * @param edit_list Remove edited entries |
||
79 | */ |
||
80 | void empty_profile_list(gboolean edit_list); |
||
81 | |||
82 | /** Remove an entry from the profile list. |
||
83 | * |
||
84 | * @param fl_entry Profile list entry |
||
85 | */ |
||
86 | void remove_from_profile_list(GList *fl_entry); |
||
87 | |||
88 | /** Current profile list |
||
89 | * |
||
90 | * @return The head of the current profile list |
||
91 | */ |
||
92 | GList *current_profile_list(void); |
||
93 | |||
94 | /** Edited profile list |
||
95 | * |
||
96 | * @return The head of the edited profile list |
||
97 | */ |
||
98 | GList * edited_profile_list(void); |
||
99 | |||
100 | /** Apply the changes in the edited profile list |
||
101 | * @return NULL if the operation was successful or an error message otherwise. |
||
102 | */ |
||
103 | const gchar *apply_profile_changes(void); |
||
104 | |||
105 | /** Given a profile name, return the name of its parent profile. |
||
106 | * |
||
107 | * @param profilename Child profile name |
||
108 | * |
||
109 | * @return Parent profile name |
||
110 | */ |
||
111 | const gchar *get_profile_parent (const gchar *profilename); |
||
112 | |||
113 | /** Check the validity of a profile name. |
||
114 | * |
||
115 | * @param name Profile name |
||
116 | * @return NULL if the name is valid or an error message otherwise. |
||
117 | */ |
||
118 | gchar *profile_name_is_valid(const gchar *name); |
||
119 | |||
120 | /** Remove the current profile. |
||
121 | * |
||
122 | * @return TRUE if the current profile exists and was successfully deleted |
||
123 | * or FALSE otherwise. |
||
124 | */ |
||
125 | gboolean delete_current_profile(void); |
||
126 | |||
127 | #ifdef __cplusplus |
||
128 | } |
||
129 | #endif /* __cplusplus */ |
||
130 | |||
131 | #endif /* __PROFILE_H__ */ |
||
132 | |||
133 | /* |
||
134 | * Editor modelines - http://www.wireshark.org/tools/modelines.html |
||
135 | * |
||
136 | * Local variables: |
||
137 | * c-basic-offset: 4 |
||
138 | * tab-width: 8 |
||
139 | * indent-tabs-mode: nil |
||
140 | * End: |
||
141 | * |
||
142 | * vi: set shiftwidth=4 tabstop=8 expandtab: |
||
143 | * :indentSize=4:tabSize=8:noTabs=true: |
||
144 | */ |