Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp index f85cf38..b569f8b 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | |||
@@ -40,5 +40,5 @@ | |||
40 | namespace Opie { | 40 | namespace Opie { |
41 | 41 | ||
42 | OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , const QString& filename ): | 42 | OPimContactAccessBackend_VCard::OPimContactAccessBackend_VCard ( const QString& , const QString& filename ): |
43 | m_dirty( false ), | 43 | m_dirty( false ), |
44 | m_file( filename ) | 44 | m_file( filename ) |
@@ -48,5 +48,5 @@ OContactAccessBackend_VCard::OContactAccessBackend_VCard ( const QString& , cons | |||
48 | 48 | ||
49 | 49 | ||
50 | bool OContactAccessBackend_VCard::load () | 50 | bool OPimContactAccessBackend_VCard::load () |
51 | { | 51 | { |
52 | m_map.clear(); | 52 | m_map.clear(); |
@@ -65,5 +65,5 @@ bool OContactAccessBackend_VCard::load () | |||
65 | 65 | ||
66 | while ( obj ) { | 66 | while ( obj ) { |
67 | OContact con = parseVObject( obj ); | 67 | OPimContact con = parseVObject( obj ); |
68 | /* | 68 | /* |
69 | * if uid is 0 assign a new one | 69 | * if uid is 0 assign a new one |
@@ -86,9 +86,9 @@ bool OContactAccessBackend_VCard::load () | |||
86 | 86 | ||
87 | } | 87 | } |
88 | bool OContactAccessBackend_VCard::reload() | 88 | bool OPimContactAccessBackend_VCard::reload() |
89 | { | 89 | { |
90 | return load(); | 90 | return load(); |
91 | } | 91 | } |
92 | bool OContactAccessBackend_VCard::save() | 92 | bool OPimContactAccessBackend_VCard::save() |
93 | { | 93 | { |
94 | if (!m_dirty ) | 94 | if (!m_dirty ) |
@@ -104,5 +104,5 @@ bool OContactAccessBackend_VCard::save() | |||
104 | 104 | ||
105 | VObject *vo; | 105 | VObject *vo; |
106 | for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ | 106 | for(QMap<int, OPimContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ |
107 | vo = createVObject( *it ); | 107 | vo = createVObject( *it ); |
108 | writeVObject( file.directHandle() , vo ); | 108 | writeVObject( file.directHandle() , vo ); |
@@ -117,5 +117,5 @@ bool OContactAccessBackend_VCard::save() | |||
117 | 117 | ||
118 | } | 118 | } |
119 | void OContactAccessBackend_VCard::clear () | 119 | void OPimContactAccessBackend_VCard::clear () |
120 | { | 120 | { |
121 | m_map.clear(); | 121 | m_map.clear(); |
@@ -123,5 +123,5 @@ void OContactAccessBackend_VCard::clear () | |||
123 | } | 123 | } |
124 | 124 | ||
125 | bool OContactAccessBackend_VCard::add ( const OContact& newcontact ) | 125 | bool OPimContactAccessBackend_VCard::add ( const OPimContact& newcontact ) |
126 | { | 126 | { |
127 | m_map.insert( newcontact.uid(), newcontact ); | 127 | m_map.insert( newcontact.uid(), newcontact ); |
@@ -130,5 +130,5 @@ bool OContactAccessBackend_VCard::add ( const OContact& newcontact ) | |||
130 | } | 130 | } |
131 | 131 | ||
132 | bool OContactAccessBackend_VCard::remove ( int uid ) | 132 | bool OPimContactAccessBackend_VCard::remove ( int uid ) |
133 | { | 133 | { |
134 | m_map.remove( uid ); | 134 | m_map.remove( uid ); |
@@ -137,5 +137,5 @@ bool OContactAccessBackend_VCard::remove ( int uid ) | |||
137 | } | 137 | } |
138 | 138 | ||
139 | bool OContactAccessBackend_VCard::replace ( const OContact &contact ) | 139 | bool OPimContactAccessBackend_VCard::replace ( const OPimContact &contact ) |
140 | { | 140 | { |
141 | m_map.replace( contact.uid(), contact ); | 141 | m_map.replace( contact.uid(), contact ); |
@@ -144,13 +144,13 @@ bool OContactAccessBackend_VCard::replace ( const OContact &contact ) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | OContact OContactAccessBackend_VCard::find ( int uid ) const | 146 | OPimContact OPimContactAccessBackend_VCard::find ( int uid ) const |
147 | { | 147 | { |
148 | return m_map[uid]; | 148 | return m_map[uid]; |
149 | } | 149 | } |
150 | 150 | ||
151 | QArray<int> OContactAccessBackend_VCard::allRecords() const | 151 | QArray<int> OPimContactAccessBackend_VCard::allRecords() const |
152 | { | 152 | { |
153 | QArray<int> ar( m_map.count() ); | 153 | QArray<int> ar( m_map.count() ); |
154 | QMap<int, OContact>::ConstIterator it; | 154 | QMap<int, OPimContact>::ConstIterator it; |
155 | int i = 0; | 155 | int i = 0; |
156 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { | 156 | for ( it = m_map.begin(); it != m_map.end(); ++it ) { |
@@ -162,5 +162,5 @@ QArray<int> OContactAccessBackend_VCard::allRecords() const | |||
162 | 162 | ||
163 | // Not implemented | 163 | // Not implemented |
164 | QArray<int> OContactAccessBackend_VCard::queryByExample ( const OContact&, int, const QDateTime& ) | 164 | QArray<int> OPimContactAccessBackend_VCard::queryByExample ( const OPimContact&, int, const QDateTime& ) |
165 | { | 165 | { |
166 | QArray<int> ar(0); | 166 | QArray<int> ar(0); |
@@ -169,5 +169,5 @@ QArray<int> OContactAccessBackend_VCard::queryByExample ( const OContact&, int, | |||
169 | 169 | ||
170 | // Not implemented | 170 | // Not implemented |
171 | QArray<int> OContactAccessBackend_VCard::matchRegexp( const QRegExp& ) const | 171 | QArray<int> OPimContactAccessBackend_VCard::matchRegexp( const QRegExp& ) const |
172 | { | 172 | { |
173 | QArray<int> ar(0); | 173 | QArray<int> ar(0); |
@@ -175,15 +175,15 @@ QArray<int> OContactAccessBackend_VCard::matchRegexp( const QRegExp& ) const | |||
175 | } | 175 | } |
176 | 176 | ||
177 | const uint OContactAccessBackend_VCard::querySettings() | 177 | const uint OPimContactAccessBackend_VCard::querySettings() |
178 | { | 178 | { |
179 | return 0; // No search possible | 179 | return 0; // No search possible |
180 | } | 180 | } |
181 | 181 | ||
182 | bool OContactAccessBackend_VCard::hasQuerySettings (uint ) const | 182 | bool OPimContactAccessBackend_VCard::hasQuerySettings (uint ) const |
183 | { | 183 | { |
184 | return false; // No search possible, therefore all settings invalid ;) | 184 | return false; // No search possible, therefore all settings invalid ;) |
185 | } | 185 | } |
186 | 186 | ||
187 | bool OContactAccessBackend_VCard::wasChangedExternally() | 187 | bool OPimContactAccessBackend_VCard::wasChangedExternally() |
188 | { | 188 | { |
189 | return false; // Don't expect concurrent access | 189 | return false; // Don't expect concurrent access |
@@ -191,5 +191,5 @@ bool OContactAccessBackend_VCard::wasChangedExternally() | |||
191 | 191 | ||
192 | // Not implemented | 192 | // Not implemented |
193 | QArray<int> OContactAccessBackend_VCard::sorted( bool , int, int, int ) | 193 | QArray<int> OPimContactAccessBackend_VCard::sorted( bool , int, int, int ) |
194 | { | 194 | { |
195 | QArray<int> ar(0); | 195 | QArray<int> ar(0); |
@@ -200,7 +200,7 @@ QArray<int> OContactAccessBackend_VCard::sorted( bool , int, int, int ) | |||
200 | 200 | ||
201 | 201 | ||
202 | OContact OContactAccessBackend_VCard::parseVObject( VObject *obj ) | 202 | OPimContact OPimContactAccessBackend_VCard::parseVObject( VObject *obj ) |
203 | { | 203 | { |
204 | OContact c; | 204 | OPimContact c; |
205 | 205 | ||
206 | VObjectIterator it; | 206 | VObjectIterator it; |
@@ -428,5 +428,5 @@ OContact OContactAccessBackend_VCard::parseVObject( VObject *obj ) | |||
428 | 428 | ||
429 | 429 | ||
430 | VObject* OContactAccessBackend_VCard::createVObject( const OContact &c ) | 430 | VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c ) |
431 | { | 431 | { |
432 | VObject *vcard = newVObject( VCCardProp ); | 432 | VObject *vcard = newVObject( VCCardProp ); |
@@ -534,5 +534,5 @@ VObject* OContactAccessBackend_VCard::createVObject( const OContact &c ) | |||
534 | } | 534 | } |
535 | 535 | ||
536 | QString OContactAccessBackend_VCard::convDateToVCardDate( const QDate& d ) const | 536 | QString OPimContactAccessBackend_VCard::convDateToVCardDate( const QDate& d ) const |
537 | { | 537 | { |
538 | QString str_rfc2425 = QString("%1-%2-%3") | 538 | QString str_rfc2425 = QString("%1-%2-%3") |
@@ -548,5 +548,5 @@ QString OContactAccessBackend_VCard::convDateToVCardDate( const QDate& d ) const | |||
548 | } | 548 | } |
549 | 549 | ||
550 | QDate OContactAccessBackend_VCard::convVCardDateToDate( const QString& datestr ) | 550 | QDate OPimContactAccessBackend_VCard::convVCardDateToDate( const QString& datestr ) |
551 | { | 551 | { |
552 | int monthPos = datestr.find('-'); | 552 | int monthPos = datestr.find('-'); |
@@ -573,5 +573,5 @@ QDate OContactAccessBackend_VCard::convVCardDateToDate( const QString& datestr ) | |||
573 | } | 573 | } |
574 | 574 | ||
575 | VObject* OContactAccessBackend_VCard::safeAddPropValue( VObject *o, const char *prop, const QString &value ) | 575 | VObject* OPimContactAccessBackend_VCard::safeAddPropValue( VObject *o, const char *prop, const QString &value ) |
576 | { | 576 | { |
577 | VObject *ret = 0; | 577 | VObject *ret = 0; |
@@ -581,5 +581,5 @@ VObject* OContactAccessBackend_VCard::safeAddPropValue( VObject *o, const char * | |||
581 | } | 581 | } |
582 | 582 | ||
583 | VObject* OContactAccessBackend_VCard::safeAddProp( VObject *o, const char *prop) | 583 | VObject* OPimContactAccessBackend_VCard::safeAddProp( VObject *o, const char *prop) |
584 | { | 584 | { |
585 | VObject *ret = 0; | 585 | VObject *ret = 0; |