aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/async
diff options
context:
space:
mode:
authorGravatar CodaFi <devteam.codafi@gmail.com>2014-08-13 19:11:10 -0600
committerGravatar CodaFi <devteam.codafi@gmail.com>2014-08-13 19:11:10 -0600
commit5f82321bf14e8836da9d9a9f9caf9f12d021eef8 (patch)
tree10dad00a41cdb224bde372697827ac746dbf66a4 /src/async
parent9fdbf0688e3c8bc9ad94ff8b475ce534749f418d (diff)
cpp -> cc
Diffstat (limited to 'src/async')
-rw-r--r--src/async/nntp/MCAsyncNNTP.h4
-rw-r--r--src/async/nntp/MCNNTPAsyncSession.cc (renamed from src/async/nntp/MCNNTPAsyncSession.cpp)21
-rw-r--r--src/async/nntp/MCNNTPAsyncSession.h14
-rw-r--r--src/async/nntp/MCNNTPCheckAccountOperation.cc (renamed from src/async/nntp/MCNNTPCheckAccountOperation.cpp)0
-rw-r--r--src/async/nntp/MCNNTPDisconnectOperation.cc (renamed from src/async/nntp/MCNNTPDisconnectOperation.cpp)0
-rw-r--r--src/async/nntp/MCNNTPFetchArticleOperation.cc (renamed from src/async/nntp/MCNNTPFetchMessageOperation.cpp)20
-rw-r--r--src/async/nntp/MCNNTPFetchArticleOperation.h (renamed from src/async/nntp/MCNNTPFetchMessageOperation.h)8
-rw-r--r--src/async/nntp/MCNNTPFetchArticlesOperation.cc (renamed from src/async/nntp/MCNNTPFetchMessagesOperation.cpp)16
-rw-r--r--src/async/nntp/MCNNTPFetchArticlesOperation.h (renamed from src/async/nntp/MCNNTPFetchMessagesOperation.h)8
-rw-r--r--src/async/nntp/MCNNTPFetchHeaderOperation.cc (renamed from src/async/nntp/MCNNTPFetchHeaderOperation.cpp)10
-rw-r--r--src/async/nntp/MCNNTPFetchHeaderOperation.h4
-rw-r--r--src/async/nntp/MCNNTPListNewsgroupsOperation.cc (renamed from src/async/nntp/MCNNTPListNewsgroupsOperation.cpp)0
-rw-r--r--src/async/nntp/MCNNTPOperation.cc (renamed from src/async/nntp/MCNNTPOperation.cpp)0
13 files changed, 59 insertions, 46 deletions
diff --git a/src/async/nntp/MCAsyncNNTP.h b/src/async/nntp/MCAsyncNNTP.h
index e96788ca..56509ff8 100644
--- a/src/async/nntp/MCAsyncNNTP.h
+++ b/src/async/nntp/MCAsyncNNTP.h
@@ -13,8 +13,8 @@
#include <MailCore/MCNNTPAsyncSession.h>
#include <MailCore/MCNNTPOperation.h>
#include <MailCore/MCNNTPFetchHeaderOperation.h>
-#include <MailCore/MCNNTPFetchMessageOperation.h>
-#include <MailCore/MCNNTPFetchMessagesOperation.h>
+#include <MailCore/MCNNTPFetchArticleOperation.h>
+#include <MailCore/MCNNTPFetchArticlesOperation.h>
#include <MailCore/MCNNTPListNewsgroupsOperation.h>
#include <MailCore/MCNNTPOperationCallback.h>
diff --git a/src/async/nntp/MCNNTPAsyncSession.cpp b/src/async/nntp/MCNNTPAsyncSession.cc
index ba3b630b..84b5f318 100644
--- a/src/async/nntp/MCNNTPAsyncSession.cpp
+++ b/src/async/nntp/MCNNTPAsyncSession.cc
@@ -10,8 +10,8 @@
#include "MCNNTP.h"
#include "MCNNTPFetchHeaderOperation.h"
-#include "MCNNTPFetchMessageOperation.h"
-#include "MCNNTPFetchMessagesOperation.h"
+#include "MCNNTPFetchArticleOperation.h"
+#include "MCNNTPFetchArticlesOperation.h"
#include "MCNNTPListNewsgroupsOperation.h"
#include "MCNNTPCheckAccountOperation.h"
#include "MCNNTPDisconnectOperation.h"
@@ -153,32 +153,33 @@ bool NNTPAsyncSession::isCheckCertificateEnabled()
return mSession->isCheckCertificateEnabled();
}
-NNTPFetchMessagesOperation * NNTPAsyncSession::fetchMessagesOperation(String * group)
+MCNNTPFetchArticlesOperation * NNTPAsyncSession::fetchArticlesOperation(String * group)
{
- NNTPFetchMessagesOperation * op = new NNTPFetchMessagesOperation();
+ MCNNTPFetchArticlesOperation * op = new MCNNTPFetchArticlesOperation();
op->setSession(this);
op->setGroupName(group);
op->autorelease();
return op;
}
-NNTPFetchHeaderOperation * NNTPAsyncSession::fetchHeaderOperation(unsigned int index)
+NNTPFetchHeaderOperation * NNTPAsyncSession::fetchHeaderOperation(String * groupName, unsigned int index)
{
NNTPFetchHeaderOperation * op = new NNTPFetchHeaderOperation();
op->setSession(this);
+ op->setGroupName(groupName);
op->setMessageIndex(index);
op->autorelease();
return op;
}
-NNTPFetchHeaderOperation * NNTPAsyncSession::fetchHeaderOperation(NNTPMessageInfo * msg)
+NNTPFetchHeaderOperation * NNTPAsyncSession::fetchHeaderOperation(String * groupName, NNTPMessageInfo * msg)
{
- return fetchHeaderOperation(msg->index());
+ return fetchHeaderOperation(groupName, msg->index());
}
-NNTPFetchMessageOperation * NNTPAsyncSession::fetchArticleOperation(String * groupName, unsigned int index)
+NNTPFetchArticleOperation * NNTPAsyncSession::fetchArticleOperation(String * groupName, unsigned int index)
{
- NNTPFetchMessageOperation * op = new NNTPFetchMessageOperation();
+ NNTPFetchArticleOperation * op = new NNTPFetchArticleOperation();
op->setSession(this);
op->setGroupName(groupName);
op->setMessageIndex(index);
@@ -186,7 +187,7 @@ NNTPFetchMessageOperation * NNTPAsyncSession::fetchArticleOperation(String * gro
return op;
}
-NNTPFetchMessageOperation * NNTPAsyncSession::fetchArticleOperation(String *groupName, NNTPMessageInfo * msg)
+NNTPFetchArticleOperation * NNTPAsyncSession::fetchArticleOperation(String *groupName, NNTPMessageInfo * msg)
{
return fetchArticleOperation(groupName, msg->index());
}
diff --git a/src/async/nntp/MCNNTPAsyncSession.h b/src/async/nntp/MCNNTPAsyncSession.h
index 9c214b93..501985bc 100644
--- a/src/async/nntp/MCNNTPAsyncSession.h
+++ b/src/async/nntp/MCNNTPAsyncSession.h
@@ -12,8 +12,8 @@ namespace mailcore {
class NNTPMessageInfo;
class NNTPSession;
class NNTPFetchHeaderOperation;
- class NNTPFetchMessageOperation;
- class NNTPFetchMessagesOperation;
+ class NNTPFetchArticleOperation;
+ class MCNNTPFetchArticlesOperation;
class NNTPListNewsgroupsOperation;
class NNTPOperationQueueCallback;
class NNTPConnectionLogger;
@@ -52,13 +52,13 @@ namespace mailcore {
virtual dispatch_queue_t dispatchQueue();
#endif
- virtual NNTPFetchMessagesOperation * fetchMessagesOperation(String * group);
+ virtual MCNNTPFetchArticlesOperation * fetchArticlesOperation(String * group);
- virtual NNTPFetchHeaderOperation * fetchHeaderOperation(unsigned int index);
- virtual NNTPFetchHeaderOperation * fetchHeaderOperation(NNTPMessageInfo * msg);
+ virtual NNTPFetchHeaderOperation * fetchHeaderOperation(String * groupName, unsigned int index);
+ virtual NNTPFetchHeaderOperation * fetchHeaderOperation(String * groupName, NNTPMessageInfo * msg);
- virtual NNTPFetchMessageOperation * fetchArticleOperation(String *groupName, unsigned int index);
- virtual NNTPFetchMessageOperation * fetchArticleOperation(String *groupName, NNTPMessageInfo * msg);
+ virtual NNTPFetchArticleOperation * fetchArticleOperation(String *groupName, unsigned int index);
+ virtual NNTPFetchArticleOperation * fetchArticleOperation(String *groupName, NNTPMessageInfo * msg);
virtual NNTPListNewsgroupsOperation * listAllNewsgroupsOperation();
virtual NNTPListNewsgroupsOperation * listSubscribedNewsgroupsOperation();
diff --git a/src/async/nntp/MCNNTPCheckAccountOperation.cpp b/src/async/nntp/MCNNTPCheckAccountOperation.cc
index 29b050f0..29b050f0 100644
--- a/src/async/nntp/MCNNTPCheckAccountOperation.cpp
+++ b/src/async/nntp/MCNNTPCheckAccountOperation.cc
diff --git a/src/async/nntp/MCNNTPDisconnectOperation.cpp b/src/async/nntp/MCNNTPDisconnectOperation.cc
index d269904a..d269904a 100644
--- a/src/async/nntp/MCNNTPDisconnectOperation.cpp
+++ b/src/async/nntp/MCNNTPDisconnectOperation.cc
diff --git a/src/async/nntp/MCNNTPFetchMessageOperation.cpp b/src/async/nntp/MCNNTPFetchArticleOperation.cc
index 2fe02f37..a12f346f 100644
--- a/src/async/nntp/MCNNTPFetchMessageOperation.cpp
+++ b/src/async/nntp/MCNNTPFetchArticleOperation.cc
@@ -1,53 +1,53 @@
//
-// MCNNTPFetchMessagesOperation.cpp
+// MCMCNNTPFetchArticlesOperation.cpp
// mailcore2
//
// Created by Robert Widmann on 8/13/14.
// Copyright (c) 2014 MailCore. All rights reserved.
//
-#include "MCNNTPFetchMessageOperation.h"
+#include "MCNNTPFetchArticleOperation.h"
#include "MCNNTPAsyncSession.h"
#include "MCNNTPSession.h"
using namespace mailcore;
-NNTPFetchMessageOperation::NNTPFetchMessageOperation()
+NNTPFetchArticleOperation::NNTPFetchArticleOperation()
{
mMessageIndex = 0;
mData = NULL;
}
-NNTPFetchMessageOperation::~NNTPFetchMessageOperation()
+NNTPFetchArticleOperation::~NNTPFetchArticleOperation()
{
MC_SAFE_RELEASE(mData);
}
-void NNTPFetchMessageOperation::setGroupName(String * groupName) {
+void NNTPFetchArticleOperation::setGroupName(String * groupName) {
MC_SAFE_REPLACE_COPY(String, mGroupName, groupName);
}
-String * NNTPFetchMessageOperation::groupName() {
+String * NNTPFetchArticleOperation::groupName() {
return mGroupName;
}
-void NNTPFetchMessageOperation::setMessageIndex(unsigned int messageIndex)
+void NNTPFetchArticleOperation::setMessageIndex(unsigned int messageIndex)
{
mMessageIndex = messageIndex;
}
-unsigned int NNTPFetchMessageOperation::messageIndex()
+unsigned int NNTPFetchArticleOperation::messageIndex()
{
return mMessageIndex;
}
-Data * NNTPFetchMessageOperation::data()
+Data * NNTPFetchArticleOperation::data()
{
return mData;
}
-void NNTPFetchMessageOperation::main()
+void NNTPFetchArticleOperation::main()
{
ErrorCode error;
mData = session()->session()->fetchArticle(mGroupName, mMessageIndex, this, &error);
diff --git a/src/async/nntp/MCNNTPFetchMessageOperation.h b/src/async/nntp/MCNNTPFetchArticleOperation.h
index d038a62f..f43799a9 100644
--- a/src/async/nntp/MCNNTPFetchMessageOperation.h
+++ b/src/async/nntp/MCNNTPFetchArticleOperation.h
@@ -1,5 +1,5 @@
//
-// MCNNTPFetchMessagesOperation.h
+// MCMCNNTPFetchArticlesOperation.h
// mailcore2
//
// Created by Robert Widmann on 8/13/14.
@@ -15,10 +15,10 @@
#ifdef __cplusplus
namespace mailcore {
- class NNTPFetchMessageOperation : public NNTPOperation {
+ class NNTPFetchArticleOperation : public NNTPOperation {
public:
- NNTPFetchMessageOperation();
- virtual ~NNTPFetchMessageOperation();
+ NNTPFetchArticleOperation();
+ virtual ~NNTPFetchArticleOperation();
virtual void setGroupName(String * groupName);
virtual String * groupName();
diff --git a/src/async/nntp/MCNNTPFetchMessagesOperation.cpp b/src/async/nntp/MCNNTPFetchArticlesOperation.cc
index 0e0fc239..41e3281f 100644
--- a/src/async/nntp/MCNNTPFetchMessagesOperation.cpp
+++ b/src/async/nntp/MCNNTPFetchArticlesOperation.cc
@@ -1,46 +1,46 @@
//
-// MCNNTPFetchMessagesOperation.cpp
+// MCMCNNTPFetchArticlesOperation.cpp
// mailcore2
//
// Created by Robert Widmann on 8/13/14.
// Copyright (c) 2014 MailCore. All rights reserved.
//
-#include "MCNNTPFetchMessagesOperation.h"
+#include "MCNNTPFetchArticlesOperation.h"
#include "MCNNTPAsyncSession.h"
#include "MCNNTPSession.h"
using namespace mailcore;
-NNTPFetchMessagesOperation::NNTPFetchMessagesOperation()
+MCNNTPFetchArticlesOperation::MCNNTPFetchArticlesOperation()
{
mGroupName = NULL;
mMessages = NULL;
}
-NNTPFetchMessagesOperation::~NNTPFetchMessagesOperation()
+MCNNTPFetchArticlesOperation::~MCNNTPFetchArticlesOperation()
{
MC_SAFE_RELEASE(mGroupName);
MC_SAFE_RELEASE(mMessages);
}
-void NNTPFetchMessagesOperation::setGroupName(String * groupname)
+void MCNNTPFetchArticlesOperation::setGroupName(String * groupname)
{
MC_SAFE_REPLACE_COPY(String, mGroupName, groupname);
}
-String * NNTPFetchMessagesOperation::groupName()
+String * MCNNTPFetchArticlesOperation::groupName()
{
return mGroupName;
}
-Array * NNTPFetchMessagesOperation::messages()
+Array * MCNNTPFetchArticlesOperation::messages()
{
return mMessages;
}
-void NNTPFetchMessagesOperation::main()
+void MCNNTPFetchArticlesOperation::main()
{
ErrorCode error;
mMessages = session()->session()->fetchArticles(mGroupName, &error);
diff --git a/src/async/nntp/MCNNTPFetchMessagesOperation.h b/src/async/nntp/MCNNTPFetchArticlesOperation.h
index 91390c1f..9fe6fd1b 100644
--- a/src/async/nntp/MCNNTPFetchMessagesOperation.h
+++ b/src/async/nntp/MCNNTPFetchArticlesOperation.h
@@ -1,5 +1,5 @@
//
-// MCNNTPFetchMessagesOperation.h
+// MCMCNNTPFetchArticlesOperation.h
// mailcore2
//
// Created by Robert Widmann on 8/13/14.
@@ -16,10 +16,10 @@
namespace mailcore {
- class NNTPFetchMessagesOperation : public NNTPOperation {
+ class MCNNTPFetchArticlesOperation : public NNTPOperation {
public:
- NNTPFetchMessagesOperation();
- virtual ~NNTPFetchMessagesOperation();
+ MCNNTPFetchArticlesOperation();
+ virtual ~MCNNTPFetchArticlesOperation();
virtual void setGroupName(String * groupName);
virtual String * groupName();
diff --git a/src/async/nntp/MCNNTPFetchHeaderOperation.cpp b/src/async/nntp/MCNNTPFetchHeaderOperation.cc
index ea374527..386dc142 100644
--- a/src/async/nntp/MCNNTPFetchHeaderOperation.cpp
+++ b/src/async/nntp/MCNNTPFetchHeaderOperation.cc
@@ -25,6 +25,14 @@ NNTPFetchHeaderOperation::~NNTPFetchHeaderOperation()
MC_SAFE_RELEASE(mHeader);
}
+void NNTPFetchHeaderOperation::setGroupName(String * groupName) {
+ MC_SAFE_REPLACE_COPY(String, mGroupName, groupName);
+}
+
+String * NNTPFetchHeaderOperation::groupName() {
+ return mGroupName;
+}
+
void NNTPFetchHeaderOperation::setMessageIndex(unsigned int messageIndex)
{
mMessageIndex = messageIndex;
@@ -43,7 +51,7 @@ MessageHeader * NNTPFetchHeaderOperation::header()
void NNTPFetchHeaderOperation::main()
{
ErrorCode error;
- mHeader = session()->session()->fetchHeader(mMessageIndex, &error);
+ mHeader = session()->session()->fetchHeader(mGroupName, mMessageIndex, &error);
if (mHeader != NULL) {
mHeader->retain();
}
diff --git a/src/async/nntp/MCNNTPFetchHeaderOperation.h b/src/async/nntp/MCNNTPFetchHeaderOperation.h
index 91ded8ee..97b12b05 100644
--- a/src/async/nntp/MCNNTPFetchHeaderOperation.h
+++ b/src/async/nntp/MCNNTPFetchHeaderOperation.h
@@ -23,6 +23,9 @@ namespace mailcore {
NNTPFetchHeaderOperation();
virtual ~NNTPFetchHeaderOperation();
+ virtual void setGroupName(String * groupName);
+ virtual String * groupName();
+
virtual void setMessageIndex(unsigned int messageIndex);
virtual unsigned int messageIndex();
@@ -32,6 +35,7 @@ namespace mailcore {
virtual void main();
private:
+ String * mGroupName;
unsigned int mMessageIndex;
MessageHeader * mHeader;
diff --git a/src/async/nntp/MCNNTPListNewsgroupsOperation.cpp b/src/async/nntp/MCNNTPListNewsgroupsOperation.cc
index 253b38d0..253b38d0 100644
--- a/src/async/nntp/MCNNTPListNewsgroupsOperation.cpp
+++ b/src/async/nntp/MCNNTPListNewsgroupsOperation.cc
diff --git a/src/async/nntp/MCNNTPOperation.cpp b/src/async/nntp/MCNNTPOperation.cc
index 3368ba0e..3368ba0e 100644
--- a/src/async/nntp/MCNNTPOperation.cpp
+++ b/src/async/nntp/MCNNTPOperation.cc