summaryrefslogtreecommitdiff
path: root/src/leap/common/events/README
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-04-10 20:03:15 +0900
committerKali Kaneko <kali@leap.se>2013-04-11 23:17:12 +0900
commita982a0de2b290beecf907a2210b43faef1bb70c0 (patch)
treeebd15f81ea4f84ec0ba2008c1a6f032e053db1bf /src/leap/common/events/README
parent63f0d92a715b8d84536a449dc1e6b2b5eb9a7cb2 (diff)
add RAISE_WINDOW event
Diffstat (limited to 'src/leap/common/events/README')
-rw-r--r--src/leap/common/events/README45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/leap/common/events/README b/src/leap/common/events/README
deleted file mode 100644
index 61b320d..0000000
--- a/src/leap/common/events/README
+++ /dev/null
@@ -1,45 +0,0 @@
-Events mechanism
-================
-
-The events mechanism allows for "components" to send signal events to each
-other by means of a centralized server. Components can register with the
-server to receive signals of certain types, and they can also send signals to
-the server that will then redistribute these signals to registered components.
-
-
-Listening daemons
------------------
-
-Both components and the server listen for incoming messages by using a
-listening daemon that runs in its own thread. The server daemon has to be
-started explicitly, while components daemon will be started whenever a
-component registers with the server to receive messages.
-
-
-How to use it
--------------
-
-To start the events server:
-
->>> from leap.common.events import server
->>> server.ensure_server(port=8090)
-
-To register a callback to be called when a given signal is raised:
-
->>> from leap.common.events import (
->>> register,
->>> events_pb2 as proto,
->>> )
->>>
->>> def mycallback(sigreq):
->>> print str(sigreq)
->>>
->>> events.register(signal=proto.CLIENT_UID, callback=mycallback)
-
-To signal an event:
-
->>> from leap.common.events import (
->>> signal,
->>> events_pb2 as proto,
->>> )
->>> signal(proto.CLIENT_UID)