Hi all,
I use gloox-0.9-pre5 with Visual Studio 2003.
I have a problem in my application with the method
void search
<http://camaya.net/api/gloox-0.9-pre5/classgloox_1_1Search.html#a4>
(const JID <http://camaya.net/api/gloox-0.9-pre5/classgloox_1_1JID.html>
&directory, int fields, const SearchFieldStruct
<http://camaya.net/api/gloox-0.9-pre5/structgloox_1_1SearchFieldStruct.html>
&values, SearchHandler
<http://camaya.net/api/gloox-0.9-pre5/classgloox_1_1SearchHandler.html> *sh)
necessary for jabber servers as jabber.org.
(I have NO 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)" instead)
Please, read this simple example
SearchFieldStruct test;
test.first = "a";
test.last = "b";
test.nick = "c";
int fields = 7;
account_search->search("users.jabber.org", fields, test, this);
in log file I found:
log: level: 0, area: 16384, <iq id='uid10' to='users.jabber.org'
type='set'><query
xmlns='jabber:iq:search'><first>a</first><last>b</last><nick>c</nick></query></iq>
log: level: 0, area: 8192, <iq from='users.jabber.org' id='uid10'
to='freddie_75@xxxxxxxxxx/GlooxClient' type='result'
xml:lang='en'><query xmlns='jabber:iq:search'><item
jid='admin@xxxxxxxxxxxxxxx
'><first>a</first><last>b</last><nick>c</nick><email>ShadowImg</email></item>
etc...
So, the server replies correclty... but the handleSearchResult (const
JID &directory, const SearchResultList &resultList) is never called
and the cpu and memory occupations explode to 100% (my pc becomes unusable).
Can you help me?
Thank you in advance
Federico
Amit Fein ha scritto:
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".
Thanks,
regards,
**Amit**