X-Git-Url: http://git.maemo.org/git/?p=python-purple;a=blobdiff_plain;f=account.pyx;h=427d2bdebf24c469303a3c38e854dbb5e4156c46;hp=c724094661c1f353b7595958c7640c7ca526a5d0;hb=b81a85360c67a5721e59458aeec5d7b9280a290e;hpb=6de6090d402a505f5c9d7a483e0570c8c917fa27 diff --git a/account.pyx b/account.pyx index c724094..427d2bd 100644 --- a/account.pyx +++ b/account.pyx @@ -398,6 +398,20 @@ cdef class Account: self.__exists = True return True + + def remove_account(self, username, protocol_id): + """ + Removes as existing account. + + @return True if successful, False if account doesnt exists + """ + who = account.purple_accounts_find(username, protocol_id) + + if who == NULL: + return False + else + account.purple_accounts_remove( who ) + return True def connect(self): """