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

📄 field-desc.h

📁 linux下的电话本的最底层
💻 H
字号:
/*	librecord2 - Record Object manipulation and storage library 2 * *	Authors: YE Nan <nan.ye@orange-ftgroup.com>  *	 *	This software and associated documentation files (the "Software")  *	are copyright (C) 2005 LiPS Linux Phone Standards Forum [FranceTelecom]  *	All Rights Reserved.  * *	A copyright license is hereby granted for redistribution and use of  *	the Software in source and binary forms, with or without modification,  *	provided that the following conditions are met:  *	- Redistributions of source code must retain the above copyright notice,  *	this copyright license and the following disclaimer.  *  - Redistributions in binary form must reproduce the above copyright  * 	notice, this copyright license and the following disclaimer in the  *	documentation and/or other materials provided with the distribution.  *	- Neither the name of LiPS  nor the names of its Members may be used  *	to endorse or promote products derived from the Software without  *	specific prior written permission.  * *	A patent license for any Necessary Claims owned by Members of LiPS Forum  *	to make, have made, use, import, offer to sell, lease and sell or otherwise  *	distribute any implementation compliant with the any specification adopted  *	by the LiPS Forumcan be obtained from the respective Members on reasonable  *	and non-discriminatory terms and conditions and under reciprocity, as  *	regulated in more detail in the Internal Policy of the LiPS Forum.  * *	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, ITS MEMBERS AND CONTRIBUTORS  *	"AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,  *	THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE  *	AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER,  *	ITS MEMBERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  *	SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,  *	PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;  *	OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,  *	WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)  *	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE  *	POSSIBILITY OF SUCH DAMAGE.  */#ifndef __RECORD_FIELD_DESC_H#define __RECORD_FIELD_DESC_H#include <glib.h>#include <iterator.h>#ifdef __cplusplusextern "C" {#endif /* __cplusplus */typedef	struct	_FieldLayout			FieldLayout;typedef	struct	_FieldDescriptor	FieldDescriptor;typedef	enum {	FIELD_TYPE_BOOLEAN,			///< Boolean field	FIELD_TYPE_INTEGER,			///< Interger field	FIELD_TYPE_FLOAT,				///< Float field	FIELD_TYPE_STRING,			///< String field	FIELD_TYPE_DATE,				///< Date field	FIELD_TYPE_BINARY,			///< Binary field} FeildType;typedef	guint16	FieldSize;#define	FIELD_SIZE_AUTO		0#define		FIELD_ATTR_NONE					0#define		FIELD_ATTR_REQUIRED			(0x1 << 0)#define		FIELD_ATTR_STANDARD			(0x1 << 1)#define		FIELD_ATTR_PRIMARY			(0x1 << 2)#define		FIELD_ATTR_MULTIPLE			(0x1 << 3)struct	_FieldLayout {	gchar		*label;					/**< Field layout display label */				gchar		*desc;					/**< Field layout description */};FieldLayout *	field_layout_new		(const gchar				*label,																	 const gchar				*desc);void					field_layout_free		(FieldLayout				*layout);FieldLayout *	field_layout_copy		(const FieldLayout	*src);void					field_layout_print	(const FieldLayout	*layout);/*! @struct	FieldDescriptor		@brief	Field Descriptor structure		This structure is the field descriptor structure. */struct _FieldDescriptor {	guint32				 identifier;		/**< Field template identifier */	guint32				 attribute;			/**< Field attribute */	FeildType			 type;					/**< Field type */	FieldSize			 msize;					/**< Field size limitation */		GSList				*layouts;};FieldDescriptor *		field_descriptor_new						(guint32								 id,																										 FeildType							 type,																										 guint32								 attr,																										 FieldSize							 msize);																							 void								field_descriptor_free						(FieldDescriptor				*fdesc);FieldDescriptor *		field_descriptor_copy						(const FieldDescriptor	*src);void								field_descriptor_print					(const FieldDescriptor	*desc);void								field_descriptor_add_layout			(FieldDescriptor				*fdesc,																										 FieldLayout						*layout,																										 gboolean								 def);FieldLayout *				field_descriptor_remove_layout	(FieldDescriptor				*fdesc,																										 guint32								 index);const FieldLayout *	field_descriptor_get_layout			(const FieldDescriptor	*fdesc,																										 guint32								 index);Iterator *					field_descriptor_get_layouts		(const FieldDescriptor	*fdesc);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* __RECORD_FIELD_DESC_H *//*vi:ts=2:nowrap:ai:expandtab*/

⌨️ 快捷键说明

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