Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3380591
D6774.id22878.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D6774.id22878.diff
View Options
diff --git a/native/android/app/CMakeLists.txt b/native/android/app/CMakeLists.txt
--- a/native/android/app/CMakeLists.txt
+++ b/native/android/app/CMakeLists.txt
@@ -112,6 +112,7 @@
file(GLOB_RECURSE MODULE_NATIVE_CODE "../../cpp/CommonCpp/NativeModules/**/*.cpp")
file(GLOB MODULE_ROOT_NATIVE_CODE "../../cpp/CommonCpp/NativeModules/*.cpp")
file(GLOB TOOLS_NATIVE_CODE "../../cpp/CommonCpp/Tools/*.cpp")
+file(GLOB NOTIFICATIONS_NATIVE_CODE "../../cpp/CommonCpp/Notifications/**/*.cpp")
add_library(
# Sets the name of the library
@@ -139,6 +140,7 @@
${MODULE_NATIVE_CODE}
${MODULE_ROOT_NATIVE_CODE}
${TOOLS_NATIVE_CODE}
+ ${NOTIFICATIONS_NATIVE_CODE}
)
set(BUILD_DIR ${CMAKE_SOURCE_DIR}/build)
@@ -177,6 +179,8 @@
../../cpp/CommonCpp/NativeModules/PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs
../../cpp/CommonCpp/DatabaseManagers
../../cpp/CommonCpp/Tools
+ ../../cpp/CommonCpp/Notifications
+ ../../cpp/CommonCpp/Notifications/BackgroundDataStorage
# native rust library
${native_rust_library_include_dir}
diff --git a/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h
new file mode 100644
--- /dev/null
+++ b/native/cpp/CommonCpp/Notifications/BackgroundDataStorage/NotificationsCryptoModule.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "../../CryptoTools/CryptoModule.h"
+
+#include <string>
+
+namespace comm {
+class NotificationsCryptoModule {
+ const static std::string secureStoreNotificationsAccountDataKey;
+ const static std::string notificationsCryptoAccountID;
+
+ static void serializeAndFlushCryptoModule(
+ crypto::CryptoModule &cryptoModule,
+ const std::string &path,
+ const std::string &picklingKey,
+ const std::string &callingProcessName);
+ static crypto::CryptoModule deserializeCryptoModule(
+ const std::string &path,
+ const std::string &picklingKey);
+
+public:
+ static void
+ initializeNotificationsCryptoAccount(const std::string &callingProcessName);
+ static void clearSensitiveData();
+ static std::string getNotificationsIdentityKeys();
+};
+} // namespace comm
diff --git a/native/ios/Comm.xcodeproj/project.pbxproj b/native/ios/Comm.xcodeproj/project.pbxproj
--- a/native/ios/Comm.xcodeproj/project.pbxproj
+++ b/native/ios/Comm.xcodeproj/project.pbxproj
@@ -182,6 +182,7 @@
B7906F6C27209091009BBBF5 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Thread.h; sourceTree = "<group>"; };
B7E937CA26F448E700022A7C /* Media.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Media.h; sourceTree = "<group>"; };
C562A7004903539402D988CE /* Pods-Comm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Comm.release.xcconfig"; path = "Target Support Files/Pods-Comm/Pods-Comm.release.xcconfig"; sourceTree = "<group>"; };
+ CB24361629A397AB00FEC4E1 /* NotificationsCryptoModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationsCryptoModule.h; path = Notifications/BackgroundDataStorage/NotificationsCryptoModule.h; sourceTree = "<group>"; };
CB30C12327D0ACF700FBE8DE /* NotificationService.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NotificationService.entitlements; sourceTree = "<group>"; };
CB38B4792877179A00171182 /* NonBlockingLock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NonBlockingLock.h; path = Comm/TemporaryMessageStorage/NonBlockingLock.h; sourceTree = "<group>"; };
CB38B47B287718A200171182 /* NonBlockingLock.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = NonBlockingLock.mm; path = Comm/TemporaryMessageStorage/NonBlockingLock.mm; sourceTree = "<group>"; };
@@ -330,6 +331,7 @@
71BE84372636A944002849D2 /* CommonCpp */ = {
isa = PBXGroup;
children = (
+ CB24361429A3978800FEC4E1 /* Notifications */,
71F971B4270726C000DDC5BF /* _generated */,
71BF5B6A26B3FCFF00EDE27D /* CryptoTools */,
71BE84382636A944002849D2 /* Tools */,
@@ -513,6 +515,22 @@
name = ExpoModulesProviders;
sourceTree = "<group>";
};
+ CB24361429A3978800FEC4E1 /* Notifications */ = {
+ isa = PBXGroup;
+ children = (
+ CB24361529A3979500FEC4E1 /* BackgroundDataStorage */,
+ );
+ name = Notifications;
+ sourceTree = "<group>";
+ };
+ CB24361529A3979500FEC4E1 /* BackgroundDataStorage */ = {
+ isa = PBXGroup;
+ children = (
+ CB24361629A397AB00FEC4E1 /* NotificationsCryptoModule.h */,
+ );
+ name = BackgroundDataStorage;
+ sourceTree = "<group>";
+ };
CB38B4782877177B00171182 /* TemporaryMessageStorage */ = {
isa = PBXGroup;
children = (
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 12:48 AM (18 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595057
Default Alt Text
D6774.id22878.diff (4 KB)
Attached To
Mode
D6774: Start NotificationsCryptoModule API definition and implementation
Attached
Detach File
Event Timeline
Log In to Comment