Author: ArcRiley Date: 2009-01-30 23:45:30 -0500 (Fri, 30 Jan 2009) New Revision: 1510
Added: trunk/pysoy/include/xmpp.pxd Removed: trunk/pysoy/include/strophe.pxd Log: per convention, renaming strophe.pxd to match the C naming prefix Deleted: trunk/pysoy/include/strophe.pxd =================================================================== --- trunk/pysoy/include/strophe.pxd 2009-01-31 04:23:14 UTC (rev 1509) +++ trunk/pysoy/include/strophe.pxd 2009-01-31 04:45:30 UTC (rev 1510) @@ -1,250 +0,0 @@ -# libstrophe Declarations -# -# Copyright ( C ) 2006,2007,2008,2009 PySoy Group -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# ( at your option ) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program; if not, see http://www.gnu.org/licenses -# -# $Id: lm.pxd 1399 2009-01-01 06:06:11Z ArcRiley $ - -cdef extern from "strophe.h" nogil : - ############################################################################# - # - # strings - # - cdef : - char* XMPP_NS_CLIENT - char* XMPP_NS_COMPONENT - char* XMPP_NS_STREAMS - char* XMPP_NS_STREAMS_IETF - char* XMPP_NS_TLS - char* XMPP_NS_SASL - char* XMPP_NS_BIND - char* XMPP_NS_SESSION - char* XMPP_NS_AUTH - char* XMPP_NS_DISCO_INFO - char* XMPP_NS_DISCO_ITEMS - char* XMPP_NS_ROSTER - # - ############################################################################# - # - # enums - # - ctypedef enum : - XMPP_EOK - XMPP_EMEM - XMPP_EINVOP - XMPP_EINT - - ctypedef enum xmpp_log_level_t : - XMPP_LEVEL_DEBUG - XMPP_LEVEL_INFO - XMPP_LEVEL_WARN - XMPP_LEVEL_ERROR - - ctypedef enum xmpp_conn_type_t : - XMPP_UNKNOWN - XMPP_CLIENT - XMPP_COMPONENT - - ctypedef enum xmpp_conn_event_t : - XMPP_CONN_CONNECT - XMPP_CONN_DISCONNECT - XMPP_CONN_FAIL - - ctypedef enum xmpp_error_type_t : - XMPP_SE_BAD_FORMAT - XMPP_SE_BAD_NS_PREFIX - XMPP_SE_CONFLICT - XMPP_SE_CONN_TIMEOUT - XMPP_SE_HOST_GONE - XMPP_SE_HOST_UNKNOWN - XMPP_SE_IMPROPER_ADDR - XMPP_SE_INTERNAL_SERVER_ERROR - XMPP_SE_INVALID_FROM - XMPP_SE_INVALID_ID - XMPP_SE_INVALID_NS - XMPP_SE_INVALID_XML - XMPP_SE_NOT_AUTHORIZED - XMPP_SE_POLICY_VIOLATION - XMPP_SE_REMOTE_CONN_FAILED - XMPP_SE_RESOURCE_CONSTRAINT - XMPP_SE_RESTRICTED_XML - XMPP_SE_SEE_OTHER_HOST - XMPP_SE_SYSTEM_SHUTDOWN - XMPP_SE_UNDEFINED_CONDITION - XMPP_SE_UNSUPPORTED_ENCODING - XMPP_SE_UNSUPPORTED_STANZA_TYPE - XMPP_SE_UNSUPPORTED_VERSION - XMPP_SE_XML_NOT_WELL_FORMED - # - ############################################################################# - # - # private structs - # - ctypedef struct xmpp_mem_t - ctypedef struct xmpp_log_t - ctypedef struct xmpp_ctx_t - ctypedef struct xmpp_conn_t - ctypedef struct xmpp_stanza_t - # - ############################################################################# - # - # first callback - # - ctypedef void (* xmpp_log_handler ) ( void*, - xmpp_log_level_t, - char*, - char* ) - # - ############################################################################# - # - # public structs - # - cdef struct _xmpp_mem_t : - void* (* alloc ) ( size_t, void* ) - void (* free ) ( void*, void* ) - void* (* realloc ) ( void*, size_t, void* ) - void* userdata - - cdef struct _xmpp_log_t : - xmpp_log_handler handler - void* userdata - - ctypedef struct xmpp_stream_error_t : - xmpp_error_type_t type - char* text - xmpp_stanza_t* stanza - # - ############################################################################# - # - # more callbacks - # - ctypedef void (* xmpp_conn_handler ) ( xmpp_conn_t*, - xmpp_conn_event_t, - int, - xmpp_stream_error_t*, - void* ) - ctypedef int (* xmpp_timed_handler ) ( xmpp_conn_t*, - void* ) - ctypedef int (* xmpp_handler ) ( xmpp_conn_t*, - xmpp_stanza_t*, - void* ) - # - ############################################################################# - # - # cdef functions - # - cdef : - void xmpp_initialize ( ) - void xmpp_shutdown ( ) - int xmpp_version_check ( int, int ) - xmpp_ctx_t* xmpp_ctx_new ( xmpp_mem_t*, - xmpp_log_t* ) - void xmpp_ctx_free ( xmpp_ctx_t* ) - xmpp_log_t* xmpp_get_default_logger ( xmpp_log_level_t ) - xmpp_conn_t* xmpp_conn_new ( xmpp_ctx_t* ) - xmpp_conn_t* xmpp_conn_clone ( xmpp_conn_t* ) - int xmpp_conn_release ( xmpp_conn_t* ) - char* xmpp_conn_get_jid ( xmpp_conn_t* ) - void xmpp_conn_set_jid ( xmpp_conn_t*, char* ) - char* xmpp_conn_get_pass ( xmpp_conn_t* ) - void xmpp_conn_set_pass ( xmpp_conn_t*, char* ) - xmpp_ctx_t* xmpp_conn_get_context ( xmpp_conn_t* ) - int xmpp_connect_client ( xmpp_conn_t*, - char*, - unsigned short, - xmpp_conn_handler, - void* ) - void xmpp_disconnect ( xmpp_conn_t* ) - void xmpp_send ( xmpp_conn_t*, - xmpp_stanza_t* ) - void xmpp_send_raw_string ( xmpp_conn_t*, - char*, - ... ) - void xmpp_send_raw ( xmpp_conn_t*, - char*, - size_t ) - void xmpp_timed_handler_add ( xmpp_conn_t*, - xmpp_timed_handler, - unsigned long, - void* ) - void xmpp_timed_handler_delete( xmpp_conn_t*, - xmpp_timed_handler ) - void xmpp_handler_add ( xmpp_conn_t*, - xmpp_handler, - char*, - char*, - char*, - void* ) - void xmpp_handler_delete ( xmpp_conn_t*, - xmpp_handler ) - void xmpp_id_handler_add ( xmpp_conn_t*, - xmpp_handler, - char*, - void* ) - void xmpp_id_handler_delete ( xmpp_conn_t*, - xmpp_handler, - char* ) - xmpp_stanza_t* xmpp_stanza_new ( xmpp_ctx_t* ) - xmpp_stanza_t* xmpp_stanza_clone ( xmpp_stanza_t* ) - xmpp_stanza_t* xmpp_stanza_copy ( xmpp_stanza_t* ) - int xmpp_stanza_release ( xmpp_stanza_t* ) - void xmpp_free ( xmpp_ctx_t*, void* ) - int xmpp_stanza_is_text ( xmpp_stanza_t* ) - int xmpp_stanza_is_tag ( xmpp_stanza_t* ) - int xmpp_stanza_to_text ( xmpp_stanza_t*, - char**, - unsigned int* ) - xmpp_stanza_t* xmpp_stanza_get_children ( xmpp_stanza_t* ) - xmpp_stanza_t* xmpp_stanza_get_child_by_name \ - ( xmpp_stanza_t*, - char* ) - xmpp_stanza_t* xmpp_stanza_get_child_by_ns \ - ( xmpp_stanza_t*, - char* ) - xmpp_stanza_t* xmpp_stanza_get_next ( xmpp_stanza_t* ) - char* xmpp_stanza_get_attribute( xmpp_stanza_t*, - char* ) - char* xmpp_stanza_get_ns ( xmpp_stanza_t* ) - char* xmpp_stanza_get_text ( xmpp_stanza_t* ) - char* xmpp_stanza_get_text_ptr ( xmpp_stanza_t* ) - char* xmpp_stanza_get_name ( xmpp_stanza_t* ) - int xmpp_stanza_add_child ( xmpp_stanza_t*, - xmpp_stanza_t* ) - int xmpp_stanza_set_ns ( xmpp_stanza_t*, - char* ) - int xmpp_stanza_set_attribute( xmpp_stanza_t*, - char*, - char* ) - int xmpp_stanza_set_name ( xmpp_stanza_t*, - char* ) - int xmpp_stanza_set_text ( xmpp_stanza_t*, - char* ) - int xmpp_stanza_set_text_with_size \ - ( xmpp_stanza_t*, - char*, - size_t ) - char* xmpp_stanza_get_type ( xmpp_stanza_t* ) - char* xmpp_stanza_get_id ( xmpp_stanza_t* ) - int xmpp_stanza_set_id ( xmpp_stanza_t*, - char* ) - int xmpp_stanza_set_type ( xmpp_stanza_t*, - char* ) - xmpp_stanza_t* xmpp_stanza_reply ( xmpp_stanza_t* ) - void xmpp_run_once ( xmpp_ctx_t*, - unsigned long ) - void xmpp_run ( xmpp_ctx_t* ) - void xmpp_stop ( xmpp_ctx_t* ) - # - ############################################################################# Copied: trunk/pysoy/include/xmpp.pxd (from rev 1509, trunk/pysoy/include/strophe.pxd) =================================================================== --- trunk/pysoy/include/xmpp.pxd (rev 0) +++ trunk/pysoy/include/xmpp.pxd 2009-01-31 04:45:30 UTC (rev 1510) @@ -0,0 +1,250 @@ +# libstrophe Declarations +# +# Copyright ( C ) 2006,2007,2008,2009 PySoy Group +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or +# ( at your option ) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program; if not, see http://www.gnu.org/licenses +# +# $Id: lm.pxd 1399 2009-01-01 06:06:11Z ArcRiley $ + +cdef extern from "strophe.h" nogil : + ############################################################################# + # + # strings + # + cdef : + char* XMPP_NS_CLIENT + char* XMPP_NS_COMPONENT + char* XMPP_NS_STREAMS + char* XMPP_NS_STREAMS_IETF + char* XMPP_NS_TLS + char* XMPP_NS_SASL + char* XMPP_NS_BIND + char* XMPP_NS_SESSION + char* XMPP_NS_AUTH + char* XMPP_NS_DISCO_INFO + char* XMPP_NS_DISCO_ITEMS + char* XMPP_NS_ROSTER + # + ############################################################################# + # + # enums + # + ctypedef enum : + XMPP_EOK + XMPP_EMEM + XMPP_EINVOP + XMPP_EINT + + ctypedef enum xmpp_log_level_t : + XMPP_LEVEL_DEBUG + XMPP_LEVEL_INFO + XMPP_LEVEL_WARN + XMPP_LEVEL_ERROR + + ctypedef enum xmpp_conn_type_t : + XMPP_UNKNOWN + XMPP_CLIENT + XMPP_COMPONENT + + ctypedef enum xmpp_conn_event_t : + XMPP_CONN_CONNECT + XMPP_CONN_DISCONNECT + XMPP_CONN_FAIL + + ctypedef enum xmpp_error_type_t : + XMPP_SE_BAD_FORMAT + XMPP_SE_BAD_NS_PREFIX + XMPP_SE_CONFLICT + XMPP_SE_CONN_TIMEOUT + XMPP_SE_HOST_GONE + XMPP_SE_HOST_UNKNOWN + XMPP_SE_IMPROPER_ADDR + XMPP_SE_INTERNAL_SERVER_ERROR + XMPP_SE_INVALID_FROM + XMPP_SE_INVALID_ID + XMPP_SE_INVALID_NS + XMPP_SE_INVALID_XML + XMPP_SE_NOT_AUTHORIZED + XMPP_SE_POLICY_VIOLATION + XMPP_SE_REMOTE_CONN_FAILED + XMPP_SE_RESOURCE_CONSTRAINT + XMPP_SE_RESTRICTED_XML + XMPP_SE_SEE_OTHER_HOST + XMPP_SE_SYSTEM_SHUTDOWN + XMPP_SE_UNDEFINED_CONDITION + XMPP_SE_UNSUPPORTED_ENCODING + XMPP_SE_UNSUPPORTED_STANZA_TYPE + XMPP_SE_UNSUPPORTED_VERSION + XMPP_SE_XML_NOT_WELL_FORMED + # + ############################################################################# + # + # private structs + # + ctypedef struct xmpp_mem_t + ctypedef struct xmpp_log_t + ctypedef struct xmpp_ctx_t + ctypedef struct xmpp_conn_t + ctypedef struct xmpp_stanza_t + # + ############################################################################# + # + # first callback + # + ctypedef void (* xmpp_log_handler ) ( void*, + xmpp_log_level_t, + char*, + char* ) + # + ############################################################################# + # + # public structs + # + cdef struct _xmpp_mem_t : + void* (* alloc ) ( size_t, void* ) + void (* free ) ( void*, void* ) + void* (* realloc ) ( void*, size_t, void* ) + void* userdata + + cdef struct _xmpp_log_t : + xmpp_log_handler handler + void* userdata + + ctypedef struct xmpp_stream_error_t : + xmpp_error_type_t type + char* text + xmpp_stanza_t* stanza + # + ############################################################################# + # + # more callbacks + # + ctypedef void (* xmpp_conn_handler ) ( xmpp_conn_t*, + xmpp_conn_event_t, + int, + xmpp_stream_error_t*, + void* ) + ctypedef int (* xmpp_timed_handler ) ( xmpp_conn_t*, + void* ) + ctypedef int (* xmpp_handler ) ( xmpp_conn_t*, + xmpp_stanza_t*, + void* ) + # + ############################################################################# + # + # cdef functions + # + cdef : + void xmpp_initialize ( ) + void xmpp_shutdown ( ) + int xmpp_version_check ( int, int ) + xmpp_ctx_t* xmpp_ctx_new ( xmpp_mem_t*, + xmpp_log_t* ) + void xmpp_ctx_free ( xmpp_ctx_t* ) + xmpp_log_t* xmpp_get_default_logger ( xmpp_log_level_t ) + xmpp_conn_t* xmpp_conn_new ( xmpp_ctx_t* ) + xmpp_conn_t* xmpp_conn_clone ( xmpp_conn_t* ) + int xmpp_conn_release ( xmpp_conn_t* ) + char* xmpp_conn_get_jid ( xmpp_conn_t* ) + void xmpp_conn_set_jid ( xmpp_conn_t*, char* ) + char* xmpp_conn_get_pass ( xmpp_conn_t* ) + void xmpp_conn_set_pass ( xmpp_conn_t*, char* ) + xmpp_ctx_t* xmpp_conn_get_context ( xmpp_conn_t* ) + int xmpp_connect_client ( xmpp_conn_t*, + char*, + unsigned short, + xmpp_conn_handler, + void* ) + void xmpp_disconnect ( xmpp_conn_t* ) + void xmpp_send ( xmpp_conn_t*, + xmpp_stanza_t* ) + void xmpp_send_raw_string ( xmpp_conn_t*, + char*, + ... ) + void xmpp_send_raw ( xmpp_conn_t*, + char*, + size_t ) + void xmpp_timed_handler_add ( xmpp_conn_t*, + xmpp_timed_handler, + unsigned long, + void* ) + void xmpp_timed_handler_delete( xmpp_conn_t*, + xmpp_timed_handler ) + void xmpp_handler_add ( xmpp_conn_t*, + xmpp_handler, + char*, + char*, + char*, + void* ) + void xmpp_handler_delete ( xmpp_conn_t*, + xmpp_handler ) + void xmpp_id_handler_add ( xmpp_conn_t*, + xmpp_handler, + char*, + void* ) + void xmpp_id_handler_delete ( xmpp_conn_t*, + xmpp_handler, + char* ) + xmpp_stanza_t* xmpp_stanza_new ( xmpp_ctx_t* ) + xmpp_stanza_t* xmpp_stanza_clone ( xmpp_stanza_t* ) + xmpp_stanza_t* xmpp_stanza_copy ( xmpp_stanza_t* ) + int xmpp_stanza_release ( xmpp_stanza_t* ) + void xmpp_free ( xmpp_ctx_t*, void* ) + int xmpp_stanza_is_text ( xmpp_stanza_t* ) + int xmpp_stanza_is_tag ( xmpp_stanza_t* ) + int xmpp_stanza_to_text ( xmpp_stanza_t*, + char**, + unsigned int* ) + xmpp_stanza_t* xmpp_stanza_get_children ( xmpp_stanza_t* ) + xmpp_stanza_t* xmpp_stanza_get_child_by_name \ + ( xmpp_stanza_t*, + char* ) + xmpp_stanza_t* xmpp_stanza_get_child_by_ns \ + ( xmpp_stanza_t*, + char* ) + xmpp_stanza_t* xmpp_stanza_get_next ( xmpp_stanza_t* ) + char* xmpp_stanza_get_attribute( xmpp_stanza_t*, + char* ) + char* xmpp_stanza_get_ns ( xmpp_stanza_t* ) + char* xmpp_stanza_get_text ( xmpp_stanza_t* ) + char* xmpp_stanza_get_text_ptr ( xmpp_stanza_t* ) + char* xmpp_stanza_get_name ( xmpp_stanza_t* ) + int xmpp_stanza_add_child ( xmpp_stanza_t*, + xmpp_stanza_t* ) + int xmpp_stanza_set_ns ( xmpp_stanza_t*, + char* ) + int xmpp_stanza_set_attribute( xmpp_stanza_t*, + char*, + char* ) + int xmpp_stanza_set_name ( xmpp_stanza_t*, + char* ) + int xmpp_stanza_set_text ( xmpp_stanza_t*, + char* ) + int xmpp_stanza_set_text_with_size \ + ( xmpp_stanza_t*, + char*, + size_t ) + char* xmpp_stanza_get_type ( xmpp_stanza_t* ) + char* xmpp_stanza_get_id ( xmpp_stanza_t* ) + int xmpp_stanza_set_id ( xmpp_stanza_t*, + char* ) + int xmpp_stanza_set_type ( xmpp_stanza_t*, + char* ) + xmpp_stanza_t* xmpp_stanza_reply ( xmpp_stanza_t* ) + void xmpp_run_once ( xmpp_ctx_t*, + unsigned long ) + void xmpp_run ( xmpp_ctx_t* ) + void xmpp_stop ( xmpp_ctx_t* ) + # + ############################################################################# _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn