~awe/phablet-extras/ofono-nettime-plugin

« back to all changes in this revision

Viewing changes to src/util.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
char *convert_gsm_to_utf8(const unsigned char *text, long len, long *items_read,
 
23
                                long *items_written, unsigned char terminator);
 
24
unsigned char *convert_utf8_to_gsm(const char *text, long len, long *items_read,
 
25
                                long *items_written, unsigned char terminator);
 
26
 
 
27
unsigned char *decode_hex_own_buf(const char *in, long len, long *items_written,
 
28
                                        unsigned char terminator,
 
29
                                        unsigned char *buf);
 
30
 
 
31
unsigned char *decode_hex(const char *in, long len, long *items_written,
 
32
                                unsigned char terminator);
 
33
 
 
34
char *encode_hex_own_buf(const unsigned char *in, long len,
 
35
                                unsigned char terminator, char *buf);
 
36
 
 
37
char *encode_hex(const unsigned char *in, long len,
 
38
                        unsigned char terminator);
 
39
 
 
40
unsigned char *unpack_7bit_own_buf(const unsigned char *in, long len,
 
41
                                        int byte_offset, gboolean ussd,
 
42
                                        long max_to_unpack, long *items_written,
 
43
                                        unsigned char terminator,
 
44
                                        unsigned char *buf);
 
45
 
 
46
unsigned char *unpack_7bit(const unsigned char *in, long len, int byte_offset,
 
47
                                gboolean ussd, long max_to_unpack,
 
48
                                long *items_written, unsigned char terminator);
 
49
 
 
50
unsigned char *pack_7bit_own_buf(const unsigned char *in, long len,
 
51
                                        int byte_offset, gboolean ussd,
 
52
                                        long *items_written,
 
53
                                        unsigned char terminator,
 
54
                                        unsigned char *buf);
 
55
 
 
56
unsigned char *pack_7bit(const unsigned char *in, long len, int byte_offset,
 
57
                                gboolean ussd,
 
58
                                long *items_written, unsigned char terminator);
 
59
 
 
60
char *sim_string_to_utf8(const unsigned char *buffer, int length);