Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.5 KiB

  1. /******************************************************************************
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. FileList.h
  5. Abstract:
  6. This file contains the declaration of the class used during setup.
  7. Revision History:
  8. Davide Massarenti (dmassare) 04/07/2000
  9. created
  10. ******************************************************************************/
  11. #if !defined(__INCLUDED___HCP___FILELIST_H___)
  12. #define __INCLUDED___HCP___FILELIST_H___
  13. /////////////////////////////////////////////////////////////////////////////
  14. #include <TaxonomyDatabase.h>
  15. namespace Installer
  16. {
  17. typedef enum
  18. {
  19. PURPOSE_INVALID = -1,
  20. PURPOSE_BINARY ,
  21. PURPOSE_OTHER ,
  22. PURPOSE_DATABASE ,
  23. PURPOSE_PACKAGE ,
  24. PURPOSE_UI ,
  25. } PURPOSE;
  26. ////////////////////////////////////////
  27. struct FileEntry
  28. {
  29. PURPOSE m_purpose;
  30. MPC::wstring m_strFileLocal; // Not persisted.
  31. MPC::wstring m_strFileLocation; // Final destination of the file.
  32. MPC::wstring m_strFileInner; // Name of the file inside the cabinet.
  33. DWORD m_dwCRC;
  34. ////////////////////
  35. FileEntry();
  36. friend HRESULT operator>>( /*[in]*/ MPC::Serializer& stream, /*[out]*/ FileEntry& val );
  37. friend HRESULT operator<<( /*[in]*/ MPC::Serializer& stream, /*[in] */ const FileEntry& val );
  38. ////////////////////
  39. HRESULT SetPurpose( /*[in ]*/ LPCWSTR szID );
  40. HRESULT UpdateSignature( );
  41. HRESULT VerifySignature( ) const;
  42. HRESULT Extract ( /*[in]*/ LPCWSTR szCabinetFile );
  43. HRESULT Extract ( /*[in]*/ MPC::Cabinet& cab );
  44. HRESULT Install ( );
  45. HRESULT RemoveLocal ( );
  46. };
  47. ////////////////////////////////////////
  48. typedef std::list< FileEntry > List;
  49. typedef List::iterator Iter;
  50. typedef List::const_iterator IterConst;
  51. ////////////////////////////////////////
  52. class Package
  53. {
  54. MPC::wstring m_strFile;
  55. Taxonomy::InstanceBase m_data;
  56. List m_lstFiles;
  57. public:
  58. Package();
  59. friend HRESULT operator>>( /*[in]*/ MPC::Serializer& stream, /*[out]*/ Package& val );
  60. friend HRESULT operator<<( /*[in]*/ MPC::Serializer& stream, /*[in] */ const Package& val );
  61. ////////////////////////////////////////
  62. LPCWSTR GetFile ();
  63. Taxonomy::InstanceBase& GetData ();
  64. Iter GetBegin();
  65. Iter GetEnd ();
  66. Iter NewFile ();
  67. HRESULT Init ( /*[in]*/ LPCWSTR szCabinetFile );
  68. HRESULT GetList ( /*[in]*/ LPCWSTR szSignatureFile );
  69. HRESULT GenerateList( /*[in]*/ LPCWSTR szSignatureFile );
  70. HRESULT VerifyTrust();
  71. HRESULT Load ();
  72. HRESULT Save ();
  73. HRESULT Install( /*[in]*/ const PURPOSE* rgPurpose = NULL, /*[in]*/ LPCWSTR szRelocation = NULL );
  74. HRESULT Unpack( /*[in]*/ LPCWSTR szDirectory );
  75. HRESULT Pack ( /*[in]*/ LPCWSTR szDirectory );
  76. };
  77. };
  78. /////////////////////////////////////////////////////////////////////////////
  79. #endif // !defined(__INCLUDED___HCP___FILELIST_H___)