Exemplo n.º 1
0
    def _set_global_status(self, status):
        """Internal use only, set the current global state.

        This method is meant to be inaccessible to user interfaces. It
        is called by other components of the client to update the
        current data in this interface. Although Python doesn't have
        such a concept, you can think of it as a "protected" method.

        @param status:
                    Instance of filerockclient.interfaces.GStatuses
        """
        with self._lock:
            if status != self._global_status:
                s1 = GStatus._idToStrings()[self._global_status]
                s2 = GStatus._idToStrings()[status]
                self._logger.debug(
                    u"Changing application status from %s to %s" % (s1, s2))
                self._global_status = status
Exemplo n.º 2
0
 def isConnected(self):
     """Tell whether the client is connected to the server."""
     return GStatus.isConnected(self.getCurrentGlobalStatus())