add subscribed_folders.
authorChris Toshok <toshok@helixcode.com>
Wed, 25 Oct 2000 02:13:17 +0000 (02:13 +0000)
committerChris Toshok <toshok@src.gnome.org>
Wed, 25 Oct 2000 02:13:17 +0000 (02:13 +0000)
commit6f6bcc1f02d52a6508618eb675edf4a250071d33
treebcf871085809bcd404a9d6201a81cf4284f9108e
parentd39e8c5f8aa7471e742d5f073732435d4139ad12
add subscribed_folders.

2000-10-24  Chris Toshok  <toshok@helixcode.com>

* providers/imap/camel-imap-store.h: add subscribed_folders.

* providers/imap/camel-imap-store.c (camel_imap_store_class_init):
fill in vtable entries for subscription functions.
(camel_imap_store_finalize): new function, so we can free up our
subscribed_folders hashtable.
(camel_imap_store_init): set CAMEL_STORE_SUBSCRIPTIONS in the
CamelStore flags, and create our subscribed_folders hashtable.
(camel_imap_store_get_type): camel_imap_store_finalize is our
finalize function.
(get_folder_info): if we're looking at subscribed_only, clear out
the subscribed_folders hashtable, use LSUB instead of LIST, and
insert folder paths (prepended by their namespace if there is one)
into subscribed_folders.  INBOX subscription support needs work,
since we always show it, regardless of it's subscribed state.
(folder_subscribed): new function.  just look up the folder_path
in the hashtable.
(subscribe_folder): new function.  use the imap SUBSCRIBE command,
and if successful add it to the hashtable.
(unsubscribe_folder): new function.  use the imap UNSUBSCRIBE
command, and if successful remove it from the hashtable.
camel/ChangeLog
camel/providers/imap/camel-imap-store.c
camel/providers/imap/camel-imap-store.h