Exemple #1
0
Secrecy VCardTool::parseSecrecy(const VCardLine &line)
{
    Secrecy secrecy;

    if(line.value().asString().lower() == "public")
        secrecy.setType(Secrecy::Public);
    if(line.value().asString().lower() == "private")
        secrecy.setType(Secrecy::Private);
    if(line.value().asString().lower() == "confidential")
        secrecy.setType(Secrecy::Confidential);

    return secrecy;
}
Exemple #2
0
Secrecy VCardFormatImpl::readClassValue( ContentLine *cl )
{
  ClassValue *classValue = (ClassValue *)cl->value();
  if ( classValue ) {
    Secrecy secrecy;
    switch ( classValue->type() ) {
      case ClassValue::Public:
        secrecy.setType( Secrecy::Public );
        break;
      case ClassValue::Private:
        secrecy.setType( Secrecy::Private );
        break;
      case ClassValue::Confidential:
        secrecy.setType( Secrecy::Confidential );
        break;
    }

    return secrecy;
  } else
    return Secrecy();
}