<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.4.4">
</HEAD>
<BODY>
Hi Daniel,<BR>
<BR>
I added parsing of the auid just so that errors wouldn't be generated if we received it and so that these requests could then be handled cleanly.&nbsp; By parsing the auid in the xcap_server without errors it also leaves open the option of then calling an exported function from another module that does handle XQuery based searches, or simply returning an appropriate HTTP response code indicating that search isn't supported.<BR>
<BR>
For example,<BR>
<BR>
<PRE>
event_route[xhttp:request] {
        ...
        switch($rm) {
        ...
        case &quot;POST&quot;:
                if ($xcapuri(u=&gt;auid)=~&quot;search&quot;) {
                        if ($xcapuri(u=&gt;target)=~&quot;org.openmobilealliance.user-profile/users&quot;) {
                                # Call custom XQuery search function for user-profiles
                        } else if ($xcapuri(u=&gt;target)=~ .. some other searchable directory .. ) {
                                # Call custom XQuery search function for this directory
                        } else {
                                xhttp_reply(&quot;501&quot;, &quot;Not Implemented&quot;, &quot;&quot;, &quot;&quot;);
                        }
                } else {
                        xhttp_reply(&quot;400&quot;, &quot;Bad Request&quot;, &quot;&quot;, &quot;&quot;);
                }
                exit;
        }
        ...
}
</PRE>
<BR>
Regards,<BR>
<BR>
Peter<BR>
<BR>
<BR>
<BR>
<BR>
On Thu, 2012-10-25 at 11:06 +0200, Daniel-Constantin Mierla wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hello Peter,

regarding your email with supported auids:
<A HREF="http://lists.sip-router.org/pipermail/sr-users/2012-September/074850.html">http://lists.sip-router.org/pipermail/sr-users/2012-September/074850.html</A>

You mention that org.openmobilealliance.search is not supported, but in 
the source code it is parsed. Is it that just is not complete 
implementation? I saw there is some special handling when this auid is 
matched.

Btw, I refactored a bit the auid discovery, using a static table that 
contains the list of supported auids:
<A HREF="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5f813fdab34cb7507bc4dcc1b66ff87f90f69c9a">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5f813fdab34cb7507bc4dcc1b66ff87f90f69c9a</A>

Hopefully I haven't introduced any issue, having limited testing 
capabilities for xcap at this moment (just commit fixes if you find some).

Also, if you know the auids that imply static documents (as you wrote in 
the email), feel free to add them when you get some spare time, it would 
be good to support them in xcap_server even the presence modules have to 
be extended as well.

Cheers,
Daniel

</PRE>
</BLOCKQUOTE>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>