[tuxdroid-svn] r4731 - software_suite_v3/smart-core/smart-dev/plugin-toolkit/python/skeleton/trunk/
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-06-03 09:41:37
|
Author: remi
Date: 2009-06-03 11:41:30 +0200 (Wed, 03 Jun 2009)
New Revision: 4731
Modified:
software_suite_v3/smart-core/smart-dev/plugin-toolkit/python/skeleton/trunk/executables/plugin-skeleton.py
Log:
* added a throwActuation "mouthOn(2, 'NDEF')" in the python plugin skeleton
* added the callback on server event.
Modified: software_suite_v3/smart-core/smart-dev/plugin-toolkit/python/skeleton/trunk/executables/plugin-skeleton.py
===================================================================
--- software_suite_v3/smart-core/smart-dev/plugin-toolkit/python/skeleton/trunk/executables/plugin-skeleton.py 2009-06-03 09:34:02 UTC (rev 4730)
+++ software_suite_v3/smart-core/smart-dev/plugin-toolkit/python/skeleton/trunk/executables/plugin-skeleton.py 2009-06-03 09:41:30 UTC (rev 4731)
@@ -113,6 +113,7 @@
self.throwMessage(self.configuration().getWindowsParam())
else:
self.throwMessage(self.configuration().getLinuxParam())
+ self.throwActuation("mouthOn", 2, 'NDEF')
self.throwMessage("I finished my work ...")
def runDaemon(self):
@@ -141,6 +142,17 @@
# Stop the fake daemon loop
self.__daemonRun = False
+ def onPluginEvent(self, eventName, eventValues):
+ """Callback on plugin event.
+ @param eventName: Event name.
+ @param eventValues: Event values.
+ """
+ self.throwMessage("I received event")
+ self.throwTrace(eventName)
+ self.throwTrace(len(eventValues))
+ for value in eventValues:
+ self.throwTrace(value)
+
if __name__ == "__main__":
plugin = SkeletonPlugin()
plugin.boot(sys.argv[1:], Configuration())
|