00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_LIBRARYBUILDERINTERNALS_H__5CAE40BD_1963_4A30_A333_89DBB6899803__INCLUDED_)
00023 #define AFX_LIBRARYBUILDERINTERNALS_H__5CAE40BD_1963_4A30_A333_89DBB6899803__INCLUDED_
00024
00025 #pragma once
00026
00027 class CLibraryBuilder;
00028
00029
00030 class CLibraryBuilderInternals
00031 {
00032
00033 public:
00034 CLibraryBuilderInternals(CLibraryBuilder* pBuilder);
00035 virtual ~CLibraryBuilderInternals();
00036
00037
00038 protected:
00039 CLibraryBuilder* m_pBuilder;
00040 protected:
00041 BOOL m_bEnableMP3;
00042 BOOL m_bEnableEXE;
00043 BOOL m_bEnableImage;
00044 BOOL m_bEnableASF;
00045 BOOL m_bEnableOGG;
00046 BOOL m_bEnableAPE;
00047 BOOL m_bEnableAVI;
00048 BOOL m_bEnablePDF;
00049 BOOL m_bEnableCHM;
00050 protected:
00051 DWORD m_nSleep;
00052 public:
00053 static LPCTSTR pszID3Genre[];
00054
00055
00056 public:
00057 void LoadSettings();
00058 BOOL ExtractMetadata( CString& strPath, HANDLE hFile, SHA1* pSHA1);
00059 protected:
00060 BOOL SubmitMetadata( LPCTSTR pszSchemaURI, CXMLElement* pXML);
00061 BOOL SubmitCorrupted();
00062 protected:
00063 BOOL ReadID3v1( HANDLE hFile, CXMLElement* pXML = NULL);
00064 BOOL CopyID3v1Field(CXMLElement* pXML, LPCTSTR pszAttribute, LPCSTR pszValue, int nLength);
00065 BOOL ReadID3v2( HANDLE hFile);
00066 BOOL CopyID3v2Field(CXMLElement* pXML, LPCTSTR pszAttribute, BYTE* pBuffer, DWORD nLength, BOOL bSkipLanguage = FALSE);
00067 BOOL ReadMP3Frames( HANDLE hFile);
00068 BOOL ScanMP3Frame(CXMLElement* pXML, HANDLE hFile, DWORD nIgnore);
00069 protected:
00070 BOOL ReadVersion( LPCTSTR pszPath);
00071 BOOL CopyVersionField(CXMLElement* pXML, LPCTSTR pszAttribute, BYTE* pBuffer, LPCTSTR pszKey, BOOL bCommaToDot = FALSE);
00072 CString GetVersionKey(BYTE* pBuffer, LPCTSTR pszKey);
00073 protected:
00074 BOOL ReadJPEG( HANDLE hFile);
00075 BOOL ReadGIF( HANDLE hFile);
00076 BOOL ReadPNG( HANDLE hFile);
00077 BOOL ReadBMP( HANDLE hFile);
00078 protected:
00079 BOOL ReadASF( HANDLE hFile);
00080 BOOL ReadAVI( HANDLE hFile);
00081 BOOL ReadMPEG( HANDLE hFile);
00082 BOOL ReadOGG( HANDLE hFile);
00083 BYTE* ReadOGGPage(HANDLE hFile, DWORD& nBuffer, BYTE nFlags, DWORD nSequence, DWORD nMinSize = 0);
00084 BOOL ReadOGGString(BYTE*& pOGG, DWORD& nOGG, CString& str);
00085 BOOL ReadAPE( HANDLE hFile);
00086 BOOL ReadPDF( HANDLE hFile, LPCTSTR pszPath);
00087 CString ReadLine(HANDLE hFile);
00088 CString ReadLineReverse(HANDLE hFile);
00089 BOOL ReadCollection( HANDLE hFile, SHA1* pSHA1);
00090 BOOL ReadCHM(HANDLE hFile, LPCTSTR pszPath);
00091 };
00092
00093 #endif // !defined(AFX_LIBRARYBUILDERINTERNALS_H__5CAE40BD_1963_4A30_A333_89DBB6899803__INCLUDED_)