daemon: fixed issue in registring more than one ports by a client.
[profile/ivi/message-port.git] / daemon / dbus-server.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  *
5  * Copyright (C) 2013 Intel Corporation.
6  *
7  * Contact: Amarnath Valluri <amarnath.valluri@linux.intel.com>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22  * 02110-1301 USA
23  */
24
25 #ifndef __MSGPORT_DBUS_SERVER_H_
26 #define __MSGPORT_DBUS_SERVER_H_
27
28 #include <config.h>
29 #include <glib.h>
30 #include <glib-object.h>
31 //#include "manager.h"
32
33 G_BEGIN_DECLS
34
35 #define MSGPORT_TYPE_DBUS_SERVER            (msgport_dbus_server_get_type())
36 #define MSGPORT_DBUS_SERVER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), MSGPORT_TYPE_DBUS_SERVER, MsgPortDbusServer))
37 #define MSGPORT_DBUS_SERVER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), MSGPORT_TYPE_DBUS_SERVER, MsgPortDbusServerClass))
38 #define MSGPORT_IS_DBUS_SERVER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), MSGPORT_TYPE_DBUS_SERVER))
39 #define MSGPORT_IS_DBUS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MSGPORT_TYPE_DBUS_SERVER))
40 #define MSGPORT_DBUS_SERVER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), MSGPORT_TYPE_DBUS_SERVER, MsgPortDbusServerClass))
41
42 typedef struct _MsgPortManager MsgPortManager;
43 typedef struct _MsgPortDbusManager MsgPortDbusManager;
44 typedef struct _MsgPortDbusServer MsgPortDbusServer;
45 typedef struct _MsgPortDbusServerClass MsgPortDbusServerClass;
46 typedef struct _MsgPortDbusServerPrivate MsgPortDbusServerPrivate;
47
48 struct _MsgPortDbusServer
49 {
50     GObject parent;
51
52     /* priv */
53     MsgPortDbusServerPrivate *priv;
54 };
55
56 struct _MsgPortDbusServerClass
57 {
58     GObjectClass parent_class;
59 };
60
61 GType msgport_dbus_server_get_type();
62
63 const gchar *
64 msgport_dbus_server_get_address (MsgPortDbusServer *server) G_GNUC_CONST;
65
66 MsgPortDbusServer * msgport_dbus_server_new ();
67
68 MsgPortManager    * msgport_dbus_server_get_manager (MsgPortDbusServer *server);
69
70 MsgPortDbusManager *
71 msgport_dbus_server_get_dbus_manager_by_app_id (MsgPortDbusServer *server, const gchar *app_id);
72
73 #endif /* __MSGPORT_DBUS_SERVER_H_ */