#ifndef _NNTP_NEWSREG_HPP_ #define _NNTP_NEWSREG_HPP_ #ifndef _COMMON_STDIO_HPP_ #include #endif #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_BLOCK_HPP_ #include #endif #ifndef _COMMON_STRING_HPP_ #include #endif #ifndef _NNTP_RESOURCE_HPP_ #include #endif #ifndef _NNTP_NEWSGROUP_HPP_ #include #endif class NewsGroup; class NewsReg { public: enum QueryType{QueryActive,QueryAll}; NewsReg(void); virtual ~NewsReg(); WORD queryGroups(Block &subscriberList,QueryType queryType=QueryAll); WORD addGroup(const String &groupName,DWORD active=TRUE); WORD addGroup(const NewsGroup &someNewsGroup); WORD setGroup(const String &newsGroup,DWORD active); WORD removeGroup(const String &groupName); private: NewsReg(const NewsReg &someNewsReg); String mNewsGroupsKeyName; String mNewsGroupsKeyValuePrefix; String mApplicationKeyName; String mNewsGroupsShortName; }; inline NewsReg::NewsReg(void) : mNewsGroupsKeyValuePrefix(STRING_NEWSGROUPSKEYVALUEPREFIX), mNewsGroupsKeyName(STRING_NEWSGROUPSKEYNAME), mApplicationKeyName(STRING_NNTPKEYNAME), mNewsGroupsShortName(STRING_NEWSGROUPSSHORTNAME) { } inline NewsReg::~NewsReg() { } inline NewsReg::NewsReg(const NewsReg &someNewsReg) : mNewsGroupsKeyValuePrefix(STRING_NEWSGROUPSKEYVALUEPREFIX), mNewsGroupsKeyName(STRING_NEWSGROUPSKEYNAME) { // no implementation } inline WORD NewsReg::addGroup(const NewsGroup &someNewsGroup) { return addGroup(someNewsGroup.newsGroup(),someNewsGroup.active()); } #endif