[epiphany/wip/ephy-sync: 81/86] sync-service: The Storage Server keeps timestamps as floats



commit d35ae05d1611487b75b03e454e49dac19f1308f5
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date:   Sat Jul 30 17:58:35 2016 +0300

    sync-service: The Storage Server keeps timestamps as floats

 src/ephy-sync-service.c |   28 ++++++++++++++--------------
 src/ephy-sync-service.h |    4 ++--
 2 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/src/ephy-sync-service.c b/src/ephy-sync-service.c
index 90dc848..0136088 100644
--- a/src/ephy-sync-service.c
+++ b/src/ephy-sync-service.c
@@ -64,14 +64,14 @@ struct _EphySyncService {
 G_DEFINE_TYPE (EphySyncService, ephy_sync_service, G_TYPE_OBJECT);
 
 typedef struct {
-  EphySyncService *service;
-  gchar *endpoint;
-  const gchar *method;
-  gchar *request_body;
-  gint64 modified_since;
-  gint64 unmodified_since;
-  SoupSessionCallback callback;
-  gpointer user_data;
+  EphySyncService     *service;
+  gchar               *endpoint;
+  const gchar         *method;
+  gchar               *request_body;
+  float                modified_since;
+  float                unmodified_since;
+  SoupSessionCallback  callback;
+  gpointer             user_data;
 } StorageServerRequestAsyncData;
 
 static StorageServerRequestAsyncData *
@@ -79,8 +79,8 @@ storage_server_request_async_data_new (EphySyncService     *service,
                                        gchar               *endpoint,
                                        const gchar         *method,
                                        gchar               *request_body,
-                                       gint64               modified_since,
-                                       gint64               unmodified_since,
+                                       float                modified_since,
+                                       float                unmodified_since,
                                        SoupSessionCallback  callback,
                                        gpointer             user_data)
 {
@@ -319,13 +319,13 @@ ephy_sync_service_send_storage_request (EphySyncService               *self,
   }
 
   if (data->modified_since >= 0) {
-    if_modified_since = g_strdup_printf ("%ld", data->modified_since);
+    if_modified_since = g_strdup_printf ("%.2f", data->modified_since);
     soup_message_headers_append (message->request_headers,
                                  "X-If-Modified-Since", if_modified_since);
   }
 
   if (data->unmodified_since >= 0) {
-    if_unmodified_since = g_strdup_printf ("%ld", data->unmodified_since);
+    if_unmodified_since = g_strdup_printf ("%.2f", data->unmodified_since);
     soup_message_headers_append (message->request_headers,
                                  "X-If-Unmodified-Since", if_unmodified_since);
   }
@@ -930,8 +930,8 @@ ephy_sync_service_send_storage_message (EphySyncService     *self,
                                         gchar               *endpoint,
                                         const gchar         *method,
                                         gchar               *request_body,
-                                        gint64               modified_since,
-                                        gint64               unmodified_since,
+                                        float                modified_since,
+                                        float                unmodified_since,
                                         SoupSessionCallback  callback,
                                         gpointer             user_data)
 {
diff --git a/src/ephy-sync-service.h b/src/ephy-sync-service.h
index d41ec2a..b9eaa7f 100644
--- a/src/ephy-sync-service.h
+++ b/src/ephy-sync-service.h
@@ -74,8 +74,8 @@ void             ephy_sync_service_send_storage_message (EphySyncService     *se
                                                          gchar               *endpoint,
                                                          const gchar         *method,
                                                          gchar               *request_body,
-                                                         gint64               modified_since,
-                                                         gint64               unmodified_since,
+                                                         float                modified_since,
+                                                         float                unmodified_since,
                                                          SoupSessionCallback  callback,
                                                          gpointer             user_data);
 


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