1 /* export_object_dialog.h
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
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.
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.
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.
24 #ifndef EXPORT_OBJECT_DIALOG_H
25 #define EXPORT_OBJECT_DIALOG_H
33 #include <epan/packet_info.h>
34 #include <epan/prefs.h>
37 #include <ui/export_object.h>
41 #include <QTreeWidgetItem>
42 #include <QAbstractButton>
44 Q_DECLARE_METATYPE(export_object_entry_t
*)
47 class ExportObjectDialog
;
50 struct _export_object_list_t
{
51 class ExportObjectDialog
*eod
;
55 class ExportObjectDialog
: public QDialog
60 enum ObjectType
{ Dicom
, Http
, Smb
};
62 explicit ExportObjectDialog(QWidget
*parent
, capture_file
*cf
, ObjectType object_type
);
63 ~ExportObjectDialog();
66 void addObjectEntry(export_object_entry_t
*entry
);
67 export_object_entry_t
*objectEntry(int row
);
75 void captureFileClosing(const capture_file
*cf
);
76 void on_buttonBox_helpRequested();
77 void on_objectTree_currentItemChanged(QTreeWidgetItem
*item
, QTreeWidgetItem
*previous
);
78 void on_buttonBox_clicked(QAbstractButton
*button
);
81 void saveCurrentEntry();
82 void saveAllEntries();
84 /* When a protocol needs intermediate data structures to construct the
85 export objects, then it must specifiy a function that cleans up all
86 those data structures. This function is passed to export_object_window
87 and called when tap reset or windows closes occurs. If no function is needed
88 a NULL value should be passed instead */
89 typedef void (*eo_protocoldata_reset_cb
)(void);
91 Ui::ExportObjectDialog
*eo_ui_
;
92 capture_file
*cap_file_
;
94 QPushButton
*save_bt_
;
95 QPushButton
*save_all_bt_
;
97 export_object_list_t export_object_list_
;
98 const gchar
*tap_name_
;
100 tap_packet_cb tap_packet_
;
101 eo_protocoldata_reset_cb eo_protocoldata_resetfn_
;
104 #endif // EXPORT_OBJECT_DIALOG_H
112 * indent-tabs-mode: nil
115 * ex: set shiftwidth=4 tabstop=8 expandtab:
116 * :indentSize=4:tabSize=8:noTabs=true: