Hi all,
I have problem with the
void search
<http://camaya.net/api/gloox-0.9-pre5/classgloox_1_1Search.html#a3>
(const JID
<http://camaya.net/api/gloox-0.9-pre5/classgloox_1_1JID.html>
&directory, DataForm
<http://camaya.net/api/gloox-0.9-pre5/classgloox_1_1DataForm.html>
*form, SearchHandler
<http://camaya.net/api/gloox-0.9-pre5/classgloox_1_1SearchHandler.html>
*sh)
I use gloox-0.9-pre5 with Visual Studio 2003. The server jabber I use
is WildFire 3.2.2.
Here is a trivial example:
virtual void handleSearchFields (const JID &directory, DataForm *form)
{
QString search_info =
QString((*(form->instructions().begin())).c_str());
search_field_list = form->fields(); //The fields are correctly filled.
DataForm *form2 = new DataForm();
form2->setFields(search_field_list);
account_search->search(search_service_jid, form2, this);
}
The log handler produce the following message:
log: level: 0, area: 16384, <iq id='uid12'
to='search.goldrake.iet.unipi.it' type='set'><query
xmlns='jabber:iq:search'/></iq>
The search query is completely empty. This is true also if I change
the values in the fields.
Can you help me?
Cheers
Federico
Jakob Schroeter ha scritto:
Hi Amit,
On Thu Mar 22 2007, Amit Fein wrote:
Hi all,
Please correct me if I'm wrong, but currently the whole search
mechanism
(XEP-0055) is based on 4 constant fields : first name, last name,
nick &
email.
we need a more generic mechanism that will handle any given search
fields, so, for example, the function Search::fetchSearchFields should
return an array of strings (i.e - array of search fields), and the
search itself will look for these tags in the XML file, and not
constant
tags like "FirstName".
XEP-0055 originally evolved around those 4 fields. Later it was
extended by DataForms, which you can use to search in arbitrary
fields. The flexibility depends only on what the server-side XEP-0055
implementation offers. Wild/Openfire's search plugin is an example of
such a service that uses DataForms.
cheers,
Jakob