20
20
#include " firebase/app.h"
21
21
#include " firebase/future.h"
22
22
#include " firebase/gma/ump/types.h"
23
+ #include " firebase/internal/common.h"
23
24
#include " firebase/internal/platform.h"
24
25
25
26
#if FIREBASE_PLATFORM_ANDROID
@@ -49,6 +50,8 @@ class ConsentInfoInternal;
49
50
// /
50
51
// / This class contains all of the methods necessary for obtaining
51
52
// / consent from the user.
53
+ // /
54
+ // / @deprecated This class has been moved to the firebase::ump namespace.
52
55
class ConsentInfo {
53
56
public:
54
57
// / Shut down the User Messaging Platform Consent SDK.
@@ -67,6 +70,9 @@ class ConsentInfo {
67
70
// / initialized, nullptr otherwise. Each call to GetInstance() will return the
68
71
// / same pointer; when you are finished using the SDK, you can delete the
69
72
// / pointer and the UMP SDK will shut down.
73
+ // /
74
+ // / @deprecated This class has been moved to the firebase::ump namespace.
75
+ FIREBASE_DEPRECATED
70
76
static ConsentInfo* GetInstance (const ::firebase::App& app,
71
77
InitResult* init_result_out = nullptr );
72
78
@@ -96,6 +102,7 @@ class ConsentInfo {
96
102
// / initialized, nullptr otherwise. Each call to GetInstance() will return the
97
103
// / same pointer; when you are finished using the SDK, you can delete the
98
104
// / pointer and the UMP SDK will shut down.
105
+ FIREBASE_DEPRECATED
99
106
static ConsentInfo* GetInstance (JNIEnv* jni_env, jobject activity,
100
107
InitResult* init_result_out = nullptr );
101
108
@@ -104,6 +111,7 @@ class ConsentInfo {
104
111
// existing ConsentInfo instance after it's first initialized. Returns nullptr
105
112
// if no instance has been created yet; make sure you have called
106
113
// GetInstance(JNIEnv*, jobject) first.
114
+ FIREBASE_DEPRECATED
107
115
static ConsentInfo* GetInstance ();
108
116
#endif // defined(DOXYGEN)
109
117
#endif // FIREBASE_PLATFORM_ANDROID || defined(DOXYGEN)
@@ -123,12 +131,18 @@ class ConsentInfo {
123
131
// /
124
132
// / @note Once any overload of ConsentInfo::GetInstance has been called, you
125
133
// / can use this method to obtain the same instance again.
134
+ // /
135
+ // / @deprecated This class has been moved to the firebase::ump namespace.
136
+ FIREBASE_DEPRECATED
126
137
static ConsentInfo* GetInstance (InitResult* init_result_out = nullptr );
127
138
#endif // !defined(__ANDROID__) || defined(DOXYGEN)
128
139
129
140
// / The user’s consent status. This value defaults to kConsentStatusUnknown
130
141
// / until RequestConsentInfoUpdate() is called, and defaults to the previous
131
142
// / session’s value until RequestConsentInfoUpdate() completes.
143
+ // /
144
+ // / @deprecated This class has been moved to the firebase::ump namespace.
145
+ FIREBASE_DEPRECATED
132
146
ConsentStatus GetConsentStatus ();
133
147
134
148
// / Requests consent information update. Must be called in every app session
@@ -137,20 +151,35 @@ class ConsentInfo {
137
151
// / updated immediately to hold the consent state from the previous app
138
152
// / session, if one exists. GetConsentStatus() and CanRequestAds() may be
139
153
// / updated again immediately before the returned future is completed.
154
+ // /
155
+ // / @deprecated This class has been moved to the firebase::ump namespace.
156
+ FIREBASE_DEPRECATED
140
157
Future<void > RequestConsentInfoUpdate (const ConsentRequestParameters& params);
141
158
142
159
// / Get the Future from the most recent call to RequestConsentInfoUpdate().
160
+ // /
161
+ // / @deprecated This class has been moved to the firebase::ump namespace.
162
+ FIREBASE_DEPRECATED
143
163
Future<void > RequestConsentInfoUpdateLastResult ();
144
164
145
165
// / Consent form status. This value defaults to kConsentFormStatusUnknown and
146
166
// / requires a call to RequestConsentInfoUpdate() to update.
167
+ // /
168
+ // / @deprecated This class has been moved to the firebase::ump namespace.
169
+ FIREBASE_DEPRECATED
147
170
ConsentFormStatus GetConsentFormStatus ();
148
171
149
172
// / Loads a consent form. Returns an error if the consent form is unavailable
150
173
// / or cannot be loaded.
174
+ // /
175
+ // / @deprecated This class has been moved to the firebase::ump namespace.
176
+ FIREBASE_DEPRECATED
151
177
Future<void > LoadConsentForm ();
152
178
153
179
// / Get the Future from the most recent call to LoadConsentForm().
180
+ // /
181
+ // / @deprecated This class has been moved to the firebase::ump namespace.
182
+ FIREBASE_DEPRECATED
154
183
Future<void > LoadConsentFormLastResult ();
155
184
156
185
// / Presents the full screen consent form using the given FormParent, which is
@@ -166,9 +195,15 @@ class ConsentInfo {
166
195
// /
167
196
// / @note You must call LoadConsentForm() and wait for it to complete before
168
197
// / calling this method.
198
+ // /
199
+ // / @deprecated This class has been moved to the firebase::ump namespace.
200
+ FIREBASE_DEPRECATED
169
201
Future<void > ShowConsentForm (FormParent parent);
170
202
171
203
// / Get the Future from the most recent call to ShowConsentForm().
204
+ // /
205
+ // / @deprecated This class has been moved to the firebase::ump namespace.
206
+ FIREBASE_DEPRECATED
172
207
Future<void > ShowConsentFormLastResult ();
173
208
174
209
// / Loads a consent form and immediately presents it using the given
@@ -183,14 +218,23 @@ class ConsentInfo {
183
218
// /
184
219
// / @param[in] parent A FormParent, which is an Activity object on Android and
185
220
// / a UIViewController object on iOS.
221
+ // /
222
+ // / @deprecated This class has been moved to the firebase::ump namespace.
223
+ FIREBASE_DEPRECATED
186
224
Future<void > LoadAndShowConsentFormIfRequired (FormParent parent);
187
225
188
226
// / Get the Future from the most recent call to
189
227
// / LoadAndShowConsentFormIfRequired().
228
+ // /
229
+ // / @deprecated This class has been moved to the firebase::ump namespace.
230
+ FIREBASE_DEPRECATED
190
231
Future<void > LoadAndShowConsentFormIfRequiredLastResult ();
191
232
192
233
// / Check whether the privacy options form needs to be displayed.
193
234
// / This is updated by RequestConsentInfoUpdate().
235
+ // /
236
+ // / @deprecated This class has been moved to the firebase::ump namespace.
237
+ FIREBASE_DEPRECATED
194
238
PrivacyOptionsRequirementStatus GetPrivacyOptionsRequirementStatus ();
195
239
196
240
// / If GetPrivacyOptionsRequirementStatus() is
@@ -209,19 +253,31 @@ class ConsentInfo {
209
253
// /
210
254
// / @param[in] parent A FormParent, which is an Activity object on Android and
211
255
// / a UIViewController object on iOS.
256
+ // /
257
+ // / @deprecated This class has been moved to the firebase::ump namespace.
258
+ FIREBASE_DEPRECATED
212
259
Future<void > ShowPrivacyOptionsForm (FormParent parent);
213
260
214
261
// / Get the Future from the most recent call to ShowPrivacyOptionsForm().
262
+ // /
263
+ // / @deprecated This class has been moved to the firebase::ump namespace.
264
+ FIREBASE_DEPRECATED
215
265
Future<void > ShowPrivacyOptionsFormLastResult ();
216
266
217
267
// / Indicates whether the app has completed the necessary steps for gathering
218
268
// / updated user consent. Returns true if RequestConsentInfoUpdate() has been
219
269
// / called and GetConsentStatus returns either kConsentStatusNotRequired or
220
270
// / kConsentStatusObtained.
271
+ // /
272
+ // / @deprecated This class has been moved to the firebase::ump namespace.
273
+ FIREBASE_DEPRECATED
221
274
bool CanRequestAds ();
222
275
223
276
// / Clears all consent state from persistent storage. This can be used in
224
277
// / development to simulate a new installation.
278
+ // /
279
+ // / @deprecated This class has been moved to the firebase::ump namespace.
280
+ FIREBASE_DEPRECATED
225
281
void Reset ();
226
282
227
283
private:
0 commit comments