Qt- object path problem

sangram.kumar.yerra at accenture.com sangram.kumar.yerra at accenture.com
Thu Jul 14 04:26:47 PDT 2011


Hi ,


   I am experiencing a problem in QT  bindings over dbus.

  I am trying to receive the RequestPinCode call made by Bluez..  The RequstPinCode method is implemented by me ..So once bluez makes a call to that
During paring , my method should get triggered..But its not happening that way..It doesn't even get into the Adaptor class ..


  <interface name="org.bluez.Agent">
    <method name="RequestPinCode">
     <arg  type="o" direction ="in" name="path" />
      <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QDBusObjectPath"/>
     <arg  type="s" direction="out"  name="pincode" />
    </method>
  </interface>

  I have registered my agent object path ..  "/AgentPath"
  Generated the required AgentAdaptor classes using qdbusxml to cpp ...


QString AgentAdaptor::RequestPinCode(const QDBusObjectPath path )
{
    // handle method call org.bluez.Agent.RequestPinCode
    QString pincode;
    qDebug()<<"Inside Adaptor\n" ;
   QMetaObject::invokeMethod(parent(), "RequestPinCode", Q_RETURN_ARG(QString, pincode), Q_ARG(QDBusObjectPath, path));
    return pincode;
}

  But during pairing , when even a call is made by bluez to my interface i.e RequestPinCode ..it says
   " Unable to find method RequestPinCode on path /AgentPath in interface org.bluez.Agent "


   There is another method called Release in the same interface  and this is successfully getting called  by bluez..So the interface and object path registered is correct..

   To test whether the interface and path is all correct , I tried calling that method method manually using d-feet and also using dbus-send command ..and
   I was able to successfully call ..but when bluez makes this call ..it fails ..
    Is there any specific way , or specific thing to be done to receive an object path..

 I implemented the above using Glib bindings , and I am able to get the request pin code method call..but Not in QT....Can anyone throw any light
 On this....




Thanks & Regards

Sangram Kumar Yerra

 Think Green! Please consider your environmental responsibility before printing this e-mail


________________________________
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110714/ea7ff976/attachment.html>


More information about the dbus mailing list