Update Geary.Imap.Command API
Make the class abstract, since it only gets used by subclases. Allow a null cancellable when waiting for the command to complete.
This commit is contained in:
parent
cc5efc5f98
commit
7e77133bda
2 changed files with 13 additions and 5 deletions
|
|
@ -8,6 +8,14 @@
|
|||
class Geary.Imap.ClientConnectionTest : TestCase {
|
||||
|
||||
|
||||
private class TestCommand : Command {
|
||||
|
||||
public TestCommand() {
|
||||
base("TEST");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private TestServer? server = null;
|
||||
|
||||
|
||||
|
|
@ -88,7 +96,7 @@ class Geary.Imap.ClientConnectionTest : TestCase {
|
|||
|
||||
assert_true(test_article.is_in_idle(), "Post idle command timeout");
|
||||
|
||||
var command = new Command("TEST");
|
||||
var command = new TestCommand();
|
||||
test_article.send_command(command);
|
||||
command.wait_until_complete.begin(null, this.async_complete_full);
|
||||
command.wait_until_complete.end(async_result());
|
||||
|
|
@ -121,7 +129,7 @@ class Geary.Imap.ClientConnectionTest : TestCase {
|
|||
test_article.connect_async.begin(null, this.async_complete_full);
|
||||
test_article.connect_async.end(async_result());
|
||||
|
||||
var command = new Command("TEST");
|
||||
var command = new TestCommand();
|
||||
command.response_timed_out.connect(() => { timed_out = true; });
|
||||
|
||||
test_article.send_command(command);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue