Signed-off-by: Anderson Briglia <anderson.briglia@indt.org.br>
Signed-off-by: Ragner Magalhaes <ragner.magalhaes@indt.org.br>
Signed-off-by: Ricardo Guimaraes <ricardo.guimaraes@indt.org.br>
Signed-off-by: Bruno Abinader <bruno.abinader@indt.org.br>
Signed-off-by: Dinorah Monteiro <dinorah.monteiro@indt.org.br>
git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1266
596f6dd7-e928-0410-a184-
9e12fd12cf7e
cdef extern from "libpurple/account.h":
ctypedef struct PurpleAccount
cdef extern from "libpurple/account.h":
ctypedef struct PurpleAccount
- cdef PurpleAccount* c_purple_account_new "purple_account_new" (const_char_ptr username, const_char_ptr protocol_id)
+ cdef PurpleAccount* purple_account_new(const_char_ptr username, const_char_ptr protocol_id)
+ cdef void c_purple_account_set_username "purple_account_set_username" (PurpleAccount *account, const_char_ptr username)
cdef void c_purple_account_set_password "purple_account_set_password" (PurpleAccount *account, const_char_ptr password)
cdef void c_purple_account_set_enabled "purple_account_set_enabled" (PurpleAccount *account, const_char_ptr ui, gboolean value)
class Account(object):
""" Account class """
cdef void c_purple_account_set_password "purple_account_set_password" (PurpleAccount *account, const_char_ptr password)
cdef void c_purple_account_set_enabled "purple_account_set_enabled" (PurpleAccount *account, const_char_ptr ui, gboolean value)
class Account(object):
""" Account class """
- def __init__(self):
- purple_account = None
+ def __init__(self, username, protocol_id):
+ cdef PurpleAccount *self.purple_account = purple_account_new(username, protocol_id)
- def purple_account_new(self, user_name, protocol_id):
- return c_purple_account_new(user_name, protocol_id)
-
def purple_account_set_password(self, account, password):
c_purple_account_set_password(account, password)
def purple_account_set_password(self, account, password):
c_purple_account_set_password(account, password)
#
cdef extern from "glib.h":
#
cdef extern from "glib.h":
- ctypedef void* gpointer
+ ctypedef void *gpointer
ctypedef int gint
ctypedef unsigned int guint
ctypedef gint gboolean
# GHashTable is an opaque data structure
ctypedef struct GHashTable:
ctypedef int gint
ctypedef unsigned int guint
ctypedef gint gboolean
# GHashTable is an opaque data structure
ctypedef struct GHashTable:
struct _GSList:
gpointer data
struct _GSList:
gpointer data