Changeset 3672

Show
Ignore:
Timestamp:
09/30/08 11:33:58 (2 months ago)
Author:
bricks
Message:

added and changed traces
changed validation of xml declaration

Location:
format-plugins/tomboy-note
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • format-plugins/tomboy-note/CMakeLists.txt

    r3620 r3672  
    2020ADD_SUBDIRECTORY( src ) 
    2121IF ( CHECK_FOUND ) 
    22     ADD_SUBDIRECTORY( tests ) 
     22   # ADD_SUBDIRECTORY( tests ) 
    2323ENDIF( CHECK_FOUND) 
    2424 
     25# add uninstall target 
     26CONFIGURE_FILE( "${CMAKE_SOURCE_DIR}/cmake/modules/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) 
     27 
     28ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") 
     29 
    2530OPENSYNC_PACKAGE( ${PROJECT_NAME} ${VERSION} ) 
  • format-plugins/tomboy-note/src/CMakeLists.txt

    r3620 r3672  
    11LINK_DIRECTORIES( ${OPENSYNC_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${LIBXML2_LIBRARY_DIRS} ) 
    22INCLUDE_DIRECTORIES( ${OPENSYNC_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS} ) 
    3  
    4 #OPENSYNC_PLUGIN_ADD( tomboy-sync tomboy_sync.c ) 
    5  
    6 #TARGET_LINK_LIBRARIES( tomboy-sync ${OPENSYNC_LIBRARIES} ${GLIB2_LIBRARIES} ${LIBXML2_LIBRARIES} ) 
    7  
    8 ###### INSTALL ###################  
    9 #OPENSYNC_PLUGIN_INSTALL( tomboy-sync )  
    10  
    11 #OPENSYNC_PLUGIN_CONFIG( tomboy-sync ) 
    123 
    134OPENSYNC_FORMAT_ADD( tomboynote tomboy_note.c ) 
  • format-plugins/tomboy-note/src/tomboy_note.c

    r3661 r3672  
    22 * tomboy_note - convert tomboy notes to xmlformat-note and backwards 
    33 * Copyright (C) 2008  Bjoern Ricks <bjoern.ricks@gmail.com> 
    4  *  
     4 * 
    55 * This library is free software; you can redistribute it and/or 
    66 * modify it under the terms of the GNU Lesser General Public 
    77 * License as published by the Free Software Foundation; either 
    88 * version 2.1 of the License, or (at your option) any later version. 
    9  *  
     9 * 
    1010 * This library is distributed in the hope that it will be useful, 
    1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    1313 * Lesser General Public License for more details. 
    14  *  
     14 * 
    1515 * You should have received a copy of the GNU Lesser General Public 
    1616 * License along with this library; if not, write to the Free Software 
    1717 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA 
    18  *  
     18 * 
    1919 */ 
    2020 
     
    2525 
    2626osync_bool tomboynote_validate(xmlDocPtr doc) { 
     27        //TODO: use xml schema validation 
     28        osync_trace(TRACE_ENTRY, "%s (%p)", __func__, doc); 
    2729        osync_assert(doc); 
    28         osync_trace(TRACE_ENTRY, "%s (%p)", __func__, doc); 
    29          
     30 
    3031        xmlNodePtr rootnode; 
    3132        rootnode = xmlDocGetRootElement(doc); 
    32          
     33 
    3334        if (rootnode == NULL) { 
    34                 return FALSE; 
    35         } 
    36          
    37         if ( xmlStrEqual(rootnode->name, BAD_CAST "note")  ) { //TODO: use xml schema validation 
     35                osync_trace(TRACE_EXIT, "%s", __func__); 
     36                return FALSE; 
     37        } 
     38 
     39        if ( xmlStrEqual(rootnode->name, BAD_CAST "note")  ) { 
    3840                osync_trace(TRACE_EXIT, "%s", __func__); 
    3941                return TRUE; 
    4042        } 
    41         osync_trace(TRACE_EXIT, "%s", __func__);         
     43        osync_trace(TRACE_EXIT, "%s", __func__); 
    4244        return FALSE; 
    4345} 
     
    4547GList * tomboynote_parse_tags(xmlDocPtr doc) { 
    4648        osync_assert(doc); 
    47          
     49 
    4850        xmlNodePtr tag; 
    4951        xmlNodePtr cur; 
    50          
     52 
    5153        GList* list = NULL; 
    52          
     54 
    5355        for ( cur = xmlDocGetRootElement(doc)->children; cur != NULL; cur = cur->next ) { 
    5456                if ( xmlStrEqual(cur->name, BAD_CAST "tags") ) { // <tags> found 
     
    6870        osync_assert(doc); 
    6971        osync_assert(nodename); 
    70          
     72 
    7173        xmlNodePtr cur; 
    7274        for (cur = xmlDocGetRootElement(doc)->children; cur != NULL; cur = cur->next) { 
    7375                if ( xmlStrEqual(cur->name, BAD_CAST nodename) && cur->children != NULL ) { // <nodename> found 
    74                         return (const char *)cur->children->content;  
     76                        return (const char *)cur->children->content; 
    7577                } 
    7678        } 
     
    98100                                        tomboynote_parse_content_node(cur->children, output); 
    99101                                } 
    100                                         else if ( xmlStrEqual(cur->name, BAD_CAST "bold") ) { 
    101                                                 //TODO add plain bold format 
    102                                                 tomboynote_parse_content_node(cur->children, output); 
    103                                         } 
    104                                         else if ( xmlStrEqual(cur->name, BAD_CAST "italic") ) { 
    105                                             //TODO add plain italic format 
    106                                                 tomboynote_parse_content_node(cur->children, output); 
    107                                         } 
    108                                         else if ( xmlStrEqual(cur->name, BAD_CAST "monospace") ) { 
    109                                             //TODO add plain monospace format 
    110                                                 tomboynote_parse_content_node(cur->children, output); 
    111                                         } 
    112                                         // add link declaration 
    113                                         else if ( xmlStrEqual(cur->ns->href, BAD_CAST "http://beatniksoftware.com/tomboy/link") ) { 
    114                                                 tomboynote_parse_content_node(cur->children, output); 
    115                                         } 
    116                                         // add size decleration 
    117                                         else if ( xmlStrEqual(cur->ns->href, BAD_CAST "http://beatniksoftware.com/tomboy/size") ) { 
    118                                                 tomboynote_parse_content_node(cur->children, output); 
    119                                         } 
    120                                         // add listitems 
    121                                         else if ( xmlStrEqual(cur->name, BAD_CAST "list") ) { 
    122                                                 xmlNodePtr listitem; 
    123                                                 xmlAttrPtr attribute; 
    124                                                 for ( listitem = cur->children; listitem != NULL; listitem = listitem->next ) { 
    125                                                         if ( xmlStrEqual(listitem->name , BAD_CAST "list-item" ) ) { 
    126                                                                 attribute = listitem->properties; //TODO iterate through attributes 
    127                                                                 if ( xmlStrEqual(attribute->name, BAD_CAST "dir") ) { 
    128                                                                         output = g_string_append(output, "* ");  
    129                                                                 } 
    130                                                                 tomboynote_parse_content_node(listitem->children, output); 
    131                                                                 output = g_string_append(output, "\n"); 
     102                                else if ( xmlStrEqual(cur->name, BAD_CAST "bold") ) { 
     103                                        //TODO add plain bold format 
     104                                        tomboynote_parse_content_node(cur->children, output); 
     105                                } 
     106                                else if ( xmlStrEqual(cur->name, BAD_CAST "italic") ) { 
     107                                        //TODO add plain italic format 
     108                                        tomboynote_parse_content_node(cur->children, output); 
     109                                } 
     110                                else if ( xmlStrEqual(cur->name, BAD_CAST "monospace") ) { 
     111                                        //TODO add plain monospace format 
     112                                        tomboynote_parse_content_node(cur->children, output); 
     113                                } 
     114                                // add link declaration 
     115                                else if ( xmlStrEqual(cur->ns->href, BAD_CAST "http://beatniksoftware.com/tomboy/link") ) { 
     116                                        tomboynote_parse_content_node(cur->children, output); 
     117                                } 
     118                                // add size decleration 
     119                                else if ( xmlStrEqual(cur->ns->href, BAD_CAST "http://beatniksoftware.com/tomboy/size") ) { 
     120                                        tomboynote_parse_content_node(cur->children, output); 
     121                                } 
     122                                // add listitems 
     123                                else if ( xmlStrEqual(cur->name, BAD_CAST "list") ) { 
     124                                        xmlNodePtr listitem; 
     125                                        xmlAttrPtr attribute; 
     126                                        for ( listitem = cur->children; listitem != NULL; listitem = listitem->next ) { 
     127                                                if ( xmlStrEqual(listitem->name , BAD_CAST "list-item" ) ) { 
     128                                                        attribute = listitem->properties; //TODO iterate through attributes 
     129                                                        if ( xmlStrEqual(attribute->name, BAD_CAST "dir") ) { 
     130                                                                output = g_string_append(output, "* "); 
    132131                                                        } 
     132                                                        tomboynote_parse_content_node(listitem->children, output); 
     133                                                        output = g_string_append(output, "\n"); 
    133134                                                } 
    134135                                        } 
    135136                                } 
     137                        } 
    136138                } 
    137139        } 
     
    139141 
    140142void tomboynote_parse_content(xmlDocPtr doc, GString * output) { 
     143 
     144        osync_trace(TRACE_ENTRY, "%s (%p,%p)", __func__, doc, output); 
     145        osync_assert(doc); 
     146        osync_assert(output); 
     147 
    141148        xmlNodePtr cur; 
    142         xmlXPathContextPtr xpathCtx;  
     149        xmlXPathContextPtr xpathCtx; 
    143150        xmlXPathObjectPtr xpathObj; 
    144151        xmlNodeSetPtr nodes; 
    145152        int size; 
    146153 
    147         osync_trace(TRACE_ENTRY, "%s (%p,%p)", __func__, doc, output); 
    148          
    149154        xpathCtx = xmlXPathNewContext(doc); 
    150155        if (xpathCtx == NULL) { 
     
    158163        } 
    159164        xpathObj = xmlXPathEvalExpression(BAD_CAST "/tomboy:note/tomboy:text/tomboy:note-content/node()", xpathCtx); 
    160         if ( xpathObj != NULL ) {                
     165        if ( xpathObj != NULL ) { 
    161166                nodes = xpathObj->nodesetval; 
    162167                size = (nodes) ? nodes->nodeNr : 0; 
     
    174179osync_bool conv_tomboynote_to_xmlformat(char *data, unsigned int inpsize, char **output, unsigned int *outpsize, osync_bool *free_input, const char *config, OSyncError **error) { 
    175180        osync_trace(TRACE_ENTRY, "start:%s", __func__); 
    176          
     181 
    177182        xmlDocPtr doc; 
    178         xmlParserCtxtPtr ctxt;  
     183        xmlParserCtxtPtr ctxt; 
    179184 
    180185        OSyncXMLField * xmlfield; 
     
    189194                return FALSE; 
    190195        } 
    191          
     196 
    192197        ctxt = xmlNewParserCtxt(); 
    193198        if ( ctxt == NULL ) { 
     199                osync_trace(TRACE_EXIT, "%s", __func__); 
    194200                return FALSE; 
    195201        } 
     
    201207 
    202208        str = g_string_new(""); 
    203          
     209 
    204210        OSyncXMLFormat * xmlformat = osync_xmlformat_new("note", error); 
    205          
     211 
    206212        // parse tomboy tags as Categories 
    207213        list_tags = tomboynote_parse_tags(doc); 
     
    220226                osync_xmlfield_set_attr(xmlfield, "TimezoneID", "UTC" ); //TODO get timezone info 
    221227        } 
    222          
     228 
    223229        // parse content as description 
    224230        tomboynote_parse_content(doc, str); 
     
    234240                osync_xmlfield_set_attr(xmlfield, "TimezoneID", "UTC" ); //TODO get timezone info 
    235241        } 
    236          
     242 
    237243        //parse title as summary 
    238244        node_data = tomboynote_parse_node(doc, "title"); 
     
    241247                osync_xmlfield_set_key_value(xmlfield, "Content", node_data); 
    242248        } 
    243          
    244         *free_input = TRUE; 
    245         *output = (char *)xmlformat; 
    246         *outpsize = osync_xmlformat_size(); 
     249 
    247250        // debug output 
    248251        unsigned int size; 
     
    252255        osync_xmlformat_sort(xmlformat); 
    253256        osync_trace(TRACE_SENSITIVE, "... Output XMLFormat is: \n%s", cstr); 
     257        *free_input = TRUE; 
     258        *output = (char *)xmlformat; 
     259        *outpsize = osync_xmlformat_size(); 
    254260        g_free(cstr); 
     261        xmlFreeDoc(doc); 
    255262        osync_trace(TRACE_EXIT, "%s", __func__); 
    256263        return TRUE; 
    257          
    258         xmlFreeDoc(doc); 
     264 
    259265FREE_CONTEXT: 
    260266        xmlFreeParserCtxt(ctxt); 
    261267        osync_trace(TRACE_EXIT_ERROR, "%s", __func__); 
    262         return FALSE;    
     268        return FALSE; 
    263269} 
    264270 
    265271osync_bool conv_xmlformat_to_tomboynote(char *input, unsigned int inpsize, char **output, unsigned int *outpsize, osync_bool *free_input, const char *config, OSyncError **error) 
    266272{ 
     273        osync_trace(TRACE_ENTRY, "%s(%p, %i, %p, %p, %p, %p)", __func__, input, inpsize, output, outpsize, free_input, config, error); 
     274 
    267275        xmlNsPtr ns; 
    268276        xmlDocPtr doc; 
     
    278286        xmlAttrPtr version; 
    279287        xmlAttrPtr xml_preserve; 
    280          
     288 
    281289        const char * content_text; 
    282          
    283         osync_trace(TRACE_ENTRY, "%s(%p, %i, %p, %p, %p, %p)", __func__, input, inpsize, output, outpsize, free_input, config, error); 
    284          
     290 
    285291        doc = xmlNewDoc(BAD_CAST "1.0"); 
    286292        ns = xmlNewNs(NULL, BAD_CAST "http://beatniksoftware.com/tomboy", NULL); 
    287          
     293 
    288294        note = xmlNewNode(ns, BAD_CAST "note"); 
    289295        version = xmlNewProp(note, BAD_CAST "version", BAD_CAST "0.3" ); 
     
    300306        create_date = xmlNewNode(ns, BAD_CAST "create-date"); 
    301307        last_change_date = xmlNewNode(ns, BAD_CAST "last-change-date"); 
    302          
     308 
    303309        // Print input XMLFormat into terminal 
    304310        OSyncXMLFormat *xmlformat = (OSyncXMLFormat *)input; 
     
    306312        char *str; 
    307313        osync_xmlformat_assemble(xmlformat, &str, &size); 
    308         osync_trace(TRACE_SENSITIVE, "Input XMLFormat is:\n%s", str); 
     314        osync_trace(TRACE_INTERNAL, "Input XMLFormat is:\n%s", str); 
    309315        g_free(str); 
    310          
     316 
    311317        OSyncXMLField *xmlfield = osync_xmlformat_get_first_field(xmlformat); 
    312318        for(; xmlfield != NULL; xmlfield = osync_xmlfield_get_next(xmlfield)) { 
     
    336342        // add <last-change-date> 
    337343        xmlAddChild(note, last_change_date); 
    338         // add <last-metadata-change-date>  
     344        // add <last-metadata-change-date> 
    339345        // don't know the difference between last-change-date and last-metadata-change-date 
    340346        // it seems that always both are changed 
    341         tmp_node = xmlNewNode(ns, BAD_CAST "last-metadata-change-date" );  
     347        tmp_node = xmlNewNode(ns, BAD_CAST "last-metadata-change-date" ); 
    342348        xmlNodeSetContent(tmp_node, xmlStrdup(last_change_date->content)); 
    343349        xmlAddChild(note, tmp_node); 
    344350        // add <create-date> 
    345         xmlAddChild(note, create_date);  
     351        xmlAddChild(note, create_date); 
    346352        // add <cursor-position> 
    347         tmp_node = xmlNewNode(ns, BAD_CAST "cursor-position" );  
     353        tmp_node = xmlNewNode(ns, BAD_CAST "cursor-position" ); 
    348354        xmlNodeSetContent(tmp_node, BAD_CAST "1"); // first position 
    349355        xmlAddChild(note, tmp_node); 
     
    372378        xmlNodeSetContent(tmp_node, BAD_CAST "FALSE"); 
    373379        xmlAddChild(note, tmp_node); 
    374          
     380 
    375381        *free_input = TRUE; 
    376382        xmlDocDumpFormatMemory(doc, (xmlChar **)output, (int *)outpsize, 1); 
     
    379385                return FALSE; 
    380386        } 
    381                          
     387 
    382388        osync_trace(TRACE_EXIT, "%s", __func__); 
    383389        return TRUE; 
     
    385391 
    386392osync_bool detect_tomboynote(const char *data, int size) { 
    387         osync_trace(TRACE_ENTRY, "start:%s (%p,%d)", __func__, data, size); 
    388          
     393        osync_trace(TRACE_ENTRY, "%s (%p,%d)", __func__, data, size); 
     394 
    389395        xmlDocPtr doc; 
    390396        xmlParserCtxtPtr ctxt; 
    391          
     397 
    392398        if (!data) { 
    393399                return FALSE; 
     
    395401        /* TODO change xml check 
    396402         * The g_pattern_match* functions match a string against a pattern containing '*' and '?' wildcards with similar semantics as the standard glob() function: '*' matches an arbitrary, possibly empty, string, '?' matches an arbitrary character. 
    397          * Note that in contrast to glob(), the '/' character can be matched by the wildcards, there are no '[...]' character ranges and '*' and '?' can not be escaped to include them literally in a pattern.  
     403         * Note that in contrast to glob(), the '/' character can be matched by the wildcards, there are no '[...]' character ranges and '*' and '?' can not be escaped to include them literally in a pattern. 
    398404         */ 
    399         if (!g_pattern_match_simple("?<?xml version=\"1.0\"*?>*", data)) { 
     405        if (!g_pattern_match_simple("?*<*xml version=\"1.0\"*?>*", data)) { 
    400406                osync_trace(TRACE_EXIT, "%s not xml data", __func__); 
    401407                return FALSE; 
    402408        } 
    403          
     409 
    404410        ctxt = xmlNewParserCtxt(); 
    405411        if (ctxt == NULL) { 
     
    409415        doc = xmlCtxtReadMemory(ctxt,data,size,NULL,NULL,0); 
    410416        if (doc == NULL) { 
    411                 osync_trace(TRACE_EXIT, "%s", __func__); 
    412417                goto FREE_CONTEXT; 
    413418        } 
    414          
    415         if ( tomboynote_validate(doc) ) { 
    416                 osync_trace(TRACE_EXIT, "%s valid tomboy-note", __func__); 
    417                 return TRUE; 
    418         } 
    419          
     419 
     420        if ( !tomboynote_validate(doc) ) { 
     421                goto FREE_DOC; 
     422        } 
     423        xmlFreeDoc(doc); 
     424        xmlFreeParserCtxt(ctxt); 
     425        osync_trace(TRACE_EXIT, "%s valid tomboy-note", __func__); 
     426        return TRUE; 
     427 
     428FREE_DOC: 
    420429        xmlFreeDoc(doc); 
    421430FREE_CONTEXT: 
     
    429438static void destroy_tomboynote(char *input, unsigned int inpsize) 
    430439{ 
    431         free(input); 
     440        g_free(input); 
    432441} 
    433442 
    434443static void create_tomboynote(char **data, unsigned int *size) { 
     444        osync_trace(TRACE_ENTRY, "%s (%p,%p)", __func__, data, size); 
     445 
    435446        xmlNsPtr ns; 
    436447        xmlDocPtr doc; 
    437448        xmlNodePtr node; 
    438449        xmlAttrPtr version; 
    439          
     450 
    440451        doc = xmlNewDoc(BAD_CAST "1.0"); 
    441452        ns = xmlNewNs(NULL, NULL, BAD_CAST "http://beatniksoftware.com/tomboy"); 
    442          
     453 
    443454        node = xmlNewNode(ns, BAD_CAST "note"); 
    444455        version = xmlNewProp(node, BAD_CAST "version", BAD_CAST "0.3" ); 
    445456        xmlDocSetRootElement(doc, node); 
    446          
     457 
    447458        xmlDocDumpFormatMemory(doc, (xmlChar **)data, (int *)size, 1); 
    448459        if (!*data) { 
     
    452463        xmlFreeNode(node); 
    453464        xmlFreeNs(ns); 
     465 
     466        osync_trace(TRACE_EXIT, "%s", __func__ ); 
    454467} 
    455468 
     
    458471        //TODO 
    459472        return OSYNC_CONV_DATA_MISMATCH; 
    460 }  
     473} 
    461474*/ 
    462475 
     
    464477{ 
    465478        OSyncObjFormat *format = osync_objformat_new("tomboy-note", "note", error); 
    466         if (!format) 
    467                 return FALSE; 
    468          
     479        if (!format) { 
     480                return FALSE; 
     481        } 
     482 
    469483        osync_objformat_set_create_func(format, create_tomboynote); 
    470484        osync_objformat_set_destroy_func(format, destroy_tomboynote); 
    471          
     485 
    472486/*      osync_objformat_set_compare_func(format, compare_tomboynote); 
    473487        osync_objformat_set_duplicate_func(format, duplicate_xmlformat); 
     
    481495        osync_objformat_set_demarshal_func(format, demarshal_xmlformat); 
    482496        */ 
    483          
     497 
    484498        osync_format_env_register_objformat(env, format); 
    485499        osync_objformat_unref(format); 
     
    495509                return FALSE; 
    496510        } 
    497          
     511 
    498512        OSyncObjFormat *tomboynote = osync_format_env_find_objformat(env, "tomboy-note"); 
    499513        if (!tomboynote) { 
     
    501515                return FALSE; 
    502516        } 
    503          
     517 
    504518        OSyncFormatConverter *conv = osync_converter_new_detector(plain, tomboynote, detect_tomboynote, error); 
    505519        if (!conv) 
     
    507521        osync_format_env_register_converter(env, conv); 
    508522        osync_converter_unref(conv); 
    509          
     523 
    510524        OSyncObjFormat *xmlformat = osync_format_env_find_objformat(env, "xmlformat-note"); 
    511525        if (!xmlformat) { 
    512                 /* This is the first error that occurs if /usr/lib/opensync-1.0/formats  
    513                  is not populated correctly.  So report it! */ 
    514526                osync_trace(TRACE_ERROR, "Unable to find object format xmlformat-note"); 
    515527                return FALSE; 
     
    532544        osync_format_env_register_converter(env, conv); 
    533545        osync_converter_unref(conv); 
    534          
     546 
    535547        return TRUE; 
    536548} 
    537          
     549 
    538550int get_version (void) 
    539551{ 
  • format-plugins/tomboy-note/tests/CMakeLists.txt

    r3620 r3672  
    22LINK_DIRECTORIES( ${OPENSYNC_LIBRARY_DIRS} ${GLIB2_LIBRARY_DIRS} ${LIBXML2_LIBRARY_DIRS} ) 
    33 
    4 ADD_EXECUTABLE( parser_test parser_test.c ../src/tomboy_note.c) 
     4ADD_EXECUTABLE( parser_test parser_test.c ../src/tomboy_note.c ../src/tomboy_note_doc.c) 
    55 
    66TARGET_LINK_LIBRARIES( parser_test ${LIBXML2_LIBRARIES} ${GLIB2_LIBRARIES} ${OPENSYNC_LIBRARIES} ${CHECK_LIBRARIES} ) 
  • format-plugins/tomboy-note/tests/parser_test.c

    r3620 r3672  
    22 * parser_test - test parsing of tomboy notes 
    33 * Copyright (C) 2008  Bjoern Ricks <bjoern.ricks@gmail.com> 
    4  *  
     4 * 
    55 * This library is free software; you can redistribute it and/or 
    66 * modify it under the terms of the GNU Lesser General Public 
    77 * License as published by the Free Software Foundation; either 
    88 * version 2.1 of the License, or (at your option) any later version. 
    9  *  
     9 * 
    1010 * This library is distributed in the hope that it will be useful, 
    1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1212 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
    1313 * Lesser General Public