Network Interface#
The network interface enables the module to define a module related network connection.
#include "gt_moduleinterface.h"
#include "gt_networkinterface.h"
class MyModule: public QObject, public GtModuleInterface, GtNetworkInterface
{
[...]
Q_INTERFACES(GtModuleInterface)
Q_INTERFACES(GtNetworkInterface)
[...]
/**
* @brief Returns identification string of access point.
* @return Identification string of access point.
*/
QString accessId() override;
/**
* @brief Returns meta object of GtAbstractAccessDataConnection class.
* @return Meta object of GtAbstractAccessDataConnection class.
*/
QMetaObject accessConnection() override;
[...]
}
Documentation on Virtual Member Functions#
GtNetworkInterface::accessId()Defines the access id of the module. It is recommended to use the module
GtModuleInterface::ident().QMap<const char*, QMetaObject> MyModule::accessId() { return ident(); }
GtNetworkInterface::accessConnection()Defines the access connection object. For basic applications it is recommended to use GtAccessDataConnection.
QMap<const char*, QMetaObject> MyModule::accessId() { return GT_METADATA(GtAccessDataConnection); }