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.

79 lines
2.2 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2001, Microsoft Corporation All rights reserved.
  4. //
  5. // Module Name:
  6. //
  7. // filelayout.h
  8. //
  9. // Abstract:
  10. //
  11. // This file contains the File layout object definition.
  12. //
  13. // Revision History:
  14. //
  15. // 2001-06-20 lguindon Created.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef _FILELAYOUT_H_
  19. #define _FILELAYOUT_H_
  20. ///////////////////////////////////////////////////////////////////////////////
  21. //
  22. // Includes Files.
  23. //
  24. ///////////////////////////////////////////////////////////////////////////////
  25. // #include "infparser.h"
  26. ///////////////////////////////////////////////////////////////////////////////
  27. //
  28. // Class definition.
  29. //
  30. ///////////////////////////////////////////////////////////////////////////////
  31. class FileLayout
  32. {
  33. public:
  34. FileLayout(LPSTR originFilename, LPSTR destFilename, DWORD flavorMask)
  35. {
  36. HRESULT hr;
  37. BOOL bSuccess = TRUE;
  38. hr = StringCchCopyA(m_OriginFilename, ARRAYLEN(m_OriginFilename), originFilename);
  39. if(!SUCCEEDED(hr)) {
  40. bSuccess = FALSE;
  41. }
  42. // strcpy(m_DestFilename, destFilename);
  43. hr = StringCchCopyA(m_DestFilename, ARRAYLEN(m_DestFilename), destFilename);
  44. if(!SUCCEEDED(hr)) {
  45. bSuccess = FALSE;
  46. }
  47. m_Flavor = flavorMask;
  48. m_Next = NULL;
  49. m_Previous = NULL;
  50. if(!bSuccess) {
  51. printf("Error FileLayout::FileLayout() \n");
  52. }
  53. };
  54. BOOL isFlavor(DWORD dwFlavor){ return (dwFlavor & m_Flavor); };
  55. LPSTR getOriginFileName() { return (m_OriginFilename); };
  56. LPSTR getDestFileName() { return (m_DestFilename); };
  57. FileLayout* getNext() { return (m_Next); };
  58. FileLayout* getPrevious() { return (m_Previous); };
  59. void setNext(FileLayout *next) { m_Next = next; };
  60. void setPrevious(FileLayout *previous) { m_Previous = previous; };
  61. private:
  62. CHAR m_OriginFilename[MAX_PATH];
  63. CHAR m_DestFilename[MAX_PATH];
  64. DWORD m_Flavor;
  65. FileLayout *m_Next;
  66. FileLayout *m_Previous;
  67. };
  68. #endif //_FILELAYOUT_H_