SCIM Bridge 0.4.x
scim-bridge-messenger.h
Go to the documentation of this file.
1/*
2 * SCIM Bridge
3 *
4 * Copyright (c) 2006 Ryo Dairiki <ryo-dairiki@users.sourceforge.net>
5 *
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation and
10 * appearing in the file LICENSE.LGPL included in the package of this file.
11 * You can also redistribute it and/or modify it under the terms of
12 * the GNU General Public License as published by the Free Software Foundation and
13 * appearing in the file LICENSE.GPL included in the package of this file.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 */
19
25#ifndef SCIMBRIDGEMESSAGENGER_H_
26#define SCIMBRIDGEMESSAGENGER_H_
27
28#include "scim-bridge.h"
29#include "scim-bridge-message.h"
30
35
36#ifdef __cplusplus
37extern "C"
38{
39#endif
40
47 ScimBridgeMessenger *scim_bridge_alloc_messenger (int socket_fd);
48
55 void scim_bridge_free_messenger (ScimBridgeMessenger *messenger);
56
63 int scim_bridge_messenger_get_socket_fd (const ScimBridgeMessenger *messenger);
64
71 retval_t scim_bridge_close_messenger (ScimBridgeMessenger *messenger);
72
79 boolean scim_bridge_messenger_is_closed (const ScimBridgeMessenger *messenger);
80
88 retval_t scim_bridge_messenger_push_message (ScimBridgeMessenger *messenger, const ScimBridgeMessage *message);
89
97 retval_t scim_bridge_messenger_poll_message (ScimBridgeMessenger *messenger, ScimBridgeMessage **message);
98
106 retval_t scim_bridge_messenger_send_message (ScimBridgeMessenger *messenger, const struct timeval *timeout);
107
115 retval_t scim_bridge_messenger_receive_message (ScimBridgeMessenger *messenger, const struct timeval *timeout);
116
124 ssize_t scim_bridge_messenger_get_sending_buffer_size (const ScimBridgeMessenger *messenger);
125
133 ssize_t scim_bridge_messenger_get_receiving_buffer_size (const ScimBridgeMessenger *messenger);
134
135#ifdef __cplusplus
136}
137#endif
138#endif /*SCIMBRIDGEMESSAGENGER_H_*/
struct _ScimBridgeMessage ScimBridgeMessage
Definition scim-bridge-message.h:33
This header describes abut the data type of messages.
struct _ScimBridgeMessenger ScimBridgeMessenger
Definition scim-bridge-messenger.h:34
int retval_t
Definition scim-bridge.h:59
This header describes about fundamental definitions of scim-bridge.
Definition scim-bridge-messenger.c:39