FIXES:
- Added comments for Account class public methods.
Signed-off-by: Bruno Abinader <bruno.abinader@indt.org.br>
Acked-by: Ragner Magalhaes <ragner.magalhaes@indt.org.br>
Acked-by: Ricardo Guimaraes <ricardo.guimaraes@indt.org.br>
git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1415
596f6dd7-e928-0410-a184-
9e12fd12cf7e
remember_password = property(__get_remember_password)
def set_username(self, username):
remember_password = property(__get_remember_password)
def set_username(self, username):
+ """
+ Sets the account's username.
+
+ @param username The username
+ @return True if successful, False if account doesn't exists
+ """
if self.__exists:
account.purple_account_set_username(self._get_structure(), \
username)
if self.__exists:
account.purple_account_set_username(self._get_structure(), \
username)
return False
def set_protocol_id(self, protocol_id):
return False
def set_protocol_id(self, protocol_id):
+ """
+ Sets the account's protocol ID.
+
+ @param protocol_id The protocol ID
+ @return True if successful, False if account doesn't exists
+ """
if self.__exists:
self.__protocol._set_protocol_id(protocol_id)
return True
if self.__exists:
self.__protocol._set_protocol_id(protocol_id)
return True
return False
def set_password(self, password):
return False
def set_password(self, password):
+ """
+ Sets the account's password.
+
+ @param password The password
+ @return True if successful, False if account doesn't exists
+ """
if self.__exists:
account.purple_account_set_password(self._get_structure(), \
password)
if self.__exists:
account.purple_account_set_password(self._get_structure(), \
password)
return False
def set_alias(self, alias):
return False
def set_alias(self, alias):
+ """
+ Sets the account's alias
+
+ @param alias The alias
+ @return True if successful, False if account doesn't exists
+ """
if self.__exists:
account.purple_account_set_alias(self._get_structure(), \
alias)
if self.__exists:
account.purple_account_set_alias(self._get_structure(), \
alias)
return False
def set_user_info(self, user_info):
return False
def set_user_info(self, user_info):
+ """
+ Sets the account's user information
+
+ @param user_info The user information
+ @return True if successful, False if account doesn't exists
+ """
if self.__exists:
account.purple_account_set_user_info(self._get_structure(), \
user_info)
if self.__exists:
account.purple_account_set_user_info(self._get_structure(), \
user_info)
return False
def set_remember_password(self, remember_password):
return False
def set_remember_password(self, remember_password):
+ """
+ Sets whether or not this account should save its password.
+
+ @param remember_password True if should remember the password,
+ or False otherwise
+ @return True if successful, False if account doesn't exists
+ """
if self.__exists:
account.purple_account_set_remember_password( \
self._get_structure(), remember_password)
if self.__exists:
account.purple_account_set_remember_password( \
self._get_structure(), remember_password)
return False
def new(self):
return False
def new(self):
+ """
+ Creates a new account.
+
+ @return True if successful, False if account already exists
+ """
if self.__exists:
return False
else:
if self.__exists:
return False
else: