ratings.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. //*********************************************************************
  2. //*                  Microsoft Windows                               **
  3. //*            Copyright(c) Microsoft Corp., 1996                    **
  4. //*********************************************************************
  5. #ifndef _RATINGS_H_
  6. #define _RATINGS_H_
  7. #include <winerror.h>
  8. STDAPI RatingEnable(BOOL fEnable);
  9. STDAPI RatingCheckUserAccess(LPCSTR pszUsername, LPCSTR pszURL,
  10.                              LPCSTR pszRatingInfo, LPBYTE pData,
  11.                              DWORD cbData, void **ppRatingDetails);
  12. STDAPI RatingAccessDeniedDialog(HWND hDlg, LPCSTR pszUsername, LPCSTR pszContentDescription, void *pRatingDetails);
  13. STDAPI RatingFreeDetails(void *pRatingDetails);
  14. STDAPI RatingObtainCancel(HANDLE hRatingObtainQuery);
  15. STDAPI RatingObtainQuery(LPCTSTR pszTargetUrl, DWORD dwUserData, void (*fCallback)(DWORD dwUserData, HRESULT hr, LPCTSTR pszRating, void *lpvRatingDetails), HANDLE *phRatingObtainQuery);
  16. STDAPI RatingSetupUI(HWND hDlg, LPCSTR pszUsername);
  17. #ifdef _INC_COMMCTRL
  18. STDAPI RatingAddPropertyPage(PROPSHEETHEADER *ppsh);
  19. #endif
  20. STDAPI RatingEnabledQuery();
  21. STDAPI RatingInit();
  22. STDAPI_(void) RatingTerm();
  23. #define S_RATING_ALLOW S_OK
  24. #define S_RATING_DENY S_FALSE
  25. #define S_RATING_FOUND 0x00000002
  26. #define E_RATING_NOT_FOUND 0x80000001
  27. /************************************************************************
  28. IObtainRating interface
  29. This interface is used to obtain the rating (PICS label) for a URL.
  30. It is entirely up to the server to determine how to come up with the
  31. label.  The ObtainRating call may be synchronous.
  32. GetSortOrder returns a ULONG which is used to sort this rating helper
  33. into the list of installed helpers.  The helpers are sorted in ascending
  34. order, so a lower numbered helper will be called before a higher numbered
  35. one.
  36. ************************************************************************/
  37. DECLARE_INTERFACE_(IObtainRating, IUnknown)
  38. {
  39. // *** IUnknown methods ***
  40.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppvObj) PURE;
  41.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  42.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  43. STDMETHOD(ObtainRating) (THIS_ LPCTSTR pszTargetUrl, HANDLE hAbortEvent,
  44.  IMalloc *pAllocator, LPSTR *ppRatingOut) PURE;
  45. STDMETHOD_(ULONG,GetSortOrder) (THIS) PURE;
  46. };
  47. #define RATING_ORDER_REMOTESITE 0x80000000
  48. #define RATING_ORDER_LOCALLIST 0xC0000000
  49. #endif
  50. // _RATINGS_H_