Fixes #298095 (bnc)
authorChenthill Palanisamy <pchen@src.gnome.org>
Thu, 30 Aug 2007 08:05:04 +0000 (08:05 +0000)
committerChenthill Palanisamy <pchen@src.gnome.org>
Thu, 30 Aug 2007 08:05:04 +0000 (08:05 +0000)
svn path=/trunk/; revision=8017

servers/groupwise/ChangeLog
servers/groupwise/e-gw-container.c
servers/groupwise/e-gw-container.h

index 7533a49..b4109c0 100644 (file)
@@ -1,3 +1,11 @@
+2007-08-30  Chenthill Palanisamy  <pchenthill@novell.com>
+       
+       Fixes #298095 (bnc)
+       * e-gw-container.[ch]: (e_gw_container_set_from_soap_parameter),
+       (e_gw_container_get_is_system_folder),
+       (e_gw_container_set_is_system_folder): Added a function to fetch
+       the system folder flag.                                        
+
 2007-08-17  Johnny Jacob  <jjohnny@novell.com>
  
        ** Fix for bug #458715.
index 9a306be..85ba1c4 100644 (file)
@@ -44,7 +44,7 @@ struct _EGwContainerPrivate {
        gboolean is_frequent_contacts; /*indicates  whether this folder is frequent contacts or not */
        gboolean is_shared_by_me;   
        gboolean is_shared_to_me;
-
+       gboolean is_system_folder;
 };
 
 static GObjectClass *parent_class = NULL;
@@ -262,6 +262,15 @@ e_gw_container_set_from_soap_parameter (EGwContainer *container, SoupSoapParamet
                g_free (value) ;
        }
 
+       subparam = soup_soap_parameter_get_first_child_by_name (param, "isSystemFolder");
+       if (subparam) {
+               value = soup_soap_parameter_get_string_value (subparam);
+               if (!strcmp (value, "1"))
+                       container->priv->is_system_folder = TRUE;
+               g_free (value);
+       }
+
+
        /* retrive the unread and total count */
        subparam = soup_soap_parameter_get_first_child_by_name (param, "hasUnread") ;
        if (!subparam) {
@@ -523,6 +532,22 @@ e_gw_container_set_is_shared_to_me (EGwContainer *container, gboolean is_shared_
        container->priv->is_shared_to_me = is_shared_to_me;
 }
 
+gboolean
+e_gw_container_get_is_system_folder (EGwContainer *container)
+{
+       g_return_val_if_fail (E_IS_GW_CONTAINER (container), FALSE);
+       
+       return container->priv->is_system_folder;
+}
+
+void
+e_gw_container_set_is_system_folder (EGwContainer *container, gboolean is_system_folder)
+{
+       g_return_if_fail (E_IS_GW_CONTAINER (container));
+       
+       container->priv->is_system_folder = is_system_folder;
+}
+
 const char *
 e_gw_container_get_name (EGwContainer *container)
 {
index 73a6964..5a8abf1 100644 (file)
@@ -97,6 +97,8 @@ int         e_gw_container_get_rights(EGwContainer *container, gchar *email);
 EGwContainerType e_gw_container_get_container_type (EGwContainer *container) ;
 void         e_gw_container_get_user_list(EGwContainer *container, GList **user_list);
 void         e_gw_container_form_message (SoupSoapMessage *msg, gchar *id, GList *new_list, const char *sub, const char *mesg, int flag);
+gboolean e_gw_container_get_is_system_folder (EGwContainer *container);
+void e_gw_container_set_is_system_folder (EGwContainer *container, gboolean is_system_folder);
 
 G_END_DECLS