10#ifndef ATAP_DATA_MODEL_H
11#define ATAP_DATA_MODEL_H
19#include <QAbstractListModel>
38 DISPLAY_FILTER = Qt::UserRole,
39 UNFORMATTED_DISPLAYDATA,
57 DATAMODEL_CONVERSATION,
87 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
89 virtual int columnCount(
const QModelIndex &parent = QModelIndex())
const = 0;
90 virtual QVariant headerData(
int section, Qt::Orientation orientation = Qt::Horizontal,
int role = Qt::DisplayRole)
const = 0;
91 virtual QVariant data(
const QModelIndex &idx,
int role = Qt::DisplayRole)
const = 0;
165 void setMachineReadable(
bool machineReadable);
167 void limitToDisplayFilter(
bool limit);
226 void tapListenerChanged(
bool enable);
230 static void tapReset(
void *tapdata);
231 static void tapDraw(
void *tap_data);
233 virtual tap_packet_cb conversationPacketHandler();
236 void updateData(GArray * data);
248 bool _machineReadable;
251 double _minRelStartTime;
252 double _maxRelStopTime;
274 ENDP_COLUMN_PACKETS_TOTAL,
275 ENDP_COLUMN_BYTES_TOTAL,
277 ENDP_COLUMN_BYTES_AB,
279 ENDP_COLUMN_BYTES_BA,
281 ENDP_COLUMN_GEO_COUNTRY = ENDP_NUM_COLUMNS,
282 ENDP_COLUMN_GEO_CITY,
283 ENDP_COLUMN_GEO_LATITUDE,
284 ENDP_COLUMN_GEO_LONGITUDE,
285 ENDP_COLUMN_GEO_AS_NUM,
286 ENDP_COLUMN_GEO_AS_ORG,
288 } endpoint_column_type_e;
292 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
293 QVariant headerData(
int section, Qt::Orientation orientation = Qt::Horizontal,
int role = Qt::DisplayRole)
const override;
294 QVariant data(
const QModelIndex &idx,
int role = Qt::DisplayRole)
const override;
307 CONV_COLUMN_SRC_ADDR,
308 CONV_COLUMN_SRC_PORT,
309 CONV_COLUMN_DST_ADDR,
310 CONV_COLUMN_DST_PORT,
314 CONV_COLUMN_PACKETS_TOTAL,
315 CONV_COLUMN_BYTES_TOTAL,
317 CONV_COLUMN_BYTES_AB,
319 CONV_COLUMN_BYTES_BA,
321 CONV_COLUMN_DURATION,
325 CONV_INDEX_COLUMN = CONV_NUM_COLUMNS
326 } conversation_column_type_e;
329 CONV_TCP_EXT_COLUMN_A = CONV_INDEX_COLUMN,
330 CONV_TCP_EXT_NUM_COLUMNS,
331 CONV_TCP_EXT_INDEX_COLUMN = CONV_TCP_EXT_NUM_COLUMNS
332 } conversation_tcp_ext_column_type_e;
336 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
337 QVariant headerData(
int section, Qt::Orientation orientation = Qt::Horizontal,
int role = Qt::DisplayRole)
const override;
338 QVariant data(
const QModelIndex &idx,
int role = Qt::DisplayRole)
const override;
DataModel for tap user data.
Definition atap_data_model.h:33
virtual void setResolveNames(bool resolve)=0
Enable or disable if names should be resolved.
bool showTotalColumn() const
A total column is filled.
Definition atap_data_model.cpp:328
bool resolveNames() const
Is the model set to resolve names in address and ports columns.
Definition atap_data_model.cpp:265
bool enableTap()
Enable tapping in this model.
Definition atap_data_model.cpp:109
QString tap() const
Returns the name for the tap being used.
Definition atap_data_model.cpp:82
bool allowsNameResolution() const
Does the model allow names to be resolved.
Definition atap_data_model.cpp:270
virtual void useAbsoluteTime(bool absolute)=0
Use absolute time for any column supporting it.
dataModelType modelType() const
Return the model type.
Definition atap_data_model.cpp:318
void setFilter(QString filter)
Set the filter string.
Definition atap_data_model.cpp:296
void disableTap()
Disable the tapping for this model.
Definition atap_data_model.cpp:136
void updateFlags(unsigned flag)
Update the flags.
Definition atap_data_model.cpp:145
int rowCount(const QModelIndex &parent=QModelIndex()) const
Number of rows under the given parent in this model, which is the total number of rows for the empty ...
Definition atap_data_model.cpp:182
bool portsAreHidden() const
Are ports hidden for this model.
Definition atap_data_model.cpp:323
int protoId() const
The protocol id for the tap.
Definition atap_data_model.cpp:77
virtual void useNanosecondTimestamps(bool nanoseconds)=0
Use nanosecond timestamps if requested.
QString filter() const
Return a filter set for the model.
Definition atap_data_model.cpp:313
Definition atap_data_model.h:302
void useAbsoluteTime(bool absolute) override
Use absolute time for any column supporting it.
Definition atap_data_model.cpp:943
bool showConversationId(int row=0) const
Show the conversation id if available.
Definition atap_data_model.cpp:917
void useNanosecondTimestamps(bool nanoseconds) override
Use nanosecond timestamps if requested.
Definition atap_data_model.cpp:955
void setResolveNames(bool resolve) override
Enable or disable if names should be resolved.
Definition atap_data_model.cpp:932
Definition atap_data_model.h:264
void useNanosecondTimestamps(bool nanoseconds) override
Use nanosecond timestamps if requested.
Definition atap_data_model.cpp:589
void setResolveNames(bool resolve) override
Enable or disable if names should be resolved.
Definition atap_data_model.cpp:569
void useAbsoluteTime(bool absolute) override
Use absolute time for any column supporting it.
Definition atap_data_model.cpp:580
Definition conversation_table.h:53
Definition conversation_table.h:121
Definition conversation_table.c:24