aboutsummaryrefslogtreecommitdiff
path: root/src/mm-sms-utils.h
blob: 46f475b121eeed57454ec49b28eaa19b9020158e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details:
 *
 * Copyright (C) 2010 Red Hat, Inc.
 */

#ifndef MM_SMS_UTILS_H
#define MM_SMS_UTILS_H

#include <glib.h>

#define SMS_MAX_PDU_LEN 344

GHashTable *sms_parse_pdu (const char *hexpdu, GError **error);

guint8 *sms_create_submit_pdu (const char *number,
                               const char *text,
                               const char *smsc,
                               guint validity,
                               guint class,
                               guint *out_pdulen,
                               guint *out_msgstart,
                               GError **error);

GHashTable *sms_properties_hash_new (const char *smsc,
                                     const char *number,
                                     const char *timestamp,
                                     const char *text,
                                     const GByteArray *data,
                                     guint data_coding_scheme,
                                     guint *class);

/* For testcases only */
guint sms_encode_address (const char *address,
                          guint8 *buf,
                          size_t buflen,
                          gboolean is_smsc);


#endif /* MM_SMS_UTILS_H */