4
* Copyright (C) 2008 Stefan Walter
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as
8
* published by the Free Software Foundation; either version 2.1 of
9
* the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26
#include "gkd-secret-error.h"
29
gkd_secret_error_no_such_object (DBusMessage *message)
31
g_return_val_if_fail (message, NULL);
32
return dbus_message_new_error_printf (message, SECRET_ERROR_NO_SUCH_OBJECT,
33
"The '%s' object does not exist", dbus_message_get_path (message));
37
gkd_secret_error_to_reply (DBusMessage *message, DBusError *derr)
41
g_return_val_if_fail (message, NULL);
42
g_return_val_if_fail (derr, NULL);
43
g_return_val_if_fail (dbus_error_is_set (derr), NULL);
45
reply = dbus_message_new_error (message, derr->name, derr->message);
46
dbus_error_free (derr);