LATER... ei_kerberos_kdc_session_key ...
[wireshark-sm.git] / ui / alert_box.h
blobc7956e2f44e8a215d903735cc9ae6226f7c8767a
1 /** @file
3 * Routines to put up various "standard" alert boxes used in multiple
4 * places
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #ifndef __ALERT_BOX_H__
14 #define __ALERT_BOX_H__
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
21 * Alert box for general errors.
23 extern void failure_alert_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2);
24 extern void vfailure_alert_box(const char *msg_format, va_list ap);
27 * Alert box for general warnings.
29 extern void vwarning_alert_box(const char *msg_format, va_list ap);
32 * Alert box for a failed attempt to open a capture file for reading.
33 * "filename" is the name of the file being opened; "err" is assumed
34 * to be a UNIX-style errno or a WTAP_ERR_ value; "err_info" is assumed
35 * to be a string giving further information for some WTAP_ERR_ values..
37 extern void cfile_open_failure_alert_box(const char *filename, int err,
38 char *err_info);
41 * Alert box for a failed attempt to open a capture file for writing.
42 * "filename" is the name of the file being opened; "err" is assumed
43 * to be a UNIX-style errno or a WTAP_ERR_ value; "err_info" is assumed
44 * to be a string giving further information for some WTAP_ERR_ values;
45 * "file_type_subtype" is a WTAP_FILE_TYPE_SUBTYPE_ value for the type
46 * and subtype of file being opened.
48 extern void cfile_dump_open_failure_alert_box(const char *filename, int err,
49 char *err_info,
50 int file_type_subtype);
53 * Alert box for a failed attempt to read from a capture file.
54 * "err" is assumed to be a UNIX-style errno or a WTAP_ERR_ value;
55 * "err_info" is assumed to be a string giving further information for
56 * some WTAP_ERR_ values.
58 extern void cfile_read_failure_alert_box(const char *filename, int err,
59 char *err_info);
62 * Alert box for a failed attempt to write to a capture file.
63 * "in_filename" is the name of the file from which the record being
64 * written came; "out_filename" is the name of the file to which we're
65 * writing; "err" is assumed "err" is assumed to be a UNIX-style errno
66 * or a WTAP_ERR_ value; "err_info" is assumed to be a string giving
67 * further information for some WTAP_ERR_ values; "framenum" is the frame
68 * number of the record on which the error occurred; "file_type_subtype"
69 * is a WTAP_FILE_TYPE_SUBTYPE_ value for the type and subtype of file
70 * being written.
72 extern void cfile_write_failure_alert_box(const char *in_filename,
73 const char *out_filename,
74 int err, char *err_info,
75 uint64_t framenum,
76 int file_type_subtype);
79 * Alert box for a failed attempt to close a capture file.
80 * "err" is assumed to be a UNIX-style errno or a WTAP_ERR_ value;
81 * "err_info" is assumed to be a string giving further information for
82 * some WTAP_ERR_ values.
84 * When closing a capture file:
86 * some information in the file that can't be determined until
87 * all packets have been written might be written to the file
88 * (such as a table of the file offsets of all packets);
90 * data buffered in the low-level file writing code might be
91 * flushed to the file;
93 * for remote file systems, data written to the file but not
94 * yet sent to the server might be sent to the server or, if
95 * that data was sent asynchronously, "out of space", "disk
96 * quota exceeded", or "I/O error" indications might have
97 * been received but not yet delivered, and the close operation
98 * could deliver them;
100 * so we have to check for write errors here.
102 extern void cfile_close_failure_alert_box(const char *filename, int err,
103 char *err_info);
106 * Alert box for a failed attempt to open or create a file.
107 * "err" is assumed to be a UNIX-style errno; "for_writing" is true if
108 * the file is being opened for writing and false if it's being opened
109 * for reading.
111 extern void open_failure_alert_box(const char *filename, int err,
112 bool for_writing);
115 * Alert box for a failed attempt to read a file.
116 * "err" is assumed to be a UNIX-style errno.
118 extern void read_failure_alert_box(const char *filename, int err);
121 * Alert box for a failed attempt to write to a file.
122 * "err" is assumed to be a UNIX-style errno.
124 extern void write_failure_alert_box(const char *filename, int err);
127 * Alert box for a failed attempt to rename a file.
128 * "err" is assumed to be a UNIX-style errno.
130 * XXX - whether we mention the source pathname, the target pathname,
131 * or both depends on the error and on what we find if we look for
132 * one or both of them.
134 extern void rename_failure_alert_box(const char *old_filename,
135 const char *new_filename, int err);
138 * Register these routines with the report_message mechanism.
140 extern void init_report_alert_box(const char *friendly_program_name);
142 #ifdef __cplusplus
144 #endif /* __cplusplus */
146 #endif /* __ALERT_BOX_H__ */