Loading...
Searching...
No Matches
IObject.h File Reference
`#include <sdbus-c++/ConvenienceApiClasses.h>`
`#include <sdbus-c++/Flags.h>`
`#include <sdbus-c++/TypeTraits.h>`
`#include <sdbus-c++/VTableItems.h>`
`#include <functional>`
`#include <memory>`
`#include <string>`
`#include <vector>`
`#include <sdbus-c++/ConvenienceApiClasses.inl>`
`#include <sdbus-c++/VTableItems.inl>`

Go to the source code of this file.

## Classes

class | sdbus::IObject

## Functions

std::unique_ptr< IObject > | sdbus::createObject (IConnection &connection, ObjectPath objectPath)
| Creates instance representing a D-Bus object.

## Detailed Description

(C) 2016 - 2021 KISTLER INSTRUMENTE AG, Winterthur, Switzerland (C) 2016 - 2026 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< IObject > sdbus::createObject | ( | IConnection & | connection,
|  | ObjectPath | objectPath )

nodiscard

Creates instance representing a D-Bus object.

Parameters

  [in] | connection | D-Bus connection to be used by the object
  [in] | objectPath | Path 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");
sdbus::createObject
std::unique_ptr< IObject > createObject(IConnection &connection, ObjectPath objectPath)
Creates instance representing a D-Bus object.