⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tini400_mime.h

📁 TINI的pop3的c代码
💻 H
字号:
/* --------------------------------------------------------------------------------------
 *  Copyright (C) 2003 Dallas Semiconductor Corporation, All Rights Reserved.
 * 
 *  Permission is hereby granted, free of charge, to any person obtaining a
 *  copy of this software and associated documentation files (the "Software"),
 *  to deal in the Software without restriction, including without limitation
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *  and/or sell copies of the Software, and to permit persons to whom the
 *  Software is furnished to do so, subject to the following conditions:
 * 
 *  The above copyright notice and this permission notice shall be included
 *  in all copies or substantial portions of the Software.
 * 
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY,  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *  IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES
 *  OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *  OTHER DEALINGS IN THE SOFTWARE.
 * 
 *  Except as contained in this notice, the name of Dallas Semiconductor
 *  shall not be used except as stated in the Dallas Semiconductor
 *  Branding Policy.
 * --------------------------------------------------------------------------------------
 */

/****************************************************************************************
 *		Module Name : mime module
 *		Description : mime module function declarations
 *	   	   Filename : mime.h
 *		   Compiler : keil C51 Compiler V7.06
 *			Version : Version 1.0
 *	  Modifications :
 *			  Notes :
****************************************************************************************/

/** \file tini400_mime.h
 *  \brief MIME Library functions for DS80C400 processor
 *
 *  This library contains functions for encoding and decoding mime messages 
 *  
 *  For detailed information on the DS80C400 please see the
 *  <a href="http://pdfserv.maxim-ic.com/arpdf/Design/DS80C400UG.pdf">
 *  High-Speed Microcontroller User's Guide: DS80C400 Supplement</a>.
 *
 *  \warning  The functions in this library are <b>NOT</b> multi-process 
 *            safe--that is, if you call the same method from two different 
 *            processes at the same time, the parameters to the function 
 *            may be destroyed, yielding unpredictable results.
 */

#ifndef __rom400_mime_
#define __rom400_mime_

/** Definition for mime base64 encoding and decoding method
 * \sa #mime_encode, #mime_decode */
#define BASE64			  1

/** Definition for mime quoted printable encoding and decoding method
 * \sa #mime_encode, #mime_decode */
#define QUOTED_PRINTABLE  2	 

/** Version number associated with this header file. Should be the same as
 * the version number returned by the <i>#mime_version</i> function.
 * \sa #mime_version */
#define MIME_VERSION      1

/**
 * \brief      Returns the version number of mime library
 *
 * \return     Version number of mime library.
 */
unsigned int mime_version(void);

/**
 * \brief      Initializes mime library
 *
 */
void mime_init(void);

/**
 * \brief      Encodes the given message to mime format
 *
 * See RFC1521 for more information on MIME
 *
 * \param inbuf input buffer to encode
 * \param size length of the input buffer
 * \param encode_flag  not used, reserved for future use
 *
 * \return 
 *		address of encoded mime message buffer or NULL if function failed
 *
 */
char * mime_encode(unsigned char *inbuf,int size, char encode_flag);

/**
 * \brief      Decodes the given mime message
 *
 * See RFC1521 for more information on MIME
 *
 * \param inbuf - mime message to decode
 * \param decode_flag - decoding flag indicates what decoding method to be used,
 *                      should be either #BASE64 or #QUOTED_PRINTABLE
 * \return 
 *		address of decoded message buffer or NULL if function failed
 *
 */
char * mime_decode(char *inbuf,char decode_flag);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -