QtDbus Two way communication



  • I'm having a hard time wrapping my head around QtDbus, it seems simple enough going one way but being able to send intermediate massages back is a bit more difficult. I just want to clarify a few things but first, this is what i'm trying to do.

    Client.AsyncCall -> server.call

    Client.printMsg(QString) <- server.emitMsg(QString)
    Client.printMsg(QString) <- server.emitMsg(QString)
    Client.printMsg(QString) <- server.emitMsg(QString)
    Client.printMsg(QString) <- server.emitMsg(QString)

    Client.AyncCall <- server.call return

    Seems pretty simple, someone told me I all i needed to do was create a signal on the server side and slot for it on but I haven't found any examples or documentation that shows how to do this. I did find http://randomguy3.wordpress.com/2010/09/07/the-magic-of-qtdbus-and-the-propertychanged-signal/ . I guess I'm still having a hard time wrapping my head around all the different pieces.

    So we have something already where the QDBusAbstractInterface is on the client and adapter QDBusAbstractAdaptor on the server side. I imagine that I want to create a property on our adapter. But do I need another QDbusAbstractInterface to monitor that property? I think because of the threading I'll need a separate object.

    If there are any good examples that would be great!



  • oooh i found some auto generation tools! i think this may help a bit...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.