1 /* -*- Mode: C; indent-tabs-mode:nil; c-basic-offset: 8-*- */
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 */
24 #ifndef __CR_ATTR_SEL_H__
25 #define __CR_ATTR_SEL_H__
27 #include <stdio.h>
28 #include <glib.h>
29 #include "cr-utils.h"
30 #include "cr-parsing-location.h"
31 #include "cr-string.h"
33 G_BEGIN_DECLS
36 struct _CRAttrSel ;
37 typedef struct _CRAttrSel CRAttrSel ;
39 enum AttrMatchWay
40 {
41 NO_MATCH = 0,
42 SET,
43 EQUALS,
44 INCLUDES,
45 DASHMATCH
46 } ;
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 } ;
58 CRAttrSel * cr_attr_sel_new (void) ;
60 enum CRStatus cr_attr_sel_append_attr_sel (CRAttrSel * a_this,
61 CRAttrSel *a_new) ;
63 enum CRStatus cr_attr_sel_prepend_attr_sel (CRAttrSel *a_this,
64 CRAttrSel *a_attr_sel) ;
66 guchar * cr_attr_sel_to_string (CRAttrSel *a_this) ;
68 void cr_attr_sel_dump (CRAttrSel *a_this, FILE *a_fp) ;
70 void cr_attr_sel_destroy (CRAttrSel *a_this) ;
72 G_END_DECLS
74 #endif /*__CR_ATTR_SEL_H__*/