[evolution-data-server] CamelFolder: Remove "uri" property.



commit 11830cfda86e4eba832c28088845a9243ca81a29
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri May 6 13:13:03 2011 -0400

    CamelFolder: Remove "uri" property.
    
    Also remove camel_folder_get_uri().
    
    Too bad I just added this for 3.0.  It was handy at the time, but Camel
    won't be using folder URIs anymore.  That's Evolution's domain now.

 camel/camel-folder.c                        |   91 +--------------------------
 camel/camel-folder.h                        |    1 -
 docs/reference/camel/camel-sections.txt     |    1 -
 docs/reference/camel/tmpl/camel-folder.sgml |   14 ----
 docs/reference/camel/tmpl/camel-unused.sgml |   14 ++++
 5 files changed, 16 insertions(+), 105 deletions(-)
---
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index c9a008a..64267d3 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -62,7 +62,6 @@ struct _CamelFolderPrivate {
 	gchar *name;
 	gchar *full_name;
 	gchar *description;
-	gchar *uri;
 };
 
 struct _AsyncContext {
@@ -105,8 +104,7 @@ enum {
 	PROP_DESCRIPTION,
 	PROP_FULL_NAME,
 	PROP_NAME,
-	PROP_PARENT_STORE,
-	PROP_URI
+	PROP_PARENT_STORE
 };
 
 enum {
@@ -476,12 +474,6 @@ folder_get_property (GObject *object,
 				value, camel_folder_get_parent_store (
 				CAMEL_FOLDER (object)));
 			return;
-
-		case PROP_URI:
-			g_value_set_string (
-				value, camel_folder_get_uri (
-				CAMEL_FOLDER (object)));
-			return;
 	}
 
 	G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -519,7 +511,6 @@ folder_finalize (GObject *object)
 	g_free (priv->name);
 	g_free (priv->full_name);
 	g_free (priv->description);
-	g_free (priv->uri);
 
 	camel_folder_change_info_free (priv->changed_frozen);
 
@@ -1589,23 +1580,6 @@ camel_folder_class_init (CamelFolderClass *class)
 			G_PARAM_CONSTRUCT_ONLY));
 
 	/**
-	 * CamelFolder:uri
-	 *
-	 * The folder's URI.
-	 *
-	 * Since: 3.0
-	 **/
-	g_object_class_install_property (
-		object_class,
-		PROP_URI,
-		g_param_spec_string (
-			"uri",
-			"URI",
-			"The folder's URI",
-			NULL,
-			G_PARAM_READABLE));
-
-	/**
 	 * CamelFolder::changed
 	 * @folder: the #CamelFolder which emitted the signal
 	 **/
@@ -1783,22 +1757,12 @@ void
 camel_folder_set_full_name (CamelFolder *folder,
                             const gchar *full_name)
 {
-	GObject *object;
-
 	g_return_if_fail (CAMEL_IS_FOLDER (folder));
 
 	g_free (folder->priv->full_name);
 	folder->priv->full_name = g_strdup (full_name);
 
-	/* The URI property will need to be reconstructed. */
-	g_free (folder->priv->uri);
-	folder->priv->uri = NULL;
-
-	object = G_OBJECT (folder);
-	g_object_freeze_notify (object);
-	g_object_notify (object, "full-name");
-	g_object_notify (object, "uri");
-	g_object_thaw_notify (object);
+	g_object_notify (G_OBJECT (folder), "full-name");
 }
 
 /**
@@ -1859,57 +1823,6 @@ camel_folder_get_parent_store (CamelFolder *folder)
 }
 
 /**
- * camel_folder_get_uri:
- * @folder: a #CamelFolder
- *
- * Returns the folder's URI.
- *
- * Returns: the folder's URI
- *
- * Since: 3.0
- **/
-const gchar *
-camel_folder_get_uri (CamelFolder *folder)
-{
-	CamelService *service;
-	CamelProvider *provider;
-	CamelStore *parent_store;
-	const gchar *full_name;
-	CamelURL *url;
-
-	g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
-
-	/* The URI is constructed on demand and then cached. */
-
-	if (folder->priv->uri != NULL)
-		goto exit;
-
-	full_name = camel_folder_get_full_name (folder);
-	parent_store = camel_folder_get_parent_store (folder);
-
-	service = CAMEL_SERVICE (parent_store);
-	provider = camel_service_get_provider (service);
-
-	url = camel_url_copy (camel_service_get_camel_url (service));
-
-	if (provider->url_flags & CAMEL_URL_FRAGMENT_IS_PATH) {
-		camel_url_set_fragment (url, full_name);
-	} else {
-		gchar *path = g_strdup_printf ("/%s", full_name);
-		camel_url_set_path (url, path);
-		g_free (path);
-	}
-
-	g_free (folder->priv->uri);
-	folder->priv->uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL);
-
-	camel_url_free (url);
-
-exit:
-	return folder->priv->uri;
-}
-
-/**
  * camel_folder_get_message_count:
  * @folder: a #CamelFolder
  *
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index 9024344..01abda3 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -347,7 +347,6 @@ void		camel_folder_set_full_name	(CamelFolder *folder,
 const gchar *	camel_folder_get_description	(CamelFolder *folder);
 void		camel_folder_set_description	(CamelFolder *folder,
 						 const gchar *description);
-const gchar *	camel_folder_get_uri		(CamelFolder *folder);
 CamelMessageFlags
 		camel_folder_get_permanent_flags
 						(CamelFolder *folder);
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index c8cb495..2c6829d 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -434,7 +434,6 @@ camel_folder_get_full_name
 camel_folder_set_full_name
 camel_folder_get_description
 camel_folder_set_description
-camel_folder_get_uri
 camel_folder_get_permanent_flags
 camel_folder_get_message_flags
 camel_folder_set_message_flags
diff --git a/docs/reference/camel/tmpl/camel-folder.sgml b/docs/reference/camel/tmpl/camel-folder.sgml
index c34087b..bd7c5ba 100644
--- a/docs/reference/camel/tmpl/camel-folder.sgml
+++ b/docs/reference/camel/tmpl/camel-folder.sgml
@@ -82,11 +82,6 @@ CamelFolder
 
 </para>
 
-<!-- ##### ARG CamelFolder:uri ##### -->
-<para>
-
-</para>
-
 <!-- ##### MACRO CAMEL_FOLDER_ERROR ##### -->
 <para>
 
@@ -201,15 +196,6 @@ CamelFolder
 @description: 
 
 
-<!-- ##### FUNCTION camel_folder_get_uri ##### -->
-<para>
-
-</para>
-
- folder: 
- Returns: 
-
-
 <!-- ##### FUNCTION camel_folder_get_permanent_flags ##### -->
 <para>
 
diff --git a/docs/reference/camel/tmpl/camel-unused.sgml b/docs/reference/camel/tmpl/camel-unused.sgml
index 2573270..cd1d428 100644
--- a/docs/reference/camel/tmpl/camel-unused.sgml
+++ b/docs/reference/camel/tmpl/camel-unused.sgml
@@ -3268,6 +3268,12 @@ streams
 </para>
 
 
+<!-- ##### ARG CamelFolder:uri ##### -->
+<para>
+
+</para>
+
+
 <!-- ##### STRUCT CamelGroupwiseFolder ##### -->
 <para>
 
@@ -5440,6 +5446,14 @@ streams
 @full_name: 
 @name: 
 
+<!-- ##### FUNCTION camel_folder_get_uri ##### -->
+<para>
+
+</para>
+
+ folder: 
+ Returns: 
+
 <!-- ##### FUNCTION camel_folder_summary_array_free ##### -->
 <para>
 



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