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.

219 lines
4.9 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /**********************************************************************/
  5. /*
  6. lmorepl.hxx
  7. Class declarations for the REPLICATOR_0 class.
  8. The REPLICATOR_0 class is used to configure the Replicator service
  9. on a target server.
  10. The classes are structured as follows:
  11. LOC_LM_OBJ
  12. |
  13. \---REPLICATOR_0
  14. FILE HISTORY:
  15. KeithMo 20-Feb-1992 Created for the Server Manager.
  16. */
  17. #ifndef _LMOREPL_HXX_
  18. #define _LMOREPL_HXX_
  19. #include "string.hxx"
  20. #include "strlst.hxx"
  21. #include "lmobj.hxx"
  22. /*************************************************************************
  23. NAME: REPLICATOR_0
  24. SYNOPSIS: Info-level 0 Replicator class.
  25. INTERFACE: REPLICATOR_0 - Class constructor.
  26. ~REPLICATOR_0 - Class destructor.
  27. QueryRole - Returns the replicator role
  28. (either Export, Import, or Both).
  29. SetRole - Sets the replicator role.
  30. QueryExportPath - Returns the Export directory path.
  31. SetExportPath - Sets the Export directory path.
  32. QueryImportPath - Returns the Import directory path.
  33. SetImportPath - Sets the Import directory path.
  34. QueryExportList - Returns the list of computers &
  35. domains to which files should be
  36. Exported.
  37. SetExportList - Sets the Export list.
  38. QueryImportList - Returns the list of computers &
  39. domains from which files should
  40. be Imported.
  41. SetImportList - Sets the Import list.
  42. QueryLogonUserName - Returns the account name used by
  43. the Importer when logging onto
  44. an Exporter.
  45. SetLogonUserName - Sets the logon account name.
  46. QueryInterval - Returns the interval time.
  47. SetInterval - Sets the interval time.
  48. QueryPulse - Returns the pulse multiplier.
  49. SetPulse - Sets the pulse multiplier.
  50. QueryGuardTime - Returns the guard time.
  51. SetGuardTime - Sets the guard time.
  52. QueryRandom - Returns the random time.
  53. SetRandom - Sets the random time.
  54. QueryName - Returns the target server's name.
  55. PARENT: LOC_LM_OBJ
  56. USES: NLS_STR
  57. STRLIST
  58. HISTORY:
  59. KeithMo 20-Feb-1992 Created for the Server Manager.
  60. **************************************************************************/
  61. DLL_CLASS REPLICATOR_0 : public LOC_LM_OBJ
  62. {
  63. private:
  64. //
  65. // These data members cache the values retrieved
  66. // from the REPL_INFO_0 structure.
  67. //
  68. ULONG _lRole;
  69. NLS_STR _nlsExportPath;
  70. NLS_STR _nlsExportList;
  71. NLS_STR _nlsImportPath;
  72. NLS_STR _nlsImportList;
  73. NLS_STR _nlsLogonUserName;
  74. ULONG _lInterval;
  75. ULONG _lPulse;
  76. ULONG _lGuardTime;
  77. ULONG _lRandom;
  78. STRLIST * _pstrlistExport;
  79. STRLIST * _pstrlistImport;
  80. //
  81. // This worker function is called to initialize the
  82. // REPL_INFO_0 structure before the NetReplSetInfo
  83. // API is invoked.
  84. //
  85. APIERR W_Write( VOID );
  86. protected:
  87. //
  88. // These virtual callbacks are called by NEW_LM_OBJ to
  89. // invoke any necessary NetRepl{Get,Set}Info API.
  90. //
  91. virtual APIERR I_GetInfo( VOID );
  92. virtual APIERR I_WriteInfo( VOID );
  93. public:
  94. //
  95. // Usual constructor/destructor goodies.
  96. //
  97. REPLICATOR_0( const TCHAR * pszServerName );
  98. ~REPLICATOR_0( VOID );
  99. //
  100. // Accessor methods.
  101. //
  102. ULONG QueryRole( VOID ) const
  103. { return _lRole; }
  104. VOID SetRole( ULONG lRole )
  105. { _lRole = lRole; }
  106. const TCHAR * QueryExportPath( VOID ) const
  107. { return _nlsExportPath.QueryPch(); }
  108. APIERR SetExportPath( const TCHAR * pszExportPath );
  109. const TCHAR * QueryImportPath( VOID ) const
  110. { return _nlsImportPath.QueryPch(); }
  111. APIERR SetImportPath( const TCHAR * pszImportPath );
  112. STRLIST * QueryExportList( VOID ) const
  113. { return _pstrlistExport; }
  114. APIERR SetExportList( const TCHAR * pszExportList );
  115. STRLIST * QueryImportList( VOID ) const
  116. { return _pstrlistImport; }
  117. APIERR SetImportList( const TCHAR * pszImportList );
  118. const TCHAR * QueryLogonUserName( VOID ) const
  119. { return _nlsLogonUserName.QueryPch(); }
  120. APIERR SetLogonUserName( const TCHAR * pszLogonUserName );
  121. ULONG QueryInterval( VOID ) const
  122. { return _lInterval; }
  123. VOID SetInterval( ULONG lInterval )
  124. { _lInterval = lInterval; }
  125. ULONG QueryPulse( VOID ) const
  126. { return _lPulse; }
  127. VOID SetPulse( ULONG lPulse )
  128. { _lPulse = lPulse; }
  129. ULONG QueryGuardTime( VOID ) const
  130. { return _lGuardTime; }
  131. VOID SetGuardTime( ULONG lGuardTime )
  132. { _lGuardTime = lGuardTime; }
  133. ULONG QueryRandom( VOID ) const
  134. { return _lRandom; }
  135. VOID SetRandom( ULONG lRandom )
  136. { _lRandom = lRandom; }
  137. //
  138. // Provide access to the target server's name.
  139. //
  140. const TCHAR * QueryName( VOID ) const
  141. { return LOC_LM_OBJ::QueryServer(); }
  142. }; // class REPLICATOR_0
  143. #endif // _LMOREPL_HXX_