[telepathy-doc/master] Delete old Python examples
Davyd Madeley
davyd at madeley.id.au
Sun Apr 5 19:55:02 PDT 2009
---
.../basics_dbus_python_methods/Makefile.am | 4 -
.../examples/basics_dbus_python_methods/example.py | 79 --------------------
.../basics_dbus_python_properties/Makefile.am | 4 -
.../basics_dbus_python_properties/example.py | 63 ----------------
.../basics_dbus_python_signals/Makefile.am | 4 -
.../examples/basics_dbus_python_signals/example.py | 56 --------------
6 files changed, 0 insertions(+), 210 deletions(-)
delete mode 100644 docs/examples/basics_dbus_python_methods/Makefile.am
delete mode 100644 docs/examples/basics_dbus_python_methods/example.py
delete mode 100644 docs/examples/basics_dbus_python_properties/Makefile.am
delete mode 100644 docs/examples/basics_dbus_python_properties/example.py
delete mode 100644 docs/examples/basics_dbus_python_signals/Makefile.am
delete mode 100644 docs/examples/basics_dbus_python_signals/example.py
diff --git a/docs/examples/basics_dbus_python_methods/Makefile.am b/docs/examples/basics_dbus_python_methods/Makefile.am
deleted file mode 100644
index 6e633c3..0000000
--- a/docs/examples/basics_dbus_python_methods/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(top_srcdir)/docs/examples/Makefile.am_fragment
-
-#Dist the example:
-EXTRA_DIST = example.py
diff --git a/docs/examples/basics_dbus_python_methods/example.py b/docs/examples/basics_dbus_python_methods/example.py
deleted file mode 100644
index 3eb425f..0000000
--- a/docs/examples/basics_dbus_python_methods/example.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 2009 Collabora Ltd
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2
-# as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-import dbus
-import dbus.mainloop.glib
-import gobject
-import sys
-import traceback
-
-def on_notify_reply(result):
- print "Notify() result: %u \n" % result
- loop.quit()
-
-def on_notify_error(error):
- print "Notify() failed: %s\n" % str(error)
- loop.quit()
-
-if __name__ == '__main__':
-
- # begin dbus-python-get-bus
- # Tell the dbus python module to use the Glib mainloop,
- # which we will start and stop later:
- dbus.mainloop.glib.DBusGMainLoop(set_as_default = True)
-
- # Connect to the bus:
- bus = dbus.SessionBus()
- # end dbus-python-get-bus
-
- # begin dbus-python-get-proxy
- # Get a proxy for the remote object:
- try:
- proxy = bus.get_object('org.freedesktop.Notifications',
- '/org/freedesktop/Notifications',
- 'org.freedesktop.Notifications')
- except dbus.DBusException:
- traceback.print_exc()
- sys.exit(1)
- # end dbus-python-get-proxy
-
-
- # Call a method on the interface of the remote object: */
-
- # begin dbus-python-call-method
- # Create empty objects needed for some parameters:
- actions = dbus.Array('s')
- hints = dbus.Dictionary({}, signature=dbus.Signature('sv'))
-
- # Call the method:
- proxy.Notify(
- "dbus python example",
- (dbus.UInt32)(0),
- '', # icon-name
- 'Example Notification',
- 'This is an example notification via dbus with Python.',
- actions,
- hints,
- 0,
- reply_handler = on_notify_reply, error_handler = on_notify_error)
- # end dbus-python-call-method
-
- # Start the mainloop so we can wait until the D-Bus method
- # returns. We stop the mainloop in our handlers.
- loop = gobject.MainLoop()
- loop.run()
-
-
-
diff --git a/docs/examples/basics_dbus_python_properties/Makefile.am b/docs/examples/basics_dbus_python_properties/Makefile.am
deleted file mode 100644
index 6e633c3..0000000
--- a/docs/examples/basics_dbus_python_properties/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(top_srcdir)/docs/examples/Makefile.am_fragment
-
-#Dist the example:
-EXTRA_DIST = example.py
diff --git a/docs/examples/basics_dbus_python_properties/example.py b/docs/examples/basics_dbus_python_properties/example.py
deleted file mode 100644
index fa82233..0000000
--- a/docs/examples/basics_dbus_python_properties/example.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 2009 Collabora Ltd
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2
-# as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-import dbus
-import dbus.mainloop.glib
-import gobject
-import sys
-import traceback
-
-def on_get_reply(result):
- print "Get() result: %u \n" % result
- loop.quit()
-
-def on_get_error(error):
- print "Get() failed: %s\n" % str(error)
- loop.quit()
-
-if __name__ == '__main__':
-
- # Tell the dbus python module to use the Glib mainloop,
- # which we will start and stop later:
- dbus.mainloop.glib.DBusGMainLoop(set_as_default = True)
-
- # Connect to the bus:
- bus = dbus.SessionBus()
-
- # Get a proxy for the Properties interface of a remote object:
- try:
- proxy = bus.get_object('org.freedesktop.Telepathy.Connection.salut.local_xmpp.Murray_20Cumming',
- '/org/freedesktop/Telepathy/Connection/salut/local_xmpp/Murray_20Cumming',
- 'org.freedesktop.DBus.Properties')
- except dbus.DBusException:
- traceback.print_exc()
- sys.exit(1)
-
-
- # Call the Properties.Get method on the interface of the remote object: */
-
- # Call the method:
- proxy.Get(
- "org.freedesktop.Telepathy.Connection",
- "SelfHandle",
- reply_handler = on_get_reply, error_handler = on_get_error)
-
- # Start the mainloop so we can wait until the D-Bus method
- # returns. We stop the mainloop in our handlers.
- loop = gobject.MainLoop()
- loop.run()
-
-
-
diff --git a/docs/examples/basics_dbus_python_signals/Makefile.am b/docs/examples/basics_dbus_python_signals/Makefile.am
deleted file mode 100644
index 6e633c3..0000000
--- a/docs/examples/basics_dbus_python_signals/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(top_srcdir)/docs/examples/Makefile.am_fragment
-
-#Dist the example:
-EXTRA_DIST = example.py
diff --git a/docs/examples/basics_dbus_python_signals/example.py b/docs/examples/basics_dbus_python_signals/example.py
deleted file mode 100644
index 7e618a8..0000000
--- a/docs/examples/basics_dbus_python_signals/example.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 2009 Collabora Ltd
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2
-# as published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-import dbus
-import dbus.mainloop.glib
-import gobject
-import sys
-import traceback
-
-def on_signal_device_added(path):
- print "DeviceAdded signal handled: %s \n" % path
- loop.quit()
-
-if __name__ == '__main__':
-
- # Tell the dbus python module to use the Glib mainloop,
- # which we will start and stop later:
- dbus.mainloop.glib.DBusGMainLoop(set_as_default = True)
-
- # Connect to the bus:
- bus = dbus.SystemBus()
-
- # Get a proxy for the remote object:
- try:
- proxy = bus.get_object('org.freedesktop.Hal',
- '/org/freedesktop/Hal/Manager',
- 'org.freedesktop.Hal.Manager')
- except dbus.DBusException:
- traceback.print_exc()
- sys.exit(1)
-
-
- # Connect to a signal on the interface: */
- proxy.connect_to_signal(
- "DeviceAdded",
- on_signal_device_added)
-
- # Start the mainloop so we can wait until the D-Bus method
- # returns. We stop the mainloop in our handlers.
- loop = gobject.MainLoop()
- loop.run()
-
-
-
--
1.5.6.5
More information about the telepathy-commits
mailing list