[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/services - hub.py:1.6

Anthony Baxter anthony@interlink.com.au
Fri, 11 Jul 2003 01:51:16 -0400


Update of /cvs-repository/Zope3/src/zope/app/interfaces/services
In directory cvs.zope.org:/tmp/cvs-serv13561/src/zope/app/interfaces/services

Modified Files:
	hub.py 
Log Message:
Moved the Registration object from zope.app.index to zope.app.services.hub,
and changed the bootstrap code to add a Registration object if there is not
already one installed. This means that by default the ObjectHub is now 
actually doing something, rather than sitting by itself feeling lonely.

When a Registration object is added by bootstrap, it's subscribed by
default.


=== Zope3/src/zope/app/interfaces/services/hub.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/interfaces/services/hub.py:1.5	Wed Mar 19 13:05:03 2003
+++ Zope3/src/zope/app/interfaces/services/hub.py	Fri Jul 11 01:50:41 2003
@@ -20,6 +20,7 @@
 
 from zope.app.interfaces.services.event import IEventChannel
 from zope.app.interfaces.event import IEvent
+from zope.interface import Interface
 
 
 class ObjectHubError(Exception):
@@ -216,3 +217,19 @@
 
 class IObjectRemovedHubEvent(IObjectUnregisteredHubEvent):
     """An object with a hub id has been removed and unregistered."""
+
+
+class ISubscriptionControl(Interface):
+    def subscribe():
+        """Subscribe to the prevailing object hub service."""
+
+    def unsubscribe():
+        """Unsubscribe from the object hub service."""
+
+    def isSubscribed():
+        """Return whether we are currently subscribed."""
+
+    def registerExisting():
+        """Register all existing objects (for some definition of all)."""
+
+