Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIContentSecurityManager.idl
3 : */
4 :
5 : #ifndef __gen_nsIContentSecurityManager_h__
6 : #define __gen_nsIContentSecurityManager_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIChannel; /* forward declaration */
18 :
19 : class nsIPrincipal; /* forward declaration */
20 :
21 : class nsIStreamListener; /* forward declaration */
22 :
23 : class nsIURI; /* forward declaration */
24 :
25 :
26 : /* starting interface: nsIContentSecurityManager */
27 : #define NS_ICONTENTSECURITYMANAGER_IID_STR "3a9a1818-2ae8-4ec5-a340-8b29d31fca3b"
28 :
29 : #define NS_ICONTENTSECURITYMANAGER_IID \
30 : {0x3a9a1818, 0x2ae8, 0x4ec5, \
31 : { 0xa3, 0x40, 0x8b, 0x29, 0xd3, 0x1f, 0xca, 0x3b }}
32 :
33 2 : class NS_NO_VTABLE nsIContentSecurityManager : public nsISupports {
34 : public:
35 :
36 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTSECURITYMANAGER_IID)
37 :
38 : /* nsIStreamListener performSecurityCheck (in nsIChannel aChannel, in nsIStreamListener aStreamListener); */
39 : NS_IMETHOD PerformSecurityCheck(nsIChannel *aChannel, nsIStreamListener *aStreamListener, nsIStreamListener * *_retval) = 0;
40 :
41 : /* boolean isOriginPotentiallyTrustworthy (in nsIPrincipal aPrincipal); */
42 : NS_IMETHOD IsOriginPotentiallyTrustworthy(nsIPrincipal *aPrincipal, bool *_retval) = 0;
43 :
44 : };
45 :
46 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentSecurityManager, NS_ICONTENTSECURITYMANAGER_IID)
47 :
48 : /* Use this macro when declaring classes that implement this interface. */
49 : #define NS_DECL_NSICONTENTSECURITYMANAGER \
50 : NS_IMETHOD PerformSecurityCheck(nsIChannel *aChannel, nsIStreamListener *aStreamListener, nsIStreamListener * *_retval) override; \
51 : NS_IMETHOD IsOriginPotentiallyTrustworthy(nsIPrincipal *aPrincipal, bool *_retval) override;
52 :
53 : /* Use this macro when declaring the members of this interface when the
54 : class doesn't implement the interface. This is useful for forwarding. */
55 : #define NS_DECL_NON_VIRTUAL_NSICONTENTSECURITYMANAGER \
56 : nsresult PerformSecurityCheck(nsIChannel *aChannel, nsIStreamListener *aStreamListener, nsIStreamListener * *_retval); \
57 : nsresult IsOriginPotentiallyTrustworthy(nsIPrincipal *aPrincipal, bool *_retval);
58 :
59 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
60 : #define NS_FORWARD_NSICONTENTSECURITYMANAGER(_to) \
61 : NS_IMETHOD PerformSecurityCheck(nsIChannel *aChannel, nsIStreamListener *aStreamListener, nsIStreamListener * *_retval) override { return _to PerformSecurityCheck(aChannel, aStreamListener, _retval); } \
62 : NS_IMETHOD IsOriginPotentiallyTrustworthy(nsIPrincipal *aPrincipal, bool *_retval) override { return _to IsOriginPotentiallyTrustworthy(aPrincipal, _retval); }
63 :
64 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
65 : #define NS_FORWARD_SAFE_NSICONTENTSECURITYMANAGER(_to) \
66 : NS_IMETHOD PerformSecurityCheck(nsIChannel *aChannel, nsIStreamListener *aStreamListener, nsIStreamListener * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PerformSecurityCheck(aChannel, aStreamListener, _retval); } \
67 : NS_IMETHOD IsOriginPotentiallyTrustworthy(nsIPrincipal *aPrincipal, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsOriginPotentiallyTrustworthy(aPrincipal, _retval); }
68 :
69 : #if 0
70 : /* Use the code below as a template for the implementation class for this interface. */
71 :
72 : /* Header file */
73 : class nsContentSecurityManager : public nsIContentSecurityManager
74 : {
75 : public:
76 : NS_DECL_ISUPPORTS
77 : NS_DECL_NSICONTENTSECURITYMANAGER
78 :
79 : nsContentSecurityManager();
80 :
81 : private:
82 : ~nsContentSecurityManager();
83 :
84 : protected:
85 : /* additional members */
86 : };
87 :
88 : /* Implementation file */
89 : NS_IMPL_ISUPPORTS(nsContentSecurityManager, nsIContentSecurityManager)
90 :
91 : nsContentSecurityManager::nsContentSecurityManager()
92 : {
93 : /* member initializers and constructor code */
94 : }
95 :
96 : nsContentSecurityManager::~nsContentSecurityManager()
97 : {
98 : /* destructor code */
99 : }
100 :
101 : /* nsIStreamListener performSecurityCheck (in nsIChannel aChannel, in nsIStreamListener aStreamListener); */
102 : NS_IMETHODIMP nsContentSecurityManager::PerformSecurityCheck(nsIChannel *aChannel, nsIStreamListener *aStreamListener, nsIStreamListener * *_retval)
103 : {
104 : return NS_ERROR_NOT_IMPLEMENTED;
105 : }
106 :
107 : /* boolean isOriginPotentiallyTrustworthy (in nsIPrincipal aPrincipal); */
108 : NS_IMETHODIMP nsContentSecurityManager::IsOriginPotentiallyTrustworthy(nsIPrincipal *aPrincipal, bool *_retval)
109 : {
110 : return NS_ERROR_NOT_IMPLEMENTED;
111 : }
112 :
113 : /* End of implementation class template. */
114 : #endif
115 :
116 :
117 : #endif /* __gen_nsIContentSecurityManager_h__ */
|