propertiesinterfaceproxy.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-3.0-or-later OR BSD-3-Clause
2 /***************************************************************************
3  * Copyright (C) 2020 by Robert Middleton *
4  * robert.middleton@rm5248.com *
5  * *
6  * This file is part of the dbus-cxx library. *
7  ***************************************************************************/
8 #ifndef DBUSCXX_PROPERTIES_INTERFACE_PROXY_H
9 #define DBUSCXX_PROPERTIES_INTERFACE_PROXY_H
10 
11 #include "../interfaceproxy.h"
12 #include <memory>
13 #include <string>
14 #include <map>
15 
16 namespace DBus{
17 
18 class Variant;
19 
21 private:
23 
24 public:
25  static std::shared_ptr<PropertiesInterfaceProxy> create();
26 
27  Variant Get( std::string interface_name, std::string property_name );
28 
29  void Set( std::string interface_name, std::string property_name, Variant property_value );
30 
31  std::map<std::string,Variant> GetAll( std::string interface_name );
32 
33 private:
34  std::shared_ptr<MethodProxy<Variant(std::string,std::string)>> m_get_method;
35  std::shared_ptr<MethodProxy<void(std::string,std::string,Variant)>> m_set_method;
36  std::shared_ptr<MethodProxy<std::map<std::string,Variant>(std::string)>> m_getall_method;
37 };
38 
39 }
40 
41 #endif /* DBUSCXX_PROPERTIES_INTERFACE_PROXY_H */
An InterfaceProxy represents a remote Interface in another application on the DBus.
Definition: interfaceproxy.h:43
Definition: interfaceproxy.h:30
Definition: propertiesinterfaceproxy.h:20
std::shared_ptr< MethodProxy< Variant(std::string, std::string)> > m_get_method
Definition: propertiesinterfaceproxy.h:34
void Set(std::string interface_name, std::string property_name, Variant property_value)
Definition: propertiesinterfaceproxy.cpp:29
std::map< std::string, Variant > GetAll(std::string interface_name)
PropertiesInterfaceProxy()
Definition: propertiesinterfaceproxy.cpp:13
std::shared_ptr< MethodProxy< std::map< std::string, Variant >std::string)> > m_getall_method
Definition: propertiesinterfaceproxy.h:36
Variant Get(std::string interface_name, std::string property_name)
Definition: propertiesinterfaceproxy.cpp:25
static std::shared_ptr< PropertiesInterfaceProxy > create()
Definition: propertiesinterfaceproxy.cpp:21
std::shared_ptr< MethodProxy< void(std::string, std::string, Variant)> > m_set_method
Definition: propertiesinterfaceproxy.h:35
A Variant is a type-safe union for DBus operations.
Definition: variant.h:42
Global DBus namespace, where everything happens.
Definition: callmessage.cpp:18