Source code of Windows XP (NT5)
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.

145 lines
3.2 KiB

  1. /**********************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. lmofile.hxx
  7. LM_FILE header file.
  8. The LM_FILE class is as the following:
  9. NEW_LM_OBJ
  10. LM_FILE
  11. LM_FILE_2 // level 2 object
  12. LM_FILE_3 // level 3 object
  13. FILE HISTORY:
  14. terryk 12-Aug-1991 Created
  15. terryk 26-Aug-1991 Code review changed. Attend: keithmo
  16. Chuckc hui-lich
  17. terryk 07-Oct-1991 type changes for NT
  18. terryk 21-Oct-1991 type changes for NT
  19. */
  20. /**********************************************************\
  21. NAME: LM_FILE
  22. WORKBOOK: lmocdd.doc
  23. SYNOPSIS: Handle file object. It will call ::NetFileClose2 when
  24. the function CloseFile is being called.
  25. It will also call ::NetFileGetInfo to get
  26. the file information.
  27. INTERFACE: CloseFile() - close the file now.
  28. QueryServer() - return the server name
  29. QueryFileId() - return the file id
  30. PARENT: NEW_LM_OBJ
  31. USES: NLS_STR
  32. HISTORY:
  33. terryk 16-Aug-1991 Created
  34. \**********************************************************/
  35. DLL_CLASS LM_FILE : public NEW_LM_OBJ
  36. {
  37. private:
  38. NLS_STR _nlsServer;
  39. ULONG _ulFileId;
  40. protected:
  41. LM_FILE( const TCHAR * pszServer, ULONG ulFileId );
  42. ~LM_FILE();
  43. APIERR SetFileId( ULONG ulFileId );
  44. APIERR SetServer( const TCHAR * pszServer );
  45. public:
  46. APIERR CloseFile();
  47. const TCHAR * QueryServer() const;
  48. ULONG QueryFileId() const;
  49. };
  50. /**********************************************************\
  51. NAME: LM_FILE_2
  52. WORKBOOK: lmocdd.doc
  53. SYNOPSIS: level 2 file object
  54. INTERFACE: LM_FILE_2() - constructor
  55. PARENT: LM_FILE
  56. HISTORY:
  57. terryk 16-Aug-1991 Created
  58. \**********************************************************/
  59. DLL_CLASS LM_FILE_2 : public LM_FILE
  60. {
  61. protected:
  62. virtual APIERR I_GetInfo();
  63. public:
  64. LM_FILE_2( const TCHAR * pszServer, ULONG ulFileId );
  65. };
  66. /**********************************************************\
  67. NAME: LM_FILE_3
  68. WORKBOOK: lmocdd.doc
  69. SYNOPSIS: level 3 file object
  70. INTERFACE: LM_FILE_3() - constructor
  71. QueryNumLock() - return the number of lock applied to
  72. the file.
  73. QueryPermission() - return the permission field.
  74. IsPermRead() - readable ?
  75. IsPermWrite() - writable?
  76. IsPermCreate() - Created permission set?
  77. QueryPathname() - return the path name
  78. QueryUsername() - return the user name
  79. PARENT: LM_FILE_2
  80. USES: NLS_STR
  81. HISTORY:
  82. terryk 16-Aug-1991 Created
  83. \**********************************************************/
  84. DLL_CLASS LM_FILE_3 : public LM_FILE_2
  85. {
  86. private:
  87. UINT _uLock;
  88. UINT _uPermission;
  89. NLS_STR _nlsPathname;
  90. NLS_STR _nlsUsername;
  91. protected:
  92. virtual APIERR I_GetInfo();
  93. public:
  94. LM_FILE_3( const TCHAR * pszServer, ULONG ulFileId );
  95. UINT QueryNumLock() const;
  96. UINT QueryPermission() const;
  97. BOOL IsPermRead() const;
  98. BOOL IsPermWrite() const;
  99. BOOL IsPermCreate() const;
  100. const TCHAR * QueryPathname() const;
  101. const TCHAR * QueryUsername() const;
  102. };