3 * oFono - Open Source Telephony
5 * Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef __GISI_CLIENT_H
23 #define __GISI_CLIENT_H
30 #include <glib/gtypes.h>
34 #define G_ISI_CLIENT_DEFAULT_TIMEOUT (5)
37 typedef struct _GIsiClient GIsiClient;
39 GIsiClient *g_isi_client_create(GIsiModem *modem, uint8_t resource);
40 GIsiModem *g_isi_client_modem(GIsiClient *client);
41 uint8_t g_isi_client_resource(GIsiClient *client);
42 void g_isi_client_reset(GIsiClient *client);
43 void g_isi_client_destroy(GIsiClient *client);
45 void g_isi_client_set_timeout(GIsiClient *client, unsigned timeout);
47 gboolean g_isi_client_send(GIsiClient *client,
48 const void *__restrict msg, size_t len,
49 GIsiNotifyFunc notify, void *data,
50 GDestroyNotify destroy);
52 gboolean g_isi_client_vsend(GIsiClient *client,
53 const struct iovec *iov, size_t iovlen,
54 GIsiNotifyFunc notify, void *data,
55 GDestroyNotify destroy);
57 gboolean g_isi_client_send_with_timeout(GIsiClient *client,
58 const void *__restrict msg,
59 size_t len, unsigned timeout,
60 GIsiNotifyFunc notify, void *data,
61 GDestroyNotify destroy);
63 gboolean g_isi_client_vsend_with_timeout(GIsiClient *client,
64 const struct iovec *iov,
65 size_t iovlen, unsigned timeout,
66 GIsiNotifyFunc notify, void *data,
67 GDestroyNotify destroy);
69 gboolean g_isi_client_ind_subscribe(GIsiClient *client, uint8_t type,
70 GIsiNotifyFunc notify, void *data);
71 gboolean g_isi_client_ntf_subscribe(GIsiClient *client, uint8_t type,
72 GIsiNotifyFunc notify, void *data);
74 gboolean g_isi_client_verify(GIsiClient *client, GIsiNotifyFunc notify,
75 void *data, GDestroyNotify destroy);
81 #endif /* __GISI_CLIENT_H */