From 5f82321bf14e8836da9d9a9f9caf9f12d021eef8 Mon Sep 17 00:00:00 2001 From: CodaFi Date: Wed, 13 Aug 2014 19:11:10 -0600 Subject: cpp -> cc --- src/async/nntp/MCNNTPListNewsgroupsOperation.cc | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/async/nntp/MCNNTPListNewsgroupsOperation.cc (limited to 'src/async/nntp/MCNNTPListNewsgroupsOperation.cc') 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); +} -- cgit v1.2.3