2 * Copyright (C) 2008,2010 Nokia Corporation.
3 * Copyright (C) 2008 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>.
5 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
7 * This file is part of Rygel.
9 * Rygel is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * Rygel is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 // FIXME: Declare that we implement DBusInterface once bug#631044 is fixed.
27 [DBus (name = "org.gnome.Rygel1")]
28 public class Rygel.DBusService : Object {
31 public DBusService (Main main) throws IOError {
34 DBusObject bus = Bus.get_proxy_sync (BusType.SESSION,
38 // try to register service in session bus
39 if (bus.request_name (DBusInterface.SERVICE_NAME, 0) !=
40 DBusRequestNameReply.PRIMARY_OWNER) {
41 warning ("Failed to start D-Bus service name '%s' already taken",
42 DBusInterface.SERVICE_NAME);
44 var conn = Bus.get_sync (BusType.SESSION);
46 conn.register_object (DBusInterface.OBJECT_PATH, this);
50 public void shutdown () throws IOError {