X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=protocol.pyx;h=e8d8999593ab6e0161ac35d9157759f1790a1a51;hp=2e36aa4daf108d3d5b67aae8cded5783601d681d;hb=e5cbbcebacb064a4e291a12c05af9ebf93376fd9;hpb=33091059fda101f7c4105945a677db2632d4ffcc;ds=sidebyside diff --git a/protocol.pyx b/protocol.pyx index 2e36aa4..e8d8999 100644 --- a/protocol.pyx +++ b/protocol.pyx @@ -17,15 +17,26 @@ # along with this program. If not, see . # +cimport purple + cdef class Protocol: """ Protocol class @param protocol_id """ - def __init__(self, protocol_id): + def __init__(self, account, protocol_id): + self.__account = account self.__protocol_id = protocol_id def __get_protocol_id(self): return self.__protocol_id.protocol_id protocol_id = property(__get_protocol_id) + + def __get_account(self): + return self.__account + account = property(__get_account) + + def _set_protocol_id(self, protocol_id): + account.purple_account_set_protocol_id( \ + self.__account._get_structure(), protocol_id)