Debian Codegraph @

src/cd-common.h

raw
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2010 Richard Hughes <[email protected]>
4 *
5 * Licensed under the GNU General Public License Version 2
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #ifndef __CD_COMMON_H__
23 #define __CD_COMMON_H__
24
25 #include "config.h"
26
27 #include <gio/gio.h>
28 #include <colord-private.h>
29 #include <sqlite3.h>
30
31 #define COLORD_DBUS_SERVICE "org.freedesktop.ColorManager"
32 #define COLORD_DBUS_PATH "/org/freedesktop/ColorManager"
33 #define COLORD_DBUS_INTERFACE "org.freedesktop.ColorManager"
34 #define COLORD_DBUS_INTERFACE_DEVICE "org.freedesktop.ColorManager.Device"
35 #define COLORD_DBUS_INTERFACE_PROFILE "org.freedesktop.ColorManager.Profile"
36 #define COLORD_DBUS_INTERFACE_SENSOR "org.freedesktop.ColorManager.Sensor"
37
38 #define CD_DBUS_METADATA_KEY_LEN_MAX 256 /* chars */
39 #define CD_DBUS_METADATA_VALUE_LEN_MAX 4096 /* chars */
40
41 #define CD_CLIENT_ERROR cd_client_error_quark()
42
43 GQuark cd_client_error_quark (void);
44 gboolean cd_main_sender_authenticated (GDBusConnection *connection,
45 const gchar *sender,
46 const gchar *action_id,
47 GError **error)
48 G_GNUC_WARN_UNUSED_RESULT;
49 guint cd_main_get_sender_uid (GDBusConnection *connection,
50 const gchar *sender,
51 GError **error)
52 G_GNUC_WARN_UNUSED_RESULT;
53 guint cd_main_get_sender_pid (GDBusConnection *connection,
54 const gchar *sender,
55 GError **error)
56 G_GNUC_WARN_UNUSED_RESULT;
57 gchar *cd_main_ensure_dbus_path (const gchar *object_path);
58 gboolean cd_main_mkdir_with_parents (const gchar *filename,
59 GError **error)
60 G_GNUC_WARN_UNUSED_RESULT;
61
62 #endif /* __CD_COMMON_H__ */
63