1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
4 * This file is part of message-port.
6 * Copyright (C) 2013 Intel Corporation.
8 * Contact: Amarnath Valluri <amarnath.valluri@linux.intel.com>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 #ifndef __MSGPORT_MANAGER_H
27 #define __MSGPORT_MANAGER_H
30 #include <glib-object.h>
31 #include <message-port.h>
33 #define MSGPORT_TYPE_MANAGER (msgport_manager_get_type())
34 #define MSGPORT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MSGPORT_TYPE_MANAGER, MsgPortManager))
35 #define MSGPORT_MANAGER_CLASS(kls) (G_TYPE_CHECK_CLASS_CAST((kls), MSGPORT_TYPE_MANAGER, MsgPortManagerClass))
36 #define MSGPORT_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MSGPORT_TYPE_MANAGER))
37 #define MSGPORT_IS_MANAGER_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE((kls), MSGPORT_TYPE_MANAGER)
39 typedef struct _MsgPortManager MsgPortManager;
40 typedef struct _MsgPortManagerClass MsgPortManagerClass;
41 typedef struct _MsgPortService MsgPortService;
45 struct _MsgPortManagerClass
47 GObjectClass parent_class;
50 GType msgport_manager_get_type (void);
53 msgport_manager_new ();
56 msgport_manager_register_service (MsgPortManager *manager, const gchar *port_name, gboolean is_trusted, messageport_message_cb cb, int *service_id_out);
59 msgport_manager_check_remote_service (MsgPortManager *manager, const gchar *remote_app_id, const gchar *port_name, gboolean is_trusted, guint *service_id_out);
62 msgport_manager_get_service_name (MsgPortManager *manager, int port_id, gchar **name_out);
65 msgport_manager_get_service_is_trusted (MsgPortManager *manager, int port_id, gboolean *is_trusted_out);
68 msgport_manager_unregister_service (MsgPortManager *manager, int service_id);
71 msgport_manager_send_message (MsgPortManager *manager, const gchar *remote_app_id, const gchar *port_name, gboolean is_trusted, GVariant *data);
74 msgport_manager_send_bidirectional_message (MsgPortManager *manager, int from_id, const gchar *remote_app_id, const gchar *port_name, gboolean is_trusted, GVariant *data);
78 #endif /* __MSGPORT_MANAGER_PROXY_H */