NDEVR
API Documentation
ConnectionDialogFactoryabstract

Used to, given a Connection, generate an appropriate ConnectionDialog to allow adjustment of parameters. More...

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

Public Member Functions

virtual ConnectionDialogcreateConnectionDialog () const =0
 Creates a new ConnectionDialog instance for this connection type.
virtual bool handlesConnection (const ConnectionInfo &connection) const
 Checks whether this factory can produce a dialog for the given connection.
virtual bool handlesType (const StringView &type) const =0
 Checks whether this factory handles the specified connection type string.
virtual StringView icon () const =0
 Returns the icon name associated with this connection type.
virtual TranslatedString title () const =0
 Returns the display title for this connection type.

Static Public Member Functions

static Buffer< ConnectionDialogFactory * > ConnectionDialogFactories ()
 Returns all registered ConnectionDialogFactory instances.
static void RegisterConnectionFactory (ConnectionDialogFactory *factory)
 Registers a connection dialog factory for use by the application.

Static Protected Attributes

static Buffer< ConnectionDialogFactory * > s_registered_factories
 All registered connection dialog factories.

Detailed Description

Used to, given a Connection, generate an appropriate ConnectionDialog to allow adjustment of parameters.


Definition at line 53 of file ConnectionDialog.h.

Member Function Documentation

◆ ConnectionDialogFactories()

Buffer< ConnectionDialogFactory * > ConnectionDialogFactory::ConnectionDialogFactories ( )
static

Returns all registered ConnectionDialogFactory instances.

Returns
Buffer of registered factories.

◆ createConnectionDialog()

virtual ConnectionDialog * ConnectionDialogFactory::createConnectionDialog ( ) const
pure virtual

Creates a new ConnectionDialog instance for this connection type.

Returns
A newly allocated ConnectionDialog.

Implemented in BluetoothConnectionDialogFactory, SerialPortConnectionDialogFactory, and WebSocketConnectionDialogFactory.

◆ handlesConnection()

virtual bool ConnectionDialogFactory::handlesConnection ( const ConnectionInfo & connection) const
virtual

Checks whether this factory can produce a dialog for the given connection.

Parameters
[in]connectionThe connection info to check.
Returns
Whether this factory handles the connection.

◆ handlesType()

virtual bool ConnectionDialogFactory::handlesType ( const StringView & type) const
pure virtual

Checks whether this factory handles the specified connection type string.

Parameters
[in]typeThe connection type identifier.
Returns
Whether this factory supports the type.

Implemented in BluetoothConnectionDialogFactory, SerialPortConnectionDialogFactory, and WebSocketConnectionDialogFactory.

◆ icon()

virtual StringView ConnectionDialogFactory::icon ( ) const
pure virtual

Returns the icon name associated with this connection type.

Returns
The icon identifier.

Implemented in BluetoothConnectionDialogFactory, SerialPortConnectionDialogFactory, and WebSocketConnectionDialogFactory.

◆ RegisterConnectionFactory()

void ConnectionDialogFactory::RegisterConnectionFactory ( ConnectionDialogFactory * factory)
static

Registers a connection dialog factory for use by the application.

Parameters
[in]factoryThe factory to register.

◆ title()

virtual TranslatedString ConnectionDialogFactory::title ( ) const
pure virtual

Returns the display title for this connection type.

Returns
The translated title string.

Implemented in BluetoothConnectionDialogFactory, SerialPortConnectionDialogFactory, and WebSocketConnectionDialogFactory.


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