AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy Class Reference

#include <DBusProxy.h>

Inheritance diagram for alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy:
Inheritance graph
[legend]

Public Member Functions

virtual ~DBusProxy ()
 
virtual ManagedGVariant callMethod (const std::string &methodName, GVariant *parameters=nullptr, GError **error=nullptr)
 
virtual ManagedGVariant callMethodWithFDList (const std::string &methodName, GVariant *parameters=nullptr, GUnixFDList **outlist=nullptr, GError **error=nullptr)
 
virtual std::string getObjectPath () const
 
virtual GDBusProxy * get ()
 

Static Public Member Functions

static std::shared_ptr< DBusProxycreate (const std::string &interfaceName, const std::string &objectPath)
 

Protected Member Functions

 DBusProxy (GDBusProxy *proxy, const std::string &objectPath)
 

Detailed Description

A wrapper class for DBus proxy objects.

Constructor & Destructor Documentation

◆ ~DBusProxy()

virtual alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy::~DBusProxy ( )
virtual

◆ DBusProxy()

alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy::DBusProxy ( GDBusProxy *  proxy,
const std::string &  objectPath 
)
protected

Constructor that initializes the object with an existing GDBusProxy* value. It also receives object path for the object being proxified to keep it for later use.

Parameters
proxyAn existing GDBusProxy* value
objectPathObject path of an object being proxified

Member Function Documentation

◆ callMethod()

virtual ManagedGVariant alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy::callMethod ( const std::string &  methodName,
GVariant *  parameters = nullptr,
GError **  error = nullptr 
)
virtual

Calls a method of the proxy and returns the its result.

Parameters
methodNameName of the method to invoke
parametersA GVariant* containing the tuple with the parameters for the method or nullptr if method does not have any parameters
[out]errorA pointer to a GError* variable that will receive the error returned by method invocation
Returns
The result GVariant* returned by method invocation

◆ callMethodWithFDList()

virtual ManagedGVariant alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy::callMethodWithFDList ( const std::string &  methodName,
GVariant *  parameters = nullptr,
GUnixFDList **  outlist = nullptr,
GError **  error = nullptr 
)
virtual

Calls a method of the proxy and returns the its result along with the list of linux file descriptors associated with it.

Parameters
methodNameName of the method to invoke
parametersA GVariant* containing the tuple with the parameters for the method or nullptr if method does not have any parameters
[out]outlistA pointer to GUnixFDList* variable that recieves a list of linux file descriptor list associated with result returned by the method call
[out]errorA pointer to a GError* variable that will receive the error returned by method invocation
Returns
The result GVariant* returned by method invocation

◆ create()

static std::shared_ptr<DBusProxy> alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy::create ( const std::string &  interfaceName,
const std::string &  objectPath 
)
static

Factory method to create a new instance of the DBus proxy. DBus proxies are shortcuts that bind to a specific interface of an object and simplifies operations on that object by avoiding providing the object and its interface during the subsequent calls.

Parameters
interfaceNameName of the DBus interface to be proxified
objectPathObject path to an object who's interface is to be proxified
Returns
A new instance of DBusProxy on success, nullptr otherwise.

◆ get()

virtual GDBusProxy* alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy::get ( )
virtual

Get the raw GDBusProxy* value associated with the object

Returns
A pointer to GDBusProxy object associated with the this instance. This pointer is valid as long as DBusProxy object is valid.

◆ getObjectPath()

virtual std::string alexaClientSDK::bluetoothImplementations::blueZ::DBusProxy::getObjectPath ( ) const
virtual

Get the path of the object being proxified

Returns
A string containing the object path

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

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