VCardLine VCardTool::createSecrecy(const Secrecy &secrecy) { VCardLine line("CLASS"); int type = secrecy.type(); if(type == Secrecy::Public) line.setValue("PUBLIC"); else if(type == Secrecy::Private) line.setValue("PRIVATE"); else if(type == Secrecy::Confidential) line.setValue("CONFIDENTIAL"); return line; }
void VCardFormatImpl::addClassValue( VCARD::VCard *vcard, const Secrecy &secrecy ) { ContentLine cl; cl.setName( EntityTypeToParamName( EntityClass ) ); ClassValue *v = new ClassValue; switch ( secrecy.type() ) { case Secrecy::Public: v->setType( (int)ClassValue::Public ); break; case Secrecy::Private: v->setType( (int)ClassValue::Private ); break; case Secrecy::Confidential: v->setType( (int)ClassValue::Confidential ); break; } cl.setValue( v ); vcard->add(cl); }