1. Overview
GTK page that aggregates connections by executable/application identity for the current session, showing connection count, latest destination, verdict, and time with constant-time row updates.
File role: Header Interface. The file contains 68 lines and belongs to the pages/AppsPage.hpp path.
The companion file is pages/AppsPage.cpp.
2. Component Responsibilities
- Declare the component API, owned state, callbacks, and data structures.
- Resolve a stable application display name
- Use executable path or process command as the aggregation key
- Insert a new application row on first sight
- Update count and latest connection metadata in O(1)
- Clear the session list on user request
3. Dependencies and Integration
Project-level dependencies:
gtkmm.h../ipc/UIServer.hpp
System and library dependencies:
stringunordered_map
4. Declared Types
AppsPage
Declares a class derived from or associated with public Gtk::Box.
Columns
Declares a struct derived from or associated with public Gtk::TreeModel::ColumnRecord.
5. Owned State and UI Members
User-interface members
Gtk::TreeModelColumn<Glib::ustring> col_name;Gtk::TreeModelColumn<Glib::ustring> col_path;Gtk::TreeModelColumn<uint32_t> col_count;Gtk::TreeModelColumn<Glib::ustring> col_last_host;Gtk::TreeModelColumn<Glib::ustring> col_last_verdict;Gtk::TreeModelColumn<Glib::ustring> col_last_time;Glib::RefPtr<Gtk::ListStore> m_store;Gtk::TreeView m_treeView;Gtk::ScrolledWindow m_scroll;Gtk::Label m_headerLabel;Gtk::Button m_clearBtn;std::unordered_map<std::string, Gtk::TreeModel::iterator> m_appRows;
Data and configuration state
Columns m_columns;
6. Functions and Methods
The file exposes or implements 6 detected function or method signatures.
1. AppsPage
AppsPage()
Implements the apps page operation declared by this component.
2. noteConnection
void noteConnection(const ConnectionInfo& info, const std::string& verdict)
Records connection in the current in-memory model.
3. clear
void clear()
Clears clear and resets related state.
4. buildUI
void buildUI()
Builds and configures the ui user-interface or internal structure.
5. currentTimeString
static std::string currentTimeString()
Implements the current time string operation declared by this component.
6. displayNameFor
static std::string displayNameFor(const ConnectionInfo& info)
Implements the display name for operation declared by this component.
7. Runtime Flow
- Resolve a stable application display name
- Use executable path or process command as the aggregation key
- Insert a new application row on first sight
- Update count and latest connection metadata in O(1)
- Clear the session list on user request
8. Runtime and Security Considerations
- Uses the shared application resolver to avoid misleading process attribution.
- Keeps session data in memory and exposes an explicit clear operation.
9. Error Handling and Operational Notes
- Errors are propagated through the return type, callbacks, or the owning controller.
10. Source Integrity
Relative source path: pages/AppsPage.hpp
SHA-256:
28df5524b9003018baf082af66912c12a1b9aff64b87c980eeedba21587ca21d
11. Licensing
The source header identifies this component as distributed under the GNU General Public License version 3. BastionGuard branding and trademarks remain subject to the notices stated in the source file.
