Geary.Account: Support creating folders in the personal name space

Add `create_personal_folder` method, implement it in
ImapEngine.GenericAccount. Use this when creating required special
folders to reduce code duplication.
This commit is contained in:
Michael Gratton 2020-04-22 19:05:47 +10:00 committed by Michael James Gratton
parent e0dc785240
commit 48ed8d9fe3
3 changed files with 67 additions and 40 deletions

View file

@ -107,6 +107,18 @@ public class Geary.MockAccount : Account, MockObject {
}
}
public override async Folder create_personal_folder(
string name,
Folder.SpecialUse use = NONE,
GLib.Cancellable? cancellable = null
) throws GLib.Error {
return object_call<Folder>(
"create_personal_folder",
{ box_arg(name), box_arg(use), cancellable },
new MockFolder(null, null, null, use, null)
);
}
public override EmailIdentifier to_email_identifier(GLib.Variant serialised)
throws EngineError.BAD_PARAMETERS {
try {