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