[Telepathy-commits] [telepathy-salut/master] Removed EstimatedFilesize property from the file channel.

Jonny Lamb jonny.lamb at collabora.co.uk
Fri Nov 21 03:46:18 PST 2008


Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
 src/salut-file-channel.c |   33 ++-------------------------------
 1 files changed, 2 insertions(+), 31 deletions(-)

diff --git a/src/salut-file-channel.c b/src/salut-file-channel.c
index 36b37c8..f5ff924 100644
--- a/src/salut-file-channel.c
+++ b/src/salut-file-channel.c
@@ -95,7 +95,6 @@ enum
   PROP_CONTENT_TYPE,
   PROP_FILENAME,
   PROP_SIZE,
-  PROP_ESTIMATED_SIZE,
   PROP_CONTENT_MD5,
   PROP_DESCRIPTION,
   PROP_AVAILABLE_SOCKET_TYPES,
@@ -123,7 +122,6 @@ struct _SalutFileChannelPrivate {
   gchar *content_type;
   gchar *filename;
   guint64 size;
-  guint64 estimated_size;
   gchar *content_md5;
   gchar *description;
   GHashTable *available_socket_types;
@@ -210,9 +208,6 @@ salut_file_channel_get_property (GObject    *object,
       case PROP_SIZE:
         g_value_set_uint64 (value, self->priv->size);
         break;
-      case PROP_ESTIMATED_SIZE:
-        g_value_set_uint64 (value, self->priv->estimated_size);
-        break;
       case PROP_CONTENT_MD5:
         g_value_set_string (value, self->priv->content_md5);
         break;
@@ -296,10 +291,6 @@ salut_file_channel_set_property (GObject *object,
         /* This should not be writeable with the new request API */
         self->priv->size = g_value_get_uint64 (value);
         break;
-      case PROP_ESTIMATED_SIZE:
-        /* This should not be writeable with the new request API */
-        self->priv->estimated_size = g_value_get_uint64 (value);
-        break;
       case PROP_CONTENT_MD5:
         /* This should not be writeable with the new request API */
         self->priv->content_md5 = g_value_dup_string (value);
@@ -386,7 +377,6 @@ salut_file_channel_class_init (SalutFileChannelClass *salut_file_channel_class)
     { "ContentType", "content-type", "content-type" },
     { "Filename", "filename", "filename" },
     { "Size", "size", "size" },
-    { "EstimatedSize", "estimated-size", "estimated-size" },
     { "ContentMD5", "content-md5", "content-md5" },
     { "Description", "description", "description" },
     { "AvailableSocketTypes", "available-socket-types", NULL },
@@ -539,22 +529,6 @@ salut_file_channel_class_init (SalutFileChannelClass *salut_file_channel_class)
       G_PARAM_STATIC_BLURB);
   g_object_class_install_property (object_class, PROP_SIZE, param_spec);
 
-  param_spec = g_param_spec_uint64 (
-      "estimated-size",
-      "guint estimated-size",
-      "Estimated size of the file in bytes",
-      0,
-      G_MAXUINT64,
-      SALUT_UNDEFINED_FILE_SIZE,
-      /* TODO: change this to CONSTRUCT_ONLY when
-       * the new request API is used.
-       */
-      G_PARAM_CONSTRUCT |
-      G_PARAM_READWRITE |
-      G_PARAM_STATIC_NICK |
-      G_PARAM_STATIC_BLURB);
-  g_object_class_install_property (object_class, PROP_ESTIMATED_SIZE, param_spec);
-
   param_spec = g_param_spec_string (
       "content-md5",
       "gchar *content-md5",
@@ -829,10 +803,7 @@ send_file_offer (SalutFileChannel *self)
 
   setup_local_socket (self);
 
-  if (self->priv->size != SALUT_UNDEFINED_FILE_SIZE)
-    ft->size = self->priv->size;
-  else
-    ft->size = self->priv->estimated_size;
+  ft->size = self->priv->size;
 
   gibber_file_transfer_offer (ft);
 }
@@ -871,7 +842,7 @@ salut_file_channel_check_and_send (SalutFileChannel *channel)
       return;
     }
 
-  if (channel->priv->size == SALUT_UNDEFINED_FILE_SIZE && channel->priv->estimated_size == SALUT_UNDEFINED_FILE_SIZE)
+  if (channel->priv->size == SALUT_UNDEFINED_FILE_SIZE)
     {
       DEBUG ("Size property not present; not starting file transfer");
       return;
-- 
1.5.6.5




More information about the Telepathy-commits mailing list