Added comments for Account class public methods.
authorRagner Magalhaes <ragner.magalhaes@openbossa.org>
Tue, 2 Dec 2008 21:10:00 +0000 (21:10 +0000)
committerAnderson Briglia <anderson.briglia@openbossa.org>
Sat, 28 Feb 2009 21:11:18 +0000 (17:11 -0400)
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

account.pyx

index d5f5ef2..1a62140 100644 (file)
@@ -117,6 +117,12 @@ cdef class Account:
     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)
@@ -125,6 +131,12 @@ cdef class Account:
             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
@@ -132,6 +144,12 @@ cdef class Account:
             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)
@@ -140,6 +158,12 @@ cdef class Account:
             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)
@@ -148,6 +172,12 @@ cdef class Account:
             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)
@@ -156,6 +186,13 @@ cdef class Account:
             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)
@@ -164,6 +201,11 @@ cdef class Account:
             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: