~awe/phablet-extras/ofono-lp1204683

« back to all changes in this revision

Viewing changes to src/smsutil.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2009-08-15 15:55:11 UTC
  • Revision ID: james.westby@ubuntu.com-20090815155511-frst06dijguhyfi4
Tags: upstream-0.3
ImportĀ upstreamĀ versionĀ 0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *
 
3
 *  oFono - Open Source Telephony
 
4
 *
 
5
 *  Copyright (C) 2008-2009  Intel Corporation. All rights reserved.
 
6
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 *
 
20
 */
 
21
 
 
22
#define CBS_MAX_GSM_CHARS 93
 
23
 
 
24
enum sms_type {
 
25
        SMS_TYPE_DELIVER = 0,
 
26
        SMS_TYPE_DELIVER_REPORT_ACK,
 
27
        SMS_TYPE_DELIVER_REPORT_ERROR,
 
28
        SMS_TYPE_STATUS_REPORT,
 
29
        SMS_TYPE_SUBMIT,
 
30
        SMS_TYPE_SUBMIT_REPORT_ACK,
 
31
        SMS_TYPE_SUBMIT_REPORT_ERROR,
 
32
        SMS_TYPE_COMMAND
 
33
};
 
34
 
 
35
/* 23.040 Section 9.1.2.5 */
 
36
enum sms_number_type {
 
37
        SMS_NUMBER_TYPE_UNKNOWN = 0,
 
38
        SMS_NUMBER_TYPE_INTERNATIONAL = 1,
 
39
        SMS_NUMBER_TYPE_NATIONAL = 2,
 
40
        SMS_NUMBER_TYPE_NETWORK_SPECIFIC = 3,
 
41
        SMS_NUMBER_TYPE_SUBSCRIBER = 4,
 
42
        SMS_NUMBER_TYPE_ALPHANUMERIC = 5,
 
43
        SMS_NUMBER_TYPE_ABBREVIATED = 6,
 
44
        SMS_NUMBER_TYPE_RESERVED = 7
 
45
};
 
46
 
 
47
/* 23.040 Section 9.1.2.5 */
 
48
enum sms_numbering_plan {
 
49
        SMS_NUMBERING_PLAN_UNKNOWN = 0,
 
50
        SMS_NUMBERING_PLAN_ISDN = 1,
 
51
        SMS_NUMBERING_PLAN_DATA = 3,
 
52
        SMS_NUMBERING_PLAN_TELEX = 4,
 
53
        SMS_NUMBERING_PLAN_SC1 = 5,
 
54
        SMS_NUMBERING_PLAN_SC2 = 6,
 
55
        SMS_NUMBERING_PLAN_NATIONAL = 8,
 
56
        SMS_NUMBERING_PLAN_PRIVATE = 9,
 
57
        SMS_NUMBERING_PLAN_ERMES = 10,
 
58
        SMS_NUMBERING_PLAN_RESERVED = 15
 
59
};
 
60
 
 
61
enum sms_validity_period_format {
 
62
        SMS_VALIDITY_PERIOD_FORMAT_ABSENT = 0,
 
63
        SMS_VALIDITY_PERIOD_FORMAT_ENHANCED = 1,
 
64
        SMS_VALIDITY_PERIOD_FORMAT_RELATIVE = 2,
 
65
        SMS_VALIDITY_PERIOD_FORMAT_ABSOLUTE = 3,
 
66
};
 
67
 
 
68
enum sms_st {
 
69
        SMS_ST_COMPLETED_RECEIVED = 0x0,
 
70
        SMS_ST_COMPLETED_UNABLE_TO_CONFIRM = 0x1,
 
71
        SMS_ST_COMPLETED_REPLACED = 0x2,
 
72
        SMS_ST_COMPLETED_LAST = 0x1F,
 
73
        SMS_ST_TEMPORARY_CONGESTION = 0x20,
 
74
        SMS_ST_TEMPORARY_SME_BUSY = 0x21,
 
75
        SMS_ST_TEMPORARY_NO_RESPONSE = 0x22,
 
76
        SMS_ST_TEMPORARY_SERVICE_REJECTED = 0x23,
 
77
        SMS_ST_TEMPORARY_QOS_UNAVAILABLE = 0x24,
 
78
        SMS_ST_TEMPORARY_SME_ERROR = 0x25,
 
79
        SMS_ST_TEMPORARY_LAST = 0x2F,
 
80
        SMS_ST_PERMANENT_RP_ERROR = 0x40,
 
81
        SMS_ST_PERMANENT_INVALID_DESTINATION = 0x41,
 
82
        SMS_ST_PERMANENT_CONNECTION_REJECTED = 0x42,
 
83
        SMS_ST_PERMANENT_NOT_OBTAINABLE = 0x43,
 
84
        SMS_ST_PERMANENT_QOS_UNAVAILABLE = 0x44,
 
85
        SMS_ST_PERMANENT_INTERWORKING_UNAVAILABLE = 0x45,
 
86
        SMS_ST_PERMANENT_VALIDITY_PERIOD_EXPIRED = 0x46,
 
87
        SMS_ST_PERMANENT_DELETED = 0x47,
 
88
        SMS_ST_PERMANENT_SC_ADMIN_DELETED = 0x48,
 
89
        SMS_ST_PERMANENT_SM_DOES_NOT_EXIST = 0x49,
 
90
        SMS_ST_PERMANENT_LAST = 0x4F,
 
91
        SMS_ST_TEMPFINAL_CONGESTION = 0x60,
 
92
        SMS_ST_TEMPFINAL_SME_BUSY = 0x61,
 
93
        SMS_ST_TEMPFINAL_NO_RESPONSE = 0x62,
 
94
        SMS_ST_TEMPFINAL_SERVICE_REJECTED = 0x63,
 
95
        SMS_ST_TEMPFINAL_QOS_UNAVAILABLE = 0x64,
 
96
        SMS_ST_TEMPFINAL_SME_ERROR = 0x65,
 
97
        SMS_ST_TEMPFINAL_LAST = 0x6F,
 
98
};
 
99
 
 
100
enum sms_ct {
 
101
        SMS_CT_ENQUIRY = 0,
 
102
        SMS_CT_CANCEL_SRR = 1,
 
103
        SMS_CT_DELETE_SM = 2,
 
104
        SMS_CT_ENABLE_SRR = 3
 
105
};
 
106
 
 
107
enum sms_iei {
 
108
        SMS_IEI_CONCATENATED_8BIT = 0x00,
 
109
        SMS_IEI_SPECIAL_MESSAGE_INDICATION = 0x01,
 
110
        SMS_IEI_APPLICATION_ADDRESS_8BIT = 0x04,
 
111
        SMS_IEI_APPLICATION_ADDRESS_16BIT = 0x05,
 
112
        SMS_IEI_SMSC_CONTROL_PARAMETERS = 0x06,
 
113
        SMS_IEI_UDH_SOURCE_INDICATOR = 0x07,
 
114
        SMS_IEI_CONCATENATED_16BIT = 0x08,
 
115
        SMS_IEI_WCMP = 0x09,
 
116
        SMS_IEI_TEXT_FORMAT = 0x0A,
 
117
        SMS_IEI_PREDEFINED_SOUND = 0x0B,
 
118
        SMS_IEI_USER_DEFINED_SOUND = 0x0C,
 
119
        SMS_IEI_PREDEFINED_ANIMATION = 0x0D,
 
120
        SMS_IEI_LARGE_ANIMATION = 0x0E,
 
121
        SMS_IEI_SMALL_ANIMATION = 0x0F,
 
122
        SMS_IEI_LARGE_PICTURE = 0x10,
 
123
        SMS_IEI_SMALL_PICTURE = 0x11,
 
124
        SMS_IEI_VARIABLE_PICTURE = 0x12,
 
125
        SMS_IEI_USER_PROMPT_INDICATOR = 0x13,
 
126
        SMS_IEI_EXTENDED_OBJECT = 0x14,
 
127
        SMS_IEI_REUSED_EXTENDED_OBJECT = 0x15,
 
128
        SMS_IEI_COMPRESSION_CONTROL = 0x16,
 
129
        SMS_IEI_OBJECT_DISTRIBUTION_INDICATOR = 0x17,
 
130
        SMS_IEI_STANDARD_WVG_OBJECT = 0x18,
 
131
        SMS_IEI_CHARACTER_SIZE_WVG_OBJECT = 0x19,
 
132
        SMS_IEI_EXTENDED_OBJECT_DATA_REQUEST_COMMAND = 0x1A,
 
133
        SMS_IEI_RFC822_EMAIL_HEADER = 0x20,
 
134
        SMS_IEI_HYPERLINK_ELEMENT = 0x21,
 
135
        SMS_IEI_REPLY_ADDRESS_ELEMENT = 0x22,
 
136
        SMS_IEI_ENHANCED_VOICE_MAIL_INFORMATION = 0x23,
 
137
        SMS_IEI_NATIONAL_LANGUAGE_SINGLE_SHIFT = 0x24,
 
138
        SMS_IEI_NATIONAL_LANGUAGE_LOCKING_SHIFT = 0x25,
 
139
        SMS_IEI_INVALID = 0xFFF
 
140
};
 
141
 
 
142
enum sms_class {
 
143
        SMS_CLASS_0 = 0,
 
144
        SMS_CLASS_1 = 1,
 
145
        SMS_CLASS_2 = 2,
 
146
        SMS_CLASS_3 = 3,
 
147
        SMS_CLASS_UNSPECIFIED = 4,
 
148
};
 
149
 
 
150
enum sms_charset {
 
151
        SMS_CHARSET_7BIT = 0,
 
152
        SMS_CHARSET_8BIT = 1,
 
153
        SMS_CHARSET_UCS2 = 2,
 
154
};
 
155
 
 
156
enum sms_mwi_type {
 
157
        SMS_MWI_TYPE_VOICE = 0,
 
158
        SMS_MWI_TYPE_FAX = 1,
 
159
        SMS_MWI_TYPE_EMAIL = 2,
 
160
        SMS_MWI_TYPE_OTHER = 3,
 
161
        SMS_MWI_TYPE_VIDEO = 4,
 
162
};
 
163
 
 
164
enum sms_pid_type {
 
165
        SMS_PID_TYPE_SM_TYPE_0 = 0x40,
 
166
        SMS_PID_TYPE_REPLACE_SM_TYPE_1 = 0x41,
 
167
        SMS_PID_TYPE_REPLACE_SM_TYPE_2 = 0x42,
 
168
        SMS_PID_TYPE_REPLACE_SM_TYPE_3 = 0x43,
 
169
        SMS_PID_TYPE_REPLACE_SM_TYPE_4 = 0x44,
 
170
        SMS_PID_TYPE_REPLACE_SM_TYPE_5 = 0x45,
 
171
        SMS_PID_TYPE_REPLACE_SM_TYPE_6 = 0x46,
 
172
        SMS_PID_TYPE_REPLACE_SM_TYPE_7 = 0x47,
 
173
        SMS_PID_TYPE_ENHANCED_MESSAGE_SERVICE = 0x5e,
 
174
        SMS_PID_TYPE_RETURN_CALL = 0x5f,
 
175
        SMS_PID_TYPE_ANSI136 = 0x7c,
 
176
        SMS_PID_TYPE_ME_DOWNLOAD = 0x7d,
 
177
        SMS_PID_TYPE_ME_DEPERSONALIZATION = 0x7e,
 
178
        SMS_PID_TYPE_USIM_DOWNLOAD = 0x7f,
 
179
};
 
180
 
 
181
enum cbs_language {
 
182
        CBS_LANGUAGE_GERMAN = 0x0,
 
183
        CBS_LANGUAGE_ENGLISH = 0x1,
 
184
        CBS_LANGUAGE_ITALIAN = 0x2,
 
185
        CBS_LANGUAGE_FRENCH = 0x3,
 
186
        CBS_LANGUAGE_SPANISH = 0x4,
 
187
        CBS_LANGUAGE_DUTCH = 0x5,
 
188
        CBS_LANGUAGE_SWEDISH = 0x6,
 
189
        CBS_LANGUAGE_DANISH = 0x7,
 
190
        CBS_LANGUAGE_PORTUGESE = 0x8,
 
191
        CBS_LANGUAGE_FINNISH = 0x9,
 
192
        CBS_LANGUAGE_NORWEGIAN = 0xA,
 
193
        CBS_LANGUAGE_GREEK = 0xB,
 
194
        CBS_LANGUAGE_TURKISH = 0xC,
 
195
        CBS_LANGUAGE_HUNGARIAN = 0xD,
 
196
        CBS_LANGUAGE_POLISH = 0xE,
 
197
        CBS_LANGUAGE_UNSPECIFIED = 0xF,
 
198
        CBS_LANGUAGE_CZECH = 0x20,
 
199
        CBS_LANGUAGE_HEBREW = 0x21,
 
200
        CBS_LANGUAGE_ARABIC = 0x22,
 
201
        CBS_LANGUAGE_RUSSIAN = 0x23,
 
202
        CBS_LANGUAGE_ICELANDIC = 0x24
 
203
};
 
204
 
 
205
enum cbs_geo_scope {
 
206
        CBS_GEO_SCOPE_CELL_IMMEDIATE,
 
207
        CBS_GEO_SCOPE_PLMN,
 
208
        CBS_GEO_SCOPE_SERVICE_AREA,
 
209
        CBS_GEO_SCOPE_CELL_NORMAL
 
210
};
 
211
 
 
212
struct sms_address {
 
213
        enum sms_number_type number_type;
 
214
        enum sms_numbering_plan numbering_plan;
 
215
        char address[21]; /* Max 20 in semi-octet, 11 in alnum */
 
216
};
 
217
 
 
218
struct sms_scts {
 
219
        guint8 year;
 
220
        guint8 month;
 
221
        guint8 day;
 
222
        guint8 hour;
 
223
        guint8 minute;
 
224
        guint8 second;
 
225
        gint8 timezone;
 
226
};
 
227
 
 
228
struct sms_validity_period {
 
229
        union {
 
230
                guint8 relative;
 
231
                struct sms_scts absolute;
 
232
                guint8 enhanced[7];
 
233
        };
 
234
};
 
235
 
 
236
struct sms_deliver {
 
237
        gboolean mms;
 
238
        gboolean sri;
 
239
        gboolean udhi;
 
240
        gboolean rp;
 
241
        struct sms_address oaddr;
 
242
        guint8 pid;
 
243
        guint8 dcs;
 
244
        struct sms_scts scts;
 
245
        guint8 udl;
 
246
        guint8 ud[140];
 
247
};
 
248
 
 
249
struct sms_deliver_err_report {
 
250
        gboolean udhi;
 
251
        guint8 fcs;
 
252
        guint8 pi;
 
253
        guint8 pid;
 
254
        guint8 dcs;
 
255
        guint8 udl;
 
256
        guint8 ud[158];
 
257
};
 
258
 
 
259
struct sms_deliver_ack_report {
 
260
        gboolean udhi;
 
261
        guint8 pi;
 
262
        guint8 pid;
 
263
        guint8 dcs;
 
264
        guint8 udl;
 
265
        guint8 ud[159];
 
266
};
 
267
 
 
268
struct sms_command {
 
269
        gboolean udhi;
 
270
        gboolean srr;
 
271
        guint8 mr;
 
272
        guint8 pid;
 
273
        enum sms_ct ct;
 
274
        guint8 mn;
 
275
        struct sms_address daddr;
 
276
        guint8 cdl;
 
277
        guint8 cd[156];
 
278
};
 
279
 
 
280
struct sms_status_report {
 
281
        gboolean udhi;
 
282
        gboolean mms;
 
283
        gboolean srq;
 
284
        guint8 mr;
 
285
        struct sms_address raddr;
 
286
        struct sms_scts scts;
 
287
        struct sms_scts dt;
 
288
        enum sms_st st;
 
289
        guint8 pi;
 
290
        guint8 pid;
 
291
        guint8 dcs;
 
292
        guint8 udl;
 
293
        guint8 ud[143];
 
294
};
 
295
 
 
296
struct sms_submit {
 
297
        gboolean rd;
 
298
        enum sms_validity_period_format vpf;
 
299
        gboolean rp;
 
300
        gboolean udhi;
 
301
        gboolean srr;
 
302
        guint8 mr;
 
303
        struct sms_address daddr;
 
304
        guint8 pid;
 
305
        guint8 dcs;
 
306
        struct sms_validity_period vp;
 
307
        guint8 udl;
 
308
        guint8 ud[140];
 
309
};
 
310
 
 
311
struct sms_submit_ack_report {
 
312
        gboolean udhi;
 
313
        guint8 pi;
 
314
        struct sms_scts scts;
 
315
        guint8 pid;
 
316
        guint8 dcs;
 
317
        guint8 udl;
 
318
        guint8 ud[152];
 
319
};
 
320
 
 
321
struct sms_submit_err_report {
 
322
        gboolean udhi;
 
323
        guint8 fcs;
 
324
        guint8 pi;
 
325
        struct sms_scts scts;
 
326
        guint8 pid;
 
327
        guint8 dcs;
 
328
        guint8 udl;
 
329
        guint8 ud[151];
 
330
};
 
331
 
 
332
struct sms {
 
333
        struct sms_address sc_addr;
 
334
        enum sms_type type;
 
335
        union {
 
336
                struct sms_deliver deliver;
 
337
                struct sms_deliver_ack_report deliver_ack_report;
 
338
                struct sms_deliver_err_report deliver_err_report;
 
339
                struct sms_submit submit;
 
340
                struct sms_submit_ack_report submit_ack_report;
 
341
                struct sms_submit_err_report submit_err_report;
 
342
                struct sms_command command;
 
343
                struct sms_status_report status_report;
 
344
        };
 
345
};
 
346
 
 
347
struct sms_udh_iter {
 
348
        const guint8 *data;
 
349
        guint8 offset;
 
350
};
 
351
 
 
352
struct sms_assembly_node {
 
353
        struct sms_address addr;
 
354
        time_t ts;
 
355
        GSList *fragment_list;
 
356
        guint8 ref;
 
357
        guint8 max_fragments;
 
358
        guint8 num_fragments;
 
359
        unsigned int bitmap[8];
 
360
};
 
361
 
 
362
struct sms_assembly {
 
363
        GSList *assembly_list;
 
364
};
 
365
 
 
366
struct cbs {
 
367
        enum cbs_geo_scope gs;                  /* 2 bits */
 
368
        guint16 message_code;                   /* 10 bits */
 
369
        guint8 update_number;                   /* 4 bits */
 
370
        guint16 message_identifier;             /* 16 bits */
 
371
        guint8 dcs;                             /* 8 bits */
 
372
        guint8 max_pages;                       /* 4 bits */
 
373
        guint8 page;                            /* 4 bits */
 
374
        guint8 ud[82];
 
375
};
 
376
 
 
377
struct cbs_assembly_node {
 
378
        guint32 serial;
 
379
        guint16 bitmap;
 
380
        GSList *pages;
 
381
};
 
382
 
 
383
struct cbs_assembly {
 
384
        GSList *assembly_list;
 
385
        GSList *recv_plmn;
 
386
        GSList *recv_loc;
 
387
        GSList *recv_cell;
 
388
};
 
389
 
 
390
static inline gboolean is_bit_set(unsigned char oct, int bit)
 
391
{
 
392
        int mask = 0x1 << bit;
 
393
        return oct & mask ? TRUE : FALSE;
 
394
}
 
395
 
 
396
static inline unsigned char bit_field(unsigned char oct, int start, int num)
 
397
{
 
398
        unsigned char mask = (0x1 << num) - 1;
 
399
 
 
400
        return (oct >> start) & mask;
 
401
}
 
402
 
 
403
void extract_bcd_number(const unsigned char *buf, int len, char *out);
 
404
void encode_bcd_number(const char *number, unsigned char *out);
 
405
 
 
406
gboolean sms_decode(const unsigned char *pdu, int len, gboolean outgoing,
 
407
                        int tpdu_len, struct sms *out);
 
408
 
 
409
gboolean sms_encode(const struct sms *in, int *len, int *tpdu_len,
 
410
                        unsigned char *pdu);
 
411
 
 
412
gboolean sms_decode_address_field(const unsigned char *pdu, int len,
 
413
                                        int *offset, gboolean sc,
 
414
                                        struct sms_address *out);
 
415
 
 
416
gboolean sms_encode_address_field(const struct sms_address *in, gboolean sc,
 
417
                                        unsigned char *pdu, int *offset);
 
418
 
 
419
int sms_udl_in_bytes(guint8 ud_len, guint8 dcs);
 
420
 
 
421
time_t sms_scts_to_time(const struct sms_scts *scts, struct tm *remote);
 
422
 
 
423
const char *sms_address_to_string(const struct sms_address *addr);
 
424
void sms_address_from_string(struct sms_address *addr, const char *str);
 
425
 
 
426
const guint8 *sms_extract_common(const struct sms *sms, gboolean *out_udhi,
 
427
                                        guint8 *out_dcs, guint8 *out_udl,
 
428
                                        guint8 *out_max);
 
429
 
 
430
gboolean sms_udh_iter_init(const struct sms *sms, struct sms_udh_iter *iter);
 
431
gboolean sms_udh_iter_init_from_cbs(const struct cbs *cbs,
 
432
                                        struct sms_udh_iter *iter);
 
433
guint8 sms_udh_iter_get_udh_length(struct sms_udh_iter *iter);
 
434
const guint8 *sms_udh_iter_get_ud_after_header(struct sms_udh_iter *iter);
 
435
enum sms_iei sms_udh_iter_get_ie_type(struct sms_udh_iter *iter);
 
436
guint8 sms_udh_iter_get_ie_length(struct sms_udh_iter *iter);
 
437
void sms_udh_iter_get_ie_data(struct sms_udh_iter *iter, guint8 *data);
 
438
gboolean sms_udh_iter_has_next(struct sms_udh_iter *iter);
 
439
gboolean sms_udh_iter_next(struct sms_udh_iter *iter);
 
440
 
 
441
gboolean sms_dcs_decode(guint8 dcs, enum sms_class *cls,
 
442
                        enum sms_charset *charset,
 
443
                        gboolean *compressed, gboolean *autodelete);
 
444
 
 
445
gboolean sms_mwi_dcs_decode(guint8 dcs, enum sms_mwi_type *type,
 
446
                                enum sms_charset *charset,
 
447
                                gboolean *active, gboolean *discard);
 
448
 
 
449
gboolean sms_extract_app_port(const struct sms *sms, int *dst, int *src,
 
450
                                gboolean *is_8bit);
 
451
gboolean sms_extract_concatenation(const struct sms *sms, guint16 *ref_num,
 
452
                                        guint8 *max_msgs, guint8 *seq_num);
 
453
 
 
454
unsigned char *sms_decode_datagram(GSList *sms_list, long *out_len);
 
455
char *sms_decode_text(GSList *sms_list);
 
456
 
 
457
struct sms_assembly *sms_assembly_new();
 
458
void sms_assembly_free(struct sms_assembly *assembly);
 
459
GSList *sms_assembly_add_fragment(struct sms_assembly *assembly,
 
460
                                        const struct sms *sms, time_t ts,
 
461
                                        const struct sms_address *addr,
 
462
                                        guint16 ref, guint8 max, guint8 seq);
 
463
void sms_assembly_expire(struct sms_assembly *assembly, time_t before);
 
464
 
 
465
GSList *sms_text_prepare(const char *utf8, guint16 ref,
 
466
                                gboolean use_16bit, int *ref_offset);
 
467
 
 
468
gboolean cbs_dcs_decode(guint8 dcs, gboolean *udhi, enum sms_class *cls,
 
469
                        enum sms_charset *charset, gboolean *compressed,
 
470
                        enum cbs_language *language, gboolean *iso639);
 
471
 
 
472
gboolean cbs_decode(const unsigned char *pdu, int len, struct cbs *out);
 
473
gboolean cbs_encode(const struct cbs *cbs, int *len, unsigned char *pdu);
 
474
gboolean cbs_extract_app_port(const struct cbs *cbs, int *dst, int *src,
 
475
                                gboolean *is_8bit);
 
476
 
 
477
char *cbs_decode_text(GSList *cbs_list, char *iso639_lang);
 
478
 
 
479
struct cbs_assembly *cbs_assembly_new();
 
480
void cbs_assembly_free(struct cbs_assembly *assembly);
 
481
GSList *cbs_assembly_add_page(struct cbs_assembly *assembly,
 
482
                                const struct cbs *cbs);
 
483
void cbs_assembly_location_changed(struct cbs_assembly *assembly,
 
484
                                        gboolean lac, gboolean ci);