MailSaveMngr.h
上传用户:weimei12
上传日期:2022-08-11
资源大小:185k
文件大小:2k
- #pragma once
- /********************************************************************
- created: 2009:1:12 9:30
- author: 李欣
- filename: e:MyProjectSimpleMailSimpleMailMailSaveMngr.h
- classname: CMailSaveMngr
- purpose: save and read the mails
- *********************************************************************/
- #include "../FileStore/FileStore/FileStore_inc.h"
- class CMailSaveMngr
- {
- public:
- CMailSaveMngr(void);
- ~CMailSaveMngr(void);
- ///<summary>
- /// Save the mails and return the mail position
- ///</summary>
- ///<param name = szMail>
- /// the content of the mail
- ///</param>
- ///<param name = nMailLen>
- /// the length of the szMail
- ///</param>
- ///<param name = sMailPos>
- /// the start position of the mail
- ///</param>
- BOOL SaveMail(IN LPCTSTR szMail, IN const int nMailLen, OUT MAILPOS& sMailPos);
- ///<summary>
- /// load the mail content
- ///</summary>
- ///<param name = sMailPos>
- /// the start position of the mail
- ///</param>
- ///<param name = szMail>
- /// the content of the mail
- ///</param>
- ///<param name = nMailLen>
- /// the length of the szMail
- ///</param>
- BOOL LoadMail(IN MAILPOS sMailPos, OUT LPCTSTR szMail, OUT int nMailLen);
- ///<summary>
- /// delete the certain mail from the database
- ///</summary>
- ///<param name = sMailPos>
- /// the start position of the mail
- ///</param>
- void DelMail(IN MAILPOS sMailPos);
- ///<summary>
- /// initial the database to save the mails
- ///</summary>
- BOOL InitMailTmpFile();
- private:
- CMailTmpFile m_MailTmpFile;
- };