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.

646 lines
18 KiB

  1. #pragma once
  2. #include "profilefieldsconsts.h"
  3. #include "profilefieldinfo.h"
  4. #include "csite.h"
  5. class CUserProfile2;
  6. //
  7. // customizaeble validation paramers
  8. //
  9. class CValidationParams
  10. {
  11. public:
  12. CValidationParams(LONG lMinPwd = 6,
  13. LONG lMaxPwd = 16,
  14. LONG lMinMemberName = 1,
  15. LONG lMaxMemberName = 64,
  16. LONG lEmailLeft = 32,
  17. LONG lEmailRight = 32,
  18. LONG lMaxNickname = 30) :
  19. // default values ....
  20. m_lMinPwd(lMinPwd), m_lMaxPwd(lMaxPwd),
  21. m_lMinMemberName(lMinMemberName), m_lMaxMemberName(lMaxMemberName),
  22. m_lEmailLeft(lEmailLeft), m_lEmailRight(lEmailRight),
  23. m_lMaxNickname(lMaxNickname)
  24. {
  25. }
  26. // this is how to change'em
  27. VOID SetNewValues(LONG lMinPwd = 8,
  28. LONG lMaxPwd = 16,
  29. LONG lMinMemberName = 1,
  30. LONG lMaxMemberName = 64,
  31. LONG lEmailLeft = 32,
  32. LONG lEmailRight = 32,
  33. LONG lMaxNickname = 30)
  34. {
  35. m_lMinPwd = lMinPwd, m_lMaxPwd=lMaxPwd,
  36. m_lMinMemberName = lMinMemberName, m_lMaxMemberName = lMaxMemberName,
  37. m_lEmailLeft = lEmailLeft, m_lEmailRight = lEmailRight;
  38. m_lMaxNickname = lMaxNickname;
  39. }
  40. void GetPwdParams(LONG& lmin, LONG& lmax) {
  41. lmin = m_lMinPwd, lmax = m_lMaxPwd;
  42. }
  43. void GetMemberNameParams(LONG& lmin, LONG& lmax){
  44. lmin = m_lMinMemberName, lmax = m_lMaxMemberName;
  45. }
  46. void GetEmailParams(LONG& lmailL, LONG& lmailR ){
  47. lmailL = m_lEmailLeft, lmailR = m_lEmailRight;
  48. }
  49. void GetNicknameParams(LONG& lmax){
  50. lmax = m_lMaxNickname;
  51. }
  52. private:
  53. LONG m_lMinPwd;
  54. LONG m_lMaxPwd;
  55. LONG m_lMinMemberName;
  56. LONG m_lMaxMemberName;
  57. LONG m_lEmailLeft;
  58. LONG m_lEmailRight;
  59. LONG m_lMaxNickname;
  60. };
  61. extern CProfileFieldInfo *g_pFieldInfo;
  62. //
  63. // field description ...
  64. //
  65. class CProfileFieldState
  66. {
  67. public:
  68. CProfileFieldState(CStringA szName)
  69. {
  70. m_bIsRequired = FALSE;
  71. m_lSectionID = -1;
  72. m_lValidationID = 0;
  73. m_pTag = g_pFieldInfo->GetFieldInfoByName(szName);
  74. if (m_pTag == NULL)
  75. {
  76. m_szFieldName = szName;
  77. m_bIsExternal = TRUE;
  78. }
  79. else
  80. {
  81. m_bIsExternal = FALSE;
  82. m_lValidationID = -1; // internal validation
  83. }
  84. }
  85. VARENUM GetSyntax()
  86. {
  87. if (m_bIsExternal) return VT_BSTR;
  88. return m_pTag->lSyntax;
  89. }
  90. LONG GetFieldID()
  91. {
  92. if (m_bIsExternal) return -1;
  93. return m_pTag->lFieldID;
  94. }
  95. LPCSTR GetFieldName()
  96. {
  97. if (!m_bIsExternal) return m_pTag->szField;
  98. return m_szFieldName;
  99. }
  100. BOOL GetIsRequired() { return m_bIsRequired; }
  101. void SetIsRequired(BOOL b) { m_bIsRequired = b; }
  102. BOOL GetIsExternal() { return m_bIsExternal; }
  103. LONG GetSectionID() { return m_lSectionID; }
  104. void SetSectionID(LONG l) { m_lSectionID = l; }
  105. LONG GetValidation() { return m_lValidationID; }
  106. void SetValidation(LONG l)
  107. {
  108. if (GetIsExternal()) m_lValidationID = l;
  109. }
  110. HRESULT GetHRMissing()
  111. {
  112. if (GetIsExternal()) E_INVALIDARG;
  113. if (m_pTag)
  114. return m_pTag->hrMissing;
  115. else
  116. return S_OK;
  117. }
  118. private:
  119. PCPROF_FIELD m_pTag; // This variable is stored for performance reason
  120. // If a tag is passport supported, m_pTag points
  121. // to g_FieldInfo, which provides Syntax, FieldID,
  122. // and missing HR.
  123. CStringA m_szFieldName; // Store name of a non passport attribute.
  124. // GetFieldName points to m_pTag->cszField
  125. // instead of making another copy
  126. BOOL m_bIsRequired;
  127. BOOL m_bIsExternal;
  128. LONG m_lSectionID; // SectionID = -1 && bIsExternal indicates our internal "external item"
  129. // validation routine index
  130. // 0 = no validation
  131. // -1 = internal validation for passport supported fields
  132. // > 0 specify a validation routine for external items
  133. // For internal items, the object that owns the field
  134. // knows how to validate a particular field ID
  135. LONG m_lValidationID;
  136. };
  137. typedef CAutoPtr<CProfileFieldState> CFieldStatePtr;
  138. //
  139. // represent a field into profile. Should be initialized from
  140. // schema file in XML format ....
  141. //
  142. class CProfileField
  143. {
  144. public:
  145. // get the field from the form ....
  146. CProfileField(CProfileFieldState *pField,
  147. BOOL fIsRequired = FALSE,
  148. BOOL fIsDirty = TRUE
  149. ) :
  150. m_dwErr(S_OK),
  151. m_pTag(pField),
  152. // by default the field is set. Mark it not set if
  153. // necessary
  154. m_fIsSet(TRUE),
  155. m_bIsDirty(fIsDirty)
  156. {
  157. pField->SetIsRequired(fIsRequired);
  158. m_lFieldID = pField->GetFieldID();
  159. // should probably throw an exception if pField is NULL .....
  160. }
  161. // virtual d-tor
  162. virtual ~CProfileField(){
  163. }
  164. // and from XML ....
  165. // and from Cookie ....
  166. // get the value ....
  167. // specific for field types
  168. // make that class abstract ...
  169. virtual void GetStringValue(CStringW& Val) = 0;
  170. virtual void SetStringValue(LPCWSTR Val) = 0;
  171. HRESULT GetErrorCode()
  172. {
  173. return m_dwErr;
  174. }
  175. //
  176. // external validation setting errcodes ...
  177. //
  178. void SetErrorCode(HRESULT hr)
  179. {
  180. m_dwErr = hr;
  181. }
  182. //
  183. // Wrappers on CProfileFieldState when m_pTag is been invalidated
  184. // When no FieldState is provided
  185. //
  186. VARENUM GetSyntax()
  187. {
  188. if (m_pTag) return m_pTag->GetSyntax();
  189. PCPROF_FIELD ppf = g_pFieldInfo->GetFieldInfoByID(m_lFieldID);
  190. if (!ppf) return VT_BSTR;
  191. return ppf->lSyntax;
  192. }
  193. LONG GetFieldID()
  194. {
  195. return m_lFieldID;
  196. }
  197. LPCSTR GetFieldName()
  198. {
  199. if (m_pTag) return m_pTag->GetFieldName();
  200. PCPROF_FIELD ppf = g_pFieldInfo->GetFieldInfoByID(m_lFieldID);
  201. if (!ppf) return NULL;
  202. return ppf->szField;
  203. }
  204. BOOL GetIsRequired()
  205. {
  206. if (m_pTag) return m_pTag->GetIsRequired();
  207. return FALSE;
  208. }
  209. BOOL GetIsExternal()
  210. {
  211. if (m_pTag == NULL) return FALSE;
  212. return m_pTag->GetIsExternal();
  213. }
  214. LONG GetSectionID()
  215. {
  216. if (m_pTag == NULL) return -1;
  217. return m_pTag->GetSectionID();
  218. }
  219. BOOL SetSectionID(LONG l)
  220. {
  221. if (m_pTag == NULL) return FALSE;
  222. m_pTag->SetSectionID(l);
  223. }
  224. LONG GetValidation()
  225. {
  226. if (m_pTag == NULL) return -1; // internal validation
  227. return m_pTag->GetValidation();
  228. }
  229. BOOL SetValidation(LONG l)
  230. {
  231. if (m_pTag == NULL) return FALSE;
  232. // overwrite validation when when it is external
  233. if (m_pTag->GetIsExternal())
  234. {
  235. m_pTag->SetValidation(l);
  236. return TRUE;
  237. }
  238. else return FALSE;
  239. }
  240. HRESULT GetHRMissing()
  241. {
  242. if (m_pTag->GetIsExternal()) return PP_E_EXTERNALFIELD_BLANK;
  243. return m_pTag->GetHRMissing();
  244. }
  245. // set up the item
  246. virtual HRESULT SetDBItem(CComVariant& v) = 0;
  247. //
  248. // Generate field that does not need runtime FieldState
  249. // This is used only for passport supported attributes
  250. //
  251. //void InvalidateFieldState()
  252. //{
  253. // m_pTag = NULL;
  254. //}
  255. BOOL GetIsDirty() { return m_bIsDirty; }
  256. void SetIsDirty(BOOL b) { m_bIsDirty = b; }
  257. protected:
  258. HRESULT m_dwErr;
  259. BOOL m_fIsSet;
  260. LONG m_lFieldID; // used when m_pTag is not valid
  261. // used for simple attribute that does not need
  262. // runtime FieldState, the FieldID
  263. // gives us access to g_FieldInfo
  264. CProfileFieldState *m_pTag;
  265. //
  266. // Used for persistence optimization
  267. //
  268. BOOL m_bIsDirty;
  269. };
  270. typedef CAutoPtr<CProfileField> CProfFieldPtr;
  271. //
  272. // This interface manages a list of profile fields.
  273. // Alternatively, field state list can be managed to
  274. // restrict the list of fields presented.
  275. //
  276. class CProfileFieldCollectionBase
  277. {
  278. public:
  279. virtual ~CProfileFieldCollectionBase(){};
  280. // A field is passport supported within the range that this object manages
  281. virtual BOOL IsFieldSupported(LPCSTR szName) = 0;
  282. // FieldName <- -> FieldID ; only for passport supported attributes
  283. virtual LPCSTR GetFieldNameByID(ULONG lFieldID) = 0;
  284. virtual LONG GetIDByFieldName(LPCSTR szName) = 0;
  285. // Retrive a field
  286. virtual CProfileField* GetField(LPCSTR szName) = 0;
  287. virtual CProfileFieldState* GetFieldState(LPCSTR szName) = 0;
  288. virtual HRESULT GetFieldStateCount(LONG& lCount) =0;
  289. virtual HRESULT GetFieldValue(LPCSTR szName, CStringW& cswValue) = 0;
  290. virtual HRESULT GetFieldValue(LPCSTR szName, LONG& lValue) = 0;
  291. virtual HRESULT GetFieldValue(LPCSTR szName, CComBSTR& bstrValue) = 0;
  292. virtual HRESULT GetFieldError(LPCSTR szName) = 0;
  293. virtual HRESULT SetFieldError(LPCSTR szName, HRESULT h) =0;
  294. virtual HRESULT GetFieldErrorCount(LONG& lCount) =0;
  295. // Validation
  296. virtual LONG Validate() = 0;
  297. virtual HRESULT Validate(CProfileField *ppf) = 0;
  298. virtual LONG ValidateSection(LONG lSectionNum)=0;
  299. // Field management
  300. virtual HRESULT UpdateField(LPCSTR cszName, LPCWSTR cszValue)=0;
  301. virtual HRESULT UpdateField(LPCSTR cszName, LONG lValue)=0;
  302. virtual HRESULT AddField(LPCSTR cszName, PCWSTR value)=0;
  303. virtual HRESULT DeleteField(LPCSTR cszName)=0;
  304. // DB initialization
  305. virtual HRESULT InitFromDB(LARGE_INTEGER PUID, CStringW cswCredName)=0;
  306. virtual HRESULT Persist(LARGE_INTEGER& PUID, CStringW& cswCredName, BOOL bInsert)=0;
  307. // Web initialization
  308. virtual HRESULT InitFromHTMLForm(CHttpRequest& request)=0;
  309. virtual HRESULT InitFromQueryString(CHttpRequest& request)=0;
  310. virtual HRESULT InitFromXML(IXMLDOMDocument *pXMLDoc)=0;
  311. // Save all fields in XML format and append to szProfileXML
  312. virtual HRESULT SaveToXML(CStringA &szProfileXML) = 0;
  313. //
  314. // Manage FieldStates.
  315. // It stores a list of fields requirements.
  316. // Used when only a subset of fields belonging to the category are needed
  317. //
  318. virtual HRESULT InitFieldStates()=0;
  319. //virtual HRESULT AddFieldState(LONG lFieldID, bool bRequired = true)=0;
  320. virtual HRESULT AddFieldState(LPCSTR szName, bool bRequired = true, bool bExternal = false)=0;
  321. //virtual HRESULT DeleteFieldState(LONG lFieldID)=0;
  322. virtual HRESULT DeleteFieldState(LPCSTR szsName)=0;
  323. virtual HRESULT DeleteFieldStates()=0;
  324. virtual HRESULT StartEnumFields(POSITION &pos)=0;
  325. virtual HRESULT GetNextField(POSITION& pos, CStringA& fname, CStringW& fvalue)=0;
  326. virtual HRESULT StartEnumErrors(POSITION& pos)=0;
  327. virtual HRESULT GetNextError(POSITION& pos, CStringA& fname, HRESULT& fhr)=0;
  328. };
  329. // In DB,
  330. // set @si_ProfileCategory = 1
  331. // set @si_SystemCategory = 2
  332. // set @si_ProfileConsentCategory = 3
  333. //(never change) defined in DB
  334. typedef enum _tagProfileCategory
  335. {
  336. PROFCAT_INVALID = -1,
  337. PROFCAT_FIRST=0,
  338. PROFCAT_CREDENTIAL = PROFCAT_FIRST, // 0
  339. PROFCAT_PROFILE, // 1
  340. PROFCAT_SYSTEM, // 2
  341. PROFCAT_PROFILECONSENT, // 3
  342. PROFCAT_CREDENTIALCONSENT, // 4
  343. PROFCAT_SYSTEMCONSENT, // 5
  344. PROFCAT_VOLATILE, // 6
  345. PROFCAT_LAST,
  346. } PROFILE_CATEGORY;
  347. #define PROFCAT_NUM 3
  348. typedef enum _tagCredentialType
  349. {
  350. PROFCRED_INVALID = -1,
  351. PROFCRED_FIRST=0,
  352. PROFCRED_EMAIL = PROFCAT_FIRST, // email, password
  353. PROFCRED_EMAILSQA, // email, password, secret question, secret answer
  354. PROFCRED_MOBILE, // phone, pin
  355. // PROFCRED_EMAIL3SQA, // email, password, SQ1, SA1, SQ2, SA2, SQ3, SA3
  356. PROFCRED_3SQAPIN, // SQ1, SA1, SQ2, SA2, SQ3, SA3, PIN, SA1_Verify, SA2_Verify, SA3_Verify
  357. PROFCRED_LAST,
  358. } PROFILE_CREDENTIALTYPE;
  359. //
  360. // user profile interface. An abstract class ...
  361. //
  362. class CUserProfileBase : public CProfileFieldCollectionBase
  363. {
  364. public:
  365. // this need to be defined for the autoptr ....
  366. // all other functions are pure virtual
  367. virtual ~CUserProfileBase(){};
  368. //*******************************************************************
  369. // CProfileFieldCollectionBase interface to access to fields
  370. //
  371. // A field is passport supported within the range that this object manages
  372. virtual BOOL IsFieldSupported(LPCSTR szName) = 0;
  373. // FieldName <- -> FieldID ; only for passport supported attributes
  374. virtual LPCSTR GetFieldNameByID(ULONG lFieldID) = 0;
  375. virtual LONG GetIDByFieldName(LPCSTR szName) = 0;
  376. // Retrive a field
  377. virtual CProfileField* GetField(LPCSTR szName) = 0;
  378. virtual CProfileFieldState* GetFieldState(LPCSTR szName) = 0;
  379. virtual HRESULT GetFieldStateCount(LONG& lCount) =0;
  380. virtual HRESULT GetFieldValue(LPCSTR szName, CStringW& cswValue) = 0;
  381. virtual HRESULT GetFieldValue(LPCSTR szName, LONG& lValue) = 0;
  382. virtual HRESULT GetFieldValue(LPCSTR szName, CComBSTR& bstrValue) = 0;
  383. virtual HRESULT GetFieldError(LPCSTR szName) = 0;
  384. virtual HRESULT SetFieldError(LPCSTR szName, HRESULT h) =0;
  385. virtual HRESULT GetFieldErrorCount(LONG& lCount) =0;
  386. // Validation
  387. virtual LONG Validate() = 0;
  388. virtual HRESULT Validate(CProfileField *ppf) = 0;
  389. // Field management
  390. virtual HRESULT UpdateField(LPCSTR cszName, LPCWSTR cszValue)=0;
  391. virtual HRESULT UpdateField(LPCSTR cszName, LONG lValue)=0;
  392. virtual HRESULT AddField(LPCSTR cszName, PCWSTR value)=0;
  393. virtual HRESULT DeleteField(LPCSTR cszName)=0;
  394. // DB initialization
  395. virtual HRESULT InitFromDB(LARGE_INTEGER PUID, CStringW cswCredName)=0;
  396. virtual HRESULT Persist(LARGE_INTEGER& PUID, CStringW& cswCredName, BOOL bInsert)=0;
  397. // Web initialization
  398. virtual HRESULT InitFromHTMLForm(CHttpRequest& request)=0;
  399. virtual HRESULT InitFromQueryString(CHttpRequest& request)=0;
  400. virtual HRESULT InitFromXML(IXMLDOMDocument *pXMLDoc)=0;
  401. // Save all fields in XML format and append to szProfileXML
  402. virtual HRESULT SaveToXML(CStringA &szProfileXML) = 0;
  403. //
  404. // Manage FieldStates.
  405. // It stores a list of fields requirements.
  406. // Used when only a subset of fields belonging to the category are needed
  407. //
  408. virtual HRESULT InitFieldStates(LONG lSiteID, CStringA cszDevice, CSite* in_pCSite = NULL, BOOL bIsService = FALSE)=0;
  409. //virtual HRESULT AddFieldState(LONG lFieldID, bool bRequired = true)=0;
  410. virtual HRESULT AddFieldState(LPCSTR szName, bool bRequired = true, bool bExternal = false)=0;
  411. //virtual HRESULT DeleteFieldState(LONG lFieldID)=0;
  412. virtual HRESULT DeleteFieldState(LPCSTR szsName)=0;
  413. virtual HRESULT DeleteFieldStates()=0;
  414. virtual HRESULT StartEnumFields(POSITION &pos)=0;
  415. virtual HRESULT GetNextField(POSITION& pos, CStringA& fname, CStringW& fvalue)=0;
  416. virtual HRESULT StartEnumErrors(POSITION& pos)=0;
  417. virtual HRESULT GetNextError(POSITION& pos, CStringA& fname, HRESULT& fhr)=0;
  418. //
  419. //
  420. //
  421. //**********************************************************************
  422. // Set Dictionary, Locale or Regional Information for Validation purpose
  423. virtual void SetDictionaryObject(IDictionaryEx *ppiDict)=0;
  424. virtual IDictionaryEx* GetDictionaryObject()=0;
  425. virtual void SetLCID(LCID lc)=0;
  426. virtual LCID GetLCID()=0;
  427. #if 0
  428. // Maintain fields version
  429. virtual void SetVersion(LONG l)=0;
  430. virtual LONG GetVersion()=0;
  431. #endif
  432. virtual PROFILE_CATEGORY GetCategory(LPCSTR szFieldName)=0;
  433. // debug method
  434. virtual void Dump(PROFILE_CATEGORY cat, CStringA& dump) = 0;
  435. #if 0
  436. // get/set namespace
  437. virtual HRESULT GetProfileNamespace(CStringW& strNameSpace) = 0;
  438. virtual void SetProfileNamespace(PCWSTR cszNameSpace) = 0;
  439. #endif
  440. // get/set credential type
  441. virtual void SetCredentialType(PROFILE_CREDENTIALTYPE t) = 0;
  442. virtual PROFILE_CREDENTIALTYPE GetCredentialType() =0;
  443. virtual HRESULT GetCredentialFieldName(CStringA& cszCredential) =0;
  444. virtual HRESULT GetCredResponseFieldName(CStringA& cszCredResponse) =0;
  445. // virtual BOOL Credential2PUID(LPCWSTR szMemberName, LARGE_INTEGER& PUID)=0;
  446. // consent
  447. virtual HRESULT GetConsent(LPCSTR cszFieldName, BOOL& bHasConsent)=0;
  448. virtual HRESULT SetConsent(LPCSTR cszFieldName, BOOL bHasConsent)=0;
  449. // get a list of External fields for generating ticket/cookie
  450. virtual HRESULT GetExternalProfileFields(CAtlArray<CStringA *>& pArray)=0;
  451. //$$ Should move to global caching later
  452. // Initialize Global Meta Info
  453. // virtual HRESULT InitGlobalMetaDataInfo()=0;
  454. // Enumeration: to control which category to enumerate
  455. virtual void SetEnumerationCategory(PROFILE_CATEGORY cat) =0;
  456. // Backward Compatibility
  457. virtual HRESULT GetSystemFlag_backward(LONG& lFlags) = 0;
  458. virtual HRESULT GetDirectoryFlag_backward(LONG& lFlags) = 0;
  459. virtual HRESULT GetSystemMiscFlag_backward(LONG& lFlags) = 0;
  460. // Retrieve error for last calling GetFieldValue
  461. virtual LPCWSTR GetStringFieldValue(LPCSTR szName) = 0;
  462. virtual DATE GetDateFieldValue(LPCSTR szName) = 0;
  463. virtual LONG GetLongFieldValue(LPCSTR szName) = 0;
  464. virtual HRESULT GetLastFieldError() = 0;
  465. // Fine Tune category action control
  466. virtual LONG GetTaskMask() = 0;
  467. virtual void SetTaskMask(LONG l) = 0;
  468. // PUID access
  469. virtual LARGE_INTEGER GetPUID() = 0;
  470. virtual void GetPUID(LONG& lHigh, LONG& lLow)=0;
  471. virtual void SetPUID(LARGE_INTEGER l) = 0;
  472. virtual void SetPUID(LONG lHigh, LONG lLow) = 0;
  473. // DB flags access
  474. virtual void SetDBIsActive(BOOL b) = 0;
  475. virtual void SetDBIsManaged(BOOL b) = 0;
  476. virtual void SetDBIsOverwrite(BOOL b) = 0;
  477. virtual void SetDBIsCaseSensitive(BOOL b) = 0;
  478. virtual void SetDBAdminPUID(LARGE_INTEGER PUID)=0;
  479. virtual BOOL GetDBIsActive() = 0;
  480. virtual BOOL GetDBIsManaged() = 0;
  481. virtual BOOL GetDBIsOverwrite() = 0;
  482. virtual BOOL GetDBIsCaseSensitive() = 0;
  483. virtual LARGE_INTEGER GetDBAdminPUID()=0;
  484. // Wizard Section Processing
  485. virtual LONG GetSectionCount()=0;
  486. virtual HRESULT GetDeviceAttribute(CStringA szName, CStringW& wszValue)=0;
  487. // Set ProfileFieldInfo -- replacing InitGlobalMetaData
  488. // init per app instead of per request
  489. virtual void SetProfileFieldInfo(CProfileFieldInfo *p) = 0;
  490. // Check whether a field is a volatile passport field
  491. virtual BOOL IsFieldPassportVolatile(LPCSTR szName) = 0;
  492. // Delete Member
  493. virtual HRESULT DeleteMember(LARGE_INTEGER PUID, CStringW &wszMemberName) = 0;
  494. // in order to make sure Persist does MemberName conversion
  495. virtual HRESULT GetDisplayMemberName(CStringW& cswMemberName) = 0;
  496. virtual HRESULT GetInternalName(BOOL bEASI, LPCWSTR m_cswNameSpace, CStringW& cswName) = 0;
  497. // IsEASI for managed domain member exclusion validation
  498. virtual BOOL GetIsEASI() = 0;
  499. virtual void SetIsEASI(BOOL b) = 0;
  500. };
  501. //
  502. // Global validation function
  503. //
  504. BOOL VL_IsDropDownMissing(CProfileField *pField);
  505. //
  506. // wrapper for the abstract class. Use it to get
  507. // CUserProfile* interface
  508. //
  509. class CUserProfileWrapper2 : public CAutoPtr<CUserProfileBase>
  510. {
  511. public:
  512. CUserProfileWrapper2();
  513. };
  514. #define PROFILE_TASK_PROFILE 0x00000001
  515. #define PROFILE_TASK_SYSTEM 0x00000002
  516. #define PROFILE_TASK_PROFILECONSENT 0x00000004
  517. #define PROFILE_TASK_SYSTEMCONSENT 0x00000008
  518. #define PROFILE_TASK_CREDENTIALCONSENT 0x00000010
  519. #define PROFILE_TASK_CREDENTIAL_ANY(l) ( l >= 10000 )
  520. #define PROFILE_TASK_CREDENTIAL_NEW 0x00010000
  521. #define PROFILE_TASK_CREDENTIAL_ADD_ADDITIONAL 0x00020000
  522. #define PROFILE_TASK_CREDENTIAL_UPDATE 0x00040000
  523. #define PROFILE_TASK_CREDENTIAL_RENAME 0x00080000