Moved a lot of implementation-specific code into a new impl/ directory, keeping the api
directory concerned only with user-facing interfaces. Also, cleaned up some of the public interfaces in support modules to private.
This commit is contained in:
parent
41e162a9b7
commit
ab69b20b1c
17 changed files with 21 additions and 43 deletions
|
|
@ -4,7 +4,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class Geary.Imap.Account : Geary.AbstractAccount, Geary.RemoteAccount {
|
||||
private class Geary.Imap.Account : Geary.AbstractAccount, Geary.RemoteAccount {
|
||||
// all references to Inbox are converted to this string, purely for sanity sake when dealing
|
||||
// with Inbox's case issues
|
||||
public const string INBOX_NAME = "INBOX";
|
||||
|
|
@ -28,22 +28,6 @@ public class Geary.Imap.Account : Geary.AbstractAccount, Geary.RemoteAccount {
|
|||
return Geary.Email.Field.HEADER | Geary.Email.Field.BODY;
|
||||
}
|
||||
|
||||
public async string? get_folder_delimiter_async(string toplevel,
|
||||
Cancellable? cancellable = null) throws Error {
|
||||
if (delims.has_key(toplevel))
|
||||
return delims.get(toplevel);
|
||||
|
||||
MailboxInformation? mbox = yield session_mgr.fetch_async(toplevel, cancellable);
|
||||
if (mbox == null) {
|
||||
throw new EngineError.NOT_FOUND("Toplevel folder %s not found on %s", toplevel,
|
||||
session_mgr.to_string());
|
||||
}
|
||||
|
||||
delims.set(toplevel, mbox.delim);
|
||||
|
||||
return mbox.delim;
|
||||
}
|
||||
|
||||
public override async Gee.Collection<Geary.Folder> list_folders_async(Geary.FolderPath? parent,
|
||||
Cancellable? cancellable = null) throws Error {
|
||||
Geary.FolderPath? processed = process_path(parent, null,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class Geary.Imap.EmailIdentifier : Geary.EmailIdentifier {
|
||||
private class Geary.Imap.EmailIdentifier : Geary.EmailIdentifier {
|
||||
public Imap.UID uid { get; private set; }
|
||||
|
||||
public EmailIdentifier(Imap.UID uid) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public interface Geary.Imap.FolderExtensions : Geary.Folder {
|
||||
private interface Geary.Imap.FolderExtensions : Geary.Folder {
|
||||
/**
|
||||
* Much like Geary.Folder.list_email_async(), but this list operation allows for a range of
|
||||
* emails to be specified by their UID rather than position (message number). If low is null
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class Geary.Imap.Folder : Geary.AbstractFolder, Geary.RemoteFolder, Geary.Imap.FolderExtensions {
|
||||
private class Geary.Imap.Folder : Geary.AbstractFolder, Geary.RemoteFolder, Geary.Imap.FolderExtensions {
|
||||
public const bool CASE_SENSITIVE = true;
|
||||
|
||||
private ClientSessionManager session_mgr;
|
||||
|
|
@ -31,10 +31,6 @@ public class Geary.Imap.Folder : Geary.AbstractFolder, Geary.RemoteFolder, Geary
|
|||
return path;
|
||||
}
|
||||
|
||||
public Trillian is_readonly() {
|
||||
return readonly;
|
||||
}
|
||||
|
||||
public override Geary.FolderProperties? get_properties() {
|
||||
return properties;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public interface Geary.LocalAccount : Object, Geary.Account {
|
||||
private interface Geary.LocalAccount : Object, Geary.Account {
|
||||
public abstract async void clone_folder_async(Geary.Folder folder, Cancellable? cancellable = null)
|
||||
throws Error;
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ public interface Geary.LocalAccount : Object, Geary.Account {
|
|||
out int count, Cancellable? cancellable = null) throws Error;
|
||||
}
|
||||
|
||||
public interface Geary.LocalFolder : Object, Geary.Folder {
|
||||
private interface Geary.LocalFolder : Object, Geary.Folder {
|
||||
public async abstract bool is_email_present_async(Geary.EmailIdentifier id,
|
||||
out Geary.Email.Field available_fields, Cancellable? cancellable = null) throws Error;
|
||||
|
||||
|
|
@ -4,10 +4,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public interface Geary.RemoteAccount : Object, Geary.Account {
|
||||
public abstract async string? get_folder_delimiter_async(string toplevel,
|
||||
Cancellable? cancellable = null) throws Error;
|
||||
|
||||
private interface Geary.RemoteAccount : Object, Geary.Account {
|
||||
/**
|
||||
* Delivers a formatted message with this Account being the sender of record.
|
||||
*
|
||||
|
|
@ -18,6 +15,6 @@ public interface Geary.RemoteAccount : Object, Geary.Account {
|
|||
throws Error;
|
||||
}
|
||||
|
||||
public interface Geary.RemoteFolder : Object, Geary.Folder {
|
||||
private interface Geary.RemoteFolder : Object, Geary.Folder {
|
||||
}
|
||||
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
public class Geary.Sqlite.Account : Geary.AbstractAccount, Geary.LocalAccount {
|
||||
private class Geary.Sqlite.Account : Geary.AbstractAccount, Geary.LocalAccount {
|
||||
private class FolderReference : Geary.SmartReference {
|
||||
public Geary.FolderPath path;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
// TODO: This class currently deals with generic email storage as well as IMAP-specific issues; in
|
||||
// the future, to support other email services, will need to break this up.
|
||||
|
||||
public class Geary.Sqlite.Folder : Geary.AbstractFolder, Geary.LocalFolder, Geary.Imap.FolderExtensions,
|
||||
private class Geary.Sqlite.Folder : Geary.AbstractFolder, Geary.LocalFolder, Geary.Imap.FolderExtensions,
|
||||
Geary.ReferenceSemantics {
|
||||
protected int manual_ref_count { get; protected set; }
|
||||
|
||||
|
|
|
|||
21
src/wscript
21
src/wscript
|
|
@ -14,8 +14,6 @@ def build(bld):
|
|||
bld.common_packages = ['glib-2.0', 'posix' ]
|
||||
|
||||
bld.engine_src = [
|
||||
'../engine/api/geary-abstract-account.vala',
|
||||
'../engine/api/geary-abstract-folder.vala',
|
||||
'../engine/api/geary-account.vala',
|
||||
'../engine/api/geary-composed-email.vala',
|
||||
'../engine/api/geary-credentials.vala',
|
||||
|
|
@ -24,20 +22,12 @@ def build(bld):
|
|||
'../engine/api/geary-email-properties.vala',
|
||||
'../engine/api/geary-email.vala',
|
||||
'../engine/api/geary-endpoint.vala',
|
||||
'../engine/api/geary-engine-account.vala',
|
||||
'../engine/api/geary-engine-error.vala',
|
||||
'../engine/api/geary-engine-folder.vala',
|
||||
'../engine/api/geary-engine.vala',
|
||||
'../engine/api/geary-folder-path.vala',
|
||||
'../engine/api/geary-folder-properties.vala',
|
||||
'../engine/api/geary-folder.vala',
|
||||
'../engine/api/geary-generic-imap-account.vala',
|
||||
'../engine/api/geary-generic-imap-folder.vala',
|
||||
'../engine/api/geary-gmail-account.vala',
|
||||
'../engine/api/geary-local-interfaces.vala',
|
||||
'../engine/api/geary-personality.vala',
|
||||
'../engine/api/geary-remote-interfaces.vala',
|
||||
'../engine/api/geary-replay-queue.vala',
|
||||
'../engine/api/geary-special-folder.vala',
|
||||
|
||||
'../engine/common/common-message-data.vala',
|
||||
|
|
@ -84,6 +74,17 @@ def build(bld):
|
|||
'../engine/imap/transport/imap-serializable.vala',
|
||||
'../engine/imap/transport/imap-serializer.vala',
|
||||
|
||||
'../engine/impl/geary-abstract-account.vala',
|
||||
'../engine/impl/geary-abstract-folder.vala',
|
||||
'../engine/impl/geary-engine-account.vala',
|
||||
'../engine/impl/geary-engine-folder.vala',
|
||||
'../engine/impl/geary-generic-imap-account.vala',
|
||||
'../engine/impl/geary-generic-imap-folder.vala',
|
||||
'../engine/impl/geary-gmail-account.vala',
|
||||
'../engine/impl/geary-local-interfaces.vala',
|
||||
'../engine/impl/geary-remote-interfaces.vala',
|
||||
'../engine/impl/geary-replay-queue.vala',
|
||||
|
||||
'../engine/nonblocking/nonblocking-mailbox.vala',
|
||||
'../engine/nonblocking/nonblocking-mutex.vala',
|
||||
'../engine/nonblocking/nonblocking-abstract-semaphore.vala',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue