* Fixed implementation of D-Bus properties
* Added an example to demonstrate implementation of D-Bus properties * Fixed DBus::Server (should work with the tcp transport too, see related TODO item) git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@8158 30a43799-04e7-0310-8b2b-ea0d24f86d0e
This commit is contained in:
parent
19712668b1
commit
1b84dc5abc
30 changed files with 750 additions and 121 deletions
|
@ -88,7 +88,7 @@ Variant* InterfaceAdaptor::get_property( const std::string& name )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
bool InterfaceAdaptor::set_property( const std::string& name, Variant& value )
|
||||
void InterfaceAdaptor::set_property( const std::string& name, Variant& value )
|
||||
{
|
||||
PropertyTable::iterator pti = _properties.find(name);
|
||||
|
||||
|
@ -97,10 +97,15 @@ bool InterfaceAdaptor::set_property( const std::string& name, Variant& value )
|
|||
if( !pti->second.write )
|
||||
throw ErrorAccessDenied("property is not writeable");
|
||||
|
||||
Signature sig = value.signature();
|
||||
|
||||
if( pti->second.sig != sig )
|
||||
throw ErrorInvalidSignature("property expects a different type");
|
||||
|
||||
pti->second.value = value;
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
return false;
|
||||
throw ErrorFailed("requested property not found");
|
||||
}
|
||||
|
||||
InterfaceProxy* ProxyBase::find_interface( const std::string& name )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue