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.

151 lines
2.8 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*++
  3. Module Name:
  4. LSMgrDoc.h
  5. Abstract:
  6. This Module defines the Document class for the License Manager
  7. Author:
  8. Arathi Kundapur (v-akunda) 11-Feb-1998
  9. Revision History:
  10. --*/
  11. #if !defined(AFX_LICMGRDOC_H__72451C71_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_)
  12. #define AFX_LICMGRDOC_H__72451C71_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_
  13. #include "LSServer.h" // Added by ClassView
  14. #include <afxmt.h>
  15. #if _MSC_VER >= 1000
  16. #endif // _MSC_VER >= 1000
  17. class CAllServers;
  18. class CLicMgrDoc : public CDocument
  19. {
  20. protected: // create from serialization only
  21. CLicMgrDoc();
  22. DECLARE_DYNCREATE(CLicMgrDoc)
  23. // Attributes
  24. public:
  25. // Operations
  26. public:
  27. // Overrides
  28. // ClassWizard generated virtual function overrides
  29. //{{AFX_VIRTUAL(CLicMgrDoc)
  30. public:
  31. virtual BOOL OnNewDocument();
  32. virtual void Serialize(CArchive& ar);
  33. //}}AFX_VIRTUAL
  34. // Implementation
  35. public:
  36. BOOL
  37. IsServerInList(
  38. CString& Server
  39. );
  40. HRESULT
  41. ConnectWithCurrentParams();
  42. HRESULT
  43. ConnectToServer(
  44. CString& Server,
  45. CString& Scope,
  46. SERVER_TYPE& ServerType
  47. );
  48. HRESULT
  49. EnumerateKeyPacks(
  50. CLicServer *pServer,
  51. DWORD dwSearchParm,
  52. BOOL bMatchAll
  53. );
  54. HRESULT
  55. EnumerateLicenses(
  56. CKeyPack *pKeyPack,
  57. DWORD dwSearchParm,
  58. BOOL bMatchAll
  59. );
  60. virtual ~CLicMgrDoc();
  61. NODETYPE
  62. GetNodeType()
  63. {
  64. return m_NodeType;
  65. };
  66. void
  67. SetNodeType(
  68. NODETYPE nodetype
  69. )
  70. {
  71. m_NodeType=nodetype;
  72. };
  73. CAllServers *
  74. GetAllServers()
  75. {
  76. return m_pAllServers;
  77. };
  78. HRESULT
  79. AddLicenses(
  80. PLICSERVER pServer,
  81. LPLSKeyPack pKeyPack,
  82. UINT nLicenses
  83. );
  84. HRESULT
  85. RemoveLicenses(
  86. PLICSERVER pServer,
  87. LPLSKeyPack pKeyPack,
  88. UINT nLicenses
  89. );
  90. void
  91. TimeToString(
  92. DWORD *ptime,
  93. CString& rString
  94. );
  95. #ifdef _DEBUG
  96. virtual void AssertValid() const;
  97. virtual void Dump(CDumpContext& dc) const;
  98. #endif
  99. private:
  100. CAllServers * m_pAllServers;
  101. CWinThread *m_pBackgroundThread;
  102. CCriticalSection m_AllServersCriticalSection;
  103. NODETYPE m_NodeType;
  104. protected:
  105. // Generated message map functions
  106. protected:
  107. //{{AFX_MSG(CLicMgrDoc)
  108. // NOTE - the ClassWizard will add and remove member functions here.
  109. // DO NOT EDIT what you see in these blocks of generated code !
  110. //}}AFX_MSG
  111. DECLARE_MESSAGE_MAP()
  112. };
  113. /////////////////////////////////////////////////////////////////////////////
  114. //{{AFX_INSERT_LOCATION}}
  115. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  116. #endif // !defined(AFX_LICMGRDOC_H__72451C71_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_)