author | ulf69 <ulf69> | 2004-09-09 18:57:57 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-09-09 18:57:57 (UTC) |
commit | 880518b6f1d4b06e3df45224c244d9c62f6fb7a9 (patch) (side-by-side diff) | |
tree | 2b0b5a0c7e40481c31f29ff2bd98aa6abb4c6c90 /kabc/vcard21parser.cpp | |
parent | 72860f2b84ba97de9223238d9fb97edc0804cc68 (diff) | |
download | kdepimpi-880518b6f1d4b06e3df45224c244d9c62f6fb7a9.zip kdepimpi-880518b6f1d4b06e3df45224c244d9c62f6fb7a9.tar.gz kdepimpi-880518b6f1d4b06e3df45224c244d9c62f6fb7a9.tar.bz2 |
added sip type to phonnumbers
-rw-r--r-- | kabc/vcard21parser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp index b02aac4..277de22 100644 --- a/kabc/vcard21parser.cpp +++ b/kabc/vcard21parser.cpp @@ -141,65 +141,66 @@ bool VCardLineX::isValid() const return true; break; case 'r': if ( name == VCARD_ROLE ) return true; if ( name == VCARD_REV ) return true; break; case 's': if ( name == VCARD_SOURCE ) return true; if ( name == VCARD_SOUND ) return true; break; case 't': if ( name == VCARD_TEL && qualified && (qualifiers.contains(VCARD_TEL_HOME) || qualifiers.contains(VCARD_TEL_WORK) || qualifiers.contains(VCARD_TEL_PREF) || qualifiers.contains(VCARD_TEL_VOICE) || qualifiers.contains(VCARD_TEL_FAX) || qualifiers.contains(VCARD_TEL_MSG) || qualifiers.contains(VCARD_TEL_CELL) || qualifiers.contains(VCARD_TEL_PAGER) || qualifiers.contains(VCARD_TEL_BBS) || qualifiers.contains(VCARD_TEL_MODEM) || qualifiers.contains(VCARD_TEL_CAR) || qualifiers.contains(VCARD_TEL_ISDN) || qualifiers.contains(VCARD_TEL_VIDEO) || - qualifiers.contains(VCARD_TEL_PCS) + qualifiers.contains(VCARD_TEL_PCS) || + qualifiers.contains(VCARD_TEL_SIP) ) ) return true; if ( name == VCARD_TZ ) return true; if ( name == VCARD_TITLE ) return true; break; case 'u': if ( name == VCARD_URL ) return true; if ( name == VCARD_UID ) return true; break; case 'v': if ( name == VCARD_VERSION ) return true; break; default: break; } return false; } VCard21Parser::VCard21Parser() { } VCard21Parser::~VCard21Parser() @@ -272,64 +273,66 @@ KABC::Addressee VCard21Parser::readFromString( const QString &data) for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { if ( (*i).name == VCARD_TEL ) { int type = 0; if ( (*i).qualified ) { if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) type |= PhoneNumber::Home; if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) type |= PhoneNumber::Work; if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) type |= PhoneNumber::Pref; // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) // type |= PhoneNumber::Voice; if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) type |= PhoneNumber::Fax; if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) type |= PhoneNumber::Msg; if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) type |= PhoneNumber::Cell; if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) ) type |= PhoneNumber::Pager; if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) ) type |= PhoneNumber::Bbs; if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) ) type |= PhoneNumber::Modem; if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) ) type |= PhoneNumber::Car; if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) type |= PhoneNumber::Isdn; if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) type |= PhoneNumber::Video; if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) type |= PhoneNumber::Pcs; + if ( (*i).qualifiers.contains( VCARD_TEL_SIP ) ) + type |= PhoneNumber::Sip; } addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); } } //set the addressee's addresses for ( QValueListIterator<VCardLineX> i = mVCard->_vcdata->begin();i != mVCard->_vcdata->end(); ++i ) { if ( (*i).name == VCARD_ADR ) { int type = 0; if ( (*i).qualified ) { if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) type |= Address::Dom; if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) type |= Address::Intl; if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) type |= Address::Postal; if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) type |= Address::Parcel; if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) type |= Address::Home; if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) type |= Address::Work; if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) type |= Address::Pref; } addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); } } //set the addressee's delivery label tmpStr = mVCard->getValue(VCARD_LABEL); if (!tmpStr.isEmpty()) { |