From: Yang Gu <gyagp0@gmail.com>
To: ofono@ofono.org
Subject: [PATCH 07/13] Add parser for multimedia message transfer status objects
Date: Thu, 22 Apr 2010 23:12:24 +0800 [thread overview]
Message-ID: <1271949150-9085-7-git-send-email-yang.gu@intel.com> (raw)
In-Reply-To: <1271949150-9085-1-git-send-email-yang.gu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
---
src/stkutil.c | 20 ++++++++++++++++++++
src/stkutil.h | 9 +++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/src/stkutil.c b/src/stkutil.c
index 45ff7e3..c2b3cd5 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -1705,6 +1705,24 @@ static gboolean parse_dataobj_mms_id(struct comprehension_tlv_iter *iter,
return TRUE;
}
+/* Defined in TS 102.223 Section 8.84 */
+static gboolean parse_dataobj_mms_transfer_status(
+ struct comprehension_tlv_iter *iter, void *user)
+{
+ struct stk_mms_transfer_status *mts = user;
+ const unsigned char *data;
+ unsigned int len = comprehension_tlv_iter_get_length(iter);
+
+ if (len < 1)
+ return FALSE;
+
+ data = comprehension_tlv_iter_get_data(iter);
+ mts->len = len;
+ memcpy(mts->status, data, len);
+
+ return TRUE;
+}
+
static dataobj_handler handler_for_type(enum stk_data_object_type type)
{
switch (type) {
@@ -1860,6 +1878,8 @@ static dataobj_handler handler_for_type(enum stk_data_object_type type)
return parse_dataobj_mms_reference;
case STK_DATA_OBJECT_TYPE_MMS_ID:
return parse_dataobj_mms_id;
+ case STK_DATA_OBJECT_TYPE_MMS_TRANSFER_STATUS:
+ return parse_dataobj_mms_transfer_status;
default:
return NULL;
};
diff --git a/src/stkutil.h b/src/stkutil.h
index c4e2c91..937bbc6 100644
--- a/src/stkutil.h
+++ b/src/stkutil.h
@@ -739,6 +739,15 @@ struct stk_mms_id {
unsigned char len;
};
+/*
+ * According to 102.223 Section 8.84 the length of CTLV is 1 byte. This means
+ * that the maximum size is 127 according to the rules of CTLVs.
+ */
+struct stk_mms_transfer_status {
+ unsigned char status[127];
+ unsigned char len;
+};
+
struct stk_command_display_text {
char *text;
struct stk_icon_id icon_id;
--
1.7.0.4
next prev parent reply other threads:[~2010-04-22 15:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 15:12 [PATCH 01/13] Add parser for browsing status objects Yang Gu
2010-04-22 15:12 ` [PATCH 02/13] Add parser for frame layout objects Yang Gu
2010-04-22 15:12 ` [PATCH 03/13] Add parser for frames information objects Yang Gu
2010-04-22 15:12 ` [PATCH 04/13] Add parser for meid objects Yang Gu
2010-04-22 15:12 ` [PATCH 05/13] Add parser for multimedia message reference objects Yang Gu
2010-04-22 15:12 ` [PATCH 06/13] Add parser for multimedia message identifier objects Yang Gu
2010-04-22 15:12 ` Yang Gu [this message]
2010-04-22 15:12 ` [PATCH 08/13] Add parser for mm content " Yang Gu
2010-04-22 15:12 ` [PATCH 09/13] Add parser for multimedia message notification objects Yang Gu
2010-04-22 15:12 ` [PATCH 10/13] Add parser for last envelope objects Yang Gu
2010-04-22 15:12 ` [PATCH 11/13] Add parser for registry application data objects Yang Gu
2010-04-22 15:12 ` [PATCH 12/13] Add parser for activate descriptor objects Yang Gu
2010-04-22 15:12 ` [PATCH 13/13] Add parser for broadcast network information objects Yang Gu
2010-04-23 16:54 ` [PATCH 01/13] Add parser for browsing status objects Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1271949150-9085-7-git-send-email-yang.gu@intel.com \
--to=gyagp0@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox