8bfdad708515ff1e79adf5e88bedc0ebc8755c05
[platform/core/appfw/message-port-dbus.git] / daemon / dbus-manager.h
1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4  * Copyright (C) 2013 Intel Corporation.
5  *
6  * Contact: Amarnath Valluri <amarnath.valluri@linux.intel.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21  * 02110-1301 USA
22  */
23
24 #ifndef _MSGPORT_DBUS_MANAGER_H
25 #define _MSGPORT_DBUS_MANAGER_H
26
27 #include <glib.h>
28 #include <gio/gio.h>
29 #include <glib-object.h>
30
31 G_BEGIN_DECLS
32
33 #define MSGPORT_TYPE_DBUS_MANAGER (msgport_dbus_manager_get_type())
34 #define MSGPORT_DBUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MSGPORT_TYPE_DBUS_MANAGER, MsgPortDbusManager))
35 #define MSGPORT_DBUS_MANAGER_CLASS(obj)  (G_TYPE_CHECK_CLASS_CAST((kls), MSGPORT_TYPE_DBUS_MANAGER, MsgPortDbusManagerClass))
36 #define MSGPORT_IS_DBUS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MSGPORT_TYPE_DBUS_MANAGER))
37 #define MSGPORT_IS_DBUS_MANAGER_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE((kls), MSGPORT_TYPE_DBUS_MANAGER))
38
39 typedef struct _MsgPortDbusManager MsgPortDbusManager;
40 typedef struct _MsgPortDbusManagerClass MsgPortDbusManagerClass;
41 typedef struct _MsgPortDbusManagerPrivate MsgPortDbusManagerPrivate;
42
43 typedef struct _MsgPortManager MsgPortManager;
44 typedef struct _MsgPortDbusServer MsgPortDbusServer;
45
46 struct _MsgPortDbusManager
47 {
48     GObject parent;
49
50     /* private */
51     MsgPortDbusManagerPrivate *priv;
52 };
53
54 struct _MsgPortDbusManagerClass
55 {
56     GObjectClass parenet_class;
57 };
58
59 GType msgport_dbus_manager_get_type (void);
60
61 MsgPortDbusManager *
62 msgport_dbus_manager_new (
63     GDBusConnection *connection,
64     MsgPortDbusServer *server,
65     GError **error);
66
67 MsgPortManager *
68 msgport_dbus_manager_get_manager (MsgPortDbusManager *dbus_manager);
69
70 GDBusConnection *
71 msgport_dbus_manager_get_connection (MsgPortDbusManager *dbus_manager);
72
73 const gchar *
74 msgport_dbus_manager_get_app_id (MsgPortDbusManager *dbus_manager);
75
76 gboolean
77 msgport_dbus_manager_validate_peer_certificate (MsgPortDbusManager *dbus_manager,
78                                                 const gchar *peer_app_id);
79
80 G_END_DECLS
81
82 #endif /* _MSGPORT_DBUS_MANAER_H */
83