sms: Make sms_decode_text public
This can be used for cell broadcast messages as well Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
committed by
Aleksander Morgado
parent
ce8989182c
commit
a8c10c676e
+13
-13
@@ -244,13 +244,13 @@ sms_encoding_type (int dcs)
|
||||
return scheme;
|
||||
}
|
||||
|
||||
static gchar *
|
||||
sms_decode_text (const guint8 *text,
|
||||
int len,
|
||||
MMSmsEncoding encoding,
|
||||
int bit_offset,
|
||||
gpointer log_object,
|
||||
GError **error)
|
||||
gchar *
|
||||
mm_sms_decode_text (const guint8 *text,
|
||||
int len,
|
||||
MMSmsEncoding encoding,
|
||||
int bit_offset,
|
||||
gpointer log_object,
|
||||
GError **error)
|
||||
{
|
||||
if (!text || len == 0) {
|
||||
g_set_error (error,
|
||||
@@ -779,12 +779,12 @@ mm_sms_part_3gpp_new_from_binary_pdu (guint index,
|
||||
|
||||
/* Otherwise if it's 7-bit or UCS2 we can decode it */
|
||||
mm_obj_dbg (log_object, "decoding SMS text with %u elements", tp_user_data_size_elements);
|
||||
text = sms_decode_text (&pdu[tp_user_data_offset],
|
||||
tp_user_data_size_elements,
|
||||
user_data_encoding,
|
||||
bit_offset,
|
||||
log_object,
|
||||
error);
|
||||
text = mm_sms_decode_text (&pdu[tp_user_data_offset],
|
||||
tp_user_data_size_elements,
|
||||
user_data_encoding,
|
||||
bit_offset,
|
||||
log_object,
|
||||
error);
|
||||
if (!text) {
|
||||
mm_sms_part_free (sms_part);
|
||||
return NULL;
|
||||
|
||||
@@ -38,6 +38,13 @@ guint8 *mm_sms_part_3gpp_get_submit_pdu (MMSmsPart *part,
|
||||
gpointer log_object,
|
||||
GError **error);
|
||||
|
||||
gchar *mm_sms_decode_text (const guint8 *text,
|
||||
int len,
|
||||
MMSmsEncoding encoding,
|
||||
int bit_offset,
|
||||
gpointer log_object,
|
||||
GError **error);
|
||||
|
||||
/* For testcases only */
|
||||
|
||||
guint mm_sms_part_3gpp_encode_address (const gchar *address,
|
||||
|
||||
Reference in New Issue
Block a user