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.

215 lines
4.9 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*++
  3. Module Name:
  4. MainFrm.h
  5. Abstract:
  6. This Module defines the CMainFrame(The Frame Window of the application) class
  7. Author:
  8. Arathi Kundapur (v-akunda) 11-Feb-1998
  9. Revision History:
  10. --*/
  11. #if !defined(AFX_MAINFRM_H__72451C6F_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_)
  12. #define AFX_MAINFRM_H__72451C6F_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_
  13. #if _MSC_VER >= 1000
  14. #endif // _MSC_VER >= 1000
  15. #include "lrwizapi.h"
  16. class CLicServer;
  17. class CKeyPack;
  18. class CMainFrame : public CFrameWnd
  19. {
  20. protected: // create from serialization only
  21. CMainFrame();
  22. DECLARE_DYNCREATE(CMainFrame)
  23. // Attributes
  24. public:
  25. // Operations
  26. public:
  27. // Overrides
  28. // ClassWizard generated virtual function overrides
  29. //{{AFX_VIRTUAL(CMainFrame)
  30. public:
  31. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  32. protected:
  33. virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  34. //}}AFX_VIRTUAL
  35. // Implementation
  36. public:
  37. virtual ~CMainFrame();
  38. #ifdef _DEBUG
  39. virtual void AssertValid() const;
  40. virtual void Dump(CDumpContext& dc) const;
  41. #endif
  42. public:
  43. void
  44. EnumFailed(
  45. HRESULT reason,
  46. CLicServer * pLicServer
  47. );
  48. BOOL
  49. IsUserAdmin(
  50. CString& Server
  51. );
  52. void
  53. SetTreeViewSel(
  54. LPARAM lParam,
  55. NODETYPE NodeType
  56. );
  57. void
  58. DeleteServer(
  59. LicServerList * pLicServerList,
  60. POSITION TempPos,
  61. CLicServer * pLicServer
  62. );
  63. HRESULT
  64. AddLicensestoList(
  65. CKeyPack * pKeyPack,
  66. CListCtrl * pListCtrl,
  67. BOOL bRefresh
  68. );
  69. HRESULT
  70. AddKeyPackDialog(
  71. CLicServer * pServer
  72. );
  73. HRESULT
  74. GetLicServer(
  75. CString * pLicServer
  76. );
  77. void
  78. PressButton(
  79. UINT uId,
  80. BOOL bPress
  81. );
  82. HRESULT
  83. GetActiveServer(
  84. CLicServer ** ppServer
  85. )
  86. {
  87. *ppServer = m_pServer;
  88. if( m_pServer == NULL )
  89. {
  90. return E_FAIL;
  91. }
  92. return S_OK;
  93. }
  94. BOOL IsDownLoadedPacks( CLicServer *pServer );
  95. HRESULT
  96. RefreshServer(
  97. CLicServer * pLicServer
  98. );
  99. void SelectView(VIEW);
  100. void ConnectAndDisplay();
  101. CSplitterWnd m_SplitterWnd;
  102. BOOL
  103. ConnectServer(
  104. LPCTSTR pszServer=NULL
  105. );
  106. BOOL IsServerRegistered(
  107. HRESULT *phrStatus
  108. );
  109. BOOL IsLicensesDownLoaded( );
  110. void UI_initmenu( CMenu *pMenu , NODETYPE nt );
  111. DWORD WizardActionOnServer( WIZACTION wa , PBOOL pbRefresh , VIEW );
  112. DWORD StartWizardEx(HWND hWndParent,
  113. WIZACTION WizAction,
  114. LPCTSTR pszLSName,
  115. PBOOL pbRefresh);
  116. void OnRefresh();
  117. void OnHelp( );
  118. void OnRefreshServer( );
  119. void OnDownLoadLicenses( );
  120. void OnRepeatLastDownLoad( );
  121. void OnReRegisterServer( );
  122. void OnUnRegisterServer( );
  123. void SetActiveServer( CLicServer *pServer )
  124. {
  125. m_pServer = pServer;
  126. }
  127. private:
  128. CLicServer *m_pServer;
  129. // BOOL m_fDownloadedLicenses;
  130. protected: // control bar embedded members
  131. CStatusBar m_wndStatusBar;
  132. CToolBar m_wndToolBar;
  133. // Generated message map functions
  134. protected:
  135. CView * m_pRightView;
  136. CView * m_pLeftView;
  137. //{{AFX_MSG(CMainFrame)
  138. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  139. afx_msg LRESULT OnSelChange(WPARAM wParam, LPARAM lParam);
  140. afx_msg LRESULT OnAddAllServers(WPARAM wParam, LPARAM lParam);
  141. afx_msg LRESULT OnAddServer(WPARAM wParam, LPARAM lParam);
  142. afx_msg LRESULT OnAddKeyPack(WPARAM wParam, LPARAM lParam);
  143. afx_msg void OnLargeIcons();
  144. afx_msg void OnSmallIcons();
  145. afx_msg void OnList();
  146. afx_msg void OnDetails();
  147. afx_msg void OnExit();
  148. afx_msg void OnAppAbout();
  149. afx_msg void OnConnectServer();
  150. afx_msg void OnRegistration();
  151. afx_msg void OnProperties( );
  152. afx_msg LRESULT OnEnumerateServer(WPARAM wParam, LPARAM lParam);
  153. afx_msg void OnUpdateDownloadlicenses( CCmdUI * pCmdUI );
  154. afx_msg void OnUpdateRepeatLastDownload( CCmdUI * pCmdUI );
  155. afx_msg void OnUpdateReregisterserver( CCmdUI * pCmdUI );
  156. afx_msg void OnUpdateUnregisterserver( CCmdUI * pCmdUI );
  157. afx_msg void OnUpdateRefresh( CCmdUI *pCmdUI );
  158. afx_msg void OnUpdateProperties( CCmdUI *pCmdUI );
  159. //}}AFX_MSG
  160. DECLARE_MESSAGE_MAP()
  161. };
  162. /////////////////////////////////////////////////////////////////////////////
  163. //{{AFX_INSERT_LOCATION}}
  164. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  165. #endif // !defined(AFX_MAINFRM_H__72451C6F_887E_11D1_8AD1_00C04FB6CBB5__INCLUDED_)