File indexing completed on 2024-05-19 04:49:27
0001 /**************************************************************************************** 0002 * Copyright (c) 2008 Dan Meltzer <parallelgrapefruit@gmail.com> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify it under * 0005 * the terms of the GNU General Public License as published by the Free Software * 0006 * Foundation; either version 2 of the License, or (at your option) any later * 0007 * version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0010 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0011 * PARTICULAR PURPOSE. See the GNU General Public License for more details. * 0012 * * 0013 * You should have received a copy of the GNU General Public License along with * 0014 * this program. If not, see <http://www.gnu.org/licenses/>. * 0015 ****************************************************************************************/ 0016 0017 #ifndef STREAMINFOCAPABILITY_H 0018 #define STREAMINFOCAPABILITY_H 0019 0020 #include "core/amarokcore_export.h" 0021 #include "core/capabilities/Capability.h" 0022 0023 #include <QString> 0024 namespace Capabilities 0025 { 0026 0027 /** 0028 * This capability is designed to provide additional information 0029 * about streaming metadata. For meta types that provide multiple 0030 * tracks within the same stream (lastfm, shoutcast, etc ) 0031 * this capability is designed to return stream metadata, 0032 * where the properties in the Meta::Track class refers to the track 0033 * being played within the stream. 0034 0035 @author Dan Meltzer <parallelgrapefruit@gmail.com> 0036 */ 0037 class AMAROKCORE_EXPORT StreamInfoCapability : public Capabilities::Capability 0038 { 0039 Q_OBJECT 0040 public: 0041 StreamInfoCapability() {} 0042 ~StreamInfoCapability() override {} 0043 0044 /** 0045 * The human readable name of this stream 0046 * @return A string representing the name of this stream. 0047 */ 0048 virtual QString streamName() const = 0; 0049 /** 0050 * The source this stream belongs to. 0051 * @return The name of the owning source. 0052 */ 0053 virtual QString streamSource() const { return QString(); } 0054 static Type capabilityInterfaceType() { return Capabilities::Capability::StreamInfo; } 0055 0056 }; 0057 0058 } 0059 0060 #endif