Skip to content

class flake::Connection

More...

#include <Connection.h>

Inherits from flake::ConnectedObject, flake::IndicationSink, flake::ConfirmationSink

Public Functions

Name
virtual intconnect(AuthenticationSink * authentication_sink) =0
virtual intconnect(PropArray & props) =0
virtual voiddisconnect() =0
Disconnect from the router.
virtual boolconnected() =0
virtual int8_tregisterService(Service * srv, uniqueId_t & uuid, bool requires_auth =false) =0
virtual int8_tcreateObject(uniqueId_t & objectType, PropArray & properties, Object ** object) =0
virtual voidqueryObjects(uniqueId_t type, int * numObjects, Object ** objects[]) =0

Protected Functions

Name
~Connection() =default

Additional inherited members

Public Functions inherited from flake::ConnectedObject

Name
virtual addr_taddr() const =0
virtual addr_tbroadcastAddr() const =0
virtual voidref() =0
virtual voidunref() =0

Protected Functions inherited from flake::ConnectedObject

Name
~ConnectedObject() =default

Public Attributes inherited from flake::ConnectedObject

Name
const addr_tEMPTY_ADDR

Public Functions inherited from flake::IndicationSink

Name
virtual voidonIndication(Indication & indication) =0

Protected Functions inherited from flake::IndicationSink

Name
~IndicationSink() =default

Public Functions inherited from flake::ConfirmationSink

Name
virtual voidonConfirmation(Confirmation & confirmation) =0

Protected Functions inherited from flake::ConfirmationSink

Name
~ConfirmationSink() =default

Detailed Description

cpp
class flake::Connection;

Document me

Public Functions Documentation

function connect

cpp
virtual int connect(
    AuthenticationSink * authentication_sink
) =0

Return: E_OK if the connection has been established or an error if it failed

Establish a connection to the router

function connect

cpp
virtual int connect(
    PropArray & props
) =0

function disconnect

cpp
virtual void disconnect() =0

Disconnect from the router.

function connected

cpp
virtual bool connected() =0

function registerService

cpp
virtual int8_t registerService(
    Service * srv,
    uniqueId_t & uuid,
    bool requires_auth =false
) =0

function createObject

cpp
virtual int8_t createObject(
    uniqueId_t & objectType,
    PropArray & properties,
    Object ** object
) =0

function queryObjects

cpp
virtual void queryObjects(
    uniqueId_t type,
    int * numObjects,
    Object ** objects[]
) =0

Parameters:

  • type the type of the service (the service-class)
  • numObjects number of found objects
  • objects array of objects

Queries the router for exisiting service-objects. it is important to call 'unref()' on any returned object, that the caller doesn't want to use

Protected Functions Documentation

function ~Connection

cpp
~Connection() =default