Libcroco
|
00001 /* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ 00002 00003 /* 00004 * This file is part of The Croco Library 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of version 2.1 of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Lesser General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00018 * USA 00019 * 00020 * Author: Dodji Seketeli 00021 * See COPYRIGHTS file for copyright information. 00022 */ 00023 00024 #ifndef __CR_ATTR_SEL_H__ 00025 #define __CR_ATTR_SEL_H__ 00026 00027 #include <stdio.h> 00028 #include <glib.h> 00029 #include "cr-utils.h" 00030 #include "cr-parsing-location.h" 00031 #include "cr-string.h" 00032 00033 G_BEGIN_DECLS 00034 00035 00036 struct _CRAttrSel ; 00037 typedef struct _CRAttrSel CRAttrSel ; 00038 00039 enum AttrMatchWay 00040 { 00041 NO_MATCH = 0, 00042 SET, 00043 EQUALS, 00044 INCLUDES, 00045 DASHMATCH 00046 } ; 00047 00048 struct _CRAttrSel 00049 { 00050 CRString *name ; 00051 CRString *value ; 00052 enum AttrMatchWay match_way ; 00053 CRAttrSel *next ; 00054 CRAttrSel *prev ; 00055 CRParsingLocation location ; 00056 } ; 00057 00058 CRAttrSel * cr_attr_sel_new (void) ; 00059 00060 enum CRStatus cr_attr_sel_append_attr_sel (CRAttrSel * a_this, 00061 CRAttrSel *a_attr_sel) ; 00062 00063 enum CRStatus cr_attr_sel_prepend_attr_sel (CRAttrSel *a_this, 00064 CRAttrSel *a_attr_sel) ; 00065 00066 guchar * cr_attr_sel_to_string (CRAttrSel const *a_this) ; 00067 00068 void cr_attr_sel_dump (CRAttrSel const *a_this, FILE *a_fp) ; 00069 00070 void cr_attr_sel_destroy (CRAttrSel *a_this) ; 00071 00072 G_END_DECLS 00073 00074 #endif /*__CR_ATTR_SEL_H__*/