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.

101 lines
2.9 KiB

  1. #ifndef _ULSWIZRD_H_
  2. #define _ULSWIZRD_H_
  3. // same as INTERNET_MAX_USER_NAME_LENGTH in wininet.h.
  4. #define MAX_SERVER_NAME_LENGTH 128
  5. #define MAX_FIRST_NAME_LENGTH 128
  6. #define MAX_LAST_NAME_LENGTH 128
  7. #define MAX_EMAIL_NAME_LENGTH 128
  8. #define MAX_UID_LENGTH 256
  9. #define MAX_LOCATION_NAME_LENGTH 128
  10. #define MAX_PHONENUM_LENGTH 128
  11. #define MAX_COMMENTS_LENGTH 256
  12. #define UI_COMMENTS_LENGTH 60 // ;Internal
  13. #define MAX_CLNTSTRING_LENGTH 256 //max of above
  14. //SS: username is concatenated first name with last name with space in between
  15. #define MAX_USER_NAME_LENGTH (MAX_FIRST_NAME_LENGTH + MAX_LAST_NAME_LENGTH + sizeof (TCHAR))
  16. // Wizard
  17. typedef struct tag_ULS_CONF
  18. {
  19. DWORD dwFlags;
  20. BOOL fDontPublish;
  21. TCHAR szServerName[MAX_SERVER_NAME_LENGTH];
  22. TCHAR szFirstName[MAX_FIRST_NAME_LENGTH];
  23. TCHAR szLastName[MAX_LAST_NAME_LENGTH];
  24. TCHAR szEmailName[MAX_EMAIL_NAME_LENGTH];
  25. TCHAR szLocation[MAX_LOCATION_NAME_LENGTH];
  26. TCHAR szComments[MAX_COMMENTS_LENGTH];
  27. TCHAR szUserName[MAX_USER_NAME_LENGTH];
  28. }
  29. ULS_CONF;
  30. #define ULSCONF_F_PUBLISH 0X00000001UL
  31. #define ULSCONF_F_SERVER_NAME 0X00000002UL
  32. #define ULSCONF_F_FIRST_NAME 0X00000004UL
  33. #define ULSCONF_F_EMAIL_NAME 0X00000008UL
  34. #define ULSCONF_F_LAST_NAME 0X00000010UL
  35. #define ULSCONF_F_LOCATION 0X00000020UL
  36. #define ULSCONF_F_COMMENTS 0X00000080UL
  37. #define ULSCONF_F_USER_NAME 0x00000100UL
  38. #define ULSWIZ_F_SHOW_BACK 0X00010000UL
  39. #define ULSWIZ_F_NO_FINISH 0X00020000UL
  40. class CULSWizard;
  41. class CWizDirectCallingSettings
  42. {
  43. private:
  44. static HWND s_hDlg;
  45. CULSWizard* m_pWiz;
  46. ULS_CONF* m_pConf;
  47. TCHAR m_szInitialServerName[MAX_SERVER_NAME_LENGTH];
  48. bool m_bInitialEnableGateway;
  49. public:
  50. CWizDirectCallingSettings( CULSWizard* pWiz ) : m_pWiz( pWiz ) {
  51. memset(m_szInitialServerName,0,sizeof(m_szInitialServerName)/sizeof(m_szInitialServerName[0])); }
  52. void SetULS_CONF( ULS_CONF* pConf ) { m_pConf = pConf; }
  53. static INT_PTR APIENTRY StaticDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  54. static HWND GetHwnd(){ return s_hDlg; }
  55. static bool IsGatewayNameInvalid();
  56. static void OnWizFinish();
  57. private:
  58. INT_PTR APIENTRY _DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  59. BOOL _OnInitDialog();
  60. BOOL _OnSetActive();
  61. BOOL _OnKillActive();
  62. BOOL _OnWizBack();
  63. BOOL _OnWizNext();
  64. BOOL _OnWizFinish();
  65. BOOL _OnCommand( WPARAM wParam, LPARAM lParam );
  66. void _SetWizButtons();
  67. };
  68. class CULSWizard
  69. {
  70. CWizDirectCallingSettings m_WizDirectCallingSettings;
  71. public:
  72. CULSWizard::CULSWizard() : m_WizDirectCallingSettings( this )
  73. { ; }
  74. HRESULT GetWizardPages( PROPSHEETPAGE **, ULONG *, ULS_CONF **);
  75. HRESULT ReleaseWizardPages( PROPSHEETPAGE *);
  76. HRESULT SetConfig( ULS_CONF * );
  77. HRESULT GetConfig( ULS_CONF * );
  78. };
  79. #endif // _ULSWIZRD_H_