[Zope3-checkins] SVN: Zope3/branches/jim-simplifyevents/src/zope/app/event/__init__.py Got rid of the event services.

Jim Fulton jim at zope.com
Wed May 26 07:26:22 EDT 2004


Log message for revision 24998:
Got rid of the event services.



-=-
Modified: Zope3/branches/jim-simplifyevents/src/zope/app/event/__init__.py
===================================================================
--- Zope3/branches/jim-simplifyevents/src/zope/app/event/__init__.py	2004-05-26 11:25:46 UTC (rev 24997)
+++ Zope3/branches/jim-simplifyevents/src/zope/app/event/__init__.py	2004-05-26 11:26:21 UTC (rev 24998)
@@ -1,42 +1 @@
-##############################################################################
 #
-# Copyright (c) 2002 Zope Corporation and Contributors.
-# All Rights Reserved.
-# 
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-# 
-##############################################################################
-"""
-$Id$
-"""
-from zope.component import getService
-from zope.app.servicenames import EventPublication
-from zope.app.event.interfaces import IEvent
-from zope.app.event.globalservice import eventPublisher
-
-# XXX convert these as well
-def getEventService(context): # the "publish" service
-    return getService(EventPublication, context=context)
-
-def publish(context, event):
-    return getEventService(context).publish(event)
-
-def globalSubscribe(subscriber, event_type=IEvent, filter=None):
-    return eventPublisher.globalSubscribe(subscriber, event_type, filter)
-
-def globalSubscribeMany(subscriber, event_types=(IEvent,), filter=None):
-    subscribe_func = eventPublisher.globalSubscribe
-    for event_type in event_types:
-        subscribe_func(subscriber, event_type, filter)
-
-def globalUnsubscribe(subscriber, event_type=None, filter=None):
-    return eventPublisher.unsubscribe(subscriber, event_type, filter)
-
-def globalListSubscriptions(subscriber, event_type=None):
-    return eventPublisher.listSubscriptions(subscriber, event_type)
-




More information about the Zope3-Checkins mailing list