2 * Routines to put up various "standard" alert boxes used in multiple
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
12 #ifndef __ALERT_BOX_H__
13 #define __ALERT_BOX_H__
17 #endif /* __cplusplus */
20 * Alert box for general errors.
22 extern void failure_alert_box(const char *msg_format, ...) G_GNUC_PRINTF(1, 2);
23 extern void vfailure_alert_box(const char *msg_format, va_list ap);
26 * Alert box for general warnings.
28 extern void vwarning_alert_box(const char *msg_format, va_list ap);
31 * Alert box for a failed attempt to open a capture file for reading.
32 * "filename" is the name of the file being opened; "err" is assumed
33 * to be a UNIX-style errno or a WTAP_ERR_ value; "err_info" is assumed
34 * to be a string giving further information for some WTAP_ERR_ values..
36 extern void cfile_open_failure_alert_box(const char *filename, int err,
40 * Alert box for a failed attempt to open a capture file for writing.
41 * "filename" is the name of the file being opened; "err" is assumed
42 * to be a UNIX-style errno or a WTAP_ERR_ value; "file_type_subtype"
43 * is a WTAP_FILE_TYPE_SUBTYPE_ value for the type and subtype of file
46 extern void cfile_dump_open_failure_alert_box(const char *filename, int err,
47 int file_type_subtype);
50 * Alert box for a failed attempt to read from a capture file.
51 * "err" is assumed to be a UNIX-style errno or a WTAP_ERR_ value;
52 * "err_info" is assumed to be a string giving further information for
53 * some WTAP_ERR_ values.
55 extern void cfile_read_failure_alert_box(const char *filename, int err,
59 * Alert box for a failed attempt to write to a capture file.
60 * "in_filename" is the name of the file from which the record being
61 * written came; "out_filename" is the name of the file to which we're
62 * writing; "err" is assumed "err" is assumed to be a UNIX-style errno
63 * or a WTAP_ERR_ value; "err_info" is assumed to be a string giving
64 * further information for some WTAP_ERR_ values; "framenum" is the frame
65 * number of the record on which the error occurred; "file_type_subtype"
66 * is a WTAP_FILE_TYPE_SUBTYPE_ value for the type and subtype of file
69 extern void cfile_write_failure_alert_box(const char *in_filename,
70 const char *out_filename,
71 int err, gchar *err_info,
73 int file_type_subtype);
76 * Alert box for a failed attempt to close a capture file.
77 * "err" is assumed to be a UNIX-style errno or a WTAP_ERR_ value.
79 * When closing a capture file:
81 * some information in the file that can't be determined until
82 * all packets have been written might be written to the file
83 * (such as a table of the file offsets of all packets);
85 * data buffered in the low-level file writing code might be
86 * flushed to the file;
88 * for remote file systems, data written to the file but not
89 * yet sent to the server might be sent to the server or, if
90 * that data was sent asynchronously, "out of space", "disk
91 * quota exceeded", or "I/O error" indications might have
92 * been received but not yet delivered, and the close operation
95 * so we have to check for write errors here.
97 extern void cfile_close_failure_alert_box(const char *filename, int err);
100 * Alert box for a failed attempt to open or create a file.
101 * "err" is assumed to be a UNIX-style errno; "for_writing" is TRUE if
102 * the file is being opened for writing and FALSE if it's being opened
105 extern void open_failure_alert_box(const char *filename, int err,
106 gboolean for_writing);
109 * Alert box for a failed attempt to read a file.
110 * "err" is assumed to be a UNIX-style errno.
112 extern void read_failure_alert_box(const char *filename, int err);
115 * Alert box for a failed attempt to write to a file.
116 * "err" is assumed to be a UNIX-style errno.
118 extern void write_failure_alert_box(const char *filename, int err);
122 #endif /* __cplusplus */
124 #endif /* __ALERT_BOX_H__ */
132 * indent-tabs-mode: nil
135 * ex: set shiftwidth=4 tabstop=8 expandtab:
136 * :indentSize=4:tabSize=8:noTabs=true: