All of lore.kernel.org
 help / color / mirror / Atom feed
From: =?unknown-8bit?q?S=C3=A9bastien?= Bianti <sebastien.bianti@linux.intel.com>
To: ofono@ofono.org
Subject: [PATCH v3 1/2] mmsutil: add mms_message_status_get_string API
Date: Mon, 23 Apr 2012 10:55:31 +0200	[thread overview]
Message-ID: <1335171332-13855-2-git-send-email-sebastien.bianti@linux.intel.com> (raw)
In-Reply-To: <1335171332-13855-1-git-send-email-sebastien.bianti@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

---
 src/mmsutil.c |   18 ++++++++++++++++++
 src/mmsutil.h |    1 +
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/mmsutil.c b/src/mmsutil.c
index c507d6f..89f1c29 100644
--- a/src/mmsutil.c
+++ b/src/mmsutil.c
@@ -1661,3 +1661,21 @@ gboolean mms_message_encode(struct mms_message *msg, int fd)
 
 	return FALSE;
 }
+
+const char *mms_message_status_get_string(enum mms_message_status status)
+{
+	switch (status) {
+	case MMS_MESSAGE_STATUS_DOWNLOADED:
+		return "downloaded";
+	case MMS_MESSAGE_STATUS_RECEIVED:
+		return "received";
+	case MMS_MESSAGE_STATUS_READ:
+		return "read";
+	case MMS_MESSAGE_STATUS_SENT:
+		return "sent";
+	case MMS_MESSAGE_STATUS_DRAFT:
+		return "draft";
+	}
+
+	return NULL;
+}
diff --git a/src/mmsutil.h b/src/mmsutil.h
index b2a0418..79c74db 100644
--- a/src/mmsutil.h
+++ b/src/mmsutil.h
@@ -146,3 +146,4 @@ gboolean mms_message_decode(const unsigned char *pdu,
 				unsigned int len, struct mms_message *out);
 gboolean mms_message_encode(struct mms_message *msg, int fd);
 void mms_message_free(struct mms_message *msg);
+const char *mms_message_status_get_string(enum mms_message_status status);
-- 
1.7.4.4


  reply	other threads:[~2012-04-23  8:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  8:55 [PATCH v3 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-04-23  8:55 ` =?unknown-8bit?q?S=C3=A9bastien?= Bianti [this message]
2012-04-23  8:55 ` [PATCH v3 2/2] service: use proper status value string =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-04-23 10:29 ` [PATCH v3 0/2] mmsd: bug fix Marcel Holtmann

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=1335171332-13855-2-git-send-email-sebastien.bianti@linux.intel.com \
    --to=sebastien.bianti@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.