NDEVR
API Documentation
OWLClientInterface

High-level OWL server client that combines WebSocket communication with file transfer, credential management, and UI dialog coordination. More...

Inheritance diagram for OWLClientInterface:
[legend]
Collaboration diagram for OWLClientInterface:
[legend]

Public Member Functions

 OWLClientInterface (DesignObjectLookup *lookup, WindowManager *window_manager)
 Constructs the OWL client interface.
void connectionChangedSignal (bool is_connected)
 Emitted when the connection state changes.
OWLCredentialsDialogcredentialsDialog ()
 Returns the credentials dialog, creating it if needed.
OWLExportDialogexportDialog ()
 Returns the export dialog, creating it if needed.
OWLFileManagerfileManager ()
 Returns the file manager dialog, creating it if needed.
void finishedSignal (ServerRequestType)
 Emitted when a server request has completed.
virtual void onConnectionChanged (void *, bool is_connected) override
 Called when the server connection state changes.
virtual void onReceive (NDEVRConnectionData &data) override
 Handles received data from the server connection.
void openDownloadedData ()
 Opens the most recently downloaded data in the application.
LogPtrprogress ()
 Returns the progress log for tracking operations.
virtual ServerCommandReturn pushData () override
 Pushes the current project data to the server.
void requestShowCredentialsSignal ()
 Emitted when credentials need to be shown to the user.
OwlServerSettingsDialogserverManagerDialog ()
 Returns the server settings dialog, creating it if needed.
void setAllowBackButton (bool allow)
 Enables or disables the back button on dialogs.
void showDuplicateUserWarning (PopupInfo info)
 Shows a warning when a duplicate user is detected.
void showNoUserWarning (PopupInfo info)
 Shows a warning when no user account is found.
void showWarning (PopupInfo info, ServerRequestType request_type)
 Shows a warning popup for a failed server request.
WindowManagerwindowManager () const
 Returns the window manager.
Public Member Functions inherited from AdaptiveWebClient
 AdaptiveWebClient (QObject *parent=nullptr)
 Constructs the WebSocket client.
virtual uint08 bytesAvailable (void *socket) override
 Returns the number of bytes available for reading.
void * connectTo (const NDEVRServerInfo &info) override
 Establishes a connection to the specified server.
void connectToServer (const StringView &host, uint04 port, bool secure)
 Initiates a WebSocket connection to the specified host and port.
virtual void disconnectFrom (void *socket) override
 Disconnects from the specified socket.
virtual bool isOpen (void *socket=nullptr) const override
 Checks whether the socket is currently connected.
virtual uint08 rx (void *socket, NDEVRDataPacket &packet) override
 Receives data from the socket into a packet.
virtual uint08 tx (void *socket, NDEVRDataPacket &packet, uint08 size) override
 Transmits packet data through the socket.
void updateWindowSize (NDEVRConnectionData &state) override
 Updates the protocol window size for flow control.
virtual void wait (const TimeSpan &span, LogPtr log=nullptr) override
 Waits for the specified time span, processing events.

Additional Inherited Members

Protected Attributes inherited from AdaptiveWebClient
bool m_is_open_received = false
 Whether the connected signal has been received.
QTimer m_reconnect_timer
 Timer for automatic reconnection attempts.
QTimer m_send_timer
 Timer for periodic send buffer flushing.
QWebSocket * m_server_socket
 The underlying WebSocket.
bool m_should_be_open = false
 Whether the connection should be open.

Detailed Description

High-level OWL server client that combines WebSocket communication with file transfer, credential management, and UI dialog coordination.

Provides methods for uploading, downloading, and managing files on an OWL server, as well as lazily creating the associated UI dialogs.

Definition at line 27 of file OWLClientInterface.h.

Constructor & Destructor Documentation

◆ OWLClientInterface()

OWLClientInterface::OWLClientInterface ( DesignObjectLookup * lookup,
WindowManager * window_manager )

Constructs the OWL client interface.

Parameters
[in]lookupThe design object lookup for project data.
[in]window_managerThe window manager for dialog display.

Member Function Documentation

◆ connectionChangedSignal()

void OWLClientInterface::connectionChangedSignal ( bool is_connected)

Emitted when the connection state changes.

Parameters
[in]is_connectedWhether the server is now connected.

◆ credentialsDialog()

OWLCredentialsDialog * OWLClientInterface::credentialsDialog ( )

Returns the credentials dialog, creating it if needed.

Returns
A pointer to the credentials dialog.

◆ exportDialog()

OWLExportDialog * OWLClientInterface::exportDialog ( )

Returns the export dialog, creating it if needed.

Returns
A pointer to the export dialog.

◆ fileManager()

OWLFileManager * OWLClientInterface::fileManager ( )

Returns the file manager dialog, creating it if needed.

Returns
A pointer to the file manager.

◆ finishedSignal()

void OWLClientInterface::finishedSignal ( ServerRequestType )

Emitted when a server request has completed.

Parameters
[in]typeThe type of request that completed.

◆ onConnectionChanged()

virtual void OWLClientInterface::onConnectionChanged ( void * ,
bool is_connected )
overridevirtual

Called when the server connection state changes.

Parameters
[in]socketThe socket whose state changed.
[in]is_connectedWhether the socket is now connected.

◆ onReceive()

virtual void OWLClientInterface::onReceive ( NDEVRConnectionData & data)
overridevirtual

Handles received data from the server connection.

Parameters
[in]dataThe connection data containing the received payload.

◆ progress()

LogPtr & OWLClientInterface::progress ( )
inline

Returns the progress log for tracking operations.

Returns
A reference to the log pointer.

Definition at line 74 of file OWLClientInterface.h.

◆ pushData()

virtual ServerCommandReturn OWLClientInterface::pushData ( )
overridevirtual

Pushes the current project data to the server.

Returns
The server command return status.

◆ serverManagerDialog()

OwlServerSettingsDialog * OWLClientInterface::serverManagerDialog ( )

Returns the server settings dialog, creating it if needed.

Returns
A pointer to the server settings dialog.

◆ setAllowBackButton()

void OWLClientInterface::setAllowBackButton ( bool allow)

Enables or disables the back button on dialogs.

Parameters
[in]allowWhether the back button should be shown.

◆ showDuplicateUserWarning()

void OWLClientInterface::showDuplicateUserWarning ( PopupInfo info)

Shows a warning when a duplicate user is detected.

Parameters
[in]infoThe popup display information.

◆ showNoUserWarning()

void OWLClientInterface::showNoUserWarning ( PopupInfo info)

Shows a warning when no user account is found.

Parameters
[in]infoThe popup display information.

◆ showWarning()

void OWLClientInterface::showWarning ( PopupInfo info,
ServerRequestType request_type )

Shows a warning popup for a failed server request.

Parameters
[in]infoThe popup display information.
[in]request_typeThe type of request that failed.

◆ windowManager()

WindowManager * OWLClientInterface::windowManager ( ) const
inline

Returns the window manager.

Returns
A pointer to the window manager.

Definition at line 78 of file OWLClientInterface.h.


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