LeechCraft 0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
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
17template<typename>
18class QFuture;
19
20namespace 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
74
79 QStringList Artists_;
80
85 QString Headliner_;
86
89 QStringList Tags_;
90
94
98 QString PlaceName_;
99
105 double Latitude_;
106
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
166
175 virtual void AttendEvent (qint64 id, EventAttendType status) = 0;
176 };
177}
178
179Q_DECLARE_INTERFACE (Media::IEventsProvider, "org.LeechCraft.Media.IEventsProvider/1.0")
Interface for plugins that can provide events.
virtual QFuture< EventsQueryResult_t > UpdateRecommendedEvents()=0
Requests re-fetching the list of recommended events.
virtual void AttendEvent(qint64 id, EventAttendType status)=0
Updates the event attendance status, if possible.
virtual QString GetServiceName() const =0
Returns the service name.
QList< EventInfo > EventInfos_t
A list of events.
@ None
No type (item doesn't correspond to a radio station).
EventAttendType
Enum describing if and how an event is attended by user.
@ Surely
The user surely will attend the event.
@ Maybe
The user is interested and maybe will attend the event.
A structure describing an event like a gig or a festival.
QStringList Artists_
The list of all artists present on this event.
QUrl URL_
The URL of a page describing the event in more detail.
QString Address_
The address of the place this event will happen in.
QUrl SmallImage_
A thumb image associated with this event.
QString Name_
The name of the event.
QUrl BigImage_
A big, preferably poster-size image of this event.
QString City_
The city this event will happen in.
QString PlaceName_
The name of the club or other place this event will be in.
qint64 ID_
The internal ID of the event.
EventAttendType AttendType_
Current attendance status by the user.
int Attendees_
The current number of attendees or -1 if not known.
double Longitude_
Longitude of the place.
double Latitude_
Latitude of the place.
bool CanBeAttended_
Whether this event can be attended.
QStringList Tags_
The associated tags like musical genre of bands.
QDateTime Date_
The date the event will happen.
QString Headliner_
The name of the headliner of this event.
QString Description_
The description of the event.