aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/pop
diff options
context:
space:
mode:
authorGravatar CodaFi <devteam.codafi@gmail.com>2013-12-08 13:28:59 -0700
committerGravatar CodaFi <devteam.codafi@gmail.com>2013-12-08 13:28:59 -0700
commit87f3cb5765f961d7a7fec734dd890ff913b46393 (patch)
treed872306d4ed374c00101d2319fdf31ccf058cbbb /src/core/pop
parentf3eb11eec145a5db4e76bca53b6f6b05566e674e (diff)
Unify Project Style
Diffstat (limited to 'src/core/pop')
-rw-r--r--src/core/pop/MCPOPMessageInfo.cc4
-rw-r--r--src/core/pop/MCPOPMessageInfo.h50
-rw-r--r--src/core/pop/MCPOPProgressCallback.h15
-rw-r--r--src/core/pop/MCPOPSession.cc50
-rw-r--r--src/core/pop/MCPOPSession.h3
5 files changed, 61 insertions, 61 deletions
diff --git a/src/core/pop/MCPOPMessageInfo.cc b/src/core/pop/MCPOPMessageInfo.cc
index a1b1dcfe..418d159d 100644
--- a/src/core/pop/MCPOPMessageInfo.cc
+++ b/src/core/pop/MCPOPMessageInfo.cc
@@ -4,8 +4,8 @@ using namespace mailcore;
void POPMessageInfo::init()
{
- mIndex = 0;
- mSize = 0;
+ mIndex = 0;
+ mSize = 0;
mUid = NULL;
}
diff --git a/src/core/pop/MCPOPMessageInfo.h b/src/core/pop/MCPOPMessageInfo.h
index f7bb9f18..55ac149f 100644
--- a/src/core/pop/MCPOPMessageInfo.h
+++ b/src/core/pop/MCPOPMessageInfo.h
@@ -7,34 +7,34 @@
#ifdef __cplusplus
namespace mailcore {
-
- class POPMessageInfo : public Object {
- public:
- POPMessageInfo();
- virtual ~POPMessageInfo();
-
- virtual void setIndex(unsigned int index);
- virtual unsigned int index();
-
- virtual void setSize(unsigned int size);
- virtual unsigned int size();
-
- virtual void setUid(String * uid);
- virtual String * uid();
+
+ class POPMessageInfo : public Object {
+ public:
+ POPMessageInfo();
+ virtual ~POPMessageInfo();
+
+ virtual void setIndex(unsigned int index);
+ virtual unsigned int index();
+
+ virtual void setSize(unsigned int size);
+ virtual unsigned int size();
+
+ virtual void setUid(String * uid);
+ virtual String * uid();
public: // subclass behavior
- POPMessageInfo(POPMessageInfo * other);
- virtual String * description();
- virtual Object * copy();
+ POPMessageInfo(POPMessageInfo * other);
+ virtual String * description();
+ virtual Object * copy();
- private:
- unsigned int mIndex;
- unsigned int mSize;
- String * mUid;
-
- void init();
- };
-
+ private:
+ unsigned int mIndex;
+ unsigned int mSize;
+ String * mUid;
+
+ void init();
+ };
+
}
#endif
diff --git a/src/core/pop/MCPOPProgressCallback.h b/src/core/pop/MCPOPProgressCallback.h
index 5a46b38e..6cc205d9 100644
--- a/src/core/pop/MCPOPProgressCallback.h
+++ b/src/core/pop/MCPOPProgressCallback.h
@@ -5,13 +5,14 @@
#ifdef __cplusplus
namespace mailcore {
-
- class POPSession;
-
- class POPProgressCallback {
- public:
- virtual void bodyProgress(POPSession * session, unsigned int current, unsigned int maximum) {};
- };
+
+ class POPSession;
+
+ class POPProgressCallback {
+ public:
+ virtual void bodyProgress(POPSession * session, unsigned int current, unsigned int maximum) {};
+ };
+
}
#endif
diff --git a/src/core/pop/MCPOPSession.cc b/src/core/pop/MCPOPSession.cc
index b73d4148..12b0b032 100644
--- a/src/core/pop/MCPOPSession.cc
+++ b/src/core/pop/MCPOPSession.cc
@@ -20,15 +20,15 @@ enum {
void POPSession::init()
{
- mHostname = NULL;
- mPort = 0;
- mUsername = NULL;
- mPassword = NULL;
- mAuthType = AuthTypeSASLNone;
- mConnectionType = ConnectionTypeClear;
+ mHostname = NULL;
+ mPort = 0;
+ mUsername = NULL;
+ mPassword = NULL;
+ mAuthType = AuthTypeSASLNone;
+ mConnectionType = ConnectionTypeClear;
mCheckCertificateEnabled = true;
mTimeout = 30;
-
+
mPop = NULL;
mCapabilities = POPCapabilityNone;
mProgressCallback = NULL;
@@ -171,21 +171,21 @@ static void logger(mailpop3 * pop3, int log_type, const char * buffer, size_t si
void POPSession::setup()
{
- mPop = mailpop3_new(0, NULL);
+ mPop = mailpop3_new(0, NULL);
mailpop3_set_progress_callback(mPop, POPSession::body_progress, this);
mailpop3_set_logger(mPop, logger, this);
}
void POPSession::unsetup()
{
- if (mPop != NULL) {
+ if (mPop != NULL) {
if (mPop->pop3_stream != NULL) {
mailstream_close(mPop->pop3_stream);
mPop->pop3_stream = NULL;
}
- mailpop3_free(mPop);
- mPop = NULL;
- }
+ mailpop3_free(mPop);
+ mPop = NULL;
+ }
}
void POPSession::connectIfNeeded(ErrorCode * pError)
@@ -316,10 +316,10 @@ void POPSession::login(ErrorCode * pError)
* pError = ErrorAuthentication;
return;
}
-
+
r = mailpop3_pass(mPop, utf8password);
break;
-
+
case AuthTypeSASLCRAMMD5:
r = mailpop3_auth(mPop, "CRAM-MD5",
MCUTF8(hostname()),
@@ -328,7 +328,7 @@ void POPSession::login(ErrorCode * pError)
utf8username, utf8username,
utf8password, NULL);
break;
-
+
case AuthTypeSASLPlain:
r = mailpop3_auth(mPop, "PLAIN",
MCUTF8(hostname()),
@@ -337,7 +337,7 @@ void POPSession::login(ErrorCode * pError)
utf8username, utf8username,
utf8password, NULL);
break;
-
+
case AuthTypeSASLGSSAPI:
// needs to be tested
r = mailpop3_auth(mPop, "GSSAPI",
@@ -347,7 +347,7 @@ void POPSession::login(ErrorCode * pError)
utf8username, utf8username,
utf8password, NULL /* realm */);
break;
-
+
case AuthTypeSASLDIGESTMD5:
r = mailpop3_auth(mPop, "DIGEST-MD5",
MCUTF8(hostname()),
@@ -356,7 +356,7 @@ void POPSession::login(ErrorCode * pError)
utf8username, utf8username,
utf8password, NULL);
break;
-
+
case AuthTypeSASLLogin:
r = mailpop3_auth(mPop, "LOGIN",
MCUTF8(hostname()),
@@ -365,7 +365,7 @@ void POPSession::login(ErrorCode * pError)
utf8username, utf8username,
utf8password, NULL);
break;
-
+
case AuthTypeSASLSRP:
r = mailpop3_auth(mPop, "SRP",
MCUTF8(hostname()),
@@ -374,7 +374,7 @@ void POPSession::login(ErrorCode * pError)
utf8username, utf8username,
utf8password, NULL);
break;
-
+
case AuthTypeSASLNTLM:
r = mailpop3_auth(mPop, "NTLM",
MCUTF8(hostname()),
@@ -383,7 +383,7 @@ void POPSession::login(ErrorCode * pError)
utf8username, utf8username,
utf8password, NULL /* realm */);
break;
-
+
case AuthTypeSASLKerberosV4:
r = mailpop3_auth(mPop, "KERBEROS_V4",
MCUTF8(hostname()),
@@ -401,7 +401,7 @@ void POPSession::login(ErrorCode * pError)
* pError = ErrorAuthentication;
return;
}
-
+
mState = STATE_LOGGEDIN;
* pError = ErrorNone;
}
@@ -425,16 +425,16 @@ Array * POPSession::fetchMessages(ErrorCode * pError)
* pError = ErrorFetchMessageList;
return NULL;
}
-
+
Array * result = Array::array();
for(unsigned int i = 0 ; i < carray_count(msg_list) ; i ++) {
struct mailpop3_msg_info * msg_info;
String * uid;
-
+
msg_info = (struct mailpop3_msg_info *) carray_get(msg_list, i);
if (msg_info->msg_uidl == NULL)
continue;
-
+
uid = String::stringWithUTF8Characters(msg_info->msg_uidl);
POPMessageInfo * info = new POPMessageInfo();
diff --git a/src/core/pop/MCPOPSession.h b/src/core/pop/MCPOPSession.h
index 2f16e45b..0b27a1bc 100644
--- a/src/core/pop/MCPOPSession.h
+++ b/src/core/pop/MCPOPSession.h
@@ -12,9 +12,8 @@ namespace mailcore {
class POPMessageInfo;
class POPProgressCallback;
class MessageHeader;
-
+
class POPSession : public Object {
-
public:
POPSession();
virtual ~POPSession();