AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Types | Public Member Functions | Protected Member Functions | List of all members
alexaClientSDK::bluetoothImplementations::blueZ::DBusObject< T > Class Template Reference

#include <DBusObject.h>

Inheritance diagram for alexaClientSDK::bluetoothImplementations::blueZ::DBusObject< T >:
Inheritance graph
Collaboration diagram for alexaClientSDK::bluetoothImplementations::blueZ::DBusObject< T >:
Collaboration graph

Public Types

using commandHandler_t = void(T::*)(GVariant *parameters, GDBusMethodInvocation *invocation)

Public Member Functions

virtual ~DBusObject ()=default
- Public Member Functions inherited from alexaClientSDK::bluetoothImplementations::blueZ::DBusObjectBase
virtual ~DBusObjectBase ()
bool registerWithDBus ()
void unregisterObject ()

Protected Member Functions

 DBusObject (std::shared_ptr< DBusConnection > connection, std::string xmlInterfaceIntrospection, std::string objectPath, std::unordered_map< std::string, commandHandler_t > methodMap)
- Protected Member Functions inherited from alexaClientSDK::bluetoothImplementations::blueZ::DBusObjectBase
 DBusObjectBase (std::shared_ptr< DBusConnection > connection, const std::string &xmlInterfaceIntrospection, const std::string &objectPath, GDBusInterfaceMethodCallFunc methodCallFunc)
void onMethodCalledInternal (const char *methodName)

Detailed Description

template<class T>
class alexaClientSDK::bluetoothImplementations::blueZ::DBusObject< T >

Typed version of the base class for objects exposed to DBus. This class simplifies the handling of DBus method calls by binding them to class member functions

Template Parameters
TName of the derived class to be used to imlpement the object. The derived class declaration would look like this:
class MyDBusObjectClass : public DBusObject<MyDBusObjectClass> {

Member Typedef Documentation

◆ commandHandler_t

template<class T>
using alexaClientSDK::bluetoothImplementations::blueZ::DBusObject< T >::commandHandler_t = void (T::*)(GVariant* parameters, GDBusMethodInvocation* invocation)

Callback type to be used by member functions handling DBus method calls

parametersParameters provided to method call
invocation@ GDBusMethodInvocation object associated with a method call

Constructor & Destructor Documentation

◆ ~DBusObject()

template<class T>
virtual alexaClientSDK::bluetoothImplementations::blueZ::DBusObject< T >::~DBusObject ( )

◆ DBusObject()

template<class T>
alexaClientSDK::bluetoothImplementations::blueZ::DBusObject< T >::DBusObject ( std::shared_ptr< DBusConnection connection,
std::string  xmlInterfaceIntrospection,
std::string  objectPath,
std::unordered_map< std::string, commandHandler_t methodMap 


connectionDBus connection to be used to register this obejct
xmlInterfaceIntrospectionXML containing the description of the interfaces this object implements. See objectPath Path to register the object to methodMap A Method name to callback function map

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

AlexaClientSDK 3.0.0 - Copyright 2016-2022, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0