1 /* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */ 2 3 /* 4 * This file is part of The Croco Library 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of version 2.1 of the GNU Lesser General Public 8 * License as published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 18 * USA 19 * 20 * Author: Dodji Seketeli 21 * See COPYRIGHTS file for copyright information. 22 */ 23 24 #ifndef __CR_ATTR_SEL_H__ 25 #define __CR_ATTR_SEL_H__ 26 27 #include <stdio.h> 28 #include <glib.h> 29 #include "cr-utils.h" 30 #include "cr-parsing-location.h" 31 #include "cr-string.h" 32 33 G_BEGIN_DECLS 34 35 36 struct _CRAttrSel ; 37 typedef struct _CRAttrSel CRAttrSel ; 38 39 enum AttrMatchWay 40 { 41 NO_MATCH = 0, 42 SET, 43 EQUALS, 44 INCLUDES, 45 DASHMATCH 46 } ; 47 48 struct _CRAttrSel 49 { 50 CRString *name ; 51 CRString *value ; 52 enum AttrMatchWay match_way ; 53 CRAttrSel *next ; 54 CRAttrSel *prev ; 55 CRParsingLocation location ; 56 } ; 57 58 CRAttrSel * cr_attr_sel_new (void) ; 59 60 enum CRStatus cr_attr_sel_append_attr_sel (CRAttrSel * a_this, 61 CRAttrSel *a_attr_sel) ; 62 63 enum CRStatus cr_attr_sel_prepend_attr_sel (CRAttrSel *a_this, 64 CRAttrSel *a_attr_sel) ; 65 66 guchar * cr_attr_sel_to_string (CRAttrSel const *a_this) ; 67 68 void cr_attr_sel_dump (CRAttrSel const *a_this, FILE *a_fp) ; 69 70 void cr_attr_sel_destroy (CRAttrSel *a_this) ; 71 72 G_END_DECLS 73 74 #endif /*__CR_ATTR_SEL_H__*/ 75