doc/api.mdwn
changeset 31 e404cd1c7077
parent 30 a66ed0454ca8
equal deleted inserted replaced
30:a66ed0454ca8 31:e404cd1c7077
    70 
    70 
    71 ### HOOK_*
    71 ### HOOK_*
    72 Hook name constants. Usually are the same as actual hook name, but
    72 Hook name constants. Usually are the same as actual hook name, but
    73 uppercased, with 'HOOK_' added and with underscores instead of dashes.
    73 uppercased, with 'HOOK_' added and with underscores instead of dashes.
    74 
    74 
    75 ### *_request ( to, error )
    75 ### OPT_*
       
    76 MCabber option names. Should not be enclosed in braces.
       
    77 
       
    78 ### pep_*_request ( to, error )
    76 Request corresponding data from the jid, specified in 'to'.
    79 Request corresponding data from the jid, specified in 'to'.
    77 'error' may be used for error control. If no error occured,
    80 'error' may be used for error control. If no error occured,
    78 and remote side have replied with notification stanza, call
    81 and remote side have replied with notification stanza, call
    79 to one of this functions will eventually result in corresponding
    82 to one of this functions will eventually result in corresponding
    80 event '*-in'. Currently there's no way to detect an
    83 event '*-in'. Currently there's no way to detect an
    81 error on the remote side (eg, if it does not support PEP).
    84 error on the remote side (eg, if it does not support PEP).
    82 
       
    83 ### *_publish ( ... )
       
    84 Publish supplied data as corresponding user's update. Note,
       
    85 that this function bypasses event interface, thus, it can
       
    86 be used to publish *only* via PEP. In general, it is
       
    87 suggested to use event (hooks) interface, as it allows
       
    88 multiplexing and non-breaking extensibility.
       
    89 
    85 
    90 ## pep
    86 ## pep
    91 
    87 
    92 ### (*pep_xmlns_handler_t) ( from, node, n, id, userdata )
    88 ### (*pep_xmlns_handler_t) ( from, node, n, id, userdata )
    93 Type of function to supply as a handler for pep xmlns namespace.
    89 Type of function to supply as a handler for pep xmlns namespace.
   102 'notify' is a function, that may be called for userdata destruction.
    98 'notify' is a function, that may be called for userdata destruction.
   103 
    99 
   104 ### pep_unregister_xmlns_handler ( xmlns )
   100 ### pep_unregister_xmlns_handler ( xmlns )
   105 Remove handler from given xmlns namespace.
   101 Remove handler from given xmlns namespace.
   106 
   102 
   107 ## tune
       
   108 'tune_publish' takes list of key-value pairs.
       
   109 
       
   110 ## mood
       
   111 'mood_publish' takes two string arguments - mood and mood message.
       
   112 
       
   113 ## activity
       
   114 'activity_publish' takes three string arguments - major activity, minor, and
       
   115 activity message.
       
   116 
       
   117 ## geoloc
       
   118 'geoloc_publish' takes list of key-value pairs.
       
   119 
       
   120 <!-- -->
   103 <!-- -->