sdbus-c++ 1.5.0
High-level C++ D-Bus library based on systemd D-Bus implementation
Loading...
Searching...
No Matches
IObject.h File Reference
#include <sdbus-c++/ConvenienceApiClasses.h>
#include <sdbus-c++/TypeTraits.h>
#include <sdbus-c++/Flags.h>
#include <functional>
#include <string>
#include <memory>
#include <vector>
#include <sdbus-c++/ConvenienceApiClasses.inl>

Go to the source code of this file.

Classes

class  sdbus::IObject
 

Functions

std::unique_ptr< sdbus::IObjectsdbus::createObject (sdbus::IConnection &connection, std::string objectPath)
 Creates instance representing a D-Bus object.
 

Detailed Description

(C) 2016 - 2021 KISTLER INSTRUMENTE AG, Winterthur, Switzerland (C) 2016 - 2022 Stanislav Angelovic stani.nosp@m.slav.nosp@m..ange.nosp@m.lovi.nosp@m.c@pro.nosp@m.tonm.nosp@m.ail.c.nosp@m.om

Created on: Nov 8, 2016 Project: sdbus-c++ Description: High-level D-Bus IPC C++ library based on sd-bus

This file is part of sdbus-c++.

sdbus-c++ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version.

sdbus-c++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with sdbus-c++. If not, see http://www.gnu.org/licenses/.

Function Documentation

◆ createObject()

std::unique_ptr< sdbus::IObject > sdbus::createObject ( sdbus::IConnection & connection,
std::string objectPath )

Creates instance representing a D-Bus object.

Parameters
[in]connectionD-Bus connection to be used by the object
[in]objectPathPath of the D-Bus object
Returns
Pointer to the object representation instance

The provided connection will be used by the object to export methods, issue signals and provide properties.

Creating a D-Bus object instance is (thread-)safe even upon the connection which is already running its I/O event loop.

Code example:

auto proxy = sdbus::createObject(connection, "/com/kistler/foo");