Changeset 2403

Show
Ignore:
Timestamp:
08/04/07 14:30:50 (1 year ago)
Author:
paule
Message:

Fix format registration; fix converter registration to use correct xmlformat-* names; remove old commented out registration code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/opie-sync/src/opie_format.c

    r2402 r2403  
    14401440 
    14411441 
    1442 /* 
    1443 void get_info(OSyncEnv *env) 
    1444 { 
    1445         osync_env_register_objtype(env, "contact"); 
    1446         osync_env_register_objformat(env, "contact", "opie-xml-contact"); 
    1447         osync_env_register_objtype(env, "todo"); 
    1448         osync_env_register_objformat(env, "todo", "opie-xml-todo"); 
    1449         osync_env_register_objtype(env, "event"); 
    1450         osync_env_register_objformat(env, "event", "opie-xml-event"); 
    1451         osync_env_register_objtype(env, "note"); 
    1452         osync_env_register_objformat(env, "note", "opie-xml-note"); 
    1453  
    1454         osync_env_register_converter(env, CONVERTER_CONV, "opie-xml-contact", "xml-contact",      conv_opie_xml_contact_to_xml_contact); 
    1455         osync_env_register_converter(env, CONVERTER_CONV, "xml-contact",      "opie-xml-contact", conv_xml_contact_to_opie_xml_contact); 
    1456         osync_env_register_converter(env, CONVERTER_CONV, "opie-xml-todo",    "xml-todo",         conv_opie_xml_todo_to_xml_todo); 
    1457         osync_env_register_converter(env, CONVERTER_CONV, "xml-todo",         "opie-xml-todo",    conv_xml_todo_to_opie_xml_todo); 
    1458         osync_env_register_converter(env, CONVERTER_CONV, "opie-xml-event",   "xml-event",        conv_opie_xml_event_to_xml_event); 
    1459         osync_env_register_converter(env, CONVERTER_CONV, "xml-event",        "opie-xml-event",   conv_xml_event_to_opie_xml_event); 
    1460         osync_env_register_converter(env, CONVERTER_CONV, "opie-xml-note",    "xml-note",         conv_opie_xml_note_to_xml_note); 
    1461         osync_env_register_converter(env, CONVERTER_CONV, "xml-note",         "opie-xml-note",    conv_xml_note_to_opie_xml_note); 
    1462 } 
    1463 */ 
    1464  
    14651442osync_bool get_format_info(OSyncFormatEnv *env, OSyncError **error) 
    14661443{ 
    14671444        /* Contact */ 
    1468         OSyncObjFormat *format = osync_objformat_new("contact", OPIE_FORMAT_XML_CONTACT, error); 
     1445        OSyncObjFormat *format = osync_objformat_new(OPIE_FORMAT_XML_CONTACT, "contact", error); 
    14691446        if (!format) 
    14701447                return FALSE; 
     
    14771454         
    14781455        /* Todo */ 
    1479         format = osync_objformat_new("todo", OPIE_FORMAT_XML_TODO, error); 
     1456        format = osync_objformat_new(OPIE_FORMAT_XML_TODO, "todo", error); 
    14801457        if (!format) 
    14811458                return FALSE; 
     
    14841461 
    14851462        /* Event */ 
    1486         format = osync_objformat_new("event", OPIE_FORMAT_XML_EVENT, error); 
     1463        format = osync_objformat_new(OPIE_FORMAT_XML_EVENT, "event", error); 
    14871464        if (!format) 
    14881465                return FALSE; 
     
    14911468 
    14921469        /* Note */ 
    1493         format = osync_objformat_new("note", OPIE_FORMAT_XML_NOTE, error); 
     1470        format = osync_objformat_new(OPIE_FORMAT_XML_NOTE, "note", error); 
    14941471        if (!format) 
    14951472                return FALSE; 
     
    15381515osync_bool get_conversion_info(OSyncFormatEnv *env, OSyncError **error) 
    15391516{ 
    1540         if(!register_converter(env, OPIE_FORMAT_XML_CONTACT, "xml-contact", conv_opie_xml_contact_to_xml_contact, conv_xml_contact_to_opie_xml_contact, error)) 
     1517        if(!register_converter(env, OPIE_FORMAT_XML_CONTACT, "xmlformat-contact", conv_opie_xml_contact_to_xml_contact, conv_xml_contact_to_opie_xml_contact, error)) 
    15411518                return FALSE; 
    1542         if(!register_converter(env, OPIE_FORMAT_XML_TODO,    "xml-todo",    conv_opie_xml_todo_to_xml_todo, conv_xml_todo_to_opie_xml_todo, error)) 
     1519        if(!register_converter(env, OPIE_FORMAT_XML_TODO,    "xmlformat-todo",    conv_opie_xml_todo_to_xml_todo, conv_xml_todo_to_opie_xml_todo, error)) 
    15431520                return FALSE; 
    1544         if(!register_converter(env, OPIE_FORMAT_XML_EVENT,   "xml-event",   conv_opie_xml_event_to_xml_event, conv_xml_event_to_opie_xml_event, error)) 
     1521        if(!register_converter(env, OPIE_FORMAT_XML_EVENT,   "xmlformat-event",   conv_opie_xml_event_to_xml_event, conv_xml_event_to_opie_xml_event, error)) 
    15451522                return FALSE; 
    1546         if(!register_converter(env, OPIE_FORMAT_XML_NOTE,    "xml-note",    conv_opie_xml_note_to_xml_note, conv_xml_note_to_opie_xml_note, error)) 
     1523        if(!register_converter(env, OPIE_FORMAT_XML_NOTE,    "xmlformat-note",    conv_opie_xml_note_to_xml_note, conv_xml_note_to_opie_xml_note, error)) 
    15471524                return FALSE; 
    15481525