Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
ExpertInfoModel Class Reference

A model managing the expert information tree data. More...

#include <expert_info_model.h>

Inheritance diagram for ExpertInfoModel:

Public Types

enum  ExpertColumn {
  colSeverity = 0 , colSummary , colGroup , colProtocol ,
  colCount , colPacket , colHf , colLast
}
 Enumerates the columns in the expert info model. More...
 
enum  ExpertSeverity {
  severityError = PI_ERROR , severityWarn = PI_WARN , severityNote = PI_NOTE , severityChat = PI_CHAT ,
  severityComment = PI_COMMENT
}
 Enumerates the severity levels for expert information. More...
 

Public Member Functions

 ExpertInfoModel (CaptureFile &capture_file, QObject *parent=0)
 Constructs a new ExpertInfoModel.
 
virtual ~ExpertInfoModel ()
 Destroys the ExpertInfoModel.
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 Generates an index for the given row and column.
 
QModelIndex parent (const QModelIndex &index) const
 Retrieves the parent of a given index.
 
QVariant data (const QModelIndex &index, int role) const
 Retrieves data from the model for a given index and role.
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of rows under a given parent.
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 Returns the number of columns under a given parent.
 
int numEvents (enum ExpertSeverity severity)
 Gets the total number of events for a specific severity.
 
void clear ()
 Clears all expert information data from the model.
 
void setGroupBySummary (bool group_by_summary)
 Sets whether the model groups items by summary.
 
void addExpertInfo (const struct expert_info_s &expert_info)
 Adds a new expert information entry to the model.
 

Static Public Member Functions

static void tapReset (void *eid_ptr)
 Callback used by register_tap_listener to reset the tap.
 
static tap_packet_status tapPacket (void *eid_ptr, struct _packet_info *pinfo, struct epan_dissect *, const void *data, tap_flags_t flags)
 Callback used by register_tap_listener when a packet is processed.
 
static void tapDraw (void *eid_ptr)
 Callback used by register_tap_listener to draw or update results.
 

Detailed Description

A model managing the expert information tree data.

Member Enumeration Documentation

◆ ExpertColumn

Enumerates the columns in the expert info model.

Enumerator
colSeverity 

Severity column.

colSummary 

Summary text column.

colGroup 

Group ID column.

colProtocol 

Protocol string column.

colCount 

Event count column.

colPacket 

Packet number column.

colHf 

Header field ID column.

colLast 

End of columns marker.

◆ ExpertSeverity

Enumerates the severity levels for expert information.

Enumerator
severityError 

Error severity level.

severityWarn 

Warning severity level.

severityNote 

Note severity level.

severityChat 

Chat severity level.

severityComment 

Comment severity level.

Constructor & Destructor Documentation

◆ ExpertInfoModel()

ExpertInfoModel::ExpertInfoModel ( CaptureFile capture_file,
QObject *  parent = 0 
)

Constructs a new ExpertInfoModel.

Parameters
capture_fileThe capture file containing the expert information.
parentThe parent QObject, defaults to 0.

Member Function Documentation

◆ addExpertInfo()

void ExpertInfoModel::addExpertInfo ( const struct expert_info_s expert_info)

Adds a new expert information entry to the model.

Parameters
expert_infoThe expert information structure to add.

◆ columnCount()

int ExpertInfoModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Returns the number of columns under a given parent.

Parameters
parentThe parent model index (defaults to an invalid QModelIndex).
Returns
The number of columns.

◆ data()

QVariant ExpertInfoModel::data ( const QModelIndex &  index,
int  role 
) const

Retrieves data from the model for a given index and role.

Parameters
indexThe model index.
roleThe data role requested.
Returns
The data associated with the index and role.

◆ index()

QModelIndex ExpertInfoModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const

Generates an index for the given row and column.

Parameters
rowThe row index.
columnThe column index.
parentThe parent index (defaults to an invalid QModelIndex).
Returns
The corresponding model index.

◆ numEvents()

int ExpertInfoModel::numEvents ( enum ExpertSeverity  severity)

Gets the total number of events for a specific severity.

Parameters
severityThe severity level to query.
Returns
The number of events.

◆ parent()

QModelIndex ExpertInfoModel::parent ( const QModelIndex &  index) const

Retrieves the parent of a given index.

Parameters
indexThe child model index.
Returns
The parent model index.

◆ rowCount()

int ExpertInfoModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Returns the number of rows under a given parent.

Parameters
parentThe parent model index (defaults to an invalid QModelIndex).
Returns
The number of rows.

◆ setGroupBySummary()

void ExpertInfoModel::setGroupBySummary ( bool  group_by_summary)

Sets whether the model groups items by summary.

Parameters
group_by_summaryTrue to group by summary, false otherwise.

◆ tapDraw()

void ExpertInfoModel::tapDraw ( void *  eid_ptr)
static

Callback used by register_tap_listener to draw or update results.

Parameters
eid_ptrPointer to the ExpertInfoModel instance.

◆ tapPacket()

tap_packet_status ExpertInfoModel::tapPacket ( void *  eid_ptr,
struct _packet_info pinfo,
struct epan_dissect ,
const void *  data,
tap_flags_t  flags 
)
static

Callback used by register_tap_listener when a packet is processed.

Parameters
eid_ptrPointer to the ExpertInfoModel instance.
pinfoPointer to the packet info structure.
dataPointer to the expert info data.
flagsTap flags.
Returns
The status of the tap packet processing.

◆ tapReset()

void ExpertInfoModel::tapReset ( void *  eid_ptr)
static

Callback used by register_tap_listener to reset the tap.

Parameters
eid_ptrPointer to the ExpertInfoModel instance.

The documentation for this class was generated from the following files: