| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
FunnelAction Class Reference

An action representing a specific funnel menu or packet menu command. More...

`#include <funnel_statistics.h>`

Inheritance diagram for FunnelAction:

## Public Slots
void | triggerPacketCallback ()
| Slot triggered to execute the packet-specific callback.

## Public Member Functions
| FunnelAction (QObject *parent=nullptr)
| Constructs an empty FunnelAction.
| FunnelAction (QString title, funnel_menu_callback callback, void *callback_data, bool retap, QObject *parent)
| Constructs a FunnelAction for a general menu callback.
| FunnelAction (QString title, funnel_packet_menu_callback callback, void *callback_data, bool retap, const char *packet_required_fields, QObject *parent)
| Constructs a FunnelAction for a packet-specific menu callback.
| ~FunnelAction ()
| Destroys the FunnelAction.
funnel_menu_callback | callback () const
| Retrieves the standard menu callback.
QString | title () const
| Retrieves the title of the action.
virtual void | triggerCallback ()
| Triggers the associated callback based on the action type.
void | setPacketCallback (funnel_packet_menu_callback packet_callback)
| Sets the packet-specific menu callback.
void | setPacketData (GPtrArray *finfos)
| Sets the packet data required by the packet callback.
void | addToMenu (QMenu *ctx_menu, QHash< QString, QMenu * > &menuTextToMenus)
| Adds this action to a specific context menu hierarchy.
void | setPacketRequiredFields (const char *required_fields_str)
| Sets the fields required for the packet callback to be active.
const QSet< QString > | getPacketRequiredFields ()
| Retrieves the set of required packet fields.
bool | retap ()
| Checks if executing this action requires a retap.
QString | getPacketSubmenus ()
| Retrieves the path/hierarchy for packet submenus.

## Detailed Description

An action representing a specific funnel menu or packet menu command.

## Constructor & Destructor Documentation

## ◆ FunnelAction() [1/3]

FunnelAction::FunnelAction | ( | QObject * | parent = nullptr | ) |

Constructs an empty FunnelAction.

Parameters

  parent | The parent QObject, defaults to nullptr.

## ◆ FunnelAction() [2/3]

FunnelAction::FunnelAction | ( | QString | title,
|  | funnel_menu_callback | callback,
|  | void * | callback_data,
|  | bool | retap,
|  | QObject * | parent = nullptr )

Constructs a FunnelAction for a general menu callback.

Parameters

  title | The title of the action.
  callback | The callback function to execute.
  callback_data | User data to pass to the callback.
  retap | True if execution requires retapping packets.
  parent | The parent QObject.

## ◆ FunnelAction() [3/3]

FunnelAction::FunnelAction | ( | QString | title,
|  | funnel_packet_menu_callback | callback,
|  | void * | callback_data,
|  | bool | retap,
|  | const char * | packet_required_fields,
|  | QObject * | parent = nullptr )

Constructs a FunnelAction for a packet-specific menu callback.

Parameters

  title | The title of the action.
  callback | The packet-specific callback function to execute.
  callback_data | User data to pass to the callback.
  retap | True if execution requires retapping packets.
  packet_required_fields | Comma-separated list of required fields.
  parent | The parent QObject.

## Member Function Documentation

## ◆ addToMenu()

void FunnelAction::addToMenu | ( | QMenu * | ctx_menu,
|  | QHash< QString, QMenu * > & | menuTextToMenus )

Adds this action to a specific context menu hierarchy.

Parameters

  ctx_menu | The root context menu.
  menuTextToMenus | Map tracking submenus to build the hierarchy.

## ◆ callback()

funnel_menu_callback FunnelAction::callback | ( |  | ) | const

Retrieves the standard menu callback.

Returns
  The callback function pointer.

## ◆ getPacketRequiredFields()

const QSet< QString > FunnelAction::getPacketRequiredFields | ( |  | ) |

Retrieves the set of required packet fields.

Returns
  A set of required field name strings.

## ◆ getPacketSubmenus()

QString FunnelAction::getPacketSubmenus | ( |  | ) |

Retrieves the path/hierarchy for packet submenus.

Returns
  The packet submenu string.

## ◆ retap()

bool FunnelAction::retap | ( |  | ) |

Checks if executing this action requires a retap.

Returns
  True if retap is required, false otherwise.

## ◆ setPacketCallback()

void FunnelAction::setPacketCallback | ( | funnel_packet_menu_callback | packet_callback | ) |

Sets the packet-specific menu callback.

Parameters

  packet_callback | The callback function pointer.

## ◆ setPacketData()

void FunnelAction::setPacketData | ( | GPtrArray * | finfos | ) |

Sets the packet data required by the packet callback.

Parameters

  finfos | Pointer array containing field info data.

## ◆ setPacketRequiredFields()

void FunnelAction::setPacketRequiredFields | ( | const char * | required_fields_str | ) |

Sets the fields required for the packet callback to be active.

Parameters

  required_fields_str | Comma-separated list of required fields.

## ◆ title()

QString FunnelAction::title | ( |  | ) | const

Retrieves the title of the action.

Returns
  The title string.

## ◆ triggerCallback()

void FunnelAction::triggerCallback | ( |  | ) |
| virtual

Triggers the associated callback based on the action type.

Reimplemented in FunnelConsoleAction.

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

- /builds/wireshark/wireshark/ui/qt/funnel_statistics.h
- /builds/wireshark/wireshark/ui/qt/funnel_statistics.cpp