diff --git a/src/calendarurl.h b/src/calendarurl.h index 77d7fccb..674575cb 100644 --- a/src/calendarurl.h +++ b/src/calendarurl.h @@ -1,82 +1,82 @@ /* This file is part of the KContacts framework. Copyright (C) 2015-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef CALENDARURL_H #define CALENDARURL_H #include "kcontacts_export.h" #include #include #include class QUrl; + +namespace KContacts { /** @short Class that holds a Calendar Url (FBURL/CALADRURI/CALURI) * @since 4.14.6 */ - -namespace KContacts { class KCONTACTS_EXPORT CalendarUrl { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const CalendarUrl &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, CalendarUrl &); public: enum CalendarType { Unknown = 0, FBUrl, CALUri, CALADRUri, EndCalendarType }; CalendarUrl(); CalendarUrl(CalendarUrl::CalendarType type); CalendarUrl(const CalendarUrl &other); ~CalendarUrl(); typedef QVector List; Q_REQUIRED_RESULT bool isValid() const; void setType(CalendarUrl::CalendarType type); Q_REQUIRED_RESULT CalendarUrl::CalendarType type() const; void setUrl(const QUrl &url); QUrl url() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const CalendarUrl &other) const; Q_REQUIRED_RESULT bool operator!=(const CalendarUrl &other) const; CalendarUrl &operator=(const CalendarUrl &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const CalendarUrl &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, CalendarUrl &object); } Q_DECLARE_TYPEINFO(KContacts::CalendarUrl, Q_MOVABLE_TYPE); #endif // CALENDARURL_H diff --git a/src/clientpidmap.h b/src/clientpidmap.h index d68ed70e..51226ecf 100644 --- a/src/clientpidmap.h +++ b/src/clientpidmap.h @@ -1,69 +1,69 @@ /* This file is part of the KContacts framework. Copyright (C) 2016-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef CLIENTPIDMAP_H #define CLIENTPIDMAP_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a ClientPidMap for a contact. * @since 5.4 */ -namespace KContacts { class KCONTACTS_EXPORT ClientPidMap { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const ClientPidMap &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, ClientPidMap &); public: ClientPidMap(); ClientPidMap(const ClientPidMap &other); ClientPidMap(const QString &clientpidmap); ~ClientPidMap(); typedef QVector List; void setClientPidMap(const QString &clientpidmap); Q_REQUIRED_RESULT QString clientPidMap() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const ClientPidMap &other) const; Q_REQUIRED_RESULT bool operator!=(const ClientPidMap &other) const; ClientPidMap &operator=(const ClientPidMap &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const ClientPidMap &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, ClientPidMap &object); } Q_DECLARE_TYPEINFO(KContacts::ClientPidMap, Q_MOVABLE_TYPE); #endif // CLIENTPIDMAP_H diff --git a/src/email.h b/src/email.h index 7a6d48ca..a7199ab2 100644 --- a/src/email.h +++ b/src/email.h @@ -1,115 +1,115 @@ /* This file is part of the KContacts framework. Copyright (C) 2015-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef EMAIL_H #define EMAIL_H #include "kcontacts_export.h" #include #include #include #include +namespace KContacts { + /** @short Class that holds a Email for a contact. * @since 4.14.5 */ - -namespace KContacts { class KCONTACTS_EXPORT Email { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Email &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Email &); Q_GADGET Q_PROPERTY(QString email READ mail WRITE setEmail) Q_PROPERTY(bool isValid READ isValid) Q_PROPERTY(Type type READ type WRITE setType) Q_PROPERTY(bool isPreferred READ isPreferred) public: /** * Creates an empty email object. */ Email(); Email(const Email &other); Email(const QString &mail); ~Email(); typedef QVector List; /** Email types. */ enum TypeFlag { Unknown = 0, /**< No or unknown email type is set. */ Home = 1, /**< Personal email. */ Work = 2, /**< Work email. */ Other = 4, /**< Other email. */ Preferred = 8 /**< Preferred email address. */ }; Q_DECLARE_FLAGS(Type, TypeFlag) Q_FLAG(Type) void setEmail(const QString &mail); Q_REQUIRED_RESULT QString mail() const; Q_REQUIRED_RESULT bool isValid() const; /** * Returns the type of the email. * @since 5.12 */ Type type() const; /** * Sets the email type. * @since 5.12 */ void setType(Type type); /** * Returns whether this is the preferred email address. * @since 5.12 */ bool isPreferred() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const Email &other) const; Q_REQUIRED_RESULT bool operator!=(const Email &other) const; Email &operator=(const Email &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; Q_DECLARE_OPERATORS_FOR_FLAGS(Email::Type) KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Email &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Email &object); } Q_DECLARE_METATYPE(KContacts::Email) Q_DECLARE_TYPEINFO(KContacts::Email, Q_MOVABLE_TYPE); #endif // EMAIL_H diff --git a/src/fieldgroup.h b/src/fieldgroup.h index 828626ac..f9744800 100644 --- a/src/fieldgroup.h +++ b/src/fieldgroup.h @@ -1,73 +1,73 @@ /* This file is part of the KContacts framework. Copyright (C) 2016-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef FIELDGROUP_H #define FIELDGROUP_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { + /** @short Class that holds a FieldGroup for a contact. * @since 5.3 */ - -namespace KContacts { class KCONTACTS_EXPORT FieldGroup { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const FieldGroup &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, FieldGroup &); public: FieldGroup(); FieldGroup(const FieldGroup &other); FieldGroup(const QString &fieldGroupName); ~FieldGroup(); typedef QVector List; void setFieldGroupName(const QString &fieldGroup); Q_REQUIRED_RESULT QString fieldGroupName() const; Q_REQUIRED_RESULT bool isValid() const; void setValue(const QString &value); Q_REQUIRED_RESULT QString value() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const FieldGroup &other) const; Q_REQUIRED_RESULT bool operator!=(const FieldGroup &other) const; FieldGroup &operator=(const FieldGroup &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const FieldGroup &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, FieldGroup &object); } Q_DECLARE_TYPEINFO(KContacts::FieldGroup, Q_MOVABLE_TYPE); #endif // FIELDGROUP_H diff --git a/src/gender.h b/src/gender.h index c4f30a1c..9f8aef0b 100644 --- a/src/gender.h +++ b/src/gender.h @@ -1,70 +1,70 @@ /* This file is part of the KContacts framework. Copyright (C) 2015-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef GENDER_H #define GENDER_H #include "kcontacts_export.h" #include #include +namespace KContacts { + /** @short Class that holds a Gender for a contact. * @since 4.14.5 */ - -namespace KContacts { class KCONTACTS_EXPORT Gender { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Gender &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Gender &); public: /** * Creates an empty Gender object. */ Gender(); Gender(const Gender &other); Gender(const QString &gender); ~Gender(); void setGender(const QString &gender); Q_REQUIRED_RESULT QString gender() const; void setComment(const QString &comment); Q_REQUIRED_RESULT QString comment() const; Q_REQUIRED_RESULT bool isValid() const; Q_REQUIRED_RESULT bool operator==(const Gender &other) const; Q_REQUIRED_RESULT bool operator!=(const Gender &other) const; Gender &operator=(const Gender &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Gender &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Gender &object); } Q_DECLARE_TYPEINFO(KContacts::Gender, Q_MOVABLE_TYPE); #endif // GENDER_H diff --git a/src/impp.h b/src/impp.h index 60bd52c7..23f71f62 100644 --- a/src/impp.h +++ b/src/impp.h @@ -1,94 +1,98 @@ /* This file is part of libkabc. Copyright (C) 2015-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef IMPP_H #define IMPP_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a IMPP for a contact. + * + * IMPP stands for "Instant Messaging and Presence Protocol". This field is defined + * in the vCard 3.0 extension RFC 4770 and is part of vCard 4.0 (RFC 6350). + * * @since 4.14.5 */ -namespace KContacts { class KCONTACTS_EXPORT Impp { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Impp &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Impp &); public: Impp(); Impp(const Impp &other); Impp(const QString &address); ~Impp(); typedef QVector List; enum ImppType { Unknown = 0, Skype = 1, Xmpp = 2, Jabber = 3, Sip = 4, Aim = 5, Msn = 6, Twitter = 7, GoogleTalk = 8, Yahoo = 9, Qq = 10, GaduGadu = 11, Ownclound = 12, Icq = 13, Facebook = 14, EndList }; Q_REQUIRED_RESULT bool isValid() const; Q_REQUIRED_RESULT ImppType type() const; void setType(ImppType type); void setAddress(const QString &address); Q_REQUIRED_RESULT QString address() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const Impp &other) const; Q_REQUIRED_RESULT bool operator!=(const Impp &other) const; Impp &operator=(const Impp &other); Q_REQUIRED_RESULT QString toString() const; Q_REQUIRED_RESULT static QString typeToString(ImppType type); private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Impp &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Impp &object); } Q_DECLARE_TYPEINFO(KContacts::Impp, Q_MOVABLE_TYPE); #endif // IMPP_H diff --git a/src/lang.h b/src/lang.h index 8907175f..d62af63d 100644 --- a/src/lang.h +++ b/src/lang.h @@ -1,69 +1,69 @@ /* This file is part of the KContacts framework. Copyright (C) 2015-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LANG_H #define LANG_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a Language for a contact. * @since 4.14.5 */ -namespace KContacts { class KCONTACTS_EXPORT Lang { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Lang &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Lang &); public: Lang(); Lang(const Lang &other); Lang(const QString &language); ~Lang(); typedef QVector List; void setLanguage(const QString &lang); Q_REQUIRED_RESULT QString language() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const Lang &other) const; Q_REQUIRED_RESULT bool operator!=(const Lang &other) const; Lang &operator=(const Lang &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Lang &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Lang &object); } Q_DECLARE_TYPEINFO(KContacts::Lang, Q_MOVABLE_TYPE); #endif // LANG_H diff --git a/src/nickname.h b/src/nickname.h index 5365e6ec..fe07d124 100644 --- a/src/nickname.h +++ b/src/nickname.h @@ -1,69 +1,69 @@ /* This file is part of the KContacts framework. Copyright (C) 2016-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef NICKNAME_H #define NICKNAME_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a NickName for a contact. * @since 5.3 */ -namespace KContacts { class KCONTACTS_EXPORT NickName { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const NickName &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, NickName &); public: NickName(); NickName(const NickName &other); NickName(const QString &nickname); ~NickName(); typedef QVector List; void setNickName(const QString &nickname); Q_REQUIRED_RESULT QString nickname() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const NickName &other) const; Q_REQUIRED_RESULT bool operator!=(const NickName &other) const; NickName &operator=(const NickName &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const NickName &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, NickName &object); } Q_DECLARE_TYPEINFO(KContacts::NickName, Q_MOVABLE_TYPE); #endif // NICKNAME_H diff --git a/src/note.h b/src/note.h index d2bf6460..67a55c1c 100644 --- a/src/note.h +++ b/src/note.h @@ -1,69 +1,69 @@ /* This file is part of the KContacts framework. Copyright (C) 2016-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef NOTE_H #define NOTE_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a Note for a contact. * @since 5.3 */ -namespace KContacts { class KCONTACTS_EXPORT Note { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Note &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Note &); public: Note(); Note(const Note &other); Note(const QString ¬e); ~Note(); typedef QVector List; void setNote(const QString ¬e); Q_REQUIRED_RESULT QString note() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const Note &other) const; Q_REQUIRED_RESULT bool operator!=(const Note &other) const; Note &operator=(const Note &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Note &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Note &object); } Q_DECLARE_TYPEINFO(KContacts::Note, Q_MOVABLE_TYPE); #endif // NOTE_H diff --git a/src/org.h b/src/org.h index b04dad5d..9b955dfa 100644 --- a/src/org.h +++ b/src/org.h @@ -1,69 +1,69 @@ /* This file is part of the KContacts framework. Copyright (C) 2016-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef ORG_H #define ORG_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a Organization for a contact. * @since 5.3 */ -namespace KContacts { class KCONTACTS_EXPORT Org { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Org &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Org &); public: Org(); Org(const Org &other); Org(const QString &org); ~Org(); typedef QVector List; void setOrganization(const QString &org); Q_REQUIRED_RESULT QString organization() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const Org &other) const; Q_REQUIRED_RESULT bool operator!=(const Org &other) const; Org &operator=(const Org &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Org &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Org &object); } Q_DECLARE_TYPEINFO(KContacts::Org, Q_MOVABLE_TYPE); #endif // ORG_H diff --git a/src/related.h b/src/related.h index 191df2bd..d4fc40f7 100644 --- a/src/related.h +++ b/src/related.h @@ -1,66 +1,67 @@ /* This file is part of the KContacts framework. Copyright (C) 2015-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef RELATED_H #define RELATED_H #include "kcontacts_export.h" #include #include #include namespace KContacts { +/** Descripes a relationship of an Addressee. */ class KCONTACTS_EXPORT Related { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Related &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Related &); public: Related(); Related(const Related &other); Related(const QString &related); ~Related(); typedef QVector List; void setRelated(const QString &relatedTo); Q_REQUIRED_RESULT QString related() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const Related &other) const; Q_REQUIRED_RESULT bool operator!=(const Related &other) const; Related &operator=(const Related &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Related &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Related &object); } Q_DECLARE_TYPEINFO(KContacts::Related, Q_MOVABLE_TYPE); #endif // LANG_H diff --git a/src/resourcelocatorurl.h b/src/resourcelocatorurl.h index fc5acf42..5a006018 100644 --- a/src/resourcelocatorurl.h +++ b/src/resourcelocatorurl.h @@ -1,81 +1,81 @@ /* This file is part of the KContacts framework. Copyright (C) 2015-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef RESOURCELOCATORURL_H #define RESOURCELOCATORURL_H #include "kcontacts_export.h" #include #include #include #include #include +namespace KContacts { + /** @short Class that holds a Resource Locator * @since 5.0 */ - -namespace KContacts { class KCONTACTS_EXPORT ResourceLocatorUrl { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const ResourceLocatorUrl &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, ResourceLocatorUrl &); Q_GADGET Q_PROPERTY(QUrl url READ url WRITE setUrl) Q_PROPERTY(bool isValid READ isValid) public: ResourceLocatorUrl(); ResourceLocatorUrl(const ResourceLocatorUrl &other); ~ResourceLocatorUrl(); typedef QVector List; Q_REQUIRED_RESULT bool isValid() const; void setUrl(const QUrl &url); Q_REQUIRED_RESULT QUrl url() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const ResourceLocatorUrl &other) const; Q_REQUIRED_RESULT bool operator!=(const ResourceLocatorUrl &other) const; ResourceLocatorUrl &operator=(const ResourceLocatorUrl &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const ResourceLocatorUrl &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, ResourceLocatorUrl &object); } Q_DECLARE_METATYPE(KContacts::ResourceLocatorUrl) Q_DECLARE_TYPEINFO(KContacts::ResourceLocatorUrl, Q_MOVABLE_TYPE); #endif // RESOURCELOCATORURL_H diff --git a/src/role.h b/src/role.h index 7c1fabdb..ca782683 100644 --- a/src/role.h +++ b/src/role.h @@ -1,69 +1,69 @@ /* This file is part of the KContacts framework. Copyright (C) 2016-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef ROLE_H #define ROLE_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a Role for a contact. * @since 5.3 */ -namespace KContacts { class KCONTACTS_EXPORT Role { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Role &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Role &); public: Role(); Role(const Role &other); Role(const QString &role); ~Role(); typedef QVector List; void setRole(const QString &role); Q_REQUIRED_RESULT QString role() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap ¶ms); Q_REQUIRED_RESULT QMap parameters() const; Q_REQUIRED_RESULT bool operator==(const Role &other) const; Q_REQUIRED_RESULT bool operator!=(const Role &other) const; Role &operator=(const Role &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Role &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Role &object); } Q_DECLARE_TYPEINFO(KContacts::Role, Q_MOVABLE_TYPE); #endif // ROLE_H diff --git a/src/secrecy.h b/src/secrecy.h index 9345da45..44ee4bc8 100644 --- a/src/secrecy.h +++ b/src/secrecy.h @@ -1,124 +1,125 @@ /* This file is part of the KContacts framework. Copyright (c) 2002 Tobias Koenig This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KCONTACTS_SECRECY_H #define KCONTACTS_SECRECY_H #include "kcontacts_export.h" #include #include namespace KContacts { +/** Descripes the confidentiality of an addressee. */ class KCONTACTS_EXPORT Secrecy { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Secrecy &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Secrecy &); public: /** * Secrecy types * * @li Public - for public access * @li Private - only private access * @li Confidential - access for confidential persons */ enum Type { Public, Private, Confidential, Invalid }; /** * List of secrecy types. */ typedef QVector TypeList; /** * Creates a new secrecy of the given type. * * @param type The secrecy type. @see Type */ Secrecy(Type type = Invalid); /** * Copy constructor. */ Secrecy(const Secrecy &other); /** * Destroys the secrecy. */ ~Secrecy(); Secrecy &operator=(const Secrecy &other); Q_REQUIRED_RESULT bool operator==(const Secrecy &other) const; Q_REQUIRED_RESULT bool operator!=(const Secrecy &other) const; /** * Returns if the Secrecy object has a valid value. */ Q_REQUIRED_RESULT bool isValid() const; /** * Sets the @p type. * * @param type The #Type of secrecy */ void setType(Type type); /** * Returns the type. */ Q_REQUIRED_RESULT Type type() const; /** * Returns a list of all available secrecy types. */ Q_REQUIRED_RESULT static TypeList typeList(); /** * Returns a translated label for a given secrecy @p type. */ Q_REQUIRED_RESULT static QString typeLabel(Type type); /** * Returns a string representation of the secrecy. */ Q_REQUIRED_RESULT QString toString() const; private: class PrivateData; QSharedDataPointer d; }; /** * Serializes the @p secrecy object into the @p stream. */ KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Secrecy &secrecy); /** * Initializes the @p secrecy object from the @p stream. */ KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Secrecy &secrecy); } Q_DECLARE_TYPEINFO(KContacts::Secrecy, Q_MOVABLE_TYPE); #endif diff --git a/src/title.h b/src/title.h index 9d11a65f..9c37225f 100644 --- a/src/title.h +++ b/src/title.h @@ -1,69 +1,69 @@ /* This file is part of the KContacts framework. Copyright (C) 2016-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef TITLE_H #define TITLE_H #include "kcontacts_export.h" #include #include #include +namespace KContacts { /** @short Class that holds a Title for a contact. * @since 5.3 */ -namespace KContacts { class KCONTACTS_EXPORT Title { friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const Title &); friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, Title &); public: Title(); Title(const Title &other); Title(const QString &title); ~Title(); typedef QVector List; void setTitle(const QString &title); Q_REQUIRED_RESULT QString title() const; Q_REQUIRED_RESULT bool isValid() const; void setParameters(const QMap<QString, QStringList> ¶ms); Q_REQUIRED_RESULT QMap<QString, QStringList> parameters() const; Q_REQUIRED_RESULT bool operator==(const Title &other) const; Q_REQUIRED_RESULT bool operator!=(const Title &other) const; Title &operator=(const Title &other); Q_REQUIRED_RESULT QString toString() const; private: class Private; QSharedDataPointer<Private> d; }; KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const Title &object); KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, Title &object); } Q_DECLARE_TYPEINFO(KContacts::Title, Q_MOVABLE_TYPE); #endif // TITLE_H