* Fixed a bug in the D-Bus library

* Initial conference call code
* Further D-Bus API additions and fixes


git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@7973 30a43799-04e7-0310-8b2b-ea0d24f86d0e
This commit is contained in:
pdurante 2006-10-09 11:09:25 +00:00
parent 24637001ce
commit 35702f41b3
2 changed files with 11 additions and 3 deletions

View file

@ -384,7 +384,9 @@ Message& Message::operator = ( const Message& m )
{
if(&m != this)
{
dbus_message_unref(_pvt->msg);
_pvt = m._pvt;
dbus_message_ref(_pvt->msg);
}
return *this;
}

View file

@ -175,6 +175,11 @@ void ObjectAdaptor::_emit_signal( SignalMessage& sig )
conn().send(sig);
}
struct ReturnLaterError
{
const Tag* tag;
};
bool ObjectAdaptor::handle_message( const Message& msg )
{
switch( msg.type() )
@ -200,9 +205,9 @@ bool ObjectAdaptor::handle_message( const Message& msg )
ErrorMessage em(cmsg, e.name(), e.message());
conn().send(em);
}
catch(Tag* tag)
catch(ReturnLaterError& rle)
{
_continuations[tag] = new Continuation(conn(), cmsg, tag);
_continuations[rle.tag] = new Continuation(conn(), cmsg, rle.tag);
}
return true;
}
@ -220,7 +225,8 @@ bool ObjectAdaptor::handle_message( const Message& msg )
void ObjectAdaptor::return_later( const Tag* tag )
{
throw tag;
ReturnLaterError rle = { tag };
throw rle;
}
void ObjectAdaptor::return_now( Continuation* ret )