mirror of
https://github.com/Team-Resurgent/XBMC4Xbox.git
synced 2026-08-15 11:18:13 -07:00
If ever adding the XBMC4Xbox source to GitHub use "git add -f -A" or it wont add all the files.
87 lines
2.2 KiB
C++
87 lines
2.2 KiB
C++
#ifndef CShoutcastRipFile_H
|
|
#define CShoutcastRipFile_H
|
|
/*
|
|
* Copyright (C) 2005-2013 Team XBMC
|
|
* http://xbmc.org
|
|
*
|
|
* This Program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
* any later version.
|
|
*
|
|
* This Program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with XBMC; see the file COPYING. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
|
|
#include "music/tags/MusicInfoTag.h"
|
|
|
|
typedef struct RecStateSt
|
|
{
|
|
bool bRecording;
|
|
bool bCanRecord;
|
|
bool bTrackChanged;
|
|
bool bFilenameSet;
|
|
bool bStreamSet;
|
|
bool bHasMetaData;
|
|
}
|
|
RecState;
|
|
|
|
/* prototype */
|
|
typedef struct RIP_MANAGER_INFOst RIP_MANAGER_INFO;
|
|
|
|
//if one would like to make other IFiles recordable, it would be
|
|
//great, to define a superclass for this one with differend useful
|
|
//functions for all, like FilterFileName(), Record(),...
|
|
class CShoutcastRipFile
|
|
{
|
|
public:
|
|
|
|
CShoutcastRipFile();
|
|
virtual ~CShoutcastRipFile();
|
|
|
|
|
|
void SetRipManagerInfo( const RIP_MANAGER_INFO* ripInfo );
|
|
void SetTrackname( const char* trackname );
|
|
|
|
|
|
bool Record();
|
|
bool CanRecord();
|
|
void StopRecording();
|
|
bool IsRecording();
|
|
void Write( char *buf, unsigned long size );
|
|
void Reset();
|
|
void GetMusicInfoTag(MUSIC_INFO::CMusicInfoTag& tag);
|
|
protected:
|
|
|
|
|
|
private:
|
|
|
|
void PrepareRecording( );
|
|
void RemoveIllegalChars( char *szRemoveIllegal );
|
|
void GetDirectoryName( char* directoryName );
|
|
void SetFilename( const char* filePath, const char* fileName );
|
|
void CutAfterLastChar( char* szToBeCutted, int where );
|
|
void RemoveLastSpace( char* szToBeRemoved );
|
|
|
|
|
|
RecState m_recState;
|
|
int m_iTrackCount;
|
|
char m_szFileName[1024]; //FIXME: i think, that length could be optimized here
|
|
char m_szFilteredFileName[1024];
|
|
char m_szStreamName[1024];
|
|
FILE* m_ripFile;
|
|
FILE* m_logFile;
|
|
MUSIC_INFO::CMusicInfoTag m_Tag;
|
|
};
|
|
|
|
|
|
#endif
|