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

Represents a single "Decode As" mapping entry in the UI. More...

#include <decode_as_model.h>

Public Member Functions

 DecodeAsItem (const char *table_name=NULL, const void *selector=NULL)
 Construct a DecodeAsItem from a raw table name and selector.
 
 DecodeAsItem (const decode_as_t *entry, const void *selector=NULL)
 Construct a DecodeAsItem from a decode_as_t entry and selector.
 
virtual ~DecodeAsItem ()
 Destroy the DecodeAsItem.
 
const char * tableName () const
 Return the dissector table name.
 
const char * tableUIName () const
 Return the dissector table name for display in the UI.
 
uint selectorUint () const
 Return the selector as an unsigned integer.
 
QString selectorString () const
 Return the selector as a string.
 
decode_dcerpc_bind_values_tselectorDCERPC () const
 Return the selector as a DCE/RPC bind value.
 
const guid_keyselectorUUID () const
 Return the selector as a UUID key.
 
QString defaultDissector () const
 Return the name of the default dissector for this entry.
 
QString currentDissector () const
 Return the name of the currently selected dissector.
 
dissector_handle_t dissectorHandle () const
 Return the handle of the currently selected dissector.
 
void setTable (const decode_as_t *entry)
 Set the dissector table from a decode_as_t entry.
 
void setSelector (const QString &value)
 Set the selector value from a string.
 
void setDissectorHandle (dissector_handle_t handle)
 Set the dissector handle.
 
void setUUID (const guid_key &key)
 Set the UUID selector key.
 
void updateHandles ()
 Refresh the default and current dissector name strings from the current dissector handle.
 

Detailed Description

Represents a single "Decode As" mapping entry in the UI.

Constructor & Destructor Documentation

◆ DecodeAsItem() [1/2]

DecodeAsItem::DecodeAsItem ( const char *  table_name = NULL,
const void *  selector = NULL 
)

Construct a DecodeAsItem from a raw table name and selector.

Parameters
table_nameThe dissector table name, or NULL for none.
selectorThe selector value, or NULL for none.

◆ DecodeAsItem() [2/2]

DecodeAsItem::DecodeAsItem ( const decode_as_t entry,
const void *  selector = NULL 
)

Construct a DecodeAsItem from a decode_as_t entry and selector.

Parameters
entryThe decode_as_t entry describing the table.
selectorThe selector value, or NULL for none.

Member Function Documentation

◆ currentDissector()

QString DecodeAsItem::currentDissector ( ) const
inline

Return the name of the currently selected dissector.

Returns
The current dissector name string.

◆ defaultDissector()

QString DecodeAsItem::defaultDissector ( ) const
inline

Return the name of the default dissector for this entry.

Returns
The default dissector name string.

◆ dissectorHandle()

dissector_handle_t DecodeAsItem::dissectorHandle ( ) const
inline

Return the handle of the currently selected dissector.

Returns
The dissector handle.

◆ selectorDCERPC()

decode_dcerpc_bind_values_t * DecodeAsItem::selectorDCERPC ( ) const
inline

Return the selector as a DCE/RPC bind value.

Returns
Pointer to the DCE/RPC bind values, or nullptr if not set.

◆ selectorString()

QString DecodeAsItem::selectorString ( ) const
inline

Return the selector as a string.

Returns
The string selector value.

◆ selectorUint()

uint DecodeAsItem::selectorUint ( ) const
inline

Return the selector as an unsigned integer.

Returns
The uint selector value.

◆ selectorUUID()

const guid_key * DecodeAsItem::selectorUUID ( ) const
inline

Return the selector as a UUID key.

Returns
Pointer to the UUID key.

◆ setDissectorHandle()

void DecodeAsItem::setDissectorHandle ( dissector_handle_t  handle)

Set the dissector handle.

Parameters
handleThe dissector handle to use.

◆ setSelector()

void DecodeAsItem::setSelector ( const QString &  value)

Set the selector value from a string.

Parameters
valueThe new selector string.

◆ setTable()

void DecodeAsItem::setTable ( const decode_as_t entry)

Set the dissector table from a decode_as_t entry.

Parameters
entryThe decode_as_t entry describing the table.

◆ setUUID()

void DecodeAsItem::setUUID ( const guid_key key)

Set the UUID selector key.

Parameters
keyThe UUID key to use as the selector.

◆ tableName()

const char * DecodeAsItem::tableName ( ) const
inline

Return the dissector table name.

Returns
The internal table name string.

◆ tableUIName()

const char * DecodeAsItem::tableUIName ( ) const
inline

Return the dissector table name for display in the UI.

Returns
The UI-facing table name string.

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