From c9a59b40ca899b3d6df9b729d37a33b54aed268a Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen Date: Thu, 28 Feb 2013 13:14:18 +0200 Subject: [Rename] Rename to dleyna-control dleyna code is being restructured as decided in https://lists.01.org/pipermail/dleyna/2013-February/000099.html, as a result it makes sense to rename media-service-demo to dleyna-control and move the code from git://github.com/01org/media-service-demo.git to git://github.com/01org/dleyna-control.git Signed-off-by: Jussi Kukkonen --- src/dleyna-control.py | 42 ++++++++++++++++++++++++++++++++++++++++++ src/media-service-demo.py | 42 ------------------------------------------ src/msd/__init__.py | 2 +- src/msd/msd_browse.py | 2 +- src/msd/msd_main_window.py | 2 +- src/msd/msd_player.py | 2 +- src/msd/msd_search.py | 2 +- src/msd/msd_sort_order.py | 2 +- src/msd/msd_upnp.py | 25 ++++++++++++------------- src/msd/msd_utils.py | 2 +- 10 files changed, 61 insertions(+), 62 deletions(-) create mode 100755 src/dleyna-control.py delete mode 100755 src/media-service-demo.py (limited to 'src') diff --git a/src/dleyna-control.py b/src/dleyna-control.py new file mode 100755 index 0000000..5ef0973 --- /dev/null +++ b/src/dleyna-control.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +# dleyna-control +# +# Copyright (C) 2012 Intel Corporation. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU Lesser General Public License, +# version 2.1, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +# for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. +# +# Mark Ryan +# + +import pygtk +pygtk.require('2.0') +import gtk +import glib +import dbus +import dbus.service +import dbus.mainloop.glib + +from msd.msd_main_window import * + +if __name__ == "__main__": + gtk.gdk.threads_init() + try: + del os.environ["http_proxy"]; + except Exception, e: + pass + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) + state = State() + main_window = MainWindow(state) + gtk.main() diff --git a/src/media-service-demo.py b/src/media-service-demo.py deleted file mode 100755 index 3901c45..0000000 --- a/src/media-service-demo.py +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python - -# media-service-demo -# -# Copyright (C) 2012 Intel Corporation. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms and conditions of the GNU Lesser General Public License, -# version 2.1, as published by the Free Software Foundation. -# -# This program is distributed in the hope it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. -# -# Mark Ryan -# - -import pygtk -pygtk.require('2.0') -import gtk -import glib -import dbus -import dbus.service -import dbus.mainloop.glib - -from msd.msd_main_window import * - -if __name__ == "__main__": - gtk.gdk.threads_init() - try: - del os.environ["http_proxy"]; - except Exception, e: - pass - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - state = State() - main_window = MainWindow(state) - gtk.main() diff --git a/src/msd/__init__.py b/src/msd/__init__.py index 64ce8ef..b75ae01 100644 --- a/src/msd/__init__.py +++ b/src/msd/__init__.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_browse.py b/src/msd/msd_browse.py index d0d42dc..1c1b087 100644 --- a/src/msd/msd_browse.py +++ b/src/msd/msd_browse.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_main_window.py b/src/msd/msd_main_window.py index 62c3b29..e72c344 100644 --- a/src/msd/msd_main_window.py +++ b/src/msd/msd_main_window.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_player.py b/src/msd/msd_player.py index 50c6572..a5ecefd 100644 --- a/src/msd/msd_player.py +++ b/src/msd/msd_player.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_search.py b/src/msd/msd_search.py index 8a0f5a0..caa0d3c 100644 --- a/src/msd/msd_search.py +++ b/src/msd/msd_search.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_sort_order.py b/src/msd/msd_sort_order.py index 5b94bca..0347021 100644 --- a/src/msd/msd_sort_order.py +++ b/src/msd/msd_sort_order.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # diff --git a/src/msd/msd_upnp.py b/src/msd/msd_upnp.py index c2e83cc..f2bba50 100644 --- a/src/msd/msd_upnp.py +++ b/src/msd/msd_upnp.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # @@ -22,12 +22,13 @@ from msd_utils import * import dbus import os +DLEYNA_SERVER_DBUS_NAME = 'com.intel.dleyna-server' + class MediaObject(object): def __init__(self, path): - bus = dbus.SessionBus() - self.__propsIF = dbus.Interface(bus.get_object( - 'com.intel.media-service-upnp', path), + obj = dbus.SessionBus().get_object(DLEYNA_SERVER_DBUS_NAME, path) + self.__propsIF = dbus.Interface(obj, 'org.freedesktop.DBus.Properties') def get_prop(self, prop_name, iface = ""): return self.__propsIF.Get(iface, prop_name) @@ -36,10 +37,9 @@ class Container(MediaObject): def __init__(self, path): MediaObject.__init__(self, path) - bus = dbus.SessionBus() - self.__containerIF = dbus.Interface(bus.get_object( - 'com.intel.media-service-upnp', path), - 'org.gnome.UPnP.MediaContainer2') + obj = dbus.SessionBus().get_object(DLEYNA_SERVER_DBUS_NAME, path) + self.__containerIF = dbus.Interface(obj, + 'org.gnome.UPnP.MediaContainer2') def search(self, query, offset, count, fltr, sort=""): return self.__containerIF.SearchObjectsEx(query, offset, count, fltr, @@ -86,11 +86,10 @@ class State(object): self.__lost_server_cb(path) def __init__(self): - bus = dbus.SessionBus() - self.__manager = dbus.Interface(bus.get_object( - 'com.intel.media-service-upnp', - '/com/intel/MediaServiceUPnP'), - 'com.intel.MediaServiceUPnP.Manager') + obj = dbus.SessionBus().get_object(DLEYNA_SERVER_DBUS_NAME, + '/com/intel/dLeynaServer') + self.__manager = dbus.Interface(obj, + 'com.intel.dLeynaServer.Manager') self.__servers = {} self.__found_server_cb = None self.__lost_server_cb = None diff --git a/src/msd/msd_utils.py b/src/msd/msd_utils.py index cc21bfa..e55d17d 100644 --- a/src/msd/msd_utils.py +++ b/src/msd/msd_utils.py @@ -1,4 +1,4 @@ -# media-service-demo +# dleyna-control # # Copyright (C) 2012 Intel Corporation. All rights reserved. # -- cgit v1.2.1