]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
flesh out IQueuedItem
authormeejah <meejah@meejah.ca>
Mon, 1 Feb 2016 16:03:07 +0000 (09:03 -0700)
committermeejah <meejah@meejah.ca>
Mon, 8 Feb 2016 17:12:32 +0000 (10:12 -0700)
src/allmydata/frontends/magic_folder.py

index 8a2b07e1be1633c06ffdfeeb05930c12607cdfb9..c3913d357581415738c77d8d177b21a4f6a73c5f 100644 (file)
@@ -9,6 +9,8 @@ from twisted.python.failure import Failure
 from twisted.python import runtime
 from twisted.application import service
 
+from zope.interface import Interface, Attribute, implementer
+
 from allmydata.util import fileutil
 from allmydata.interfaces import IDirectoryNode
 from allmydata.util import log
@@ -199,10 +201,24 @@ class QueueMixin(HookMixin):
             raise
 
 
-from zope.interface import Interface, implementer
-
+# this isn't in interfaces.py because it's very specific to QueueMixin
 class IQueuedItem(Interface):
-    pass
+    relpath_u = Attribute("The path this item represents")
+    progress = Attribute("A PercentProgress instance")
+
+    def set_status(self, status, current_time=None):
+        """
+        """
+
+    def status_time(self, state):
+        """
+        Get the time of particular state change, or None
+        """
+
+    def status_history(self):
+        """
+        All status changes, sorted latest -> oldest
+        """
 
 
 @implementer(IQueuedItem)