[release] version bump to 13.0 beta1
[vuplus_xbmc] / xbmc / network / upnp / UPnPPlayer.h
1 /*
2  *      Copyright (c) 2006 elupus (Joakim Plate)
3  *      Copyright (C) 2006-2013 Team XBMC
4  *      http://xbmc.org
5  *
6  *  This Program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This Program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with XBMC; see the file COPYING.  If not, see
18  *  <http://www.gnu.org/licenses/>.
19  *
20  */
21
22 #include "cores/IPlayer.h"
23
24 class PLT_MediaController;
25
26 namespace UPNP
27 {
28
29 class CUPnPPlayerController;
30
31 class CUPnPPlayer
32   : public IPlayer
33 {
34 public:
35   CUPnPPlayer(IPlayerCallback& callback, const char* uuid);
36   virtual ~CUPnPPlayer();
37
38   virtual bool OpenFile(const CFileItem& file, const CPlayerOptions& options);
39   virtual bool QueueNextFile(const CFileItem &file);
40   virtual bool CloseFile(bool reopen = false);
41   virtual bool IsPlaying() const;
42   virtual void Pause();
43   virtual bool IsPaused() const;
44   virtual bool HasVideo() const { return false; }
45   virtual bool HasAudio() const { return false; }
46   virtual void Seek(bool bPlus, bool bLargeStep, bool bChapterOverride);
47   virtual void SeekPercentage(float fPercent = 0);
48   virtual float GetPercentage();
49   virtual void SetVolume(float volume);
50   virtual void GetAudioInfo( CStdString& strAudioInfo) {};
51   virtual void GetVideoInfo( CStdString& strVideoInfo) {};
52   virtual void GetGeneralInfo( CStdString& strVideoInfo) {};
53   virtual bool CanRecord() { return false;};
54   virtual bool IsRecording() { return false;};
55   virtual bool Record(bool bOnOff) { return false;};
56
57   virtual int  GetChapterCount()                               { return 0; }
58   virtual int  GetChapter()                                    { return -1; }
59   virtual void GetChapterName(CStdString& strChapterName)      { return; }
60   virtual int  SeekChapter(int iChapter)                       { return -1; }
61
62   virtual void SeekTime(__int64 iTime = 0);
63   virtual int64_t GetTime();
64   virtual int64_t GetTotalTime();
65   virtual void ToFFRW(int iSpeed = 0){};
66
67   virtual bool SkipNext(){return false;}
68   virtual bool IsCaching() const {return false;};
69   virtual int GetCacheLevel() const {return -1;};
70   virtual void DoAudioWork();
71
72
73   virtual CStdString GetPlayingTitle();
74
75 private:
76   PLT_MediaController*   m_control;
77   CUPnPPlayerController* m_delegate;
78   CStdString             m_current_uri;
79   CStdString             m_current_meta;
80   bool                   m_started;
81 };
82
83 } /* namespace UPNP */