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