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
@@ -49,6 +50,8 @@ class ConsentInfoInternal;
4950// /
5051// / This class contains all of the methods necessary for obtaining
5152// / consent from the user.
53+ // /
54+ // / @deprecated This class has been moved to the firebase::ump namespace.
5255class ConsentInfo {
5356 public:
5457 // / Shut down the User Messaging Platform Consent SDK.
@@ -67,6 +70,9 @@ class ConsentInfo {
6770 // / initialized, nullptr otherwise. Each call to GetInstance() will return the
6871 // / same pointer; when you are finished using the SDK, you can delete the
6972 // / pointer and the UMP SDK will shut down.
73+ // /
74+ // / @deprecated This class has been moved to the firebase::ump namespace.
75+ FIREBASE_DEPRECATED
7076 static ConsentInfo* GetInstance (const ::firebase::App& app,
7177 InitResult* init_result_out = nullptr );
7278
@@ -96,6 +102,7 @@ class ConsentInfo {
96102 // / initialized, nullptr otherwise. Each call to GetInstance() will return the
97103 // / same pointer; when you are finished using the SDK, you can delete the
98104 // / pointer and the UMP SDK will shut down.
105+ FIREBASE_DEPRECATED
99106 static ConsentInfo* GetInstance (JNIEnv* jni_env, jobject activity,
100107 InitResult* init_result_out = nullptr );
101108
@@ -104,6 +111,7 @@ class ConsentInfo {
104111 // existing ConsentInfo instance after it's first initialized. Returns nullptr
105112 // if no instance has been created yet; make sure you have called
106113 // GetInstance(JNIEnv*, jobject) first.
114+ FIREBASE_DEPRECATED
107115 static ConsentInfo* GetInstance ();
108116#endif // defined(DOXYGEN)
109117#endif // FIREBASE_PLATFORM_ANDROID || defined(DOXYGEN)
@@ -123,12 +131,18 @@ class ConsentInfo {
123131 // /
124132 // / @note Once any overload of ConsentInfo::GetInstance has been called, you
125133 // / 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
126137 static ConsentInfo* GetInstance (InitResult* init_result_out = nullptr );
127138#endif // !defined(__ANDROID__) || defined(DOXYGEN)
128139
129140 // / The user’s consent status. This value defaults to kConsentStatusUnknown
130141 // / until RequestConsentInfoUpdate() is called, and defaults to the previous
131142 // / session’s value until RequestConsentInfoUpdate() completes.
143+ // /
144+ // / @deprecated This class has been moved to the firebase::ump namespace.
145+ FIREBASE_DEPRECATED
132146 ConsentStatus GetConsentStatus ();
133147
134148 // / Requests consent information update. Must be called in every app session
@@ -137,20 +151,35 @@ class ConsentInfo {
137151 // / updated immediately to hold the consent state from the previous app
138152 // / session, if one exists. GetConsentStatus() and CanRequestAds() may be
139153 // / 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
140157 Future<void > RequestConsentInfoUpdate (const ConsentRequestParameters& params);
141158
142159 // / 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
143163 Future<void > RequestConsentInfoUpdateLastResult ();
144164
145165 // / Consent form status. This value defaults to kConsentFormStatusUnknown and
146166 // / requires a call to RequestConsentInfoUpdate() to update.
167+ // /
168+ // / @deprecated This class has been moved to the firebase::ump namespace.
169+ FIREBASE_DEPRECATED
147170 ConsentFormStatus GetConsentFormStatus ();
148171
149172 // / Loads a consent form. Returns an error if the consent form is unavailable
150173 // / or cannot be loaded.
174+ // /
175+ // / @deprecated This class has been moved to the firebase::ump namespace.
176+ FIREBASE_DEPRECATED
151177 Future<void > LoadConsentForm ();
152178
153179 // / 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
154183 Future<void > LoadConsentFormLastResult ();
155184
156185 // / Presents the full screen consent form using the given FormParent, which is
@@ -166,9 +195,15 @@ class ConsentInfo {
166195 // /
167196 // / @note You must call LoadConsentForm() and wait for it to complete before
168197 // / calling this method.
198+ // /
199+ // / @deprecated This class has been moved to the firebase::ump namespace.
200+ FIREBASE_DEPRECATED
169201 Future<void > ShowConsentForm (FormParent parent);
170202
171203 // / 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
172207 Future<void > ShowConsentFormLastResult ();
173208
174209 // / Loads a consent form and immediately presents it using the given
@@ -183,14 +218,23 @@ class ConsentInfo {
183218 // /
184219 // / @param[in] parent A FormParent, which is an Activity object on Android and
185220 // / a UIViewController object on iOS.
221+ // /
222+ // / @deprecated This class has been moved to the firebase::ump namespace.
223+ FIREBASE_DEPRECATED
186224 Future<void > LoadAndShowConsentFormIfRequired (FormParent parent);
187225
188226 // / Get the Future from the most recent call to
189227 // / LoadAndShowConsentFormIfRequired().
228+ // /
229+ // / @deprecated This class has been moved to the firebase::ump namespace.
230+ FIREBASE_DEPRECATED
190231 Future<void > LoadAndShowConsentFormIfRequiredLastResult ();
191232
192233 // / Check whether the privacy options form needs to be displayed.
193234 // / This is updated by RequestConsentInfoUpdate().
235+ // /
236+ // / @deprecated This class has been moved to the firebase::ump namespace.
237+ FIREBASE_DEPRECATED
194238 PrivacyOptionsRequirementStatus GetPrivacyOptionsRequirementStatus ();
195239
196240 // / If GetPrivacyOptionsRequirementStatus() is
@@ -209,19 +253,31 @@ class ConsentInfo {
209253 // /
210254 // / @param[in] parent A FormParent, which is an Activity object on Android and
211255 // / a UIViewController object on iOS.
256+ // /
257+ // / @deprecated This class has been moved to the firebase::ump namespace.
258+ FIREBASE_DEPRECATED
212259 Future<void > ShowPrivacyOptionsForm (FormParent parent);
213260
214261 // / 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
215265 Future<void > ShowPrivacyOptionsFormLastResult ();
216266
217267 // / Indicates whether the app has completed the necessary steps for gathering
218268 // / updated user consent. Returns true if RequestConsentInfoUpdate() has been
219269 // / called and GetConsentStatus returns either kConsentStatusNotRequired or
220270 // / kConsentStatusObtained.
271+ // /
272+ // / @deprecated This class has been moved to the firebase::ump namespace.
273+ FIREBASE_DEPRECATED
221274 bool CanRequestAds ();
222275
223276 // / Clears all consent state from persistent storage. This can be used in
224277 // / development to simulate a new installation.
278+ // /
279+ // / @deprecated This class has been moved to the firebase::ump namespace.
280+ FIREBASE_DEPRECATED
225281 void Reset ();
226282
227283 private:
0 commit comments