2
// Copyright (C) 2009 Canonical Ltd.
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License
15
// along with this program. If not, see <http://www.gnu.org/licenses/>.
2
* Copyright (C) 2009 Canonical, Ltd.
4
* This library is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License
6
* version 3.0 as published by the Free Software Foundation.
8
* This library is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License version 3.0 for more details.
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with this library. If not, see
15
* <http://www.gnu.org/licenses/>.
17
* Authored by Jason Smith <jason.smith@canonical.com>
18
20
#include <config.h>
103
105
DBusGProxy *proxy;
105
107
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
107
109
if (connection == NULL)
109
111
g_printerr ("Failed to open bus: %s\n", error->message);
110
g_error_free (error);
112
g_error_free (error);
113
115
g_return_if_fail (connection);
117
proxy = dbus_g_proxy_new_for_name (connection,
118
"org.wncksync.Matcher",
119
"/org/wncksync/Matcher",
119
proxy = dbus_g_proxy_new_for_name (connection,
120
"org.wncksync.Matcher",
121
"/org/wncksync/Matcher",
120
122
"org.wncksync.Matcher");
122
124
g_return_if_fail (proxy);
124
dbus_g_proxy_call (proxy,
125
"RegisterDesktopFileForPid",
126
dbus_g_proxy_call (proxy,
127
"RegisterDesktopFileForPid",
127
G_TYPE_STRING, desktop_file_path,
129
G_TYPE_STRING, desktop_file_path,
129
131
G_TYPE_INVALID, G_TYPE_INVALID);
130
132
g_object_unref (proxy);
131
133
dbus_g_connection_unref (connection);