Skip to content

Commit

Permalink
Add StampEventIKeyForConcerns option in Java layer (#1107)
Browse files Browse the repository at this point in the history
* Add StampEventIKeyForConcerns option in Java layer

* Update modules version and bump version

* Bump version to speed up release.
  • Loading branch information
sid-dahiya authored Mar 6, 2023
1 parent 76a1051 commit 3c77727
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ private static native boolean nativeInitializePrivacyGuard(
boolean UseEventFieldPrefix,
boolean ScanForUrls,
boolean DisableAdvancedScans,
boolean StampEventIKeyForConcerns,
String domainName,
String machineName,
Object[] userNames,
Expand All @@ -31,7 +32,8 @@ private static native boolean nativeInitializePrivacyGuardWithoutCommonDataConte
String SummaryEventName,
boolean UseEventFieldPrefix,
boolean ScanForUrls,
boolean DisableAdvancedScans
boolean DisableAdvancedScans,
boolean StampEventIKeyForConcerns
);

/**
Expand Down Expand Up @@ -61,6 +63,7 @@ public static boolean initialize(PrivacyGuardInitConfig initConfig)
initConfig.UseEventFieldPrefix,
initConfig.ScanForUrls,
initConfig.DisableAdvancedScans,
initConfig.StampEventIKeyForConcerns,
initConfig.DataContext.domainName,
initConfig.DataContext.machineName,
initConfig.DataContext.userNames.toArray(),
Expand All @@ -78,7 +81,8 @@ public static boolean initialize(PrivacyGuardInitConfig initConfig)
initConfig.SummaryEventName,
initConfig.UseEventFieldPrefix,
initConfig.ScanForUrls,
initConfig.DisableAdvancedScans
initConfig.DisableAdvancedScans,
initConfig.StampEventIKeyForConcerns
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ public PrivacyGuardInitConfig(ILogger logger, CommonDataContext context)
* Default value is `false`.
*/
public boolean DisableAdvancedScans = false;

/**
* (OPTIONAL) Should stamp the iKey for the scanned event as an additional property on Concerns.
* Default value is `false`.
*/
public boolean StampEventIKeyForConcerns = false;
}
6 changes: 3 additions & 3 deletions lib/include/public/Version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#define MAT_VERSION_HPP
// WARNING: DO NOT MODIFY THIS FILE!
// This file has been automatically generated, manual changes will be lost.
#define BUILD_VERSION_STR "3.7.46.1"
#define BUILD_VERSION 3,7,46,1
#define BUILD_VERSION_STR "3.7.62.1"
#define BUILD_VERSION 3,7,62,1

#ifndef RESOURCE_COMPILER_INVOKED
#include "ctmacros.hpp"
Expand All @@ -18,7 +18,7 @@ namespace MAT_NS_BEGIN {
uint64_t const Version =
((uint64_t)3 << 48) |
((uint64_t)7 << 32) |
((uint64_t)46 << 16) |
((uint64_t)62 << 16) |
((uint64_t)1);

} MAT_NS_END
Expand Down
6 changes: 5 additions & 1 deletion lib/jni/PrivacyGuard_jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
jstring SummaryEventName,
jboolean UseEventFieldPrefix,
jboolean ScanForUrls,
jboolean DisableAdvancedScans) {
jboolean DisableAdvancedScans,
jboolean StampEventIKeyForConcerns) {
if (spPrivacyGuard != nullptr) {
return false;
}
Expand All @@ -76,6 +77,7 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
config.UseEventFieldPrefix = static_cast<bool>(UseEventFieldPrefix);
config.ScanForUrls = static_cast<bool>(ScanForUrls);
config.DisableAdvancedScans = static_cast<bool>(DisableAdvancedScans);
config.StampEventIKeyForConcerns = static_cast<bool>(StampEventIKeyForConcerns);

spPrivacyGuard = std::make_shared<PrivacyGuard>(config);
return true;
Expand All @@ -92,6 +94,7 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
jboolean UseEventFieldPrefix,
jboolean ScanForUrls,
jboolean DisableAdvancedScans,
jboolean StampEventIKeyForConcerns,
jstring domainName,
jstring machineName,
jobjectArray userNames,
Expand Down Expand Up @@ -131,6 +134,7 @@ Java_com_microsoft_applications_events_PrivacyGuard_nativeInitializePrivacyGuard
config.UseEventFieldPrefix = static_cast<bool>(UseEventFieldPrefix);
config.ScanForUrls = static_cast<bool>(ScanForUrls);
config.DisableAdvancedScans = static_cast<bool>(DisableAdvancedScans);
config.StampEventIKeyForConcerns = static_cast<bool>(StampEventIKeyForConcerns);

spPrivacyGuard = std::make_shared<PrivacyGuard>(config);
return true;
Expand Down
2 changes: 1 addition & 1 deletion lib/modules

0 comments on commit 3c77727

Please sign in to comment.