twisted.spread.flavors.ViewPoint

Here are the examples of the python api twisted.spread.flavors.ViewPoint taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: mythbox Source File: publish.py
    def getStateToCacheAndObserveFor(self, perspective, observer):
        """Get all necessary metadata to keep a clientside cache.
        """
        if perspective:
            pname = perspective.perspectiveName
            sname = perspective.getService().serviceName
        else:
            pname = "None"
            sname = "None"

        return {"remote": flavors.ViewPoint(perspective, self),
                "publishedID": self.publishedID,
                "perspective": pname,
                "service": sname,
                "timestamp": self.timestamp}