Changeset 569

Show
Ignore:
Timestamp:
10/30/04 17:56:40 (4 years ago)
Author:
jajcus
Message:

- updated for JEP-30 and Jabber Registar disco categories/types registry compliance

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/disco.c

    r525 r569  
    114114                        xmlnode_put_attrib(result,"xmlns","http://jabber.org/protocol/disco#info"); 
    115115                        xmlnode_put_attrib(result,"node","online_users"); 
     116                        n=xmlnode_insert_tag(result,"identity"); 
     117                        xmlnode_put_attrib(n,"category","hierarchy"); 
     118                        xmlnode_put_attrib(n,"type","branch"); 
     119                        xmlnode_put_attrib(n,"name",_("Online users")); 
    116120                        jabber_iq_send_result(s,from,to,id,result); 
    117121                        xmlnode_free(result); 
     
    124128        n=xmlnode_insert_tag(result,"identity"); 
    125129        xmlnode_put_attrib(n,"category","gateway"); 
    126         xmlnode_put_attrib(n,"type","x-gadugadu"); 
     130        xmlnode_put_attrib(n,"type","gadu-gadu"); 
    127131        n1=xmlnode_get_tag(config,"vCard/FN"); 
    128132        if (n1){ 
     
    150154void jabber_iq_get_client_disco_items(Stream *s,const char *from,const char * to,const char *id,xmlnode q){ 
    151155xmlnode result; 
     156char *node; 
     157 
     158        node=xmlnode_get_attrib(q,"node"); 
     159        if (node && node[0]){ 
     160                jabber_iq_send_error(s,from,to,id,404,_("Disco request for unknown node")); 
     161                return; 
     162        } 
    152163 
    153164        result=xmlnode_new_tag("query"); 
     
    160171xmlnode result; 
    161172xmlnode n; 
    162 char *str
     173char *str, *node
    163174int i; 
     175 
     176        node=xmlnode_get_attrib(q,"node"); 
     177        if (node && node[0]){ 
     178                jabber_iq_send_error(s,from,to,id,404,_("Disco request for unknown node")); 
     179                return; 
     180        } 
    164181 
    165182        result=xmlnode_new_tag("query"); 
    166183        xmlnode_put_attrib(result,"xmlns","http://jabber.org/protocol/disco#info"); 
    167184        n=xmlnode_insert_tag(result,"identity"); 
    168         xmlnode_put_attrib(n,"category","user"); 
    169         xmlnode_put_attrib(n,"type","client"); 
     185        xmlnode_put_attrib(n,"category","client"); 
     186        xmlnode_put_attrib(n,"type","pc"); 
    170187        str=g_strdup_printf("GG user #%u",jid_get_uin(to)); 
    171188        xmlnode_put_attrib(n,"name",str);