diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-11-19 00:48:34 -0800 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-11-19 00:48:34 -0800 |
commit | e3c45123799d84b0ff85035db606cc36b8379427 (patch) | |
tree | 17b16bd16f57d097eae1458e8fa10943fb75e54c /src/core/nntp/MCNNTPGroupInfo.cpp | |
parent | b030d6139ba3f0eb39818ce6f9852e48db079feb (diff) |
Renamed .cc files to .cpp (fixed #983)
Diffstat (limited to 'src/core/nntp/MCNNTPGroupInfo.cpp')
-rw-r--r-- | src/core/nntp/MCNNTPGroupInfo.cpp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/core/nntp/MCNNTPGroupInfo.cpp b/src/core/nntp/MCNNTPGroupInfo.cpp new file mode 100644 index 00000000..787967f3 --- /dev/null +++ b/src/core/nntp/MCNNTPGroupInfo.cpp @@ -0,0 +1,64 @@ +// +// MCNNTPGroupInfo.cpp +// mailcore2 +// +// Created by Robert Widmann on 3/6/14. +// Copyright (c) 2014 MailCore. All rights reserved. +// + +#include "MCNNTPGroupInfo.h" + +using namespace mailcore; + +void NNTPGroupInfo::init() +{ + mMessageCount = 0; +} + +NNTPGroupInfo::NNTPGroupInfo() +{ + init(); +} + + +NNTPGroupInfo::NNTPGroupInfo(NNTPGroupInfo * other) +{ + init(); + setMessageCount(other->messageCount()); + setName(other->name()); +} + +NNTPGroupInfo::~NNTPGroupInfo() +{ +} + +String * NNTPGroupInfo::description() +{ + return String::stringWithUTF8Format("<%s:%p> Group name: %s; Message count: %u", + MCUTF8(className()), this, MCUTF8(mName), mMessageCount); +} + +Object * NNTPGroupInfo::copy() +{ + return new NNTPGroupInfo(this); +} + +void NNTPGroupInfo::setName(String * name) +{ + MC_SAFE_REPLACE_COPY(String, mName, name); +} + +String * NNTPGroupInfo::name() +{ + return mName; +} + +void NNTPGroupInfo::setMessageCount(uint32_t messageCount) +{ + mMessageCount = messageCount; +} + +uint32_t NNTPGroupInfo::messageCount() +{ + return mMessageCount; +}
\ No newline at end of file |