diff options
Diffstat (limited to 'src/async/nntp/MCNNTPFetchServerTimeOperation.cpp')
-rw-r--r-- | src/async/nntp/MCNNTPFetchServerTimeOperation.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/async/nntp/MCNNTPFetchServerTimeOperation.cpp b/src/async/nntp/MCNNTPFetchServerTimeOperation.cpp new file mode 100644 index 00000000..86800733 --- /dev/null +++ b/src/async/nntp/MCNNTPFetchServerTimeOperation.cpp @@ -0,0 +1,34 @@ +// +// MCNNTPFetchServerTimeOperation.cpp +// mailcore2 +// +// Created by Robert Widmann on 10/21/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#include "MCNNTPFetchServerTimeOperation.h" + +#include "MCNNTPAsyncSession.h" +#include "MCNNTPSession.h" + +using namespace mailcore; + +NNTPFetchServerTimeOperation::NNTPFetchServerTimeOperation() +{ +} + +NNTPFetchServerTimeOperation::~NNTPFetchServerTimeOperation() +{ +} + +time_t NNTPFetchServerTimeOperation::time() +{ + return mTime; +} + +void NNTPFetchServerTimeOperation::main() +{ + ErrorCode error; + mTime = session()->session()->fetchServerDate(&error); + setError(error); +} |