X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=core%2Faccount.pxd;h=1f11147d1aed6314deb99cd4370f593b9a7fea14;hp=50830e5a0c4476f14af6e6496619674ca7a33ec9;hb=c2250da2a909481d87209e028fa5079377ba3519;hpb=aa542c72d1d3cb8bb567f8a890cd37237b0e08c1 diff --git a/core/account.pxd b/core/account.pxd index 50830e5..1f11147 100644 --- a/core/account.pxd +++ b/core/account.pxd @@ -20,21 +20,18 @@ 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 """ - def __init__(self): - purple_account = None + def __init__(self, username, protocol_id): + cdef PurpleAccount *self.purple_account = purple_account_new(username, protocol_id) - # FIXME """ - 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)