Files
Work/nntp/MSGLOG.HPP
2024-08-07 09:16:27 -04:00

40 lines
801 B
C++

#ifndef _NNTP_MESSAGELOG_HPP_
#define _NNTP_MESSAGELOG_HPP_
#ifndef _COMMON_SMARTPOINTER_HPP_
#include <common/pointer.hpp>
#endif
#ifndef _NNTP_MESSAGEID_HPP_
#include <nntp/msgid.hpp>
#endif
#ifndef _BSPTREE_BTREE_HPP_
#include <bsptree/btree.hpp>
#endif
class FileIO;
class MessageLog
{
public:
MessageLog(void);
virtual ~MessageLog();
BOOL setLog(const String &pathFileName);
BOOL searchItem(MsgID &someMsgID);
void insert(const MsgID &someMsgID);
void flush(void);
void close(void);
BOOL isOkay(void);
private:
const String &strMessageLogPostFix(void)const;
SmartPointer<FileIO> mFileIO;
BTree<MsgID> mMasterList;
String mPathFileName;
String mStrMessageLogPostFix;
};
inline
const String &MessageLog::strMessageLogPostFix(void)const
{
return mStrMessageLogPostFix;
}
#endif