SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::ExtensionNetwork Class Referencefinal

GUI-thread HTTP policy adapter; settings and parent must outlive requests. More...

#include <extensionnetwork.h>

Inheritance diagram for openswmmvis::ExtensionNetwork:
Collaboration diagram for openswmmvis::ExtensionNetwork:

Public Member Functions

 ExtensionNetwork (QSettings *settings, QObject *parent=nullptr)
 Construct a policy client.
 
bool allowed (const QUrl &url) const override
 Test a destination without making a request.
 
QNetworkAccessManager * shared () override
 Obtain the policy-enforcing network manager.
 
- Public Member Functions inherited from OpenSWMM::Sdk::INetworkPolicy
virtual ~INetworkPolicy ()=default
 Destroy an implementation; extensions never delete the host-owned service.
 

Protected Member Functions

QNetworkReply * createRequest (Operation operation, const QNetworkRequest &request, QIODevice *outgoingData=nullptr) override
 Validate and normalize an outgoing Qt request before any IO.
 

Detailed Description

GUI-thread HTTP policy adapter; settings and parent must outlive requests.

Constructor & Destructor Documentation

◆ ExtensionNetwork()

openswmmvis::ExtensionNetwork::ExtensionNetwork ( QSettings *  settings,
QObject *  parent = nullptr 
)
explicit

Construct a policy client.

Parameters
[in]settingsRequired borrowed host settings, read under extensions/network/.
[in]parentOptional QObject owner.

Member Function Documentation

◆ allowed()

bool openswmmvis::ExtensionNetwork::allowed ( const QUrl &  url) const
overridevirtual

Test a destination without making a request.

Parameters
[in]urlHTTPS destination; credentials embedded in URLs are refused.
Returns
False in offline mode, for unsupported schemes or outside an explicit host allowlist.

Implements OpenSWMM::Sdk::INetworkPolicy.

Here is the caller graph for this function:

◆ createRequest()

QNetworkReply * openswmmvis::ExtensionNetwork::createRequest ( Operation  operation,
const QNetworkRequest &  request,
QIODevice *  outgoingData = nullptr 
)
overrideprotected

Validate and normalize an outgoing Qt request before any IO.

Parameters
[in]operationQt request verb.
[in]requestRequested URL and headers, copied before redirect policy is changed.
[in]outgoingDataOptional body device borrowed by Qt for the request lifetime.
Returns
Qt-owned normal reply or an asynchronous policy-refusal reply.
Here is the call graph for this function:

◆ shared()

QNetworkAccessManager * openswmmvis::ExtensionNetwork::shared ( )
inlineoverridevirtual

Obtain the policy-enforcing network manager.

Returns
Borrowed GUI-thread manager; replies are caller-owned under Qt conventions.
Note
Requests and manually followed redirects are checked before network IO.

Implements OpenSWMM::Sdk::INetworkPolicy.


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