2 * Copyright (C) 2005-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with XBMC; see the file COPYING. If not, see
17 * <http://www.gnu.org/licenses/>.
21 // FileShoutcast.h: interface for the CShoutcastFile class.
23 //////////////////////////////////////////////////////////////////////
29 #include "utils/StdString.h"
30 #include "music/tags/MusicInfoTag.h"
31 #include "threads/Thread.h"
38 class CShoutcastFile : public IFile, public CThread
42 virtual ~CShoutcastFile();
43 virtual int64_t GetPosition();
44 virtual int64_t GetLength();
45 virtual bool Open(const CURL& url);
46 virtual bool Exists(const CURL& url) { return true;};
47 virtual int Stat(const CURL& url, struct __stat64* buffer) { errno = ENOENT; return -1; };
48 virtual unsigned int Read(void* lpBuf, int64_t uiBufSize);
49 virtual int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET);
51 int IoControl(EIoControl request, void* param);
55 bool ExtractTagInfo(const char* buf);
56 void ReadTruncated(char* buf2, int size);
59 std::string m_fileCharset;
61 int m_discarded; // data used for tags
63 char* m_buffer; // buffer used for tags
64 MUSIC_INFO::CMusicInfoTag m_tag;
66 CFileCache* m_cacheReader;