13 #include <sigc++/sigc++.h>
17 #ifndef DBUSCXX_PROPERTY_H
18 #define DBUSCXX_PROPERTY_H
39 std::string
name()
const;
68 virtual std::string
introspect(
int spaces ){
return std::string(); }
87 template <
typename T_type>
108 std::ostringstream sout;
112 for(
int i = 0; i < space_depth; i++ ) { spaces +=
" "; }
114 sout << spaces <<
"<property"
115 <<
" name=\"" <<
name() <<
"\""
116 <<
" type=\"" << sig.dbus_sig() <<
"\""
An Interface represents a local copy of a DBus interface.
Definition: interface.h:41
Base type of Property to allow for storage in e.g.
Definition: property.h:27
DBUS_CXX_PROPAGATE_CONST(std::unique_ptr< priv_data >) m_priv
void setInterface(Interface *)
Definition: property.cpp:68
~PropertyBase()
Definition: property.cpp:38
PropertyBase(std::string name, PropertyAccess access, PropertyUpdateType update)
Definition: property.cpp:33
PropertyUpdateType update_type() const
Definition: property.cpp:50
std::string name() const
Get the name of this propery.
Definition: property.cpp:42
Variant variant_value() const
Get the value of this property as a Variant.
Definition: property.cpp:46
PropertyAccess access_type() const
Definition: property.cpp:64
void set_value(Variant value)
Set the value of this property.
Definition: property.cpp:54
virtual std::string introspect(int spaces)
Definition: property.h:68
Represents a local DBus property.
Definition: property.h:88
virtual std::string introspect(int space_depth)
Definition: property.h:107
Property(std::string name, PropertyAccess access, PropertyUpdateType update)
Definition: property.h:90
T_type value() const
Definition: property.h:102
void set_value(T_type t)
Definition: property.h:98
static std::shared_ptr< Property< T_type > > create(std::string name, PropertyAccess access, PropertyUpdateType update)
Definition: property.h:94
A Variant is a type-safe union for DBus operations.
Definition: variant.h:42
Definition: signature.h:200
Global DBus namespace, where everything happens.
Definition: callmessage.cpp:18
PropertyAccess
Definition: enums.h:46
PropertyUpdateType
Definition: enums.h:23
@ DoesNotUpdate
The property does not emit the PropertyChanged signal whenever it changes.
@ Const
This property does not change during the lifetime.
@ Invalidates
When this property cahnges, the PropertyChanged signal will be emitted but the new value will not be ...
#define DBUS_CXX_PROPERTY_EMITS_CHANGE_SIGNAL_ANNOTATION
Definition: utility.h:32