All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] mmsd: bug fix
@ 2012-04-23  8:31 =?unknown-8bit?q?S=C3=A9bastien?= Bianti
  2012-04-23  8:31 ` [PATCH v2 1/2] mmsutil: add mms_message_status_get_string API =?unknown-8bit?q?S=C3=A9bastien?= Bianti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: =?unknown-8bit?q?S=C3=A9bastien?= Bianti @ 2012-04-23  8:31 UTC (permalink / raw)
  To: ofono

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

Sébastien Bianti (2):
  mmsutil: add mms_message_status_get_string API
  service: use proper status value string

 src/mmsutil.c |   18 ++++++++++++++++++
 src/mmsutil.h |    1 +
 src/service.c |    2 +-
 3 files changed, 20 insertions(+), 1 deletions(-)

-- 
1.7.4.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] mmsutil: add mms_message_status_get_string API
  2012-04-23  8:31 [PATCH v2 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= Bianti
@ 2012-04-23  8:31 ` =?unknown-8bit?q?S=C3=A9bastien?= Bianti
  2012-04-23  8:31 ` [PATCH v2 2/2] service: use proper status value string =?unknown-8bit?q?S=C3=A9bastien?= Bianti
  2012-04-23  8:54 ` [PATCH v2 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= bianti
  2 siblings, 0 replies; 4+ messages in thread
From: =?unknown-8bit?q?S=C3=A9bastien?= Bianti @ 2012-04-23  8:31 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1203 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..8809f54 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;
 }
+
+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..d3b507f 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);
+char *mms_message_status_get_string(enum mms_message_status status);
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] service: use proper status value string
  2012-04-23  8:31 [PATCH v2 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= Bianti
  2012-04-23  8:31 ` [PATCH v2 1/2] mmsutil: add mms_message_status_get_string API =?unknown-8bit?q?S=C3=A9bastien?= Bianti
@ 2012-04-23  8:31 ` =?unknown-8bit?q?S=C3=A9bastien?= Bianti
  2012-04-23  8:54 ` [PATCH v2 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= bianti
  2 siblings, 0 replies; 4+ messages in thread
From: =?unknown-8bit?q?S=C3=A9bastien?= Bianti @ 2012-04-23  8:31 UTC (permalink / raw)
  To: ofono

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

---
 src/service.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/service.c b/src/service.c
index 469393a..f89fd3f 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1502,7 +1502,7 @@ static void append_sr_msg_properties(DBusMessageIter *dict,
 					struct mms_message *msg)
 {
 	const char *date = time_to_str(&msg->rc.date);
-	const char *status = "draft";
+	const char *status = mms_message_status_get_string(msg->sr.status);
 
 	mms_dbus_dict_append_basic(dict, "Status",
 					DBUS_TYPE_STRING, &status);
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 0/2] mmsd: bug fix
  2012-04-23  8:31 [PATCH v2 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= Bianti
  2012-04-23  8:31 ` [PATCH v2 1/2] mmsutil: add mms_message_status_get_string API =?unknown-8bit?q?S=C3=A9bastien?= Bianti
  2012-04-23  8:31 ` [PATCH v2 2/2] service: use proper status value string =?unknown-8bit?q?S=C3=A9bastien?= Bianti
@ 2012-04-23  8:54 ` =?unknown-8bit?q?S=C3=A9bastien?= bianti
  2 siblings, 0 replies; 4+ messages in thread
From: =?unknown-8bit?q?S=C3=A9bastien?= bianti @ 2012-04-23  8:54 UTC (permalink / raw)
  To: ofono

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

Please forget this, I forgot to change the return value.

Le 23/04/2012 10:31, Sébastien Bianti a écrit :
> Sébastien Bianti (2):
>    mmsutil: add mms_message_status_get_string API
>    service: use proper status value string
>
>   src/mmsutil.c |   18 ++++++++++++++++++
>   src/mmsutil.h |    1 +
>   src/service.c |    2 +-
>   3 files changed, 20 insertions(+), 1 deletions(-)
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-23  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23  8:31 [PATCH v2 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-04-23  8:31 ` [PATCH v2 1/2] mmsutil: add mms_message_status_get_string API =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-04-23  8:31 ` [PATCH v2 2/2] service: use proper status value string =?unknown-8bit?q?S=C3=A9bastien?= Bianti
2012-04-23  8:54 ` [PATCH v2 0/2] mmsd: bug fix =?unknown-8bit?q?S=C3=A9bastien?= bianti

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.