LeechCraft  0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
ieventsprovider.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <QDateTime>
12 #include <QUrl>
13 #include <QStringList>
14 #include <QtPlugin>
15 #include <util/sll/eitherfwd.h>
16 
17 template<typename>
18 class QFuture;
19 
20 namespace Media
21 {
26  enum class EventAttendType
27  {
30  None,
31 
34  Maybe,
35 
38  Surely
39  };
40 
45  struct EventInfo
46  {
49  qint64 ID_;
50 
53  QString Name_;
54 
57  QString Description_;
58 
61  QDateTime Date_;
62 
65  QUrl URL_;
66 
70 
73  QUrl BigImage_;
74 
79  QStringList Artists_;
80 
85  QString Headliner_;
86 
89  QStringList Tags_;
90 
94 
98  QString PlaceName_;
99 
105  double Latitude_;
106 
112  double Longitude_;
113 
116  QString City_;
117 
120  QString Address_;
121 
125 
129  };
130 
134 
140  class Q_DECL_EXPORT IEventsProvider
141  {
142  public:
143  virtual ~IEventsProvider () {}
144 
151 
159  virtual QString GetServiceName () const = 0;
160 
165  virtual QFuture<EventsQueryResult_t> UpdateRecommendedEvents () = 0;
166 
175  virtual void AttendEvent (qint64 id, EventAttendType status) = 0;
176  };
177 }
178 
179 Q_DECLARE_INTERFACE (Media::IEventsProvider, "org.LeechCraft.Media.IEventsProvider/1.0")
int Attendees_
The current number of attendees or -1 if not known.
The user is interested and maybe will attend the event.
EventAttendType
Enum describing if and how an event is attended by user.
Interface for plugins that can provide events.
double Latitude_
Latitude of the place.
QUrl URL_
The URL of a page describing the event in more detail.
QString Headliner_
The name of the headliner of this event.
QString Address_
The address of the place this event will happen in.
EventAttendType AttendType_
Current attendance status by the user.
QList< EventInfo > EventInfos_t
A list of events.
QStringList Tags_
The associated tags like musical genre of bands.
QStringList Artists_
The list of all artists present on this event.
The user surely will attend the event.
The user won&#39;t attend this event.
QUrl SmallImage_
A thumb image associated with this event.
QUrl BigImage_
A big, preferably poster-size image of this event.
bool CanBeAttended_
Whether this event can be attended.
QString PlaceName_
The name of the club or other place this event will be in.
QDateTime Date_
The date the event will happen.
QString City_
The city this event will happen in.
qint64 ID_
The internal ID of the event.
A structure describing an event like a gig or a festival.
double Longitude_
Longitude of the place.
QString Description_
The description of the event.
QString Name_
The name of the event.