MIMEContentAgent.h
上传用户:weimei12
上传日期:2022-08-11
资源大小:185k
文件大小:2k
- #pragma once
- /********************************************************************
- created: 2008:10:30 14:56
- author: 李欣
- filename: c:MyProjectSimpleMailSimpleMailMIMEContentAgent.h
- classname: CMIMEContentAgent
- purpose: the base class.Its subclass process a certain mime type.
- *********************************************************************/
- class CMIMEContentAgent
- {
- public:
- CMIMEContentAgent(int nMIMEType);
- virtual ~CMIMEContentAgent();
- ///<summary>
- /// Query the type of the object
- ///</summary>
- BOOL QueryType(int nContentType);
- ///<summary>
- /// append it to the body
- ///</summary>
- ///<param name = szContent>
- /// the content of this part
- ///</param>
- ///<param name = szParameters>
- /// parameters needed by some mime types
- ///</param>
- ///<param name = nEncoding>
- /// the encoding type
- ///</param>
- ///<param name = bPath>
- /// whether szContent is a path
- ///</param>
- ///<param name = strDestination>
- /// the result string
- ///</param>
- virtual BOOL AppendPart(IN LPCTSTR szContent,
- IN LPCTSTR szParameters,
- IN const int nEncoding,
- IN const BOOL bPath,
- OUT CString& strDestination) = 0;
- ///<summary>
- /// Get the content type sting
- ///</summary>
- virtual CString GetContentTypeString() = 0;
- protected:
- ///<summary>
- /// construct the sub-part header
- ///</summary>
- ///<param name = szContent>
- /// the content of this part
- ///</param>
- ///<param name = szParameters>
- /// parameters needed by some mime types
- ///</param>
- ///<param name = nEncoding>
- /// the encoding type
- ///</param>
- ///<param name = bPath>
- /// whether szContent is a path
- ///</param>
- /// <returns>
- /// the result string
- /// </returns>
- virtual CString BuildSubHeader(IN LPCTSTR szContent,
- IN LPCTSTR szParameters,
- IN const int nEncoding,
- IN const BOOL bPath) = 0;
- private:
- ///<summary>
- /// the type of the object
- ///</summary>
- int m_nMIMEType;
- };