LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
Media::IEventsProvider Class Referenceabstract

Interface for plugins that can provide events. More...

#include "ieventsprovider.h"

Public Types

using EventsQueryResult_t = LC::Util::Either< QString, EventInfos_t >
 The result of an recommended events query. More...
 

Public Member Functions

virtual ~IEventsProvider ()
 
virtual QString GetServiceName () const =0
 Returns the service name. More...
 
virtual QFuture< EventsQueryResult_tUpdateRecommendedEvents ()=0
 Requests re-fetching the list of recommended events. More...
 
virtual void AttendEvent (qint64 id, EventAttendType status)=0
 Updates the event attendance status, if possible. More...
 

Detailed Description

Interface for plugins that can provide events.

Plugins that can provide nearby or recommended events based on user's location or musical taste should implement this interface.

Definition at line 140 of file ieventsprovider.h.

Member Typedef Documentation

◆ EventsQueryResult_t

The result of an recommended events query.

The result of an recommended events query is either a string with a human-readable error text, or the list of the recommended events.

Definition at line 150 of file ieventsprovider.h.

Constructor & Destructor Documentation

◆ ~IEventsProvider()

virtual Media::IEventsProvider::~IEventsProvider ( )
inlinevirtual

Definition at line 143 of file ieventsprovider.h.

Member Function Documentation

◆ AttendEvent()

virtual void Media::IEventsProvider::AttendEvent ( qint64  id,
EventAttendType  status 
)
pure virtual

Updates the event attendance status, if possible.

This function marks the event attendance status as status, if the service supports it. The event is identified by its ID.

Parameters
[in]idThe ID of the event (EventInfo::ID_).
[in]statusThe new event attendance status.

◆ GetServiceName()

virtual QString Media::IEventsProvider::GetServiceName ( ) const
pure virtual

Returns the service name.

This string returns a human-readable string with the service name, like "Last.FM".

Returns
The human-readable service name.

◆ UpdateRecommendedEvents()

virtual QFuture<EventsQueryResult_t> Media::IEventsProvider::UpdateRecommendedEvents ( )
pure virtual

Requests re-fetching the list of recommended events.

Returns
The future with the result of the recommended events query.

The documentation for this class was generated from the following file: