# guththila_attribute.h

    00001
    00002 /*
    00003  * Licensed to the Apache Software Foundation (ASF) under one or more
    00004  * contributor license agreements.  See the NOTICE file distributed with
    00005  * this work for additional information regarding copyright ownership.
    00006  * The ASF licenses this file to You under the Apache License, Version 2.0
    00007  * (the "License"); you may not use this file except in compliance with
    00008  * the License.  You may obtain a copy of the License at
    00009  *
    00010  *      http://www.apache.org/licenses/LICENSE-2.0
    00011  *
    00012  * Unless required by applicable law or agreed to in writing, software
    00013  * distributed under the License is distributed on an "AS IS" BASIS,
    00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00015  * See the License for the specific language governing permissions and
    00016  * limitations under the License.
    00017  */
    00018 #ifndef GUTHTHILA_ATTRIBUTE_H
    00019 #define GUTHTHILA_ATTRIBUTE_H
    00020
    00021 #include <guththila_defines.h>
    00022 #include <guththila_token.h>
    00023 #include <axutil_utils.h>
    00024
    00025 EXTERN_C_START()
    00026
    00027 #ifndef GUTHTHILA_ATTR_DEF_SIZE
    00028 #define GUTHTHILA_ATTR_DEF_SIZE 16
    00029 #endif
    00030
    00031 /* Representation of an attribute */
    00032 typedef struct guththila_attr_s
    00033 {
    00034     guththila_token_t *pref; /* Prefix */
    00035     guththila_token_t *name; /* Name */
    00036     guththila_token_t *val;  /* Value */
    00037 } guththila_attr_t;
    00038
    00039 typedef struct guththila_attr_list_s
    00040 {
    00041     guththila_attr_t *list;
    00042     guththila_stack_t fr_stack;
    00043     int size;
    00044     int capacity;
    00045 } guththila_attr_list_t;
    00046
    00053 guththila_attr_list_t *
    00054 GUTHTHILA_CALL guththila_attr_list_create(const axutil_env_t * env);
    00055
    00065 int GUTHTHILA_CALL
    00066 guththila_attr_list_init(
    00067     guththila_attr_list_t * at_list,
    00068     const axutil_env_t * env);
    00069
    00076 guththila_attr_t *
    00077 GUTHTHILA_CALL guththila_attr_list_get(guththila_attr_list_t * at_list,
    00078         const axutil_env_t * env);
    00079
    00080
    00091 int GUTHTHILA_CALL
    00092 guththila_attr_list_release(
    00093     guththila_attr_list_t * at_list,
    00094     guththila_attr_t * attr,
    00095     const axutil_env_t * env);
    00096
    00106 void GUTHTHILA_CALL
    00107 msuila_attr_list_free_data(
    00108     guththila_attr_list_t * at_list,
    00109     const axutil_env_t * env);
    00110
    00120 void GUTHTHILA_CALL
    00121 guththila_attr_list_free(
    00122     guththila_attr_list_t * at_list,
    00123     const axutil_env_t * env);
    00124
    00125 EXTERN_C_END()
    00126 #endif  /*  */
    00127