LeechCraft  0.6.70-10870-g558588d6ec
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  * Boost Software License - Version 1.0 - August 17th, 2003
6  *
7  * Permission is hereby granted, free of charge, to any person or organization
8  * obtaining a copy of the software and accompanying documentation covered by
9  * this license (the "Software") to use, reproduce, display, distribute,
10  * execute, and transmit the Software, and to prepare derivative works of the
11  * Software, and to permit third-parties to whom the Software is furnished to
12  * do so, all subject to the following:
13  *
14  * The copyright notices in the Software and this entire statement, including
15  * the above license grant, this restriction and the following disclaimer,
16  * must be included in all copies of the Software, in whole or in part, and
17  * all derivative works of the Software, unless such copies or derivative
18  * works are solely in the form of machine-executable object code generated by
19  * a source language processor.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
24  * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
25  * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
26  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  **********************************************************************/
29 
30 #pragma once
31 
32 #include <QDateTime>
33 #include <QUrl>
34 #include <QStringList>
35 #include <QtPlugin>
36 #include <util/sll/eitherfwd.h>
37 
38 template<typename>
39 class QFuture;
40 
41 namespace Media
42 {
47  enum class EventAttendType
48  {
51  None,
52 
55  Maybe,
56 
59  Surely
60  };
61 
66  struct EventInfo
67  {
70  qint64 ID_;
71 
74  QString Name_;
75 
78  QString Description_;
79 
82  QDateTime Date_;
83 
86  QUrl URL_;
87 
91 
94  QUrl BigImage_;
95 
100  QStringList Artists_;
101 
106  QString Headliner_;
107 
110  QStringList Tags_;
111 
115 
119  QString PlaceName_;
120 
126  double Latitude_;
127 
133  double Longitude_;
134 
137  QString City_;
138 
141  QString Address_;
142 
146 
150  };
151 
155 
161  class Q_DECL_EXPORT IEventsProvider
162  {
163  public:
164  virtual ~IEventsProvider () {}
165 
172 
180  virtual QString GetServiceName () const = 0;
181 
186  virtual QFuture<EventsQueryResult_t> UpdateRecommendedEvents () = 0;
187 
196  virtual void AttendEvent (qint64 id, EventAttendType status) = 0;
197  };
198 }
199 
200 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.