LeechCraft  0.6.70-15082-g543737046d
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")
Media::None
@ None
The user won't attend this event.
Media::EventInfos_t
QList< EventInfo > EventInfos_t
A list of events.
Definition: ieventsprovider.h:133
Media::EventInfo::Address_
QString Address_
The address of the place this event will happen in.
Definition: ieventsprovider.h:120
Media::EventInfo::Longitude_
double Longitude_
Longitude of the place.
Definition: ieventsprovider.h:112
QList
Definition: ianrulesstorage.h:14
Media::EventAttendType::Maybe
@ Maybe
The user is interested and maybe will attend the event.
Media::EventInfo
A structure describing an event like a gig or a festival.
Definition: ieventsprovider.h:45
Media::EventInfo::URL_
QUrl URL_
The URL of a page describing the event in more detail.
Definition: ieventsprovider.h:65
LC::Util::Either
Definition: either.h:33
Media::EventInfo::BigImage_
QUrl BigImage_
A big, preferably poster-size image of this event.
Definition: ieventsprovider.h:73
Media::EventAttendType::Surely
@ Surely
The user surely will attend the event.
Media::EventInfo::ID_
qint64 ID_
The internal ID of the event.
Definition: ieventsprovider.h:49
Media::IEventsProvider
Interface for plugins that can provide events.
Definition: ieventsprovider.h:140
Media::EventInfo::AttendType_
EventAttendType AttendType_
Current attendance status by the user.
Definition: ieventsprovider.h:128
Media
Definition: audiostructs.h:16
Media::EventInfo::Tags_
QStringList Tags_
The associated tags like musical genre of bands.
Definition: ieventsprovider.h:89
Media::EventInfo::SmallImage_
QUrl SmallImage_
A thumb image associated with this event.
Definition: ieventsprovider.h:69
Media::EventInfo::PlaceName_
QString PlaceName_
The name of the club or other place this event will be in.
Definition: ieventsprovider.h:98
Media::EventAttendType
EventAttendType
Enum describing if and how an event is attended by user.
Definition: ieventsprovider.h:26
Media::EventInfo::Artists_
QStringList Artists_
The list of all artists present on this event.
Definition: ieventsprovider.h:79
Media::EventInfo::Name_
QString Name_
The name of the event.
Definition: ieventsprovider.h:53
Media::EventInfo::Headliner_
QString Headliner_
The name of the headliner of this event.
Definition: ieventsprovider.h:85
Media::EventInfo::City_
QString City_
The city this event will happen in.
Definition: ieventsprovider.h:116
Media::EventInfo::Latitude_
double Latitude_
Latitude of the place.
Definition: ieventsprovider.h:105
Media::EventInfo::CanBeAttended_
bool CanBeAttended_
Whether this event can be attended.
Definition: ieventsprovider.h:124
QFuture
Definition: idownload.h:17
Media::IEventsProvider::~IEventsProvider
virtual ~IEventsProvider()
Definition: ieventsprovider.h:143
Media::EventInfo::Description_
QString Description_
The description of the event.
Definition: ieventsprovider.h:57
Media::EventInfo::Attendees_
int Attendees_
The current number of attendees or -1 if not known.
Definition: ieventsprovider.h:93
eitherfwd.h
Media::EventInfo::Date_
QDateTime Date_
The date the event will happen.
Definition: ieventsprovider.h:61