2
* Copyright © 2012 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Thomas Voß <thomas.voss@canonical.com>
18
#ifndef DBUS_ORG_FREEDESKTOP_DBUS_INTERFACES_OBJECT_MANAGER_H_
19
#define DBUS_ORG_FREEDESKTOP_DBUS_INTERFACES_OBJECT_MANAGER_H_
21
#include "org/freedesktop/dbus/service.h"
22
#include "org/freedesktop/dbus/types/any.h"
23
#include "org/freedesktop/dbus/types/object_path.h"
24
#include "org/freedesktop/dbus/types/variant.h"
40
virtual ~ObjectManager() = default;
42
std::map<types::ObjectPath, std::map<std::string,std::map<std::string,types::Variant<types::Any>>>> get_managed_objects()
44
return service->root_object()->invoke_method_synchronously<
45
GetManagedObjects, std::map<types::ObjectPath, std::map<std::string,std::map<std::string,types::Variant<types::Any>>>>
50
ObjectManager(const Service::Ptr& service) : service(service)
54
struct GetManagedObjects
56
typedef ObjectManager Interface;
57
static std::string name()
59
return "GetManagedObjects";
61
static const bool call_synchronously = true;
62
static const std::chrono::milliseconds default_timeout;
66
const std::chrono::milliseconds ObjectManager::GetManagedObjects::default_timeout
72
struct ServiceTraits<interfaces::ObjectManager>
74
static const std::string& interface_name()
76
static const std::string s
77
{"org.freedesktop.DBus.ObjectManager"
87
#endif // DBUS_ORG_FREEDESKTOP_DBUS_INTERFACES_INTROSPECTABLE_H_