Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def manilaaccount::ManilaAccount::checkSetupOK (   self,
  toCheck = 0 
)

Checks that the setup is OK for contacting a server.

Accepts an integer arguement, each bit specifies corresponds to one check, if the bit is
one the check is done.  If the argument is 0, all checks are done.
Returns 1 if the checks are passed, 0 if one fails.

Definition at line 418 of file manilaaccount.py.

00418                                        :
        """Checks that the setup is OK for contacting a server.

        Accepts an integer arguement, each bit specifies corresponds to one check, if the bit is
        one the check is done.  If the argument is 0, all checks are done.
        Returns 1 if the checks are passed, 0 if one fails."""
        if toCheck == 0 or toCheck & 1:
            if self.prefs['username'] == "" or \
                   self.prefs['rpcserver'] == "" or self.prefs['siteurl'] == "":
                self.setErrorMessage("You must setup the Manila server details first.") 
                return 0

        if toCheck == 0 or toCheck & 2:
            if self.getLoggedIn() == 0:
                self.setErrorMessage("You must login first.") 
                return 0

        if toCheck & 4:
            if self.currentHPMsgNum == -1:
                self.setErrorMessage("You must download the current homepage before you can set it.") 
                return 0
            
        self.setErrorMessage("")
        return 1


    def getPassword(self):


Generated by  Doxygen 1.6.0   Back to index