cpp_client_telemetry/lib/jni/PrivacyGuardHelper.hpp

19 строки
490 B
C++
Исходник Постоянная ссылка Обычный вид История

Add Multiple LogManager support for Privacy Guard (#850) * Add PrivacyGuardHelper The class manages the PrivacyGuard shared_ptr.shared_ptr. This is needed to allow for logmanger-specific integration. * Add checks for module before including PG. * Update modules commit to module-master * Fix build breaks and address comments. * Correctly use the shared_ptr * Fix missing methods for ILogManager - Added tests - Renamed PrivacyGuardState to PrivacyGuardHelper. * Remove `/*static*/` where it's not used. * Simplify the PG registration for LogManager * Revert "Remove `/*static*/` where it's not used." This reverts commit 3cf8f12242f942ec82aa6d7b877c8fd2ce2e1c75. * Revert "Add PrivacyGuardState" This reverts commit 42996be631bb8fdd79bc90032fac28f8d03eea3c. # Conflicts: # lib/android_build/maesdk/src/main/java/com/microsoft/applications/events/LogManagerProvider.java # lib/jni/LogManager_jni.cpp # lib/jni/PrivacyGuard_jni.cpp * Revert more changes. * Cleanup LogManager and tests * Minor rename of methods. * Improve the test for PG on Multiple LogManager * Minor refactoring. * Add Java implementation for PG InitConfig * Fix Mac build break for Android Add support for multi-user scenarios Point modules to newer commit with PG Module changes. * Update modules and JNI. * Try fix build break. * Disable Android test for PG Remove all the #ifs I added to make the test work. * Fix PrivacyGuard_JNI compilation * Remove deprecated CDC fields from Java. * Update Obj-C Wrapper. * Add ObjC InitConfig files. * ObjC Wrapper updates. * Update modules commit. * Modules repo commit update. * Pair programming and Xcode FTW * Java Updates * Address ObjC comments. * Update main.mm to initialize the NSMutableArrays before using them. * fix typo * Update PG test * Update InitConfig to use a C'tor for required values. * Fix a typo on ObjC Wrapper * Update Modules commit point to master tip. Co-authored-by: David Brown <dabrow@microsoft.com>
2021-05-12 03:33:25 +03:00
//
2021-09-01 01:19:56 +03:00
// Copyright (c) Microsoft Corporation. All rights reserved.
Add Multiple LogManager support for Privacy Guard (#850) * Add PrivacyGuardHelper The class manages the PrivacyGuard shared_ptr.shared_ptr. This is needed to allow for logmanger-specific integration. * Add checks for module before including PG. * Update modules commit to module-master * Fix build breaks and address comments. * Correctly use the shared_ptr * Fix missing methods for ILogManager - Added tests - Renamed PrivacyGuardState to PrivacyGuardHelper. * Remove `/*static*/` where it's not used. * Simplify the PG registration for LogManager * Revert "Remove `/*static*/` where it's not used." This reverts commit 3cf8f12242f942ec82aa6d7b877c8fd2ce2e1c75. * Revert "Add PrivacyGuardState" This reverts commit 42996be631bb8fdd79bc90032fac28f8d03eea3c. # Conflicts: # lib/android_build/maesdk/src/main/java/com/microsoft/applications/events/LogManagerProvider.java # lib/jni/LogManager_jni.cpp # lib/jni/PrivacyGuard_jni.cpp * Revert more changes. * Cleanup LogManager and tests * Minor rename of methods. * Improve the test for PG on Multiple LogManager * Minor refactoring. * Add Java implementation for PG InitConfig * Fix Mac build break for Android Add support for multi-user scenarios Point modules to newer commit with PG Module changes. * Update modules and JNI. * Try fix build break. * Disable Android test for PG Remove all the #ifs I added to make the test work. * Fix PrivacyGuard_JNI compilation * Remove deprecated CDC fields from Java. * Update Obj-C Wrapper. * Add ObjC InitConfig files. * ObjC Wrapper updates. * Update modules commit. * Modules repo commit update. * Pair programming and Xcode FTW * Java Updates * Address ObjC comments. * Update main.mm to initialize the NSMutableArrays before using them. * fix typo * Update PG test * Update InitConfig to use a C'tor for required values. * Fix a typo on ObjC Wrapper * Update Modules commit point to master tip. Co-authored-by: David Brown <dabrow@microsoft.com>
2021-05-12 03:33:25 +03:00
// SPDX-License-Identifier: Apache-2.0
//
#include "ctmacros.hpp"
#include "modules/privacyguard/PrivacyGuard.hpp"
namespace MAT_NS_BEGIN
{
struct PrivacyGuardHelper {
/**
* Get the current instance of PrivacyGuardPtr.
* @return PrivacyGuardPtr if it is initialized, nullptr otherwise.
*/
static std::shared_ptr<PrivacyGuard> GetPrivacyGuardPtr() noexcept;
};
} MAT_NS_END