source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ratings.h@ 1175

Last change on this file since 1175 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 3.0 KB
Line 
1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5#ifndef _RATINGS_H_
6#define _RATINGS_H_
7
8#include <winapifamily.h>
9
10#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
11
12#include <winerror.h>
13#include <shlwapi.h>
14
15STDAPI RatingEnable(HWND hwndParent,LPCSTR pszUsername,WINBOOL fEnable);
16STDAPI RatingEnableW(HWND hwndParent, LPCWSTR pszUsername, WINBOOL fEnable);
17STDAPI RatingCheckUserAccess(LPCSTR pszUsername,LPCSTR pszURL,LPCSTR pszRatingInfo,LPBYTE pData,DWORD cbData,void **ppRatingDetails);
18STDAPI RatingCheckUserAccessW(LPCWSTR pszUsername, LPCWSTR pszURL, LPCWSTR pszRatingInfo, LPBYTE pData, DWORD cbData, void **ppRatingDetails);
19STDAPI RatingAccessDeniedDialog(HWND hDlg,LPCSTR pszUsername,LPCSTR pszContentDescription,void *pRatingDetails);
20STDAPI RatingAccessDeniedDialog2(HWND hDlg,LPCSTR pszUsername,void *pRatingDetails);
21STDAPI RatingAccessDeniedDialogW(HWND hDlg, LPCWSTR pszUsername, LPCWSTR pszContentDescription, void *pRatingDetails);
22STDAPI RatingFreeDetails(void *pRatingDetails);
23STDAPI RatingObtainCancel(HANDLE hRatingObtainQuery);
24STDAPI RatingObtainQuery(LPCSTR pszTargetUrl,DWORD dwUserData,void (*fCallback)(DWORD dwUserData,HRESULT hr,LPCSTR pszRating,void *lpvRatingDetails),HANDLE *phRatingObtainQuery);
25STDAPI RatingObtainQueryW(LPCWSTR pszTargetUrl, DWORD dwUserData, void (*fCallback) (DWORD dwUserData, HRESULT hr, LPCWSTR pszRating, void *lpvRatingDetails),HANDLE *phRatingObtainQuery);
26STDAPI RatingSetupUI(HWND hDlg,LPCSTR pszUsername);
27STDAPI RatingSetupUIW (HWND hDlg, LPCWSTR pszUsername);
28#ifdef _INC_COMMCTRL
29STDAPI RatingAddPropertyPage(PROPSHEETHEADER *ppsh);
30#endif
31
32STDAPI RatingAddToApprovedSites (HWND hDlg, DWORD cbPasswordBlob, BYTE *pbPasswordBlob, LPCWSTR lpszUrl, WINBOOL fAlwaysNever, WINBOOL fSitePage, WINBOOL fApprovedSitesEnforced);
33STDAPI RatingClickedOnPRFInternal (HWND hWndOwner, HINSTANCE, LPSTR lpszFileName, int nShow);
34STDAPI RatingClickedOnRATInternal (HWND hWndOwner, HINSTANCE, LPSTR lpszFileName, int nShow);
35
36STDAPI RatingEnabledQuery(void);
37STDAPI RatingInit(void);
38STDAPI_(void) RatingTerm(void);
39
40static inline WINBOOL IS_RATINGS_ENABLED() {
41 TCHAR sz[200];
42 DWORD typ, sz = sizeof (sz);
43 return (SHGetValue(HKEY_LOCAL_MACHINE,TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Ratings"),TEXT("Key"), &typ,&sz, &sz) == ERROR_SUCCESS);
44}
45
46#define S_RATING_ALLOW S_OK
47#define S_RATING_DENY S_FALSE
48#define S_RATING_FOUND 0x00000002
49#define E_RATING_NOT_FOUND 0x80000001
50
51#undef INTERFACE
52#define INTERFACE IObtainRating
53DECLARE_INTERFACE_(IObtainRating,IUnknown) {
54#ifndef __cplusplus
55 STDMETHOD(QueryInterface) (THIS_ REFIID riid,void **ppvObj) PURE;
56 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
57 STDMETHOD_(ULONG,Release) (THIS) PURE;
58#endif
59 STDMETHOD(ObtainRating) (THIS_ LPCSTR pszTargetUrl,HANDLE hAbortEvent,IMalloc *pAllocator,LPSTR *ppRatingOut) PURE;
60 STDMETHOD_(ULONG,GetSortOrder) (THIS) PURE;
61};
62#undef INTERFACE
63
64#define RATING_ORDER_REMOTESITE 0x80000000
65#define RATING_ORDER_LOCALLIST 0xC0000000
66
67#endif
68#endif
Note: See TracBrowser for help on using the repository browser.