1 /* 2 SPDX-FileCopyrightText: 2005 Max Howell <max.howell@methylblue.com> 3 SPDX-FileCopyrightText: 2007 Ian Monroe <ian@monroe.nu> 4 5 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 6 */ 7 8 #ifndef DRAGONPLAYER_THESTREAM_H 9 #define DRAGONPLAYER_THESTREAM_H 10 11 #include <KConfigGroup> 12 #include <QUrl> // larger :( but no macros at least 13 #include <QSize> // small header 14 #include <QString> // small header 15 #include <Phonon/Global> 16 17 /// for purely static classes 18 #define DRAGONPLAYER_NO_EXPORT( T ) \ 19 T(); \ 20 ~T(); \ 21 T( const T& ); \ 22 T &operator=( const T& ); \ 23 bool operator==( const T& ); \ 24 bool operator!=( const T& ); 25 26 class QAction; 27 28 namespace Dragon 29 { 30 class TheStream 31 { 32 DRAGONPLAYER_NO_EXPORT( TheStream ) 33 34 public: 35 static QUrl url(); 36 37 static bool canSeek(); 38 static bool hasAudio(); 39 static bool hasVideo(); 40 static bool hasMedia(); 41 42 static QSize defaultVideoSize(); 43 44 static int aspectRatio(); 45 static QAction* aspectRatioAction(); 46 static void setRatio( QAction* ); 47 static void addRatio( int, QAction* ); 48 49 static const char* CHANNEL_PROPERTY; 50 static int subtitleChannel(); 51 static int audioChannel(); 52 53 static QString prettyTitle(); 54 static QString fullTitle(); 55 56 57 static QString metaData(Phonon::MetaData key); 58 static QString discId(); 59 60 static bool hasProfile(); 61 62 static KConfigGroup profile(); 63 private: 64 static QHash<int, QAction*> s_aspectRatioActions; 65 }; 66 } 67 68 #endif 69