summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index af77a05..43e530a 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -164,26 +164,12 @@ QArray<int> OPimContactAccessBackend_VCard::allRecords() const
164 ar[i] = it.key(); 164 ar[i] = it.key();
165 i++; 165 i++;
166 } 166 }
167 return ar; 167 return ar;
168} 168}
169 169
170// Not implemented
171QArray<int> OPimContactAccessBackend_VCard::queryByExample ( const OPimContact&, int, const QDateTime& )
172{
173 QArray<int> ar(0);
174 return ar;
175}
176
177// Not implemented
178QArray<int> OPimContactAccessBackend_VCard::matchRegexp( const QRegExp& ) const
179{
180 QArray<int> ar(0);
181 return ar;
182}
183
184const uint OPimContactAccessBackend_VCard::querySettings() 170const uint OPimContactAccessBackend_VCard::querySettings()
185{ 171{
186 return 0; // No search possible 172 return 0; // No search possible
187} 173}
188 174
189bool OPimContactAccessBackend_VCard::hasQuerySettings (uint ) const 175bool OPimContactAccessBackend_VCard::hasQuerySettings (uint ) const
@@ -193,22 +179,13 @@ bool OPimContactAccessBackend_VCard::hasQuerySettings (uint ) const
193 179
194bool OPimContactAccessBackend_VCard::wasChangedExternally() 180bool OPimContactAccessBackend_VCard::wasChangedExternally()
195{ 181{
196 return false; // Don't expect concurrent access 182 return false; // Don't expect concurrent access
197} 183}
198 184
199// Not implemented
200QArray<int> OPimContactAccessBackend_VCard::sorted( bool , int, int, int )
201{
202 QArray<int> ar(0);
203 return ar;
204}
205
206// *** Private stuff *** 185// *** Private stuff ***
207
208
209OPimContact OPimContactAccessBackend_VCard::parseVObject( VObject *obj ) 186OPimContact OPimContactAccessBackend_VCard::parseVObject( VObject *obj )
210{ 187{
211 OPimContact c; 188 OPimContact c;
212 189
213 VObjectIterator it; 190 VObjectIterator it;
214 initPropIterator( &it, obj ); 191 initPropIterator( &it, obj );
@@ -317,13 +294,12 @@ OPimContact OPimContactAccessBackend_VCard::parseVObject( VObject *obj )
317 if ( (type & UNKNOWN) != UNKNOWN ) { 294 if ( (type & UNKNOWN) != UNKNOWN ) {
318 if ( ( type & (HOME|WORK) ) == 0 ) // default 295 if ( ( type & (HOME|WORK) ) == 0 ) // default
319 type |= HOME; 296 type |= HOME;
320 if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default 297 if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default
321 type |= VOICE; 298 type |= VOICE;
322 299
323 owarn << "value %s %d" << value.data() << type << oendl;
324 if ( (type & (VOICE|HOME) ) == (VOICE|HOME) && (type & (CELL|HOME) ) != (CELL|HOME) ) 300 if ( (type & (VOICE|HOME) ) == (VOICE|HOME) && (type & (CELL|HOME) ) != (CELL|HOME) )
325 c.setHomePhone( value ); 301 c.setHomePhone( value );
326 if ( ( type & (FAX|HOME) ) == (FAX|HOME) ) 302 if ( ( type & (FAX|HOME) ) == (FAX|HOME) )
327 c.setHomeFax( value ); 303 c.setHomeFax( value );
328 if ( ( type & (CELL|HOME) ) == (CELL|HOME) ) 304 if ( ( type & (CELL|HOME) ) == (CELL|HOME) )
329 c.setHomeMobile( value ); 305 c.setHomeMobile( value );
@@ -522,13 +498,12 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c )
522 } 498 }
523 499
524 safeAddPropValue( vcard, VCNoteProp, c.notes() ); 500 safeAddPropValue( vcard, VCNoteProp, c.notes() );
525 501
526 // Exporting Birthday regarding RFC 2425 (5.8.4) 502 // Exporting Birthday regarding RFC 2425 (5.8.4)
527 if ( c.birthday().isValid() ){ 503 if ( c.birthday().isValid() ){
528 owarn << "Exporting birthday as: " << convDateToVCardDate( c.birthday() ) << "" << oendl;
529 safeAddPropValue( vcard, VCBirthDateProp, convDateToVCardDate( c.birthday() ) ); 504 safeAddPropValue( vcard, VCBirthDateProp, convDateToVCardDate( c.birthday() ) );
530 } 505 }
531 506
532 if ( !c.company().isEmpty() || !c.department().isEmpty() || !c.office().isEmpty() ) { 507 if ( !c.company().isEmpty() || !c.department().isEmpty() || !c.office().isEmpty() ) {
533 VObject *org = safeAddProp( vcard, VCOrgProp ); 508 VObject *org = safeAddProp( vcard, VCOrgProp );
534 safeAddPropValue( org, VCOrgNameProp, c.company() ); 509 safeAddPropValue( org, VCOrgNameProp, c.company() );
@@ -541,13 +516,12 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c )
541 safeAddPropValue( vcard, "X-Qtopia-Manager", c.manager() ); 516 safeAddPropValue( vcard, "X-Qtopia-Manager", c.manager() );
542 safeAddPropValue( vcard, "X-Qtopia-Assistant", c.assistant() ); 517 safeAddPropValue( vcard, "X-Qtopia-Assistant", c.assistant() );
543 518
544 safeAddPropValue( vcard, "X-Qtopia-Spouse", c.spouse() ); 519 safeAddPropValue( vcard, "X-Qtopia-Spouse", c.spouse() );
545 safeAddPropValue( vcard, "X-Qtopia-Gender", c.gender() ); 520 safeAddPropValue( vcard, "X-Qtopia-Gender", c.gender() );
546 if ( c.anniversary().isValid() ){ 521 if ( c.anniversary().isValid() ){
547 owarn << "Exporting anniversary as: " << convDateToVCardDate( c.anniversary() ) << "" << oendl;
548 safeAddPropValue( vcard, "X-Qtopia-Anniversary", convDateToVCardDate( c.anniversary() ) ); 522 safeAddPropValue( vcard, "X-Qtopia-Anniversary", convDateToVCardDate( c.anniversary() ) );
549 } 523 }
550 safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() ); 524 safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() );
551 safeAddPropValue( vcard, "X-Qtopia-Children", c.children() ); 525 safeAddPropValue( vcard, "X-Qtopia-Children", c.children() );
552 526
553 return vcard; 527 return vcard;