diff options
author | 2014-08-13 19:11:10 -0600 | |
---|---|---|
committer | 2014-08-13 19:11:10 -0600 | |
commit | 5f82321bf14e8836da9d9a9f9caf9f12d021eef8 (patch) | |
tree | 10dad00a41cdb224bde372697827ac746dbf66a4 /src/async/nntp/MCNNTPListNewsgroupsOperation.cc | |
parent | 9fdbf0688e3c8bc9ad94ff8b475ce534749f418d (diff) |
cpp -> cc
Diffstat (limited to 'src/async/nntp/MCNNTPListNewsgroupsOperation.cc')
-rw-r--r-- | src/async/nntp/MCNNTPListNewsgroupsOperation.cc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/async/nntp/MCNNTPListNewsgroupsOperation.cc b/src/async/nntp/MCNNTPListNewsgroupsOperation.cc new file mode 100644 index 00000000..253b38d0 --- /dev/null +++ b/src/async/nntp/MCNNTPListNewsgroupsOperation.cc @@ -0,0 +1,48 @@ +// +// MCNNTPListNewsgroupsMessagesOperation.cpp +// mailcore2 +// +// Created by Robert Widmann on 8/13/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#include "MCNNTPListNewsgroupsOperation.h" + +#include "MCNNTPAsyncSession.h" +#include "MCNNTPSession.h" + +using namespace mailcore; + +NNTPListNewsgroupsOperation::NNTPListNewsgroupsOperation() +{ +} + +NNTPListNewsgroupsOperation::~NNTPListNewsgroupsOperation() +{ +} + +void NNTPListNewsgroupsOperation::setListsSubscribed(bool listsSubscribed) +{ + mListsSuscribed = listsSubscribed; +} + +bool NNTPListNewsgroupsOperation::listsSubscribed() +{ + return mListsSuscribed; +} + +Array * NNTPListNewsgroupsOperation::groups() { + return mGroups; +} + +void NNTPListNewsgroupsOperation::main() +{ + ErrorCode error; + + if (mListsSuscribed) { + mGroups = session()->session()->listSubscribedNewsgroups(&error); + } else { + mGroups = session()->session()->listAllNewsgroups(&error); + } + setError(error); +} |