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_MESSAGE_H
23 #define __GISI_MESSAGE_H
38 typedef struct _GIsiVersion GIsiVersion;
41 struct sockaddr_pn *addr;
44 const void *__restrict data;
48 typedef struct _GIsiMessage GIsiMessage;
50 int g_isi_msg_version_major(const GIsiMessage *msg);
51 int g_isi_msg_version_minor(const GIsiMessage *msg);
52 int g_isi_msg_error(const GIsiMessage *msg);
53 const char *g_isi_msg_strerror(const GIsiMessage *msg);
54 uint8_t g_isi_msg_resource(const GIsiMessage *msg);
55 uint16_t g_isi_msg_object(const GIsiMessage *msg);
57 uint8_t g_isi_msg_id(const GIsiMessage *msg);
58 uint8_t g_isi_msg_utid(const GIsiMessage *msg);
59 size_t g_isi_msg_data_len(const GIsiMessage *msg);
60 const void *g_isi_msg_data(const GIsiMessage *msg);
62 gboolean g_isi_msg_data_get_byte(const GIsiMessage *msg, unsigned offset,
64 gboolean g_isi_msg_data_get_word(const GIsiMessage *msg, unsigned offset,
66 gboolean g_isi_msg_data_get_struct(const GIsiMessage *msg, unsigned offset,
67 const void **type, size_t len);
73 #endif /* __GISI_MESSAGE_H */