aboutsummaryrefslogtreecommitdiffstats
path: root/epan/report_err.h
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-03-23 21:19:58 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-03-23 21:19:58 +0000
commit7e46a7722c24e5d2fb083bf908c6237246fed327 (patch)
tree9dba3131d845040ea0ab402a8b3e4a5147d5d315 /epan/report_err.h
parent83eea317696851f5456c7fb9b27789ba4cc2c017 (diff)
Make "epan_init()" take, as additional arguments, pointers to routines
that dissectors should call to report file open and read errors, and have "report_open_failure()" and "report_read_failure()" call through those pointers, rather than being defined and exported by the application using libethereal - instead, the application would define those functions and pass pointers to them to 'epan_init()". Move "report_err.h" to the epan directory, as the functions it declares are now part of the libethereal API. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10470 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/report_err.h')
-rw-r--r--epan/report_err.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/epan/report_err.h b/epan/report_err.h
new file mode 100644
index 0000000000..ef116eb046
--- /dev/null
+++ b/epan/report_err.h
@@ -0,0 +1,48 @@
+/* report_err.h
+ * Declarations of routines for dissectors to use to report errors to
+ * the user (e.g., problems with preference settings)
+ *
+ * $Id: report_err.h,v 1.1 2004/03/23 21:19:56 guy Exp $
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __REPORT_ERR_H__
+#define __REPORT_ERR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * Report an error when trying to open a file.
+ */
+extern void report_open_failure(const char *filename, int err,
+ gboolean for_writing);
+
+/*
+ * Report an error when trying to read a file.
+ */
+extern void report_read_failure(const char *filename, int err);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __REPORT_ERR_H__ */