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.

155 lines
4.2 KiB

  1. // conndlg.h : header file
  2. //
  3. //Forward declaration
  4. struct ISAMTreeItemData;
  5. class ImpersonationManager;
  6. /////////////////////////////////////////////////////////////////////////////
  7. // CConnectionDialog dialog //
  8. /////////////////////////////////////////////////////////////////////////////
  9. class CConnectionDialog : public CDialog
  10. {
  11. // Construction
  12. public:
  13. CConnectionDialog(CWnd* pParent, char*,
  14. // WBEM_LOGIN_AUTHENTICATION loginMethod,
  15. char*,
  16. char*, char** locale, char** authority, BOOL FAR*, BOOL, CMapStringToOb*,
  17. CMapStringToOb*, BOOL, char**, BOOL *,
  18. BOOL *, BOOL *); // standard constructor
  19. ~CConnectionDialog();
  20. // Dialog Data
  21. //{{AFX_DATA(CConnectionDialog)
  22. enum { IDD = IDD_DIALOG_CONNECTION };
  23. CEdit m_browseEdit;
  24. CButton m_browse;
  25. CButton m_cancelButton;
  26. CButton m_okButton;
  27. CButton m_sysPropCheck;
  28. CButton m_impersonateCheck;
  29. CButton m_PassthroughOnlyCheck;
  30. CEdit m_UserName;
  31. CEdit m_Password;
  32. CEdit m_Authority;
  33. CEdit m_Locale;
  34. CTreeCtrl m_tree1;
  35. CEdit m_messageEdit;
  36. CButton m_RefreshButton;
  37. CButton m_PwdAsNull;
  38. CButton m_PwdAsBlank;
  39. //}}AFX_DATA
  40. CImageList m_imageList;
  41. int m_idxSelectedImage, m_idxUnselectedImage, m_idxIncludedSelectedImage,
  42. m_idxIncludedUnselectedImage;
  43. // char *pServerIn;
  44. // char *pUsernameIn;
  45. // char *pPasswordIn;
  46. CMapStringToOb *pMapStringToObIn;
  47. // char *pServerOut;
  48. // char *pUsernameOut;
  49. char *pPasswordOut;
  50. char *pHomeNamespaceOut;
  51. CMapStringToOb *pMapStringToObOut;
  52. char **lpszNamespacesOut;
  53. char* lpszServer;
  54. char* lpszUserName;
  55. char* lpszPassword;
  56. char* lpszAuthority;
  57. char* lpszLocale;
  58. char** lpszAuthorityOut;
  59. char** lpszLocaleOut;
  60. BOOL fConnParmSpecified;
  61. ULONG cSelectedCels;
  62. BOOL fDoubleClicked;
  63. CBitmap bmap1;
  64. CBitmap bmap2;
  65. CBitmap bmap3;
  66. CBitmap bmap4;
  67. CBitmap bmask;
  68. BOOL FAR* fSystemProperties;
  69. BOOL FAR* fImpersonation;
  70. BOOL FAR* fPassthroughOnly;
  71. BOOL FAR* fIntpretEmptPwdAsBlank;
  72. // WBEM_LOGIN_AUTHENTICATION m_loginMethod;
  73. int m_idxMode1Image ,m_idxMode2Image, m_idxMode3Image, m_idxMode4Image;
  74. ISAMTreeItemData * pCurrentSelectionList;
  75. ISAMTreeItemData * pCurrentItem;
  76. ImpersonationManager* impersonateMgr;
  77. void ConnectionParameterChange();
  78. // Overrides
  79. // ClassWizard generated virtual function overrides
  80. //{{AFX_VIRTUAL(CConnectionDialog)
  81. protected:
  82. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  83. virtual void OnOK();
  84. virtual void OnCancel();
  85. virtual void OnNcDestroy ();
  86. //}}AFX_VIRTUAL
  87. // Implementation
  88. protected:
  89. // Generated message map functions
  90. //{{AFX_MSG(CConnectionDialog)
  91. afx_msg void OnClickTree1(NMHDR* pNMHDR, LRESULT* pResult);
  92. afx_msg void OnTreeExpand(NMHDR* pNMHDR, LRESULT* pResult);
  93. afx_msg void OnKeyDown(NMHDR* pNMHDR, LRESULT* pResult);
  94. afx_msg void OnDeleteitemTree1(NMHDR* pNMHDR, LRESULT* pResult);
  95. virtual BOOL OnInitDialog();
  96. afx_msg void OnButtonBrowse();
  97. afx_msg void OnButtonRefresh();
  98. afx_msg void OnButtonSysProp();
  99. afx_msg void OnButtonInterpretEmpty();
  100. afx_msg void OnButtonImpersonation();
  101. afx_msg void OnButtonPassthroughOnly();
  102. afx_msg void OnDblclkTree1(NMHDR* pNMHDR, LRESULT* pResult);
  103. afx_msg void OnKillfocusBrowseEdit();
  104. afx_msg void OnUserNameChange();
  105. afx_msg void OnLocaleChange();
  106. afx_msg void OnPasswordChange();
  107. afx_msg void OnAuthorityChange();
  108. afx_msg void OnServerChange();
  109. afx_msg void OnHelp();
  110. //}}AFX_MSG
  111. DECLARE_MESSAGE_MAP()
  112. public:
  113. HTREEITEM InsertItem (CTreeCtrl&, HTREEITEM, const char *);
  114. void AddNamespaces (HTREEITEM, int);
  115. void RemoveNamespaces (HTREEITEM, int);
  116. int FindAbsName (char *name,
  117. HTREEITEM hStartAt,
  118. HTREEITEM& hFoundItem);
  119. int CreateNamespace (char *name,
  120. HTREEITEM hStartAt,
  121. HTREEITEM& hFoundItem);
  122. int UnincludedChild (HTREEITEM item, int checkSelf);
  123. void GenerateOutMap (HTREEITEM hStartAt);
  124. void GenerateOutString (HTREEITEM hStartAt);
  125. void CleanUpTreeCtrl(HTREEITEM& hTreeItem);
  126. void UpdateChildChildInclude (HTREEITEM hNode, BOOL fIncrement);
  127. char* GetAuthority() //on heap (needs to be deleted)
  128. {return lpszAuthority;}
  129. char* GetLocale() //on heap (needs to be deleted)
  130. {return lpszLocale;}
  131. BOOL Impersonation() { return impersonateMgr ? TRUE : FALSE; }
  132. BOOL RefreshTree();
  133. };