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.

73 lines
2.2 KiB

  1. #ifndef _PRIVACYUI_HPP_
  2. #define _PRIVACYUI_HPP_
  3. //
  4. // PrivacyUI.hpp
  5. //
  6. // Privacy implementation classes and functions
  7. //
  8. // Forward Declarations
  9. class CDocObjectHost;
  10. class CDOHBindStatusCallback;
  11. // Function to initiate privacy dialog.. implemented in privacyui.cpp
  12. // Publicly exported through the .w files
  13. HRESULT
  14. DoPrivacyDlg(
  15. HWND hwndParent, // parent window
  16. LPOLESTR pszUrl, // base URL
  17. IEnumPrivacyRecords *pPrivacyEnum, // enum of all affected dependant URLs
  18. BOOL fReportAllSites // show all or just show sites with privacy impact
  19. );
  20. // Used during binding to keep track of the privacy data coming in through
  21. // urlmon notifications
  22. class CPrivacyRecord
  23. {
  24. public:
  25. // Data Members
  26. TCHAR * _pszUrl;
  27. TCHAR * _pszPolicyRefUrl;
  28. TCHAR * _pszP3PHeader;
  29. DWORD _dwPrivacyFlags; // contains the COOKIEACTION flags in the LOWORD and other
  30. // PRIVACY flags (TopLevel, HasPolicy, Impacted) defined in mshtml.h
  31. CPrivacyRecord * _pNextNode;
  32. // Methods
  33. CPrivacyRecord() : _pszUrl(NULL), _pszPolicyRefUrl(NULL), _pszP3PHeader(NULL),
  34. _dwPrivacyFlags(0), _pNextNode(NULL) {}
  35. ~CPrivacyRecord();
  36. HRESULT Init(LPTSTR * ppszUrl, LPTSTR * ppszPolicyRef, LPTSTR * ppszP3PHeader, DWORD dwFlags);
  37. HRESULT SetNext( CPrivacyRecord * pNextRec );
  38. CPrivacyRecord * GetNext() { return _pNextNode; }
  39. };
  40. class CPrivacyQueue
  41. {
  42. public:
  43. CPrivacyQueue() : _pHeadRec(NULL), _pTailRec(NULL), _ulSize(0) {}
  44. ~CPrivacyQueue();
  45. void Queue(CPrivacyRecord *pRecord);
  46. CPrivacyRecord * Dequeue();
  47. void Reset();
  48. private:
  49. CPrivacyRecord * _pHeadRec; // Beginning of the list
  50. CPrivacyRecord * _pTailRec; // Last record in the list. Need to keep track of this to ease addition
  51. ULONG _ulSize; // Number of records in the list
  52. };
  53. #endif
  54. // value to determine whether to show one time discovery ui or not
  55. #define REGSTR_VAL_PRIVDISCOVER TEXT("PrivDiscUiShown")
  56. // discovery dlg proc
  57. BOOL DoPrivacyFirstTimeDialog( HWND hwndParent);