Changeset 2144

Show
Ignore:
Timestamp:
06/12/07 14:15:05 (1 year ago)
Author:
mjahn
Message:

r1049@semo: mjahn | 2007-06-08 16:57:28 +0200

r1047@semo (orig r2100): dgollub | 2007-06-08 16:51:39 +0200
Fixed some xmlformat validation issues.
"Home" value of Telephone is a special value.
"Home" and "Work" are TelephoneLocations? - Not TelephoneTypes?.


r1048@semo (orig r2101): dgollub | 2007-06-08 16:52:06 +0200
"Work" is also a TelephoneLocation?



Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/gnokii-sync/src/gnokii_contact_format.c

    r2142 r2144  
    168168 
    169169 
    170                 if (contact->subentries[i].entry_type != GN_PHONEBOOK_ENTRY_Number || !phonefield
     170                if (contact->subentries[i].entry_type != GN_PHONEBOOK_ENTRY_Number
    171171                        continue; 
    172172 
    173173                switch (contact->subentries[i].number_type) { 
    174174                        case GN_PHONEBOOK_NUMBER_Home: 
    175                                 osync_xmlfield_set_attr(xmlfield, "Type", "HOME"); 
     175                                // Home value is a special type: "Telephone Location" 
     176                                osync_xmlfield_set_attr(phonefield, "Location", "Home"); 
    176177                                break; 
    177178                        case GN_PHONEBOOK_NUMBER_Mobile: 
    178                                 osync_xmlfield_set_attr(xmlfield, "Type", "CELL"); 
     179                                osync_xmlfield_set_attr(phonefield, "Type", "Cellular"); 
    179180                                break; 
    180181                        case GN_PHONEBOOK_NUMBER_Fax: 
    181                                 osync_xmlfield_set_attr(xmlfield, "Type", "FAX"); 
     182                                osync_xmlfield_set_attr(phonefield, "Type", "Fax"); 
    182183                                break; 
    183184                        case GN_PHONEBOOK_NUMBER_Work: 
    184                                 osync_xmlfield_set_attr(xmlfield, "Type", "WORK"); 
     185                                osync_xmlfield_set_attr(phonefield, "Location", "Work"); 
    185186                                break; 
    186187                        case GN_PHONEBOOK_NUMBER_None:   
    187188                        case GN_PHONEBOOK_NUMBER_Common:         
    188189                        case GN_PHONEBOOK_NUMBER_General: 
    189                                 osync_xmlfield_set_attr(xmlfield, "Type", "VOICE"); 
     190                                osync_xmlfield_set_attr(phonefield, "Type", "Voice"); 
    190191                                break; 
    191192                }        
     
    279280                if (sub) { 
    280281                        tmp = (char *) xmlNodeGetContent(sub); 
    281                         if (!strcasecmp(tmp, "WORK")) 
     282                        if (!strcasecmp(tmp, "Work")) 
    282283                                contact->subentries[subcount].number_type = GN_PHONEBOOK_NUMBER_Work;  
    283                         else if (!strcasecmp(tmp, "HOME")) 
     284                        else if (!strcasecmp(tmp, "Home")) 
    284285                                contact->subentries[subcount].number_type = GN_PHONEBOOK_NUMBER_Home;  
    285                         else if (!strcasecmp(tmp, "FAX")) 
     286                        else if (!strcasecmp(tmp, "Fax")) 
    286287                                contact->subentries[subcount].number_type = GN_PHONEBOOK_NUMBER_Fax;  
    287                         else if (!strcasecmp(tmp, "CELL")) 
     288                        else if (!strcasecmp(tmp, "Cellular")) 
    288289                                contact->subentries[subcount].number_type = GN_PHONEBOOK_NUMBER_Mobile;  
    289290                        else