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.

209 lines
7.9 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1994 **
  4. //*********************************************************************
  5. //
  6. // WIZDEF.H - data structures and constants for Internet setup/signup wizard
  7. //
  8. // HISTORY:
  9. //
  10. // 11/20/94 jeremys Created.
  11. // 96/02/27 markdu Changed RAS_MaxLocal to RAS_MaxPhoneNumber
  12. // 96/03/09 markdu Moved all references to 'need terminal window after
  13. // dial' into RASENTRY.dwfOptions.
  14. // 96/03/10 markdu Moved all references to modem name into RASENTRY.
  15. // 96/03/10 markdu Moved all references to phone number into RASENTRY.
  16. // 96/03/23 markdu Remove unused IP LAN pages.
  17. // 96/03/23 markdu Removed TCPINFO struct from CLIENTINFO struct.
  18. // 96/03/23 markdu Since TCPINFO struct was removed from CLIENTINFO,
  19. // CLIENTINFO contained only a CLIENTCONFIG. So, CLIENTINFO
  20. // has been removed and all occurrences replaced with CLIENTCONFIG.
  21. // 96/03/24 markdu Changed all MAX_ISP_ defines to use the values used
  22. // by RASDIALPARAMS. Note that since for some reason RNA won't
  23. // create an entry of length RAS_MaxEntryName even though
  24. // RasValidateEntryName succeeds, we have to subtract one.
  25. // 96/03/27 markdu Added lots of new pages.
  26. // 96/04/19 markdu NASH BUG 13387 Changed RAS_MaxPhoneNumber.
  27. // 96/05/06 markdu NASH BUG 15637 Removed unused code.
  28. // 96/05/14 markdu NASH BUG 22681 Took out mail and news pages.
  29. // 96/09/05 valdonb NORMANDY BUG 6248 Added pages for mail and news set up
  30. //
  31. #ifndef _WIZDEF_H_
  32. #define _WIZDEF_H_
  33. #include "icwcmn.h"
  34. // Defines
  35. #define MAX_ISP_NAME (RAS_MaxEntryName-1) // internet service provider name
  36. #define MAX_ISP_USERNAME UNLEN // max length of login username
  37. #define MAX_ISP_PASSWORD PWLEN // max length of login password
  38. #define MAX_PORT_LEN 5 // max length of proxy port number (max # = 65535)
  39. #define MAX_SCHEME_NAME_LENGTH sizeof("gopher")
  40. #define MAX_URL_STRING (1024 + MAX_SCHEME_NAME_LENGTH + sizeof("://")) // max length of URL
  41. #define MAX_REG_LEN 2048 // max length of registry entries
  42. #define MAX_RES_LEN 255 // max length of string resources
  43. #define SMALL_BUF_LEN 48 // convenient size for small text buffers
  44. #define MAX_UI_AREA_CODE RAS_MaxAreaCode
  45. // NASH BUG 13387 MAX_UI_PHONENUM should be defined as RAS_MaxPhoneNumber, since that
  46. // what is used in RASENTRY, but internally RNA uses RAS_MaxLocal, which is 36. There
  47. // is a bug in RNA though: it chops off the 36th character if you enter it.
  48. #define MAX_UI_PHONENUM 35
  49. // Keep in sync with CCHMAX_ACCOUNT_NAME in imnact.h. This is used here because
  50. // we can't include imnact.h in this file because using a precompiled header
  51. // conflicts with the use of DEFINE_GUID.
  52. #define MAX_ACCOUNT_NAME 256
  53. // 11/23/96 jmazner Normandy #8504
  54. #define MAX_SERVERPROTOCOL_NAME 16
  55. #define NUM_MAILSERVERPROTOCOLS 2 /* POP3
  56. IMAP
  57. */
  58. #ifndef ARRAYSIZE
  59. #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
  60. #endif
  61. #ifndef NULL_TERM_TCHARS
  62. #define NULL_TERM_TCHARS(sz); {sz[ARRAYSIZE(sz)-1] = TEXT('\0');}
  63. #endif
  64. // Data structures
  65. // we distinguish two kinds of phone numbers: "machine-readable"
  66. // which are just the digits stored sequentially ("18003524060"), and
  67. // "human readable" which is just text and may look like "(206) 352-9060
  68. // ext. 910". We will never parse "human readable" numbers.
  69. // structure to hold information about the user
  70. // The fixed-lengths fields are a little wasteful, but we only have one
  71. // of these, it's dynamically allocated and it's much more convenient this way.
  72. typedef struct tagUSERINFO {
  73. UINT cbStruct; // == sizeof(USERINFO)
  74. // various choices made along the way...
  75. // 5/4/97 jmazner Olympus #1347
  76. // Updated to allow for new Manual connection type.
  77. //BOOL fConnectOverLAN; // use LAN to connect, if user has both modem & LAN
  78. UINT uiConnectionType;
  79. // ISP (Internet Service Provider) information
  80. BOOL fNewConnection;
  81. BOOL fModifyConnection;
  82. BOOL fModifyAdvanced;
  83. BOOL fAutoDNS;
  84. TCHAR szISPName[MAX_ISP_NAME+1];
  85. TCHAR szAccountName[MAX_ISP_USERNAME+1]; // requested username
  86. TCHAR szPassword[MAX_ISP_PASSWORD+1]; // requested password
  87. // proxy server config information
  88. TCHAR szAutoConfigURL[MAX_URL_STRING+1];
  89. BOOL fProxyEnable;
  90. BOOL bByPassLocal;
  91. BOOL bAutoConfigScript;
  92. BOOL bAutoDiscovery;
  93. TCHAR szProxyServer[MAX_URL_STRING+1];
  94. TCHAR szProxyOverride[MAX_URL_STRING+1];
  95. BOOL fPrevInstallFound; // previous install was found
  96. } USERINFO;
  97. // structure used to pass information to mail profile config APIs.
  98. // Most likely the pointers point into a USERINFO struct,
  99. typedef struct MAILCONFIGINFO {
  100. TCHAR * pszEmailAddress; // user's email address
  101. TCHAR * pszEmailServer; // user's email server path
  102. TCHAR * pszEmailDisplayName; // user's name
  103. TCHAR * pszEmailAccountName; // account name
  104. TCHAR * pszEmailAccountPwd; // account password
  105. TCHAR * pszProfileName; // name of profile to use
  106. // (create or use default if NULL)
  107. BOOL fSetProfileAsDefault; // set profile as default profile
  108. TCHAR * pszConnectoidName; // name of connectoid to dial
  109. BOOL fRememberPassword; // password cached if TRUE
  110. } MAILCONFIGINFO;
  111. #define NUM_WIZARD_PAGES 12 //39 // total number of pages in wizard
  112. #define MAX_PAGE_INDEX 11
  113. // page index defines
  114. #define ORD_PAGE_HOWTOCONNECT 0
  115. #define ORD_PAGE_CHOOSEMODEM 1
  116. #define ORD_PAGE_CONNECTEDOK 2
  117. #define ORD_PAGE_CONNECTION 3
  118. #define ORD_PAGE_MODIFYCONNECTION 4
  119. #define ORD_PAGE_CONNECTIONNAME 5
  120. #define ORD_PAGE_PHONENUMBER 6
  121. #define ORD_PAGE_NAMEANDPASSWORD 7
  122. #define ORD_PAGE_USEPROXY 8
  123. #define ORD_PAGE_PROXYSERVERS 9
  124. #define ORD_PAGE_PROXYEXCEPTIONS 10
  125. #define ORD_PAGE_SETUP_PROXY 11
  126. // structure to hold information about wizard state
  127. typedef struct tagWIZARDSTATE {
  128. UINT uCurrentPage; // index of current page wizard is on
  129. // keeps a history of which pages were visited, so user can
  130. // back up and we know the last page completed in case of reboot.
  131. UINT uPageHistory[NUM_WIZARD_PAGES]; // array of page #'s we visited
  132. UINT uPagesCompleted; // # of pages in uPageHistory
  133. BOOL fMAPIActive; // MAPI initialized
  134. BOOL fNeedReboot; // reboot needed at end
  135. DWORD dwRunFlags; // flags passed to us
  136. // State data that is common to both sides of the WIZARD
  137. CMNSTATEDATA cmnStateData;
  138. } WIZARDSTATE;
  139. // handler proc for OK, cancel, etc button handlers
  140. typedef BOOL (CALLBACK* INITPROC)(HWND,BOOL);
  141. typedef BOOL (CALLBACK* OKPROC)(HWND,BOOL,UINT *,BOOL *);
  142. typedef BOOL (CALLBACK* CANCELPROC)(HWND);
  143. typedef BOOL (CALLBACK* CMDPROC)(HWND,WPARAM,LPARAM);
  144. // structure with information for each wizard page
  145. typedef struct tagPAGEINFO
  146. {
  147. UINT uDlgID; // dialog ID to use for page
  148. UINT uDlgID97External; // dialog ID to use for pages given to an external Wizard 97
  149. UINT uDlgID97; // dialog ID to use for a Wizard 97 that we build
  150. // handler procedures for each page-- any of these can be
  151. // NULL in which case the default behavior is used
  152. INITPROC InitProc;
  153. OKPROC OKProc;
  154. CMDPROC CmdProc;
  155. CANCELPROC CancelProc;
  156. // Normandy 12278 ChrisK 12/4/96
  157. #if !defined(WIN16)
  158. DWORD dwHelpID;
  159. #endif //!WIN16
  160. int nIdTitle;
  161. int nIdSubTitle;
  162. } PAGEINFO;
  163. #define SetPropSheetResult( hwnd, result ) SetWindowLongPtr(hwnd, DWLP_MSGRESULT, result)
  164. #endif // _WIZDEF_H_