cdef PurpleConversation *__conv
def __cinit__(self):
- purple_conversations_init()
+ c_purple_conversations_init()
def conversation_new(self, type, acc, const_char_ptr name):
- self.__conv = purple_conversation_new(type, <PurpleAccount*>acc.__account, name)
+ self.__conv = c_purple_conversation_new(type, <PurpleAccount*>acc.__account, name)
def conversation_set_ui_ops(self):
cdef PurpleConversationUiOps c_conv_ui_ops
c_conv_ui_ops.custom_smiley_close = NULL
c_conv_ui_ops.send_confirm = NULL
- purple_conversation_set_ui_ops(self.__conv, &c_conv_ui_ops)
+ c_purple_conversation_set_ui_ops(self.__conv, &c_conv_ui_ops)
def conversation_write(self, const_char_ptr message):
- purple_conv_im_send(purple_conversation_get_im_data(self.__conv), message)
+ c_purple_conv_im_send(c_purple_conversation_get_im_data(self.__conv), message)
def conversation_destroy(self):
- purple_conversation_destroy(self.__conv)
+ c_purple_conversation_destroy(self.__conv)
def conversation_get_handle(self):
- purple_conversations_get_handle()
+ c_purple_conversations_get_handle()
def send_message(self, buddy, const_char_ptr message):
self.conversation_new(1, buddy.account, buddy.name)
ctypedef struct PurpleBuddyList:
pass
+ void *c_purple_blist_get_handle "purple_blist_get_handle" ()
void c_purple_blist_load "purple_blist_load" ()
PurpleBuddyList* c_purple_blist_new "purple_blist_new" ()
cdef extern from "libpurple/connection.h":
ctypedef struct PurpleConnection:
pass
-
- void connect_to_signals_for_demonstration_purposes_only()
void (*custom_smiley_close) (PurpleConversation *conv, const_char_ptr smile)
void (*send_confirm) (PurpleConversation *conv, const_char_ptr message)
- void purple_conversations_init()
- PurpleConversation *purple_conversation_new(int type, PurpleAccount *account, const_char_ptr name)
- void purple_conversation_set_ui_ops(PurpleConversation *conv, PurpleConversationUiOps *ops)
- PurpleConvIm *purple_conversation_get_im_data(PurpleConversation *conv)
- void purple_conv_im_send(PurpleConvIm *im, const_char_ptr message)
- void *purple_conversations_get_handle()
- void purple_conversation_destroy(PurpleConversation *conv)
-
+ void c_purple_conversations_init "purple_conversations_init" ()
+ void *c_purple_conversations_get_handle "purple_conversations_get_handle" ()
+ PurpleConversation *c_purple_conversation_new "purple_conversation_new" (int type, PurpleAccount *account, const_char_ptr name)
+ void c_purple_conversation_set_ui_ops "purple_conversation_set_ui_ops" (PurpleConversation *conv, PurpleConversationUiOps *ops)
+ PurpleConvIm *c_purple_conversation_get_im_data "purple_conversation_get_im_data" (PurpleConversation *conv)
+ void c_purple_conv_im_send "purple_conv_im_send" (PurpleConvIm *im, const_char_ptr message)
+ void c_purple_conversation_destroy "purple_conversation_destroy" (PurpleConversation *conv)
cdef struct PurpleProxyInfo
ctypedef int PurpleProxyType
- PurpleProxyInfo *purple_proxy_info_new()
+
+ PurpleProxyInfo *c_purple_proxy_info_new "purple_proxy_info_new" ()
void c_purple_proxy_info_set_type "purple_proxy_info_set_type" (PurpleProxyInfo *info, PurpleProxyType type)
void c_purple_proxy_info_set_host "purple_proxy_info_set_host" (const_char_ptr host)
void c_purple_proxy_info_set_port "purple_proxy_info_set_port" (const_char_ptr port)
--- /dev/null
+#
+# Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
+#
+# This file is part of python-purple.
+#
+# python-purple is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# python-purple 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+cdef extern from "libpurple/signals.h":
+ ctypedef void (*PurpleCallback) ()
+
+ gulong c_purple_signal_connect "purple_signal_connect" (void *instance,
+ const_char_ptr signal, void *handle, PurpleCallback func,
+ void *data)
+ void c_purple_signal_disconnect "purple_signal_disconnect" (void *instance,
+ const_char_ptr signal, void *handle, PurpleCallback func)
#
cdef extern from "libpurple/util.h":
+ void *c_purple_markup_strip_html "purple_markup_strip_html" (const_char_ptr str)
void c_purple_util_set_user_dir "purple_util_set_user_dir" (char *dir)
include "libpurple/pounce.pxd"
include "libpurple/prefs.pxd"
include "libpurple/proxy.pxd"
+include "libpurple/signals.pxd"
include "libpurple/status.pxd"
include "libpurple/savedstatuses.pxd"
include "libpurple/util.pxd"
cdef extern from "c_purple.h":
- guint glib_input_add(gint fd, PurpleInputCondition condition, PurpleInputFunction function, gpointer data)
- void glib_main_loop()
+ void connect_to_signals_for_demonstration_purposes_only ()
+ guint glib_input_add(gint fd, PurpleInputCondition condition, PurpleInputFunction function, gpointer data)
import ecore