From: Parthasarathi Susarla Date: Thu, 20 Jan 2005 06:48:23 +0000 (+0000) Subject: sets the type of the container the in the container private structure. X-Git-Tag: upstream/3.7.4~7981 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0e8f8433814dbd3429352005c325b5b5bd1994b;p=platform%2Fupstream%2Fevolution-data-server.git sets the type of the container the in the container private structure. 2005-01-20 Parthasarathi Susarla * e-gw-container.[ch] (e_gw_container_set_from_soap_parameter): sets the type of the container the in the container private structure. --- diff --git a/servers/groupwise/e-gw-container.c b/servers/groupwise/e-gw-container.c index 0ac6e3a..c0a3b19 100644 --- a/servers/groupwise/e-gw-container.c +++ b/servers/groupwise/e-gw-container.c @@ -37,6 +37,7 @@ struct _EGwContainerPrivate { char *owner; GList *user_list; const char *modified; + EGwContainerType type ; gboolean is_root ; gboolean is_writable; gboolean is_frequent_contacts; /*indicates whether this folder is frequent contacts or not */ @@ -198,7 +199,6 @@ e_gw_container_set_from_soap_parameter (EGwContainer *container, SoupSoapParamet /* retrieve the parent container id */ subparam = soup_soap_parameter_get_first_child_by_name (param, "parent"); if (!subparam) { - g_warning (G_STRLOC ": found container with no parent"); e_gw_container_set_parent_id (container, ""); container->priv->is_root = TRUE ; } else { @@ -207,6 +207,29 @@ e_gw_container_set_from_soap_parameter (EGwContainer *container, SoupSoapParamet e_gw_container_set_parent_id (container, (const char *) value); g_free (value) ; } + + /*retrieve the folder type*/ + subparam = soup_soap_parameter_get_first_child_by_name (param, "type") ; + if (!subparam) + container->priv->type = E_GW_CONTAINER_TYPE_FOLDER ; + else { + value = soup_soap_parameter_get_string_value (subparam); + if (!strcmp (value, "Root")) + container->priv->type = E_GW_CONTAINER_TYPE_ROOT ; + else if (!strcmp (value, "Inbox")) + container->priv->type = E_GW_CONTAINER_TYPE_INBOX ; + else if (!strcmp (value, "Outbox")) + container->priv->type = E_GW_CONTAINER_TYPE_OUTBOX ; + else if (!strcmp (value, "Calendar")) + container->priv->type = E_GW_CONTAINER_TYPE_CALENDAR ; + else if (!strcmp (value, "Contacts")) + container->priv->type = E_GW_CONTAINER_TYPE_CONTACTS ; + else if (!strcmp (value, "Draft")) + container->priv->type = E_GW_CONTAINER_TYPE_DRAFT ; + else if (!strcmp (value, "Trash")) + container->priv->type = E_GW_CONTAINER_TYPE_TRASH ; + g_free (value) ; + } /* retrive the unread and total count */ subparam = soup_soap_parameter_get_first_child_by_name (param, "hasUnread") ; if (!subparam) {