store = camel_folder_get_parent_store (CAMEL_FOLDER (folder));
if (store != NULL) {
camel_store_summary_disconnect_folder_summary (
- (CamelStoreSummary *) ((CamelIMAPXStore *) store)->summary,
+ CAMEL_IMAPX_STORE (store)->summary,
CAMEL_FOLDER (folder)->summary);
}
imapx_store = CAMEL_IMAPX_STORE (store);
camel_store_summary_disconnect_folder_summary (
- CAMEL_STORE_SUMMARY (imapx_store->summary),
- folder->summary);
+ imapx_store->summary, folder->summary);
/* Chain up to parent's rename() method. */
CAMEL_FOLDER_CLASS (camel_imapx_folder_parent_class)->
folder_name = camel_folder_get_full_name (folder);
camel_store_summary_connect_folder_summary (
- CAMEL_STORE_SUMMARY (imapx_store->summary),
- folder_name, folder->summary);
+ imapx_store->summary, folder_name, folder->summary);
}
static void
}
camel_store_summary_connect_folder_summary (
- (CamelStoreSummary *) ((CamelIMAPXStore *) store)->summary,
+ CAMEL_IMAPX_STORE (store)->summary,
folder_name, folder->summary);
return folder;
CamelIMAPXServer *server = NULL;
CamelIMAPXMailbox *mailbox;
CamelStore *parent_store;
- CamelStoreSummary *store_summary;
CamelStoreInfo *store_info;
CamelIMAPXStoreInfo *imapx_store_info;
gchar *folder_path = NULL;
parent_store = camel_folder_get_parent_store (CAMEL_FOLDER (folder));
imapx_store = CAMEL_IMAPX_STORE (parent_store);
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
- store_info = camel_store_summary_path (store_summary, folder_path);
+ store_info = camel_store_summary_path (
+ imapx_store->summary, folder_path);
/* This should never fail. We needed the CamelStoreInfo
* to instantiate the CamelIMAPXFolder in the first place. */
imapx_store_info = (CamelIMAPXStoreInfo *) store_info;
mailbox_name = g_strdup (imapx_store_info->mailbox_name);
- camel_store_summary_info_unref (store_summary, store_info);
+ camel_store_summary_info_unref (imapx_store->summary, store_info);
/* See if the CamelIMAPXServer already has the mailbox. */
CamelStoreInfo *si;
/* ... and store's summary when folder's summary is dirty */
- si = camel_store_summary_path ((CamelStoreSummary *)((CamelIMAPXStore *) parent_store)->summary, full_name);
+ si = camel_store_summary_path (CAMEL_IMAPX_STORE (parent_store)->summary, full_name);
if (si) {
if (si->total != camel_folder_summary_get_saved_count (folder->summary) ||
si->unread != camel_folder_summary_get_unread_count (folder->summary)) {
* have downloaded is little. */
if (!mobile_mode)
si->unread = camel_folder_summary_get_unread_count (folder->summary);
- camel_store_summary_touch ((CamelStoreSummary *)((CamelIMAPXStore *) parent_store)->summary);
+ camel_store_summary_touch (CAMEL_IMAPX_STORE (parent_store)->summary);
}
- camel_store_summary_info_unref ((CamelStoreSummary *)((CamelIMAPXStore *) parent_store)->summary, si);
+ camel_store_summary_info_unref (CAMEL_IMAPX_STORE (parent_store)->summary, si);
}
}
camel_folder_summary_save_to_db (folder->summary, NULL);
- camel_store_summary_save ((CamelStoreSummary *)((CamelIMAPXStore *) parent_store)->summary);
+ camel_store_summary_save (CAMEL_IMAPX_STORE (parent_store)->summary);
imapx_unregister_job (is, job);
}
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
+ * camel-imapx-store-summary.c
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
*/
#ifdef HAVE_CONFIG_H
camel_imapx_store_summary,
CAMEL_TYPE_STORE_SUMMARY)
-
static gboolean
namespace_load (FILE *in)
{
}
static gint
-imapx_store_summary_summary_header_load (CamelStoreSummary *s,
+imapx_store_summary_summary_header_load (CamelStoreSummary *summary,
FILE *in)
{
CamelStoreSummaryClass *store_summary_class;
camel_imapx_store_summary_parent_class);
/* Chain up to parent's summary_header_load() method. */
- if (store_summary_class->summary_header_load (s, in) == -1)
+ if (store_summary_class->summary_header_load (summary, in) == -1)
return -1;
if (camel_file_util_decode_fixed_int32 (in, &version) == -1)
}
static gint
-imapx_store_summary_summary_header_save (CamelStoreSummary *s,
+imapx_store_summary_summary_header_save (CamelStoreSummary *summary,
FILE *out)
{
CamelStoreSummaryClass *store_summary_class;
camel_imapx_store_summary_parent_class);
/* Chain up to parent's summary_header_save() method. */
- if (store_summary_class->summary_header_save (s, out) == -1)
+ if (store_summary_class->summary_header_save (summary, out) == -1)
return -1;
/* always write as latest version */
- if (camel_file_util_encode_fixed_int32 (out, CAMEL_IMAPX_STORE_SUMMARY_VERSION) == -1)
+ if (camel_file_util_encode_fixed_int32 (
+ out, CAMEL_IMAPX_STORE_SUMMARY_VERSION) == -1)
return -1;
if (camel_file_util_encode_fixed_int32 (out, 0) == -1)
}
static CamelStoreInfo *
-imapx_store_summary_store_info_load (CamelStoreSummary *s,
+imapx_store_summary_store_info_load (CamelStoreSummary *summary,
FILE *in)
{
CamelStoreSummaryClass *store_summary_class;
camel_imapx_store_summary_parent_class);
/* Chain up to parent's store_info_load() method. */
- si = store_summary_class->store_info_load (s, in);
+ si = store_summary_class->store_info_load (summary, in);
if (si == NULL)
return NULL;
if (camel_file_util_decode_string (in, &separator) == -1) {
- camel_store_summary_info_unref (s, si);
+ camel_store_summary_info_unref (summary, si);
return NULL;
}
if (camel_file_util_decode_string (in, &mailbox_name) == -1) {
- camel_store_summary_info_unref (s, si);
+ camel_store_summary_info_unref (summary, si);
return NULL;
}
}
static gint
-imapx_store_summary_store_info_save (CamelStoreSummary *s,
+imapx_store_summary_store_info_save (CamelStoreSummary *summary,
FILE *out,
CamelStoreInfo *si)
{
separator[0] = ((CamelIMAPXStoreInfo *) si)->separator;
/* Chain up to parent's store_info_save() method. */
- if (store_summary_class->store_info_save (s, out, si) == -1)
+ if (store_summary_class->store_info_save (summary, out, si) == -1)
return -1;
if (camel_file_util_encode_string (out, separator) == -1)
}
static void
-imapx_store_summary_store_info_free (CamelStoreSummary *s,
+imapx_store_summary_store_info_free (CamelStoreSummary *summary,
CamelStoreInfo *si)
{
CamelStoreSummaryClass *store_summary_class;
g_free (((CamelIMAPXStoreInfo *) si)->mailbox_name);
/* Chain up to parent's store_info_free() method. */
- store_summary_class->store_info_free (s, si);
+ store_summary_class->store_info_free (summary, si);
}
static void
}
static void
-camel_imapx_store_summary_init (CamelIMAPXStoreSummary *s)
+camel_imapx_store_summary_init (CamelIMAPXStoreSummary *summary)
{
}
/**
- * camel_imapx_store_summary_new:
- *
- * Create a new CamelIMAPXStoreSummary object.
- *
- * Returns: A new CamelIMAPXStoreSummary widget.
- **/
-CamelIMAPXStoreSummary *
-camel_imapx_store_summary_new (void)
-{
- return g_object_new (CAMEL_TYPE_IMAPX_STORE_SUMMARY, NULL);
-}
-
-/**
* camel_imapx_store_summary_mailbox:
- * @s:
- * @mailbox_name:
+ * @summary: a #CamelStoreSummary
+ * @mailbox_name: a mailbox name
*
* Retrieve a summary item by mailbox name.
*
- * A referenced to the summary item is returned, which may be
- * ref'd or free'd as appropriate.
+ * The returned #CamelIMAPXStoreInfo is referenced for thread-safety
+ * and should be unreferenced with camel_store_summary_info_unref()
+ * when finished with it.
*
- * Returns: The summary item, or NULL if the @mailbox_name
- * is not available.
- * It must be freed using camel_store_summary_info_unref().
+ * Returns: a #CamelIMAPXStoreInfo, or %NULL
**/
CamelIMAPXStoreInfo *
-camel_imapx_store_summary_mailbox (CamelIMAPXStoreSummary *s,
+camel_imapx_store_summary_mailbox (CamelStoreSummary *summary,
const gchar *mailbox_name)
{
CamelStoreInfo *match = NULL;
gboolean find_inbox;
guint ii;
+ g_return_val_if_fail (CAMEL_IS_IMAPX_STORE_SUMMARY (summary), NULL);
+ g_return_val_if_fail (mailbox_name != NULL, NULL);
+
find_inbox = camel_imapx_mailbox_is_inbox (mailbox_name);
- array = camel_store_summary_array (CAMEL_STORE_SUMMARY (s));
+ array = camel_store_summary_array (summary);
for (ii = 0; ii < array->len; ii++) {
CamelIMAPXStoreInfo *info;
if (find_inbox && is_inbox) {
match = camel_store_summary_info_ref (
- CAMEL_STORE_SUMMARY (s),
- (CamelStoreInfo *) info);
+ summary, (CamelStoreInfo *) info);
break;
}
if (g_str_equal (info->mailbox_name, mailbox_name)) {
match = camel_store_summary_info_ref (
- CAMEL_STORE_SUMMARY (s),
- (CamelStoreInfo *) info);
+ summary, (CamelStoreInfo *) info);
break;
}
}
- camel_store_summary_array_free (CAMEL_STORE_SUMMARY (s), array);
+ camel_store_summary_array_free (summary, array);
return (CamelIMAPXStoreInfo *) match;
}
CamelIMAPXStoreInfo *
-camel_imapx_store_summary_add_from_mailbox (CamelIMAPXStoreSummary *s,
+camel_imapx_store_summary_add_from_mailbox (CamelStoreSummary *summary,
CamelIMAPXMailbox *mailbox)
{
CamelIMAPXStoreInfo *info;
gchar *folder_path;
gchar separator;
- g_return_val_if_fail (CAMEL_IS_IMAPX_STORE_SUMMARY (s), NULL);
+ g_return_val_if_fail (CAMEL_IS_IMAPX_STORE_SUMMARY (summary), NULL);
g_return_val_if_fail (CAMEL_IS_IMAPX_MAILBOX (mailbox), NULL);
mailbox_name = camel_imapx_mailbox_get_name (mailbox);
separator = camel_imapx_mailbox_get_separator (mailbox);
- info = camel_imapx_store_summary_mailbox (s, mailbox_name);
+ info = camel_imapx_store_summary_mailbox (summary, mailbox_name);
if (info != NULL) {
camel_store_summary_info_unref (
- CAMEL_STORE_SUMMARY (s),
- (CamelStoreInfo *) info);
+ summary, (CamelStoreInfo *) info);
return info;
}
mailbox_name, separator);
info = (CamelIMAPXStoreInfo *)
- camel_store_summary_add_from_path (
- CAMEL_STORE_SUMMARY (s), folder_path);
+ camel_store_summary_add_from_path (summary, folder_path);
g_free (folder_path);
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- * Authors: Michael Zucchi <notzed@ximian.com>
+ * camel-imapx-store-summary.h
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU Lesser General Public
- * License as published by the Free Software Foundation.
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
*/
#if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
CamelStoreSummaryClass parent_class;
};
-GType camel_imapx_store_summary_get_type (void);
-CamelIMAPXStoreSummary *
- camel_imapx_store_summary_new (void);
+GType camel_imapx_store_summary_get_type
+ (void) G_GNUC_CONST;
CamelIMAPXStoreInfo *
camel_imapx_store_summary_mailbox
- (CamelIMAPXStoreSummary *s,
+ (CamelStoreSummary *summary,
const gchar *mailbox_name);
CamelIMAPXStoreInfo *
camel_imapx_store_summary_add_from_mailbox
- (CamelIMAPXStoreSummary *s,
+ (CamelStoreSummary *summary,
CamelIMAPXMailbox *mailbox);
G_END_DECLS
const gchar *old_folder_path,
const gchar *new_folder_path)
{
- CamelStoreSummary *store_summary;
GPtrArray *array;
gint olen = strlen (old_folder_path);
guint ii;
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
-
- array = camel_store_summary_array (store_summary);
+ array = camel_store_summary_array (imapx_store->summary);
for (ii = 0; ii < array->len; ii++) {
CamelStoreInfo *si;
gchar *new_mailbox_name;
si = g_ptr_array_index (array, ii);
- path = camel_store_info_path (store_summary, si);
+ path = camel_store_info_path (imapx_store->summary, si);
/* We need to adjust not only the entry for the renamed
* folder, but also the entries for all the descendants
new_path = g_strdup (new_folder_path);
camel_store_info_set_string (
- store_summary, si,
+ imapx_store->summary, si,
CAMEL_STORE_INFO_PATH, new_path);
imapx_si = (CamelIMAPXStoreInfo *) si;
g_free (imapx_si->mailbox_name);
imapx_si->mailbox_name = new_mailbox_name;
- camel_store_summary_touch (store_summary);
+ camel_store_summary_touch (imapx_store->summary);
g_free (new_path);
}
- camel_store_summary_array_free (store_summary, array);
+ camel_store_summary_array_free (imapx_store->summary, array);
}
static void
CamelFolderInfo *fi;
CamelIMAPXStoreInfo *si;
CamelStoreInfoFlags flags;
- CamelStoreSummary *summary;
CamelSettings *settings;
gboolean use_subscriptions;
gboolean mailbox_is_subscribed;
const gchar *mailbox_name;
gchar separator;
- summary = CAMEL_STORE_SUMMARY (store->summary);
-
settings = camel_service_ref_settings (CAMEL_SERVICE (store));
use_subscriptions = camel_imapx_settings_get_use_subscriptions (
CAMEL_IMAPX_SETTINGS (settings));
if ((flags ^ si->info.flags) & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
si->info.flags &= ~CAMEL_FOLDER_SUBSCRIBED;
si->info.flags |= flags & CAMEL_FOLDER_SUBSCRIBED;
- camel_store_summary_touch (summary);
+ camel_store_summary_touch (store->summary);
}
- folder_path = camel_store_info_path (summary, (CamelStoreInfo *) si);
+ folder_path = camel_store_info_path (
+ store->summary, (CamelStoreInfo *) si);
fi = imapx_store_build_folder_info (store, folder_path, flags);
/* Figure out which signals to emit, if any. */
CamelFolder *new_folder = NULL;
CamelStoreInfo *si;
CamelService *service;
- CamelStoreSummary *store_summary;
const gchar *user_cache_dir;
service = CAMEL_SERVICE (store);
user_cache_dir = camel_service_get_user_cache_dir (service);
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
- si = camel_store_summary_path (store_summary, folder_name);
+ si = camel_store_summary_path (imapx_store->summary, folder_name);
if (si != NULL) {
gchar *base_dir;
g_free (folder_dir);
g_free (base_dir);
- camel_store_summary_info_unref (store_summary, si);
+ camel_store_summary_info_unref (imapx_store->summary, si);
} else {
g_set_error (
error, CAMEL_STORE_ERROR,
const gchar *folder_path,
gboolean emit_signal)
{
- CamelStoreSummary *store_summary;
CamelStoreInfo *si;
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
-
- si = camel_store_summary_path (store_summary, folder_path);
+ si = camel_store_summary_path (imapx_store->summary, folder_path);
if (si != NULL) {
if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) {
si->flags &= ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
- camel_store_summary_touch (store_summary);
- camel_store_summary_save (store_summary);
+ camel_store_summary_touch (imapx_store->summary);
+ camel_store_summary_save (imapx_store->summary);
}
- camel_store_summary_info_unref (store_summary, si);
+ camel_store_summary_info_unref (imapx_store->summary, si);
}
if (emit_signal) {
g_free (folder_dir);
event:
- camel_store_summary_remove_path (
- (CamelStoreSummary *) imapx_store->summary, folder_path);
- camel_store_summary_save ((CamelStoreSummary *) imapx_store->summary);
+ camel_store_summary_remove_path (imapx_store->summary, folder_path);
+ camel_store_summary_save (imapx_store->summary);
fi = imapx_store_build_folder_info (imapx_store, folder_path, 0);
camel_store_folder_deleted (CAMEL_STORE (imapx_store), fi);
CamelIMAPXStore *imapx_store = CAMEL_IMAPX_STORE (store);
CamelService *service;
CamelSettings *settings;
- CamelStoreSummary *store_summary;
gboolean include_inbox = FALSE;
CamelFolderInfo *fi;
GPtrArray *folders;
* the moment. So let it do the right thing by bailing out if it's
* not a folder we're explicitly interested in. */
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
-
- array = camel_store_summary_array (store_summary);
+ array = camel_store_summary_array (imapx_store->summary);
for (ii = 0; ii < array->len; ii++) {
CamelStoreInfo *si;
gboolean si_is_match;
si = g_ptr_array_index (array, ii);
- folder_path = camel_store_info_path (store_summary, si);
+ folder_path = camel_store_info_path (imapx_store->summary, si);
si_is_inbox = (g_ascii_strcasecmp (folder_path, "INBOX") == 0);
/* Filter by folder path. */
g_ptr_array_add (folders, fi);
}
- camel_store_summary_array_free (store_summary, array);
+ camel_store_summary_array_free (imapx_store->summary, array);
fi = camel_folder_info_build (folders, top, '/', TRUE);
CamelIMAPXMailbox *mailbox,
GHashTable *folder_info_results)
{
- CamelStoreSummary *store_summary;
CamelIMAPXStoreInfo *si;
CamelFolderInfo *fi;
const gchar *folder_path;
const gchar *mailbox_name;
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
-
mailbox_name = camel_imapx_mailbox_get_name (mailbox);
si = camel_imapx_store_summary_mailbox (
g_return_if_fail (si != NULL);
folder_path = camel_store_info_path (
- store_summary, (CamelStoreInfo *) si);
+ imapx_store->summary, (CamelStoreInfo *) si);
fi = imapx_store_build_folder_info (imapx_store, folder_path, 0);
/* Takes ownership of the CamelFolderInfo. */
GError **error)
{
CamelIMAPXServer *server;
- CamelStoreSummary *store_summary;
GHashTable *folder_info_results;
GPtrArray *array;
guint ii;
if (server == NULL)
return FALSE;
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
-
/* mailbox name -> CamelFolderInfo */
folder_info_results = g_hash_table_new_full (
(GHashFunc) imapx_name_hash,
if (!success)
goto exit;
- array = camel_store_summary_array (store_summary);
+ array = camel_store_summary_array (imapx_store->summary);
for (ii = 0; ii < array->len; ii++) {
CamelStoreInfo *si;
gboolean pattern_match;
si = g_ptr_array_index (array, ii);
- si_path = camel_store_info_path (store_summary, si);
+ si_path = camel_store_info_path (imapx_store->summary, si);
mailbox_name = ((CamelIMAPXStoreInfo *) si)->mailbox_name;
if (mailbox_name == NULL || *mailbox_name == '\0')
imapx_store, dup_folder_path);
g_free (dup_folder_path);
} else {
- camel_store_summary_remove (store_summary, si);
+ camel_store_summary_remove (
+ imapx_store->summary, si);
}
}
}
- camel_store_summary_array_free (store_summary, array);
+ camel_store_summary_array_free (imapx_store->summary, array);
exit:
g_hash_table_destroy (folder_info_results);
sync_folders (store, NULL, 0, cancellable, error);
- camel_store_summary_save (CAMEL_STORE_SUMMARY (store->summary));
+ camel_store_summary_save (store->summary);
exit:
camel_operation_pop_message (cancellable);
CamelFolderInfo *fi = NULL;
CamelService *service;
CamelSettings *settings;
- CamelStoreSummary *store_summary;
gboolean initial_setup = FALSE;
gboolean use_subscriptions;
service = CAMEL_SERVICE (store);
imapx_store = CAMEL_IMAPX_STORE (store);
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
settings = camel_service_ref_settings (service);
if (!sync_folders (imapx_store, top, flags, cancellable, error))
goto exit;
- camel_store_summary_save (store_summary);
+ camel_store_summary_save (imapx_store->summary);
/* ensure the INBOX is subscribed if lsub was preferred*/
if (initial_setup && use_subscriptions)
service = CAMEL_SERVICE (initable);
user_cache_dir = camel_service_get_user_cache_dir (service);
- imapx_store->summary = camel_imapx_store_summary_new ();
+ imapx_store->summary =
+ g_object_new (CAMEL_TYPE_IMAPX_STORE_SUMMARY, NULL);
summary = g_build_filename (user_cache_dir, ".ev-store-summary", NULL);
- camel_store_summary_set_filename ((CamelStoreSummary *) imapx_store->summary, summary);
- camel_store_summary_load ((CamelStoreSummary *) imapx_store->summary);
+ camel_store_summary_set_filename (imapx_store->summary, summary);
+ camel_store_summary_load (imapx_store->summary);
g_free (summary);
if (folder_name && *folder_name == '/')
folder_name++;
- si = camel_store_summary_path (
- (CamelStoreSummary *) imapx_store->summary, folder_name);
- if (si) {
- is_subscribed = (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) != 0;
- camel_store_summary_info_unref (
- (CamelStoreSummary *) imapx_store->summary, si);
+ si = camel_store_summary_path (imapx_store->summary, folder_name);
+ if (si != NULL) {
+ if (si->flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED)
+ is_subscribed = TRUE;
+ camel_store_summary_info_unref (imapx_store->summary, si);
}
return is_subscribed;
#include <camel/camel.h>
#include "camel-imapx-server.h"
-#include "camel-imapx-store-summary.h"
/* Standard GObject macros */
#define CAMEL_TYPE_IMAPX_STORE \
CamelOfflineStore parent;
CamelIMAPXStorePrivate *priv;
- CamelIMAPXStoreSummary *summary; /* in-memory list of folders */
+ CamelStoreSummary *summary; /* in-memory list of folders */
};
struct _CamelIMAPXStoreClass {
{
CamelStoreInfo *si;
CamelStore *parent_store;
- CamelStoreSummary *store_summary;
CamelIMAPXStore *imapx_store;
const gchar *full_name;
guint32 total;
parent_store = camel_folder_get_parent_store (folder);
imapx_store = CAMEL_IMAPX_STORE (parent_store);
- store_summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
- si = camel_store_summary_path (store_summary, full_name);
+ si = camel_store_summary_path (imapx_store->summary, full_name);
if (si == NULL)
return;
si->unread = unread;
si->total = total;
- camel_store_summary_touch (store_summary);
- camel_store_summary_save (store_summary);
+ camel_store_summary_touch (imapx_store->summary);
+ camel_store_summary_save (imapx_store->summary);
}
}
<TITLE>CamelIMAPXStoreSummary</TITLE>
CamelIMAPXStoreInfo
CamelIMAPXStoreSummary
-camel_imapx_store_summary_new
camel_imapx_store_summary_mailbox
camel_imapx_store_summary_add_from_mailbox
<SUBSECTION Standard>