[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QDbus / Strigi question
From:       "Mikkel Kamstrup Erlandsen" <mikkel.kamstrup () gmail ! com>
Date:       2007-09-27 11:11:59
Message-ID: 9961daf10709270411r7ea5faeap53546c8484863cb4 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


2007/9/27, Carsten Niehaus <cniehaus@gmx.de>:
>
> Moin
>
> This is my code:
>
> ================================================
>
> QDBusInterface strigiiface
> ("org.freedesktop.xesam.searcher", "/org/freedesktop/xesam/searcher/main",
> "org.freedesktop.xesam.Search");
> QDBusReply<QString> reply = strigiiface.call( "GetState" );
>     if ( reply.isValid() ) {
>            qDebug() << "The reply: " << reply;
>     } else {
>         qDebug() << "ERROR: " << reply.error();
>     }
>
> ================================================
>
> No matter what I do I am getting errors like this one:
>
> ERROR:  QDBusError("org.freedesktop.DBus.Error.InvalidSignature",
> "Unexpected
> reply signature: got "no signature", expected "" (QString)")
>
>
> Of course I read the XESAM docs [1] but I simply don't understand it. What
> is
> meant with:
>
>    GetState (out as state_info)
>
> Does it mean that the return-value is called state_info? The doc says
>
>    "state_info is an array of two strings"
>
> So what shuold I use in QDBusReply<T> for T? QString is obviously wrong...
>
> And what is "aav hits" or "u num" in this API:
>
>    GetHits (in s search, in u num, out aav hits)
>
> Neither "u" nor "aav" is mentioned anywhere in the docs...
>
> Carsten
>
>
>
> [1] http://www.freedesktop.org/wiki/XesamSearchLive



The API in the spec should be read as

  GetHits (<direction> <type> <name>)

Direction is either in or out for arguments or return values respectively.
Type is the data type of the paramter "s" is string and "as" is array of
strings - this is standard dbus notation. Name is purely informational - it
is just there to ease communications.

Anyways, I'm not sure that Strigi's dbus API is fully up to scratch... Jos?

Cheers,
Mikkel

[Attachment #5 (text/html)]

2007/9/27, Carsten Niehaus &lt;<a \
href="mailto:cniehaus@gmx.de">cniehaus@gmx.de</a>&gt;:<div><span \
class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px \
solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> \
Moin<br><br>This is my \
code:<br><br>================================================<br><br>QDBusInterface \
strigiiface<br>(&quot;org.freedesktop.xesam.searcher&quot;, \
&quot;/org/freedesktop/xesam/searcher/main&quot;, &quot; \
org.freedesktop.xesam.Search&quot;);<br>QDBusReply&lt;QString&gt; reply = \
strigiiface.call( &quot;GetState&quot; );<br>&nbsp;&nbsp;&nbsp;&nbsp;if ( \
reply.isValid() ) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
qDebug() &lt;&lt; &quot;The reply: &quot; &lt;&lt; reply;<br> \
&nbsp;&nbsp;&nbsp;&nbsp;} else \
{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;qDebug() &lt;&lt; &quot;ERROR: \
&quot; &lt;&lt; reply.error();<br>&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>================================================<br><br>No \
matter what I do I am getting errors like this \
one:<br><br>ERROR:&nbsp;&nbsp;QDBusError(&quot; \
org.freedesktop.DBus.Error.InvalidSignature&quot;, &quot;Unexpected<br>reply \
signature: got &quot;no signature&quot;, expected &quot;&quot; \
(QString)&quot;)<br><br><br>Of course I read the XESAM docs [1] but I simply \
don&#39;t understand it. What is <br>meant with:<br><br>&nbsp;&nbsp; GetState (out as \
state_info)<br><br>Does it mean that the return-value is called state_info? The doc \
says<br><br>&nbsp;&nbsp; &quot;state_info is an array of two strings&quot;<br><br>So \
what shuold I use in QDBusReply&lt;T&gt; for T? QString is obviously wrong... \
<br><br>And what is &quot;aav hits&quot; or &quot;u num&quot; in this \
API:<br><br>&nbsp;&nbsp; GetHits (in s search, in u num, out aav hits)<br><br>Neither \
&quot;u&quot; nor &quot;aav&quot; is mentioned anywhere in the docs...<br><br> \
Carsten<br><br><br><br>[1] <a \
href="http://www.freedesktop.org/wiki/XesamSearchLive">http://www.freedesktop.org/wiki/XesamSearchLive</a></blockquote><div><br><br>The \
API in the spec should be read as<br><br>&nbsp; GetHits (&lt;direction&gt; \
&lt;type&gt; &lt;name&gt;)  <br><br>Direction is either in or out for arguments or \
return values respectively. Type is the data type of the paramter &quot;s&quot; is \
string and &quot;as&quot; is array of strings - this is standard dbus notation. Name \
is purely informational - it is just there to ease communications. \
<br></div><br>Anyways, I&#39;m not sure that Strigi&#39;s dbus API is fully up to \
scratch... Jos?<br></div><br>Cheers,<br>Mikkel<br>



>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic