KContacts

calendarurl.h
1 /*
2  This file is part of the KContacts framework.
3  SPDX-FileCopyrightText: 2015-2019 Laurent Montel <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef CALENDARURL_H
9 #define CALENDARURL_H
10 #include "kcontacts_export.h"
11 
12 #include <QSharedDataPointer>
13 #include <QString>
14 #include <QMap>
15 class QUrl;
16 
17 namespace KContacts {
21 class KCONTACTS_EXPORT CalendarUrl
22 {
23  friend KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &, const CalendarUrl &);
24  friend KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &, CalendarUrl &);
25 public:
26  enum CalendarType {
27  Unknown = 0,
28  FBUrl,
29  CALUri,
30  CALADRUri,
31  EndCalendarType
32  };
33 
34  CalendarUrl();
35  CalendarUrl(CalendarUrl::CalendarType type);
36  CalendarUrl(const CalendarUrl &other);
37 
38  ~CalendarUrl();
39 
40  typedef QVector<CalendarUrl> List;
41 
42  Q_REQUIRED_RESULT bool isValid() const;
43 
44  void setType(CalendarUrl::CalendarType type);
45  Q_REQUIRED_RESULT CalendarUrl::CalendarType type() const;
46 
47  void setUrl(const QUrl &url);
48  QUrl url() const;
49 
50  void setParameters(const QMap<QString, QStringList> &params);
51  Q_REQUIRED_RESULT QMap<QString, QStringList> parameters() const;
52 
53  Q_REQUIRED_RESULT bool operator==(const CalendarUrl &other) const;
54  Q_REQUIRED_RESULT bool operator!=(const CalendarUrl &other) const;
55 
56  CalendarUrl &operator=(const CalendarUrl &other);
57 
58  Q_REQUIRED_RESULT QString toString() const;
59 private:
60  class Private;
62 };
63 
64 KCONTACTS_EXPORT QDataStream &operator<<(QDataStream &stream, const CalendarUrl &object);
65 
66 KCONTACTS_EXPORT QDataStream &operator>>(QDataStream &stream, CalendarUrl &object);
67 }
68 Q_DECLARE_TYPEINFO(KContacts::CalendarUrl, Q_MOVABLE_TYPE);
69 #endif // CALENDARURL_H
QDataStream & operator>>(QDataStream &in, KDateTime::Spec &spec)
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
Definition: calendarurl.h:21
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jul 14 2020 22:54:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.