Skip to content

Commit 570104d

Browse files
authored
Add header and stub for User Messaging Platform SDK. (#1391)
* Added initial header and empty stub for UMP ConsentInfo. * Added error message getters. * Add ConsentInfo methods. * Format code. * Comment tweak. * Fix lint error. * Add LastResult methods. * Additional implementation. * Fix build. * Fix lint errors. * Added integration test for initializing library. * Update test. * Fix initialization. * Add internal methods. * Add mappings from interface class to internal class. * Add string conversion for error code. * Add conversion of form errors. * Add stub function implementations. * Add stub operations and unit tests. * Add missing file. * Format code. * Add check for form. * Add test for expected error not specifying tag for age of consent. * Clean up tests by moving initialization into shared method. * Fix TODO. * Fix lint issues. * Add Doxygen comments to public interface. * Add LastResult implementations, and tests to confirm. * Add method stubs for new UserMessagingPlatform API. * Handle invalid internal pointers. * Format code. * Add objective-C header for FormParent. * Add ump.h to top-level CMake file, so it gets added to the framework. * Change RequestConsentStatus to RequestConsentInfoUpdate. * Update integration test method name. * Update all Future return types to Future<void>. Added GetInstance() with no parameters for Android, for convenience. * Add a test to ensure that GetInstance() always returns the same instance. * Change params to a struct. Add ConsentFormErrorUnavailable and remove some other enum entries. * Document the workflow that the stub simulates. * Clean up stub workflow for privacy options. * Add comment to struct. * Fix comments & enum text. * Newline removed. * Lint error. * Added comment explaining what EEA means. * Add a comment about ResetInfo in the UMP tests. * Add expectation for privacy also being unknown. * Move GetConsent*ErrorMessage to internal. * Update method documentation and fixed FormUnavailable/Available logic. * Fix comments.
1 parent 9b8e34e commit 570104d

File tree

11 files changed

+1474
-1
lines changed

11 files changed

+1474
-1
lines changed

app/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,10 @@ if (IOS)
546546
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/interstitial_ad.h
547547
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/internal/native_ad.h
548548
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/rewarded_ad.h
549-
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/types.h)
549+
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/types.h
550+
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/ump.h
551+
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/ump/consent_info.h
552+
${FIREBASE_SOURCE_DIR}/gma/src/include/firebase/gma/ump/types.h)
550553
set(installations_HDRS
551554
${FIREBASE_SOURCE_DIR}/installations/src/include/firebase/installations.h)
552555
set(messaging_HDRS

gma/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
# Common source files used by all platforms
1818
set(common_SRCS
19+
src/common/ump/consent_info.cc
20+
src/common/ump/consent_info_internal.cc
1921
src/common/gma_common.cc
2022
src/common/ad_view.cc
2123
src/common/ad_view_internal.cc
@@ -38,6 +40,7 @@ binary_to_array("gma_resources"
3840
# Source files used by the Android implementation.
3941
set(android_SRCS
4042
${gma_resources_source}
43+
src/stub/ump/consent_info_internal_stub.cc
4144
src/android/ad_request_converter.cc
4245
src/android/ad_error_android.cc
4346
src/android/adapter_response_info_android.cc
@@ -51,6 +54,7 @@ set(android_SRCS
5154

5255
# Source files used by the iOS implementation.
5356
set(ios_SRCS
57+
src/stub/ump/consent_info_internal_stub.cc
5458
src/ios/FADAdSize.mm
5559
src/ios/FADAdView.mm
5660
src/ios/FADInterstitialDelegate.mm
@@ -69,6 +73,7 @@ set(ios_SRCS
6973

7074
# Source files used by the stub implementation.
7175
set(stub_SRCS
76+
src/stub/ump/consent_info_internal_stub.cc
7277
src/stub/ad_error_stub.cc
7378
src/stub/adapter_response_info_stub.cc
7479
src/stub/gma_stub.cc

0 commit comments

Comments
 (0)