kabc
secrecy.h
00001 /* 00002 This file is part of libkabc. 00003 Copyright (c) 2002 Tobias Koenig <tokoe@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KABC_SECRECY_H 00022 #define KABC_SECRECY_H 00023 00024 #include "kabc_export.h" 00025 #include <QtCore/QList> 00026 #include <QtCore/QSharedDataPointer> 00027 00028 namespace KABC { 00029 00030 class KABC_EXPORT Secrecy 00031 { 00032 friend KABC_EXPORT QDataStream &operator<<( QDataStream &, const Secrecy & ); 00033 friend KABC_EXPORT QDataStream &operator>>( QDataStream &, Secrecy & ); 00034 00035 public: 00043 enum Type { 00044 Public, 00045 Private, 00046 Confidential, 00047 Invalid 00048 }; 00049 00053 typedef QList<Type> TypeList; 00054 00060 Secrecy( Type type = Invalid ); 00061 00065 Secrecy( const Secrecy &other ); 00066 00070 ~Secrecy(); 00071 00072 Secrecy &operator=( const Secrecy & ); 00073 00074 bool operator==( const Secrecy & ) const; 00075 bool operator!=( const Secrecy & ) const; 00076 00080 bool isValid() const; 00081 00087 void setType( Type type ); 00088 00092 Type type() const; 00093 00097 static TypeList typeList(); 00098 00102 static QString typeLabel( Type type ); 00103 00107 QString toString() const; 00108 00109 private: 00110 class PrivateData; 00111 QSharedDataPointer<PrivateData> d; 00112 }; 00113 00117 KABC_EXPORT QDataStream &operator<<( QDataStream &stream, const Secrecy &secrecy ); 00118 00122 KABC_EXPORT QDataStream &operator>>( QDataStream &stream, Secrecy &secrecy ); 00123 00124 } 00125 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:26:08 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:26:08 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.