<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Century;
        panose-1:2 4 6 4 5 5 5 2 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:#606420;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="#606420">
<div class="Section1">
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">Hi ,<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> I am experiencing a problem in QT bindings over dbus.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> 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<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial">During paring , my method should get triggered..But its not happening that way..It doesn’t even get into the Adaptor class ..<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><b><font size="2" face="Arial"><span style="font-size:11.0pt;
font-family:Arial;font-weight:bold"> <interface name="org.bluez.Agent"><o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" face="Arial"><span style="font-size:11.0pt;
font-family:Arial;font-weight:bold"> <method name="RequestPinCode"><o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" face="Arial"><span style="font-size:11.0pt;
font-family:Arial;font-weight:bold"> <arg type="o" direction ="in" name="path" />
<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" face="Arial"><span style="font-size:11.0pt;
font-family:Arial;font-weight:bold"> <annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QDBusObjectPath"/><o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" face="Arial"><span style="font-size:11.0pt;
font-family:Arial;font-weight:bold"> <arg type="s" direction="out" name="pincode" /><o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" face="Arial"><span style="font-size:11.0pt;
font-family:Arial;font-weight:bold"> </method><o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" face="Arial"><span style="font-size:11.0pt;
font-family:Arial;font-weight:bold"> </interface><o:p></o:p></span></font></b></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> I have registered my agent object path ..
<b><span style="font-weight:bold">“/AgentPath” </span></b> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> Generated the required AgentAdaptor classes using qdbusxml to cpp …<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold">QString AgentAdaptor::RequestPinCode(const QDBusObjectPath path )<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold">{<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold"> // handle method call org.bluez.Agent.RequestPinCode<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold"> QString pincode;<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold"> qDebug()<<"Inside Adaptor\n" ;<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold"> QMetaObject::invokeMethod(parent(), "RequestPinCode", Q_RETURN_ARG(QString, pincode), Q_ARG(QDBusObjectPath, path));<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold"> return pincode;<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><b><font size="2" color="blue" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:blue;font-weight:bold">}<o:p></o:p></span></font></b></p>
<p class="MsoNormal"><font size="2" color="blue" face="Arial"><span style="font-size:
10.0pt;font-family:Arial;color:blue"> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> But during pairing , when even a call is made by bluez to my interface i.e RequestPinCode ..it says
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" color="fuchsia" face="Arial"><span style="font-size:12.0pt;font-family:Arial;color:fuchsia"> “
<b><span style="font-weight:bold">Unable to find method RequestPinCode on path /AgentPath in interface org.bluez.Agent “<o:p></o:p></span></b></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> There is another method called
<b><span style="font-weight:bold">Release </span></b>in the same interface and this is successfully getting called by bluez..So the interface and object path registered is correct..<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> <o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> 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
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> I was able to successfully call ..but when bluez makes this call ..it fails ..<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> Is there any specific way , or specific thing to be done to receive an object path..<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> 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<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"> On this….<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="2" face="Arial"><span style="font-size:10.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><b><font size="2" color="navy" face="Times New Roman"><span style="font-size:10.0pt;color:navy;font-weight:bold">Thanks & Regards</span></font></b><font color="navy"><span style="color:navy">
</span></font><b><font color="#00ccff"><span style="color:#00CCFF;font-weight:bold"><o:p></o:p></span></font></b></p>
<p><b><font size="3" color="#00ccff" face="Times New Roman"><span style="font-size:12.0pt;color:#00CCFF;font-weight:bold">Sangram Kumar Yerra<o:p></o:p></span></font></b></p>
<p><b><i><font size="1" color="lime" face="Century"><span style="font-size:7.5pt;
font-family:Century;color:lime;font-weight:bold;font-style:italic"> Think Green! Please consider your environmental responsibility before printing this e-mail</span></font></i></b><font color="navy"><span style="color:navy">
<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"><o:p> </o:p></span></font></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="2">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.<br>
</font>
</body>
</html>