Re: [PATCH obexd v1 2/3] MAP: Add MSETime application parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

--------------------------------------------------
From: "Luiz Augusto von Dentz" <luiz.dentz@xxxxxxxxx>
Sent: Friday, November 09, 2012 3:33 PM
To: "Sunil Kumar Behera" <sunil.behera@xxxxxxxxxxx>
Cc: <linux-bluetooth@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH obexd v1 2/3] MAP: Add MSETime application parameter

Hi Sunil,

On Thu, Nov 8, 2012 at 1:04 PM, Sunil Kumar Behera
<sunil.behera@xxxxxxxxxxx> wrote:
MSETime application parameter shall be used in the response
to report the Local Time basis of the MSE.
---
 plugins/mas.c      |    4 +++-
 plugins/messages.h |    1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugins/mas.c b/plugins/mas.c
index 319c87f..bdf2b6b 100644
--- a/plugins/mas.c
+++ b/plugins/mas.c
@@ -284,7 +284,7 @@ static const char *yesorno(gboolean a)
 }

static void get_messages_listing_cb(void *session, int err, uint16_t size,
-                                       gboolean newmsg,
+                                       gboolean newmsg, gchar *msetime,
const struct messages_message *entry,
                                        void *user_data)
 {
@@ -403,6 +403,8 @@ proceed:
                mas->outparams = g_obex_apparam_set_uint8(mas->outparams,
                                                MAP_AP_NEWMESSAGE,
                                                newmsg ? 1 : 0);
+ mas->outparams = g_obex_apparam_set_string(mas->outparams,
+                                               MAP_AP_MSETIME, msetime);
        }

        if (err != -EAGAIN)
diff --git a/plugins/messages.h b/plugins/messages.h
index 00a16b1..2ab4ba1 100644
--- a/plugins/messages.h
+++ b/plugins/messages.h
@@ -226,6 +226,7 @@ int messages_get_folder_listing(void *session, const char *name, uint16_t max,
  */
 typedef void (*messages_get_messages_listing_cb)(void *session, int err,
                                        uint16_t size, gboolean newmsg,
+                                       gchar *msetime,
const struct messages_message *message,
                                        void *user_data);

Do we really need to do this in the backend? We could possible
generate the timestamp on get_messages_listing_cb and which should
avoid having duplicate code doing the same for each backend.


The data for application parameter MSETime is string with current time basis
and UTC-offset of the MSE. Since the UTC value depends on the location of the device
so I think it is better left to backend on deciding the UTC value.

Best regards,
Sunil Kumar Behera
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux