1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/netwerk/base/public/nsIPrivateBrowsingService.idl
3 : */
4 :
5 : #ifndef __gen_nsIPrivateBrowsingService_h__
6 : #define __gen_nsIPrivateBrowsingService_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 :
18 : /* starting interface: nsIPrivateBrowsingService */
19 : #define NS_IPRIVATEBROWSINGSERVICE_IID_STR "4b731983-9542-49f4-b16b-de68ad1c2068"
20 :
21 : #define NS_IPRIVATEBROWSINGSERVICE_IID \
22 : {0x4b731983, 0x9542, 0x49f4, \
23 : { 0xb1, 0x6b, 0xde, 0x68, 0xad, 0x1c, 0x20, 0x68 }}
24 :
25 470 : class NS_NO_VTABLE NS_SCRIPTABLE nsIPrivateBrowsingService : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPRIVATEBROWSINGSERVICE_IID)
29 :
30 : /* attribute boolean privateBrowsingEnabled; */
31 : NS_SCRIPTABLE NS_IMETHOD GetPrivateBrowsingEnabled(bool *aPrivateBrowsingEnabled) = 0;
32 : NS_SCRIPTABLE NS_IMETHOD SetPrivateBrowsingEnabled(bool aPrivateBrowsingEnabled) = 0;
33 :
34 : /* readonly attribute boolean autoStarted; */
35 : NS_SCRIPTABLE NS_IMETHOD GetAutoStarted(bool *aAutoStarted) = 0;
36 :
37 : /* readonly attribute boolean lastChangedByCommandLine; */
38 : NS_SCRIPTABLE NS_IMETHOD GetLastChangedByCommandLine(bool *aLastChangedByCommandLine) = 0;
39 :
40 : /* void removeDataFromDomain (in AUTF8String aDomain); */
41 : NS_SCRIPTABLE NS_IMETHOD RemoveDataFromDomain(const nsACString & aDomain) = 0;
42 :
43 : };
44 :
45 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIPrivateBrowsingService, NS_IPRIVATEBROWSINGSERVICE_IID)
46 :
47 : /* Use this macro when declaring classes that implement this interface. */
48 : #define NS_DECL_NSIPRIVATEBROWSINGSERVICE \
49 : NS_SCRIPTABLE NS_IMETHOD GetPrivateBrowsingEnabled(bool *aPrivateBrowsingEnabled); \
50 : NS_SCRIPTABLE NS_IMETHOD SetPrivateBrowsingEnabled(bool aPrivateBrowsingEnabled); \
51 : NS_SCRIPTABLE NS_IMETHOD GetAutoStarted(bool *aAutoStarted); \
52 : NS_SCRIPTABLE NS_IMETHOD GetLastChangedByCommandLine(bool *aLastChangedByCommandLine); \
53 : NS_SCRIPTABLE NS_IMETHOD RemoveDataFromDomain(const nsACString & aDomain);
54 :
55 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
56 : #define NS_FORWARD_NSIPRIVATEBROWSINGSERVICE(_to) \
57 : NS_SCRIPTABLE NS_IMETHOD GetPrivateBrowsingEnabled(bool *aPrivateBrowsingEnabled) { return _to GetPrivateBrowsingEnabled(aPrivateBrowsingEnabled); } \
58 : NS_SCRIPTABLE NS_IMETHOD SetPrivateBrowsingEnabled(bool aPrivateBrowsingEnabled) { return _to SetPrivateBrowsingEnabled(aPrivateBrowsingEnabled); } \
59 : NS_SCRIPTABLE NS_IMETHOD GetAutoStarted(bool *aAutoStarted) { return _to GetAutoStarted(aAutoStarted); } \
60 : NS_SCRIPTABLE NS_IMETHOD GetLastChangedByCommandLine(bool *aLastChangedByCommandLine) { return _to GetLastChangedByCommandLine(aLastChangedByCommandLine); } \
61 : NS_SCRIPTABLE NS_IMETHOD RemoveDataFromDomain(const nsACString & aDomain) { return _to RemoveDataFromDomain(aDomain); }
62 :
63 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
64 : #define NS_FORWARD_SAFE_NSIPRIVATEBROWSINGSERVICE(_to) \
65 : NS_SCRIPTABLE NS_IMETHOD GetPrivateBrowsingEnabled(bool *aPrivateBrowsingEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrivateBrowsingEnabled(aPrivateBrowsingEnabled); } \
66 : NS_SCRIPTABLE NS_IMETHOD SetPrivateBrowsingEnabled(bool aPrivateBrowsingEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetPrivateBrowsingEnabled(aPrivateBrowsingEnabled); } \
67 : NS_SCRIPTABLE NS_IMETHOD GetAutoStarted(bool *aAutoStarted) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAutoStarted(aAutoStarted); } \
68 : NS_SCRIPTABLE NS_IMETHOD GetLastChangedByCommandLine(bool *aLastChangedByCommandLine) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastChangedByCommandLine(aLastChangedByCommandLine); } \
69 : NS_SCRIPTABLE NS_IMETHOD RemoveDataFromDomain(const nsACString & aDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveDataFromDomain(aDomain); }
70 :
71 : #if 0
72 : /* Use the code below as a template for the implementation class for this interface. */
73 :
74 : /* Header file */
75 : class nsPrivateBrowsingService : public nsIPrivateBrowsingService
76 : {
77 : public:
78 : NS_DECL_ISUPPORTS
79 : NS_DECL_NSIPRIVATEBROWSINGSERVICE
80 :
81 : nsPrivateBrowsingService();
82 :
83 : private:
84 : ~nsPrivateBrowsingService();
85 :
86 : protected:
87 : /* additional members */
88 : };
89 :
90 : /* Implementation file */
91 : NS_IMPL_ISUPPORTS1(nsPrivateBrowsingService, nsIPrivateBrowsingService)
92 :
93 : nsPrivateBrowsingService::nsPrivateBrowsingService()
94 : {
95 : /* member initializers and constructor code */
96 : }
97 :
98 : nsPrivateBrowsingService::~nsPrivateBrowsingService()
99 : {
100 : /* destructor code */
101 : }
102 :
103 : /* attribute boolean privateBrowsingEnabled; */
104 : NS_IMETHODIMP nsPrivateBrowsingService::GetPrivateBrowsingEnabled(bool *aPrivateBrowsingEnabled)
105 : {
106 : return NS_ERROR_NOT_IMPLEMENTED;
107 : }
108 : NS_IMETHODIMP nsPrivateBrowsingService::SetPrivateBrowsingEnabled(bool aPrivateBrowsingEnabled)
109 : {
110 : return NS_ERROR_NOT_IMPLEMENTED;
111 : }
112 :
113 : /* readonly attribute boolean autoStarted; */
114 : NS_IMETHODIMP nsPrivateBrowsingService::GetAutoStarted(bool *aAutoStarted)
115 : {
116 : return NS_ERROR_NOT_IMPLEMENTED;
117 : }
118 :
119 : /* readonly attribute boolean lastChangedByCommandLine; */
120 : NS_IMETHODIMP nsPrivateBrowsingService::GetLastChangedByCommandLine(bool *aLastChangedByCommandLine)
121 : {
122 : return NS_ERROR_NOT_IMPLEMENTED;
123 : }
124 :
125 : /* void removeDataFromDomain (in AUTF8String aDomain); */
126 : NS_IMETHODIMP nsPrivateBrowsingService::RemoveDataFromDomain(const nsACString & aDomain)
127 : {
128 : return NS_ERROR_NOT_IMPLEMENTED;
129 : }
130 :
131 : /* End of implementation class template. */
132 : #endif
133 :
134 : /**
135 : * Private Browsing service notifications:
136 : *
137 : * - NS_PRIVATE_BROWSING_REQUEST_TOPIC:
138 : * The data parameter determines which kind of request this represents:
139 : * --- NS_PRIVATE_BROWSING_ENTER:
140 : * We send this notification before switching to the private browsing mode.
141 : * The subject parameter is set to a nsISupportsPRBool, which observers can
142 : * set to true to prevent the switch to the private browsing mode.
143 : * --- NS_PRIVATE_BROWSING_LEAVE:
144 : * We send this notification before leaving the private browsing mode.
145 : * The subject parameter is set to a nsISupportsPRBool, which observers can
146 : * set to true to prevent leaving the private browsing mode.
147 : *
148 : * - NS_PRIVATE_BROWSING_SWITCH_TOPIC:
149 : * The data parameter determines which kind of switch this represents:
150 : * --- NS_PRIVATE_BROWSING_ENTER:
151 : * We send this notification while switching to the private browsing mode.
152 : * --- NS_PRIVATE_BROWSING_LEAVE:
153 : * We send this notification while leaving the private browsing mode.
154 : */
155 : #define NS_PRIVATE_BROWSING_SWITCH_TOPIC "private-browsing"
156 : #define NS_PRIVATE_BROWSING_REQUEST_TOPIC "private-browsing-cancel-vote"
157 : #define NS_PRIVATE_BROWSING_ENTER "enter"
158 : #define NS_PRIVATE_BROWSING_LEAVE "exit"
159 :
160 : #endif /* __gen_nsIPrivateBrowsingService_h__ */
|