LeechCraft  0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
iaudiopile.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 <QString>
12 #include <util/sll/eitherfwd.h>
13 #include "audiostructs.h"
14 
15 class QObject;
16 class QIcon;
17 
18 template<typename>
19 class QFuture;
20 
21 namespace Media
22 {
33  {
38  QString Title_;
39 
44  QString Artist_;
45 
48  QString Album_;
49 
54  int TrackLength_ = 0;
55 
61  QString FreeForm_;
62  };
63 
70  class Q_DECL_EXPORT IAudioPile
71  {
72  public:
73  virtual ~IAudioPile () {}
74 
77  struct Result
78  {
82 
85  QUrl Source_;
86  };
87 
91 
100 
108  virtual QString GetServiceName () const = 0;
109 
117  virtual QIcon GetServiceIcon () const = 0;
118 
127  virtual QFuture<Result_t> Search (const AudioSearchRequest& request) = 0;
128  };
129 }
130 
131 Q_DECLARE_INTERFACE (Media::IAudioPile, "org.LeechCraft.Media.IAudioPile/1.0")
Interface for plugins supporting searching for tracks.
Definition: iaudiopile.h:70
AudioInfo Info_
The information about the found audio track.
Definition: iaudiopile.h:81
int TrackLength_
The approximate length of the track.
Definition: iaudiopile.h:54
Describes a single audio track.
Definition: audiostructs.h:20
QString Album_
The album containing this track.
Definition: iaudiopile.h:48
QString FreeForm_
Free form engine-specific request.
Definition: iaudiopile.h:61
QString Artist_
The artist performing the track.
Definition: iaudiopile.h:44
A structure describing a single entry in search result.
Definition: iaudiopile.h:77
virtual ~IAudioPile()
Definition: iaudiopile.h:73
QString Title_
The title of a track.
Definition: iaudiopile.h:38
Describes a request for an audio search in an IAudioPile.
Definition: iaudiopile.h:32
QUrl Source_
The URL of this audio track.
Definition: iaudiopile.h:85