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