KCalendarCore

conference.h
1/*
2 This file is part of the kcalcore library.
3
4 SPDX-FileCopyrightText: 2020 Daniel Vrátil <dvratil@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8
9#ifndef KCALCORE_CONFERENCE_H
10#define KCALCORE_CONFERENCE_H
11
12#include <QMetaType>
13#include <QSharedDataPointer>
14#include <QUrl>
15
16#include "customproperties.h"
17#include "kcalendarcore_export.h"
18
19namespace KCalendarCore
20{
21/**
22 @brief
23 Represents information related to a conference information of an Calendar
24 Incidence, typically a meeting or task (to-do).
25
26 Conference contains information needed to join a remote conference system
27 (e.g. phone call, audio/video meeting etc.)
28
29 @since 5.77
30*/
31class KCALENDARCORE_EXPORT Conference
32{
33 Q_GADGET
34 Q_PROPERTY(bool isNull READ isNull)
35 Q_PROPERTY(QStringList features READ features WRITE setFeatures)
36 Q_PROPERTY(QString label READ label WRITE setLabel)
37 Q_PROPERTY(QUrl uri READ uri WRITE setUri)
38 Q_PROPERTY(QString language READ language WRITE setLanguage)
39
40public:
41 using List = QList<Conference>;
42
43 /** Create a null Conference. */
44 explicit Conference();
45
46 /**
47 Constructs a conference consisting of a @p uri, description of
48 the URI (@p label), list of features of the conference (@p features)
49 and @p language.
50
51 @param uri Uri to join the conference.
52 @param label Label of the URI.
53 @param features Features of this particular conference method.
54 @param language Language of the information present in other fields.
55 */
56 Conference(const QUrl &uri, const QString &label, const QStringList &features = {}, const QString &language = {});
57
58 /**
59 Constructs a conference by copying another conference.
60
61 @param conference is the conference to be copied.
62 */
63 Conference(const Conference &conference);
64
65 /**
66 Destroys the conference.
67 */
69
70 /**
71 Compares this with @p conference for equality.
72
73 @param conference the conference to compare.
74 */
75 bool operator==(const Conference &conference) const;
76
77 /**
78 Compares this with @p conference for inequality.
79
80 @param conference the conference to compare.
81 */
82 bool operator!=(const Conference &other) const;
83
84 /**
85 * Returns @c true if this is a default-constructed Conference instance.
86 */
87 Q_REQUIRED_RESULT bool isNull() const;
88
89 /**
90 * Returns URI to join the conference, with access code included.
91 */
92 Q_REQUIRED_RESULT QUrl uri() const;
93
94 /**
95 * Sets the URI to @uri.
96 */
97 void setUri(const QUrl &uri);
98
99 /**
100 * Returns label with additional details regarding further use of the URI.
101 */
102 Q_REQUIRED_RESULT QString label() const;
103
104 /**
105 * Sets the URI label to @p label.
106 */
107 void setLabel(const QString &label);
108
109 /**
110 * Returns the list of features of the conferencing system at given URI.
111 *
112 * This can be e.g. CHAT, AUDIO, VIDEO, PHONE, etc.
113 */
114 Q_REQUIRED_RESULT QStringList features() const;
115
116 /**
117 * Adds @p feature to the list of features.
118 *
119 * @param feature Feature to add.
120 */
121 void addFeature(const QString &feature);
122
123 /**
124 * Removes @p feature from the list of features.
125 *
126 * @param feature Feature to remove.
127 */
128 void removeFeature(const QString &feature);
129
130 /**
131 * Sets the list of features to @p features.
132 */
133 void setFeatures(const QStringList &features);
134
135 /**
136 * Returns the language of the text present in other properties of this object.
137 */
138 Q_REQUIRED_RESULT QString language() const;
139
140 /**
141 * Sets the language to @p language.
142 */
143 void setLanguage(const QString &language);
144
145 /**
146 Sets this conference equal to @p conference.
147
148 @param conference is the conference to copy.
149 */
150 Conference &operator=(const Conference &conference);
151
152 /**
153 Adds a custom property. If the property already exists it will be overwritten.
154 @param xname is the name of the property.
155 @param xvalue is its value.
156 */
157 void setCustomProperty(const QByteArray &xname, const QString &xvalue);
158
159 /**
160 Returns a reference to the CustomProperties object
161 */
162 Q_REQUIRED_RESULT CustomProperties &customProperties();
163
164 /**
165 Returns a const reference to the CustomProperties object
166 */
167 const CustomProperties &customProperties() const;
168
169private:
170 //@cond PRIVATE
171 class Private;
173 //@endcond
174
175 friend KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &, const KCalendarCore::Conference &);
177};
178
179/**
180 Serializes a Conference object into a data stream.
181 @param stream is a QDataStream.
182 @param conference is a reference to a Conference object to be serialized.
183*/
184KCALENDARCORE_EXPORT QDataStream &operator<<(QDataStream &stream, const KCalendarCore::Conference &conference);
185
186/**
187 Initializes a Conference object from a data stream.
188 @param stream is a QDataStream.
189 @param conference is a reference to a Conference object to be initialized.
190*/
191KCALENDARCORE_EXPORT QDataStream &operator>>(QDataStream &stream, KCalendarCore::Conference &conference);
192
193}
194
195//@cond PRIVATE
196Q_DECLARE_TYPEINFO(KCalendarCore::Conference, Q_RELOCATABLE_TYPE);
197Q_DECLARE_METATYPE(KCalendarCore::Conference)
198//@endcond
199
200#endif
Represents information related to a conference information of an Calendar Incidence,...
Definition conference.h:32
friend KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &, KCalendarCore::Conference &)
Initializes a Conference object from a data stream.
friend KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &, const KCalendarCore::Conference &)
Serializes a Conference object into a data stream.
~Conference()
Destroys the conference.
Conference(const Conference &conference)
Constructs a conference by copying another conference.
Conference & operator=(const Conference &conference)
Sets this conference equal to conference.
A class to manage custom calendar properties.
This file is part of the API for handling calendar data and defines the CustomProperties class.
Namespace for all KCalendarCore types.
Definition alarm.h:37
KCALENDARCORE_EXPORT QDataStream & operator>>(QDataStream &in, const KCalendarCore::Alarm::Ptr &)
Alarm deserializer.
Definition alarm.cpp:833
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
Alarm serializer.
Definition alarm.cpp:820
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:56:45 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.