2011-06-10 19:17:35 -07:00
|
|
|
/* 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 class Geary.Sqlite.Folder : Object, Geary.Folder {
|
|
|
|
|
private FolderRow row;
|
2011-06-13 15:16:57 -07:00
|
|
|
private string name;
|
|
|
|
|
private Trillian readonly;
|
|
|
|
|
private Trillian supports_children;
|
|
|
|
|
private Trillian children;
|
|
|
|
|
private Trillian openable;
|
2011-06-10 19:17:35 -07:00
|
|
|
|
|
|
|
|
internal Folder(FolderRow row) throws Error {
|
|
|
|
|
this.row = row;
|
|
|
|
|
|
|
|
|
|
name = row.name;
|
2011-06-13 15:16:57 -07:00
|
|
|
readonly = Trillian.UNKNOWN;
|
2011-06-10 19:17:35 -07:00
|
|
|
supports_children = row.supports_children;
|
2011-06-13 15:16:57 -07:00
|
|
|
children = Trillian.UNKNOWN;
|
|
|
|
|
openable = row.is_openable;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string get_name() {
|
|
|
|
|
return name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Trillian is_readonly() {
|
|
|
|
|
return readonly;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Trillian does_support_children() {
|
|
|
|
|
return supports_children;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Trillian has_children() {
|
|
|
|
|
return children;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Trillian is_openable() {
|
|
|
|
|
return openable;
|
2011-06-10 19:17:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async void open_async(bool readonly, Cancellable? cancellable = null) throws Error {
|
2011-06-13 15:16:57 -07:00
|
|
|
this.readonly = Trillian.TRUE;
|
2011-06-10 19:17:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async void close_async(Cancellable? cancellable = null) throws Error {
|
2011-06-13 15:16:57 -07:00
|
|
|
this.readonly = Trillian.UNKNOWN;
|
2011-06-10 19:17:35 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int get_message_count() throws Error {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Gee.List<Geary.EmailHeader>? read_async(int low, int count,
|
|
|
|
|
Cancellable? cancellable = null) throws Error {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Geary.Email fetch_async(Geary.EmailHeader header,
|
|
|
|
|
Cancellable? cancellable = null) throws Error {
|
|
|
|
|
throw new EngineError.OPEN_REQUIRED("Not implemented");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|