Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

LibraryBuilderInternals.h

Go to the documentation of this file.
00001 //
00002 // LibraryBuilderInternals.h
00003 //
00004 // Copyright (c) Shareaza Development Team, 2002-2005.
00005 // This file is part of SHAREAZA (www.shareaza.com)
00006 //
00007 // Shareaza is free software; you can redistribute it
00008 // and/or modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // Shareaza is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU General Public License
00018 // along with Shareaza; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 // Construction
00033 public:
00034         CLibraryBuilderInternals(CLibraryBuilder* pBuilder);
00035         virtual ~CLibraryBuilderInternals();
00036 
00037 // Attributes
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 // Operations
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:              // ID3v1 and ID3v2 and MP3
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:              // Module Version
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:              // Image Files
00074         BOOL            ReadJPEG( HANDLE hFile);
00075         BOOL            ReadGIF( HANDLE hFile);
00076         BOOL            ReadPNG( HANDLE hFile);
00077         BOOL            ReadBMP( HANDLE hFile);
00078 protected:              // General Media
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_)

Generated on Thu Dec 15 10:39:44 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2