1 #ifndef __MSGPORT_MANAGER_H
2 #define __MSGPORT_MANAGER_H
5 #include <glib-object.h>
6 #include <message-port.h>
8 #define MSGPORT_TYPE_MANAGER (msgport_manager_get_type())
9 #define MSGPORT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), MSGPORT_TYPE_MANAGER, MsgPortManager))
10 #define MSGPORT_MANAGER_CLASS(kls) (G_TYPE_CHECK_CLASS_CAST((kls), MSGPORT_TYPE_MANAGER, MsgPortManagerClass))
11 #define MSGPORT_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), MSGPORT_TYPE_MANAGER))
12 #define MSGPORT_IS_MANAGER_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE((kls), MSGPORT_TYPE_MANAGER)
14 typedef struct _MsgPortManager MsgPortManager;
15 typedef struct _MsgPortManagerClass MsgPortManagerClass;
16 typedef struct _MsgPortService MsgPortService;
20 struct _MsgPortManagerClass
22 GObjectClass parent_class;
25 GType msgport_manager_get_type (void);
28 msgport_manager_new ();
31 msgport_manager_register_service (MsgPortManager *manager, const gchar *port_name, gboolean is_trusted, messageport_message_cb cb, int *service_id_out);
34 msgport_manager_check_remote_service (MsgPortManager *manager, const gchar *remote_app_id, const gchar *port_name, gboolean is_trusted, guint *service_id_out);
37 msgport_manager_get_service_name (MsgPortManager *manager, int port_id, gchar **name_out);
40 msgport_manager_get_service_is_trusted (MsgPortManager *manager, int port_id, gboolean *is_trusted_out);
43 msgport_manager_unregister_service (MsgPortManager *manager, int service_id);
46 msgport_manager_send_message (MsgPortManager *manager, const gchar *remote_app_id, const gchar *port_name, gboolean is_trusted, GVariant *data);
49 msgport_manager_send_bidirectional_message (MsgPortManager *manager, int from_id, const gchar *remote_app_id, const gchar *port_name, gboolean is_trusted, GVariant *data);
53 #endif /* __MSGPORT_MANAGER_PROXY_H */