29 VCard::VCard(
const VCard& vcard )
31 mLineMap = vcard.mLineMap;
38 VCard& VCard::operator=(
const VCard& vcard )
43 mLineMap = vcard.mLineMap;
53 TQStringList VCard::identifiers()
const
55 return mLineMap.keys();
58 void VCard::addLine(
const VCardLine& line )
60 mLineMap[ line.identifier() ].append( line );
63 VCardLine::List VCard::lines(
const TQString& identifier )
const
65 LineMap::ConstIterator it = mLineMap.find( identifier );
66 if ( it == mLineMap.end() )
67 return VCardLine::List();
72 VCardLine VCard::line(
const TQString& identifier )
const
74 LineMap::ConstIterator it = mLineMap.find( identifier );
75 if ( it == mLineMap.end() )
78 if ( (*it).isEmpty() )
84 void VCard::setVersion( Version version )
86 mLineMap.erase(
"VERSION" );
89 line.setIdentifier(
"VERSION" );
90 if ( version == v2_1 )
91 line.setIdentifier(
"2.1" );
92 else if ( version == v3_0 )
93 line.setIdentifier(
"3.0" );
95 mLineMap[
"VERSION" ].append( line );
98 VCard::Version VCard::version()
const
100 LineMap::ConstIterator versionEntry = mLineMap.find(
"VERSION" );
101 if ( versionEntry == mLineMap.end() )
104 VCardLine line = ( *versionEntry )[ 0 ];
105 if ( line.value() ==
"2.1" )
static data, shared by ALL addressee objects