Witness: fix notify change
[metze/wireshark/wip.git] / ui / help_url.h
1 /* help_dlg.h
2  *
3  * $Id$
4  *
5  * Some content from gtk/help_dlg.h by Laurent Deniel <laurent.deniel@free.fr>
6  *
7  * Wireshark - Network traffic analyzer
8  * By Gerald Combs <gerald@wireshark.org>
9  * Copyright 2000 Gerald Combs
10  *
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.
15  *
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.
20  *
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.
24  *
25  */
26
27 #ifndef __HELP_URL_H__
28 #define __HELP_URL_H__
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34 /** @file
35  * "Help" URLs.
36  */
37
38 typedef enum {
39     TOPIC_ACTION_NONE,
40
41     /* pages online at www.wireshark.org */
42     ONLINEPAGE_HOME,
43     ONLINEPAGE_WIKI,
44     ONLINEPAGE_USERGUIDE,
45     ONLINEPAGE_FAQ,
46     ONLINEPAGE_DOWNLOAD,
47     ONLINEPAGE_SAMPLE_FILES,
48     ONLINEPAGE_CAPTURE_SETUP,
49     ONLINEPAGE_NETWORK_MEDIA,
50     ONLINEPAGE_SAMPLE_CAPTURES,
51     ONLINEPAGE_SECURITY,
52     ONLINEPAGE_CHIMNEY,
53     ONLINEPAGE_ASK,
54
55     /* local manual pages */
56     LOCALPAGE_MAN_WIRESHARK = 100,
57     LOCALPAGE_MAN_WIRESHARK_FILTER,
58     LOCALPAGE_MAN_CAPINFOS,
59     LOCALPAGE_MAN_DUMPCAP,
60     LOCALPAGE_MAN_EDITCAP,
61     LOCALPAGE_MAN_MERGECAP,
62     LOCALPAGE_MAN_RAWSHARK,
63     LOCALPAGE_MAN_REORDERCAP,
64     LOCALPAGE_MAN_TEXT2PCAP,
65     LOCALPAGE_MAN_TSHARK,
66
67     /* help pages (textfiles or local HTML User's Guide) */
68     HELP_CONTENT = 200,
69     HELP_GETTING_STARTED,           /* currently unused */
70     HELP_CAPTURE_OPTIONS_DIALOG,
71     HELP_CAPTURE_FILTERS_DIALOG,
72     HELP_DISPLAY_FILTERS_DIALOG,
73     HELP_COLORING_RULES_DIALOG,
74     HELP_CONFIG_PROFILES_DIALOG,
75     HELP_MANUAL_ADDR_RESOLVE_DIALOG,
76     HELP_PRINT_DIALOG,
77     HELP_FIND_DIALOG,
78     HELP_FILESET_DIALOG,
79     HELP_FIREWALL_DIALOG,
80     HELP_GOTO_DIALOG,
81     HELP_CAPTURE_INTERFACES_DIALOG,
82     HELP_ENABLED_PROTOCOLS_DIALOG,
83     HELP_DECODE_AS_DIALOG,
84     HELP_DECODE_AS_SHOW_DIALOG,
85     HELP_FOLLOW_STREAM_DIALOG,
86     HELP_EXPERT_INFO_DIALOG,
87     HELP_STATS_SUMMARY_DIALOG,
88     HELP_STATS_PROTO_HIERARCHY_DIALOG,
89     HELP_STATS_ENDPOINTS_DIALOG,
90     HELP_STATS_CONVERSATIONS_DIALOG,
91     HELP_STATS_IO_GRAPH_DIALOG,
92     HELP_STATS_COMPARE_FILES_DIALOG,
93     HELP_STATS_LTE_MAC_TRAFFIC_DIALOG,
94     HELP_STATS_LTE_RLC_TRAFFIC_DIALOG,
95     HELP_STATS_WLAN_TRAFFIC_DIALOG,
96     HELP_CAPTURE_INTERFACE_OPTIONS_DIALOG,
97     HELP_CAPTURE_INTERFACES_DETAILS_DIALOG,
98     HELP_PREFERENCES_DIALOG,
99     HELP_CAPTURE_INFO_DIALOG,
100     HELP_EXPORT_FILE_DIALOG,
101     HELP_EXPORT_BYTES_DIALOG,
102     HELP_EXPORT_OBJECT_LIST,
103     HELP_OPEN_DIALOG,
104     HELP_MERGE_DIALOG,
105     HELP_IMPORT_DIALOG,
106     HELP_SAVE_DIALOG,
107     HELP_EXPORT_FILE_WIN32_DIALOG,
108     HELP_EXPORT_BYTES_WIN32_DIALOG,
109     HELP_OPEN_WIN32_DIALOG,
110     HELP_MERGE_WIN32_DIALOG,
111     HELP_SAVE_WIN32_DIALOG,
112     HELP_TIME_SHIFT_DIALOG,
113     HELP_FILTER_SAVE_DIALOG
114 } topic_action_e;
115
116 /** Given a filename return a filesystem URL. Relative paths are prefixed with
117  * the datafile directory path.
118  *
119  * @param filename A file name or path. Relative paths will be prefixed with
120  * the data file directory path.
121  * @return A filesystem URL for the file or NULL on failure. A non-NULL return
122  * value must be freed with g_free().
123  */
124 gchar *data_file_url(const gchar *filename);
125
126 /** Given a topic action return its online (www.wireshark.org) URL or NULL.
127  *
128  * @param action Topic action, e.g. ONLINEPAGE_HOME or ONLINEPAGE_ASK.
129  * @return A static URL or NULL. MUST NOT be freed.
130  */
131 const char *topic_online_url(topic_action_e action);
132
133 /** Given a page in the Wireshark User's Guide return its URL. On Windows
134  *  an attempt will be made to open User Guide URLs with HTML Help. If
135  *  the attempt succeeds NULL will be returned.
136  *
137  * @param page A page in the User's Guide.
138  * @return A static URL or NULL. A non-NULL return value must be freed
139  * with g_free().
140  */
141 gchar *user_guide_url(const gchar *page);
142
143 /** Given a topic action return its URL. On Windows an attempt will be
144  *  made to open User Guide URLs with HTML Help. If the attempt succeeds
145  *  NULL will be returned.
146  *
147  * @param action Topic action.
148  * @return A static URL or NULL. A non-NULL return value must be freed
149  * with g_free().
150  */
151 gchar *topic_action_url(topic_action_e action);
152
153 /** Open a specific topic (create a "Help" dialog box or open a webpage).
154  *
155  * @param topic the topic to display
156  */
157 void topic_action(topic_action_e topic);
158
159 #ifdef __cplusplus
160 }
161 #endif /* __cplusplus */
162
163 #endif /* __HELP_URL_H__ */
164
165 /*
166  * Editor modelines
167  *
168  * Local Variables:
169  * c-basic-offset: 4
170  * tab-width: 8
171  * indent-tabs-mode: nil
172  * End:
173  *
174  * ex: set shiftwidth=4 tabstop=8 expandtab:
175  * :indentSize=4:tabSize=8:noTabs=true:
176  */