You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
4.7 KiB
C

2 years ago
#if !defined(__CONFRW_H__QWERUOIPUADFJHAFKLHADSFHADSFVCMBVZXCVQOEWIRADSHJKXZJVBLWQERYO)
#define __CONFRW_H__QWERUOIPUADFJHAFKLHADSFHADSFVCMBVZXCVQOEWIRADSHJKXZJVBLWQERYO
/*!
* \if developer_doc
* \file
*
* \brief ,:,
2 years ago
*
* id: $Id: confrw.h,v 1.2 2006/08/04 03:37:33 zhuzhenhua Exp $
*
* \author prcharold@sina.com.cn develop1@szscada.com
2 years ago
* \endif
*/
//#include <util/util.h>
#include "confrw_errno.h"
#ifndef _WIN32
#define CONFRWLIB_API
2 years ago
#else
#ifdef CONFRWLIB_EXPORTS
#define CONFRWLIB_API __declspec(dllexport)
#else
#define CONFRWLIB_API __declspec(dllimport)
#endif// CONFRWLIB_EXPORTS
#endif// _WIN32
2 years ago
/*!
* \if by_group
* \addtogroup grp_config_rw
* @{
* \endif
*/
/*!
* \brief ,
2 years ago
*
* \param pszfname --[in] ( char [MAX_PATH])
* \param ppvhandle --[in] , ()
2 years ago
*
* \retval
* \retval SUCCESS -- ,
* \retval --
2 years ago
*
*/
CONFRWLIB_API int conf_open ( const char * pszfname, void ** ppvhandle );
/*!
* \brief
2 years ago
*
* \param handle --[in]
2 years ago
*
* \retval SUCCESS -- ()
* \retval ERROR_CONF_HANLDE --
* \retval --
2 years ago
*
* \note
* (), .
2 years ago
*
*/
CONFRWLIB_API int conf_close ( void * handle );
/*!
* \brief [],
2 years ago
*
* \param handle --[in]
* \param pszsec_name --[in] , null
* \param pszkey_name --[in] , null
* \param pszdefault --[in] , null,, , ,
* \param pbuf --[out]
* \param buffer_length --[in]
2 years ago
*
* \retval SUCCESS -- ,
* \retval , /, SUCCESS
* \retval ERROR_CONF_SECTION --
* \retval ERROR_CONF_KEY --
* \retval --
2 years ago
*/
CONFRWLIB_API int conf_read_key ( void * handle,
const char * pszsec_name,
const char * pszkey_name,
const char * pszdefault,
char * pbuf,
int buffer_length );
/*!
* \brief /
2 years ago
*
* \param handle --[in]
* \param pszsec_name --[in]
* \param pszkey_name --[in]
* \param pszkey_value --[in]
* \param force_insert --[in] (, ), (, ),
* 0, , , .
2 years ago
*
* \retval SUCCESS --
* \retval --
2 years ago
*
* \note
* force_insert 0, , ERROR_CONF_SECTION;
* (/), ERROR_CONF_KEY.
2 years ago
*/
CONFRWLIB_API int conf_write_key ( void * handle,
const char * pszsec_name,
const char * pszkey_name,
const char * pszkey_value,
int force_insert );
/*!
* \brief (, )
2 years ago
*
* \param handle --[in]
* \param pszsec_name --[in]
* \param pszkey_name --[in]
2 years ago
*
* \retval SUCCESS --
* \retval --
2 years ago
*
* \note
* , ERROR_CONF_SECTION
* (, ), ERROR_CONF_KEY
2 years ago
*/
CONFRWLIB_API int conf_delete_key ( void * handle,
const char * pszsec_name,
const char * pszkey_name );
/*!
* \brief
2 years ago
*
* \param handle --[in]
* \param pszsec_name --[in] , null
2 years ago
*
* \retval SUCCESS --
* \retval --
2 years ago
*
* \note
* , ERROR_CONF_SECTION
2 years ago
*/
CONFRWLIB_API int conf_delete_section ( void * handle,
const char * pszsec_name );
/*!
* \if by_group
* @}
* \endif
*/
#endif //!defined(__CONFRW_H__QWERUOIPUADFJHAFKLHADSFHADSFVCMBVZXCVQOEWIRADSHJKXZJVBLWQERYO)