epoc32/include/stdapis/libxml2/libxml2_dict.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/libxml2/libxml2_dict.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,107 @@
     1.4 +/*
     1.5 + * Summary: string dictionnary
     1.6 + * Description: dictionary of reusable strings, just used to avoid allocation
     1.7 + *         and freeing operations.
     1.8 + *
     1.9 + * Copy: See Copyright for the status of this software.
    1.10 + *
    1.11 + * Author: Daniel Veillard
    1.12 + * Portion Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
    1.13 + */
    1.14 +
    1.15 +/** @file
    1.16 +@publishedAll
    1.17 +@released
    1.18 +*/
    1.19 +
    1.20 +#ifndef XML_DICT_H
    1.21 +#define XML_DICT_H
    1.22 +
    1.23 +#include "libxml2_xmlstring.h"
    1.24 +
    1.25 +#ifdef __cplusplus
    1.26 +extern "C" {
    1.27 +#endif
    1.28 +
    1.29 +typedef struct _xmlDictStrings xmlDictStrings;
    1.30 +typedef xmlDictStrings* xmlDictStringsPtr;
    1.31 +
    1.32 +struct _xmlDictStrings {
    1.33 +    xmlDictStringsPtr next;
    1.34 +    xmlChar* free;
    1.35 +    xmlChar* end;
    1.36 +    int size;
    1.37 +    int nbStrings;
    1.38 +    xmlChar array[1];
    1.39 +};
    1.40 +
    1.41 +/*
    1.42 + * An entry in the dictionnary
    1.43 + */
    1.44 +typedef struct _xmlDictEntry xmlDictEntry;
    1.45 +typedef xmlDictEntry* xmlDictEntryPtr;
    1.46 +struct _xmlDictEntry {
    1.47 +    xmlDictEntryPtr next;
    1.48 +    const xmlChar* name;
    1.49 +    int len;
    1.50 +    int valid;
    1.51 +};
    1.52 +/*
    1.53 + * The dictionnary.
    1.54 + */
    1.55 +typedef struct _xmlDict xmlDict;
    1.56 +typedef xmlDict* xmlDictPtr;
    1.57 +
    1.58 +/*
    1.59 + * The entire dictionnary
    1.60 + */
    1.61 +struct _xmlDict {
    1.62 +    int ref_counter;
    1.63 +
    1.64 +    xmlDictEntryPtr dict;
    1.65 +    int size;
    1.66 +    int nbElems;
    1.67 +    xmlDictStringsPtr strings;
    1.68 +
    1.69 +    xmlDictPtr      subdict;
    1.70 +};
    1.71 +
    1.72 +/*
    1.73 + * Constructor and destructor.
    1.74 + */
    1.75 +XMLPUBFUN xmlDictPtr XMLCALL
    1.76 +                        xmlDictCreate   (void);
    1.77 +
    1.78 +XMLPUBFUN xmlDictPtr XMLCALL xmlDictCreateSub(xmlDictPtr sub);
    1.79 +
    1.80 +XMLPUBFUN int XMLCALL
    1.81 +                        xmlDictReference(xmlDictPtr dict);
    1.82 +XMLPUBFUN void XMLCALL
    1.83 +                        xmlDictFree     (xmlDictPtr dict);
    1.84 +
    1.85 +/*
    1.86 + * Lookup of entry in the dictionnary.
    1.87 + */
    1.88 +XMLPUBFUN const xmlChar* XMLCALL
    1.89 +                        xmlDictLookup   (xmlDictPtr dict,
    1.90 +                                         const xmlChar *name,
    1.91 +                                         int len);
    1.92 +
    1.93 +XMLPUBFUN const xmlChar * XMLCALL
    1.94 +                        xmlDictQLookup  (xmlDictPtr dict,
    1.95 +                                         const xmlChar *prefix,
    1.96 +                                         const xmlChar *name);
    1.97 +
    1.98 +#ifndef XMLENGINE_EXCLUDE_UNUSED
    1.99 +XMLPUBFUN int XMLCALL
   1.100 +                        xmlDictSize     (xmlDictPtr dict);
   1.101 +#endif /* ifndef XMLENGINE_EXCLUDE_UNUSED */
   1.102 +
   1.103 +XMLPUBFUN int XMLCALL
   1.104 +                        xmlDictOwns     (xmlDictPtr dict,
   1.105 +                                         const xmlChar *str);
   1.106 +#ifdef __cplusplus
   1.107 +}
   1.108 +#endif
   1.109 +#endif /* XML_DICT_H */
   1.110 +