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
33 struct _GIsiSubBlockIter {
40 typedef struct _GIsiSubBlockIter GIsiSubBlockIter;
42 void g_isi_sb_iter_init(GIsiSubBlockIter *iter, const GIsiMessage *msg,
44 void g_isi_sb_iter_init_full(GIsiSubBlockIter *iter, const GIsiMessage *msg,
45 size_t used, gboolean longhdr,
47 void g_isi_sb_subiter_init(GIsiSubBlockIter *outer, GIsiSubBlockIter *inner,
49 void g_isi_sb_subiter_init_full(GIsiSubBlockIter *out, GIsiSubBlockIter *in,
50 size_t used, gboolean longhdr,
52 gboolean g_isi_sb_iter_is_valid(const GIsiSubBlockIter *iter);
54 gboolean g_isi_sb_iter_next(GIsiSubBlockIter *iter);
56 int g_isi_sb_iter_get_id(const GIsiSubBlockIter *iter);
57 size_t g_isi_sb_iter_get_len(const GIsiSubBlockIter *iter);
59 gboolean g_isi_sb_iter_get_data(const GIsiSubBlockIter *restrict iter,
60 void **data, unsigned pos);
61 gboolean g_isi_sb_iter_get_byte(const GIsiSubBlockIter *restrict iter,
62 uint8_t *byte, unsigned pos);
63 gboolean g_isi_sb_iter_get_word(const GIsiSubBlockIter *restrict iter,
64 uint16_t *word, unsigned pos);
65 gboolean g_isi_sb_iter_get_dword(const GIsiSubBlockIter *restrict iter,
66 uint32_t *dword, unsigned pos);
67 gboolean g_isi_sb_iter_eat_byte(GIsiSubBlockIter *restrict iter,
69 gboolean g_isi_sb_iter_eat_word(GIsiSubBlockIter *restrict iter,
71 gboolean g_isi_sb_iter_eat_dword(GIsiSubBlockIter *restrict iter,
73 gboolean g_isi_sb_iter_get_oper_code(const GIsiSubBlockIter *restrict iter,
74 char *mcc, char *mnc, unsigned pos);
75 gboolean g_isi_sb_iter_eat_oper_code(GIsiSubBlockIter *restrict iter,
76 char *mcc, char *mnc);
77 gboolean g_isi_sb_iter_get_alpha_tag(const GIsiSubBlockIter *restrict iter,
78 char **utf8, size_t len, unsigned pos);
79 gboolean g_isi_sb_iter_eat_alpha_tag(GIsiSubBlockIter *restrict iter,
80 char **utf8, size_t len);
81 gboolean g_isi_sb_iter_get_latin_tag(const GIsiSubBlockIter *restrict iter,
82 char **ascii, size_t len, unsigned pos);
83 gboolean g_isi_sb_iter_eat_latin_tag(GIsiSubBlockIter *restrict iter,
84 char **ascii, size_t len);
85 gboolean g_isi_sb_iter_get_struct(const GIsiSubBlockIter *restrict iter,
86 void **ptr, size_t len, unsigned pos);
92 #endif /* __GISI_ITER_H */