From: Ragner Magalhaes Date: Tue, 2 Dec 2008 20:56:33 +0000 (+0000) Subject: Adding function set_protocol_id to Account class X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=commitdiff_plain;h=52e4bd7146a78af7e8dff51171a7d27e12aed847;hp=0f988a54df0f8ddce03f4b587ed296f30edf2e9b Adding function set_protocol_id to Account class Adding function set_protocol_id to set account's protocol id Signed-off-by: Ragner Magalhaes git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1377 596f6dd7-e928-0410-a184-9e12fd12cf7e --- diff --git a/account.pyx b/account.pyx index 69872cb..ce40bd1 100644 --- a/account.pyx +++ b/account.pyx @@ -370,3 +370,12 @@ cdef class Account: if c_account: account.c_purple_account_set_alias(c_account, alias) + def set_protocol_id(self, acc, protocol_id): + ''' @param acc Tuple (username, protocol id) ''' + ''' @param protocol_id The new account's protocol id ''' + cdef account.PurpleAccount *c_account + + c_account = account.c_purple_accounts_find(acc[0], acc[1]) + if c_account: + account.c_purple_account_set_protocol_id(c_account, protocol_id) +