Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
credentials_model.h
Go to the documentation of this file.
1
12#ifndef CREDENTIALS_MODELS_H
13#define CREDENTIALS_MODELS_H
14
15#include <QAbstractListModel>
16#include <QList>
17
18#include <epan/tap.h>
19#include <capture_file.h>
20#include <epan/credentials.h>
21
25class CredentialsModel : public QAbstractListModel
26{
27 Q_OBJECT
28
29public:
34 CredentialsModel(QObject *parent);
35
40
46 virtual int rowCount(const QModelIndex &parent = QModelIndex()) const ;
47
53 virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
54
61 virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
62
70 virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
71
76 void addRecord(const tap_credential_t *rec);
77
81 void clear();
82
86 enum {
91 };
92
96 enum {
97 ColumnHFID = Qt::UserRole + 1
98 };
99
100private:
102 QList<tap_credential_t*> credentials_;
103
104};
105
106#endif // CREDENTIALS_MODELS_H
A list model for managing and displaying extracted network credentials.
Definition credentials_model.h:26
~CredentialsModel()
Destroys the CredentialsModel.
Definition credentials_model.cpp:23
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Retrieves data from the model for the given index and role.
Definition credentials_model.cpp:38
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of columns (data fields) for a credential.
Definition credentials_model.cpp:33
@ COL_NUM
Definition credentials_model.h:87
@ COL_USERNAME
Definition credentials_model.h:89
@ COL_PROTO
Definition credentials_model.h:88
@ COL_INFO
Definition credentials_model.h:90
void clear()
Clears all credential records from the model.
Definition credentials_model.cpp:122
@ ColumnHFID
Definition credentials_model.h:97
void addRecord(const tap_credential_t *rec)
Adds a new credential record to the model.
Definition credentials_model.cpp:106
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Returns the number of rows (credentials) under the given parent.
Definition credentials_model.cpp:28
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Retrieves header data for the given section, orientation, and role.
Definition credentials_model.cpp:136
Represents a single set of credentials captured from a dissected protocol exchange.
Definition credentials.h:20