geary/src/engine/api/Folder.vala
Jim Nelson ac41e9269a Fixes message list not updated when folder is selected: #3741
Engine now uses a master Folder object that synchronizes between the network and the local store.  Also, the Geary.Folder interface was getting ugly to code when the implementation was more than trivial, so moved to standard getters for it.
2011-06-13 15:16:57 -07:00

43 lines
1.3 KiB
Vala

/* Copyright 2011 Yorba Foundation
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
public interface Geary.Folder : Object {
public enum CloseReason {
LOCAL_CLOSE,
REMOTE_CLOSE,
FOLDER_CLOSED
}
public signal void opened();
public signal void closed(CloseReason reason);
public signal void updated();
public abstract string get_name();
// This is only for when a context has been selected
public abstract Trillian is_readonly();
public abstract Trillian does_support_children();
public abstract Trillian has_children();
public abstract Trillian is_openable();
public abstract async void open_async(bool readonly, Cancellable? cancellable = null) throws Error;
public abstract async void close_async(Cancellable? cancellable = null) throws Error;
public abstract int get_message_count() throws Error;
public abstract async Gee.List<Geary.EmailHeader>? read_async(int low, int count,
Cancellable? cancellable = null) throws Error;
public abstract async Geary.Email fetch_async(Geary.EmailHeader header,
Cancellable? cancellable = null) throws Error;
}