2020#include " firebase/app.h"
2121#include " firebase/future.h"
2222#include " firebase/gma/ump/types.h"
23+ #include " firebase/internal/common.h"
2324#include " firebase/internal/platform.h"
2425
2526#if FIREBASE_PLATFORM_ANDROID
@@ -32,6 +33,9 @@ namespace gma {
3233// /
3334// / The User Messaging Platform (UMP) SDK is Google’s option to handle user
3435// / privacy and consent in mobile apps.
36+ // /
37+ // / @deprecated The firebase::gma::ump namespace has been deprecated and
38+ // / renamed to firebase::ump.
3539namespace ump {
3640
3741namespace internal {
@@ -46,6 +50,8 @@ class ConsentInfoInternal;
4650// /
4751// / This class contains all of the methods necessary for obtaining
4852// / consent from the user.
53+ // /
54+ // / @deprecated This class has been moved to the firebase::ump namespace.
4955class ConsentInfo {
5056 public:
5157 // / Shut down the User Messaging Platform Consent SDK.
@@ -64,6 +70,9 @@ class ConsentInfo {
6470 // / initialized, nullptr otherwise. Each call to GetInstance() will return the
6571 // / same pointer; when you are finished using the SDK, you can delete the
6672 // / pointer and the UMP SDK will shut down.
73+ // /
74+ // / @deprecated This class has been moved to the firebase::ump namespace.
75+ FIREBASE_DEPRECATED
6776 static ConsentInfo* GetInstance (const ::firebase::App& app,
6877 InitResult* init_result_out = nullptr );
6978
@@ -93,6 +102,7 @@ class ConsentInfo {
93102 // / initialized, nullptr otherwise. Each call to GetInstance() will return the
94103 // / same pointer; when you are finished using the SDK, you can delete the
95104 // / pointer and the UMP SDK will shut down.
105+ FIREBASE_DEPRECATED
96106 static ConsentInfo* GetInstance (JNIEnv* jni_env, jobject activity,
97107 InitResult* init_result_out = nullptr );
98108
@@ -101,6 +111,7 @@ class ConsentInfo {
101111 // existing ConsentInfo instance after it's first initialized. Returns nullptr
102112 // if no instance has been created yet; make sure you have called
103113 // GetInstance(JNIEnv*, jobject) first.
114+ FIREBASE_DEPRECATED
104115 static ConsentInfo* GetInstance ();
105116#endif // defined(DOXYGEN)
106117#endif // FIREBASE_PLATFORM_ANDROID || defined(DOXYGEN)
@@ -120,12 +131,18 @@ class ConsentInfo {
120131 // /
121132 // / @note Once any overload of ConsentInfo::GetInstance has been called, you
122133 // / 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
123137 static ConsentInfo* GetInstance (InitResult* init_result_out = nullptr );
124138#endif // !defined(__ANDROID__) || defined(DOXYGEN)
125139
126140 // / The user’s consent status. This value defaults to kConsentStatusUnknown
127141 // / until RequestConsentInfoUpdate() is called, and defaults to the previous
128142 // / session’s value until RequestConsentInfoUpdate() completes.
143+ // /
144+ // / @deprecated This class has been moved to the firebase::ump namespace.
145+ FIREBASE_DEPRECATED
129146 ConsentStatus GetConsentStatus ();
130147
131148 // / Requests consent information update. Must be called in every app session
@@ -134,20 +151,35 @@ class ConsentInfo {
134151 // / updated immediately to hold the consent state from the previous app
135152 // / session, if one exists. GetConsentStatus() and CanRequestAds() may be
136153 // / 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
137157 Future<void > RequestConsentInfoUpdate (const ConsentRequestParameters& params);
138158
139159 // / 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
140163 Future<void > RequestConsentInfoUpdateLastResult ();
141164
142165 // / Consent form status. This value defaults to kConsentFormStatusUnknown and
143166 // / requires a call to RequestConsentInfoUpdate() to update.
167+ // /
168+ // / @deprecated This class has been moved to the firebase::ump namespace.
169+ FIREBASE_DEPRECATED
144170 ConsentFormStatus GetConsentFormStatus ();
145171
146172 // / Loads a consent form. Returns an error if the consent form is unavailable
147173 // / or cannot be loaded.
174+ // /
175+ // / @deprecated This class has been moved to the firebase::ump namespace.
176+ FIREBASE_DEPRECATED
148177 Future<void > LoadConsentForm ();
149178
150179 // / 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
151183 Future<void > LoadConsentFormLastResult ();
152184
153185 // / Presents the full screen consent form using the given FormParent, which is
@@ -163,9 +195,15 @@ class ConsentInfo {
163195 // /
164196 // / @note You must call LoadConsentForm() and wait for it to complete before
165197 // / calling this method.
198+ // /
199+ // / @deprecated This class has been moved to the firebase::ump namespace.
200+ FIREBASE_DEPRECATED
166201 Future<void > ShowConsentForm (FormParent parent);
167202
168203 // / 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
169207 Future<void > ShowConsentFormLastResult ();
170208
171209 // / Loads a consent form and immediately presents it using the given
@@ -180,14 +218,23 @@ class ConsentInfo {
180218 // /
181219 // / @param[in] parent A FormParent, which is an Activity object on Android and
182220 // / a UIViewController object on iOS.
221+ // /
222+ // / @deprecated This class has been moved to the firebase::ump namespace.
223+ FIREBASE_DEPRECATED
183224 Future<void > LoadAndShowConsentFormIfRequired (FormParent parent);
184225
185226 // / Get the Future from the most recent call to
186227 // / LoadAndShowConsentFormIfRequired().
228+ // /
229+ // / @deprecated This class has been moved to the firebase::ump namespace.
230+ FIREBASE_DEPRECATED
187231 Future<void > LoadAndShowConsentFormIfRequiredLastResult ();
188232
189233 // / Check whether the privacy options form needs to be displayed.
190234 // / This is updated by RequestConsentInfoUpdate().
235+ // /
236+ // / @deprecated This class has been moved to the firebase::ump namespace.
237+ FIREBASE_DEPRECATED
191238 PrivacyOptionsRequirementStatus GetPrivacyOptionsRequirementStatus ();
192239
193240 // / If GetPrivacyOptionsRequirementStatus() is
@@ -206,19 +253,31 @@ class ConsentInfo {
206253 // /
207254 // / @param[in] parent A FormParent, which is an Activity object on Android and
208255 // / a UIViewController object on iOS.
256+ // /
257+ // / @deprecated This class has been moved to the firebase::ump namespace.
258+ FIREBASE_DEPRECATED
209259 Future<void > ShowPrivacyOptionsForm (FormParent parent);
210260
211261 // / 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
212265 Future<void > ShowPrivacyOptionsFormLastResult ();
213266
214267 // / Indicates whether the app has completed the necessary steps for gathering
215268 // / updated user consent. Returns true if RequestConsentInfoUpdate() has been
216269 // / called and GetConsentStatus returns either kConsentStatusNotRequired or
217270 // / kConsentStatusObtained.
271+ // /
272+ // / @deprecated This class has been moved to the firebase::ump namespace.
273+ FIREBASE_DEPRECATED
218274 bool CanRequestAds ();
219275
220276 // / Clears all consent state from persistent storage. This can be used in
221277 // / development to simulate a new installation.
278+ // /
279+ // / @deprecated This class has been moved to the firebase::ump namespace.
280+ FIREBASE_DEPRECATED
222281 void Reset ();
223282
224283 private:
0 commit comments