Remove unused Geary.Folder::list_local_email_fields_async method

This commit is contained in:
Michael Gratton 2019-12-14 16:42:33 +11:00 committed by Michael James Gratton
parent dda8d9baf1
commit cc0fb9eef2
5 changed files with 0 additions and 72 deletions

View file

@ -662,19 +662,6 @@ public abstract class Geary.Folder : BaseObject, Logging.Source {
Gee.Collection<Geary.EmailIdentifier> ids, Geary.Email.Field required_fields, ListFlags flags,
Cancellable? cancellable = null) throws Error;
/**
* Returns the locally available Geary.Email.Field fields for the specified emails. If a
* list or fetch operation occurs on the emails that specifies a field not returned here,
* the Engine will either have to go out to the remote server to get it, or (if
* ListFlags.LOCAL_ONLY is specified) not return it to the caller.
*
* If the EmailIdentifier is unknown locally, it will not be present in the returned Map.
*
* The Folder must be opened prior to attempting this operation.
*/
public abstract async Gee.Map<Geary.EmailIdentifier, Geary.Email.Field>? list_local_email_fields_async(
Gee.Collection<Geary.EmailIdentifier> ids, Cancellable? cancellable = null) throws Error;
/**
* Returns a single email that fulfills the required_fields flag at the ordered position in
* the folder. If the email_id is invalid for the folder's contents, an EngineError.NOT_FOUND

View file

@ -317,18 +317,6 @@ public class Geary.App.SearchFolder :
);
}
public override async Gee.Map<EmailIdentifier,Email.Field>? list_local_email_fields_async(
Gee.Collection<EmailIdentifier> list,
GLib.Cancellable? cancellable = null)
throws GLib.Error {
check_ids(list);
// TODO: This method is not currently called, but is required
// by the interface. Before completing this feature, it
// should either be implemented either here or in
// AbstractLocalFolder.
error("Search folder does not implement list_local_email_fields_async");
}
public override async Email fetch_email_async(EmailIdentifier fetch,
Email.Field required_fields,
Folder.ListFlags flags,

View file

@ -1226,15 +1226,6 @@ private class Geary.ImapEngine.MinimalFolder : Geary.Folder, Geary.FolderSupport
return !op.accumulator.is_empty ? op.accumulator : null;
}
public override async Gee.Map<Geary.EmailIdentifier, Geary.Email.Field>? list_local_email_fields_async(
Gee.Collection<Geary.EmailIdentifier> ids, Cancellable? cancellable = null) throws Error {
check_open("list_local_email_fields_async");
check_ids("list_local_email_fields_async", ids);
return yield local_folder.list_email_fields_by_id_async(
(Gee.Collection<Geary.ImapDB.EmailIdentifier>) ids, ImapDB.Folder.ListFlags.NONE, cancellable);
}
public override async Geary.Email fetch_email_async(Geary.EmailIdentifier id,
Geary.Email.Field required_fields, Geary.Folder.ListFlags flags, Cancellable? cancellable = null)
throws Error {

View file

@ -325,37 +325,6 @@ public class Geary.Outbox.Folder :
return (list.size > 0) ? list : null;
}
public override async Gee.Map<Geary.EmailIdentifier, Geary.Email.Field>?
list_local_email_fields_async(Gee.Collection<Geary.EmailIdentifier> ids,
GLib.Cancellable? cancellable = null)
throws GLib.Error {
check_open();
Gee.Map<Geary.EmailIdentifier, Geary.Email.Field> map = new Gee.HashMap<
Geary.EmailIdentifier, Geary.Email.Field>();
yield db.exec_transaction_async(Db.TransactionType.RO, (cx) => {
Db.Statement stmt = cx.prepare(
"SELECT id FROM SmtpOutboxTable WHERE ordering=?");
foreach (Geary.EmailIdentifier id in ids) {
EmailIdentifier? outbox_id = id as EmailIdentifier;
if (outbox_id == null)
throw new EngineError.BAD_PARAMETERS("%s is not outbox EmailIdentifier", id.to_string());
stmt.reset(Db.ResetScope.CLEAR_BINDINGS);
stmt.bind_int64(0, outbox_id.ordering);
// merely checking for presence, all emails in outbox have same fields
Db.Result results = stmt.exec(cancellable);
if (!results.finished)
map.set(outbox_id, Geary.Email.Field.ALL);
}
return Db.TransactionOutcome.DONE;
}, cancellable);
return (map.size > 0) ? map : null;
}
public override async Email
fetch_email_async(Geary.EmailIdentifier id,
Geary.Email.Field required_fields,

View file

@ -110,13 +110,6 @@ public class Geary.MockFolder : Folder, MockObject {
);
}
public override async Gee.Map<Geary.EmailIdentifier, Geary.Email.Field>?
list_local_email_fields_async(Gee.Collection<Geary.EmailIdentifier> ids,
Cancellable? cancellable = null)
throws Error {
throw new EngineError.UNSUPPORTED("Mock method");
}
public override async Geary.Email
fetch_email_async(Geary.EmailIdentifier email_id,
Geary.Email.Field required_fields,