AppOctetStream.h
上传用户:weimei12
上传日期:2022-08-11
资源大小:185k
文件大小:2k
- #pragma once
- /********************************************************************
- created: 2008:10:30 15:58
- author: 李欣
- filename: c:MyProjectSimpleMailSimpleMailAppOctetStream.h
- classname: CAppOctetStream
- purpose: handles the "application/octet-stream" content type
- *********************************************************************/
- class CAppOctetStream : public CMIMEContentAgent
- {
- public:
- CAppOctetStream(int nContentType);
- virtual ~CAppOctetStream();
- ///<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);
- ///<summary>
- /// Get the content type sting
- ///</summary>
- virtual CString GetContentTypeString();
- 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);
- ///<summary>
- /// attach the file to the mail
- ///</summary>
- ///<param name = pFileAtt>
- /// the pointer to the file
- ///</param>
- ///<param name = nEncoding>
- /// the encoding type
- ///</param>
- ///<param name = strDestination>
- /// the result string
- ///</param>
- virtual void AttachFile(IN CStdioFile* pFileAtt, IN const int nEncoding, OUT CString& strDestination);
- };