Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3376410
D10337.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D10337.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
@@ -132,6 +132,7 @@
list(APPEND RUST_NATIVE_CODE
"../../native_rust_library/RustCallback.cpp"
"../../native_rust_library/RustAESCrypto.cpp"
+ "../../native_rust_library/RustCSAMetadataEmitter.cpp"
)
file(GLOB CRYPTO_NATIVE_CODE "../../cpp/CommonCpp/CryptoTools/*.cpp")
file(GLOB DB_NATIVE_CODE "../../cpp/CommonCpp/DatabaseManagers/*.cpp")
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
@@ -74,6 +74,7 @@
CB4821AE27CFB187001AB7E1 /* Tools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 71BF5B7326B401D300EDE27D /* Tools.cpp */; };
CB4821AF27CFB19D001AB7E1 /* PlatformSpecificTools.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71762A74270D8AAE00F565ED /* PlatformSpecificTools.mm */; };
CB74AB1C2B2AFF6E00CBB494 /* CommServicesAuthMetadataEmitter.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB74AB1B2B2AFF6E00CBB494 /* CommServicesAuthMetadataEmitter.mm */; };
+ CB74AB202B2B0C0A00CBB494 /* RustCSAMetadataEmitter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB74AB1E2B2B0C0900CBB494 /* RustCSAMetadataEmitter.cpp */; };
CB7EF17E295C674300B17035 /* CommIOSNotifications.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB7EF17D295C5D1800B17035 /* CommIOSNotifications.mm */; };
CB7EF180295C674300B17035 /* CommIOSNotificationsBridgeQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = CB7EF17B295C580500B17035 /* CommIOSNotificationsBridgeQueue.mm */; };
CB90951F29534B32002F2A7F /* CommSecureStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 71D4D7CB26C50B1000FCDBCD /* CommSecureStore.mm */; };
@@ -263,6 +264,8 @@
CB38F2BF286C6C980010535C /* UpdateRelationshipMessageSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UpdateRelationshipMessageSpec.h; path = PersistentStorageUtilities/MessageOperationsUtilities/MessageSpecs/UpdateRelationshipMessageSpec.h; sourceTree = "<group>"; };
CB3C621327CE66540054F24C /* libEXSecureStore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libEXSecureStore.a; sourceTree = BUILT_PRODUCTS_DIR; };
CB74AB1B2B2AFF6E00CBB494 /* CommServicesAuthMetadataEmitter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CommServicesAuthMetadataEmitter.mm; path = Comm/CommServicesAuthMetadataEmitter.mm; sourceTree = "<group>"; };
+ CB74AB1E2B2B0C0900CBB494 /* RustCSAMetadataEmitter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RustCSAMetadataEmitter.cpp; sourceTree = "<group>"; };
+ CB74AB1F2B2B0C0900CBB494 /* RustCSAMetadataEmitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RustCSAMetadataEmitter.h; sourceTree = "<group>"; };
CB7EF17B295C580500B17035 /* CommIOSNotificationsBridgeQueue.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = CommIOSNotificationsBridgeQueue.mm; path = Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.mm; sourceTree = "<group>"; };
CB7EF17C295C580500B17035 /* CommIOSNotificationsBridgeQueue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommIOSNotificationsBridgeQueue.h; path = Comm/CommIOSNotifications/CommIOSNotificationsBridgeQueue.h; sourceTree = "<group>"; };
CB7EF17D295C5D1800B17035 /* CommIOSNotifications.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = CommIOSNotifications.mm; path = Comm/CommIOSNotifications/CommIOSNotifications.mm; sourceTree = "<group>"; };
@@ -587,6 +590,8 @@
8B99AF6B28D50D4800EB5ADB /* native_rust_library */ = {
isa = PBXGroup;
children = (
+ CB74AB1E2B2B0C0900CBB494 /* RustCSAMetadataEmitter.cpp */,
+ CB74AB1F2B2B0C0900CBB494 /* RustCSAMetadataEmitter.h */,
DFD5E7842B052B1400C32B6A /* RustAESCrypto.cpp */,
DFD5E7852B052B1400C32B6A /* RustAESCrypto.h */,
8B652FA4295EA9F1009F8163 /* RustCallback.h */,
@@ -1079,6 +1084,7 @@
8BC9568529FC49B00060AE4A /* JSIRust.cpp in Sources */,
8EA59BD92A73DAB000EB4F53 /* rustJSI-generated.cpp in Sources */,
CB38B48628771CDD00171182 /* TemporaryMessageStorage.mm in Sources */,
+ CB74AB202B2B0C0A00CBB494 /* RustCSAMetadataEmitter.cpp in Sources */,
CB38B48428771CAF00171182 /* EncryptedFileUtils.mm in Sources */,
CBFE58292885852B003B94C9 /* ThreadOperations.cpp in Sources */,
CB74AB1C2B2AFF6E00CBB494 /* CommServicesAuthMetadataEmitter.mm in Sources */,
diff --git a/native/native_rust_library/RustCSAMetadataEmitter.h b/native/native_rust_library/RustCSAMetadataEmitter.h
new file mode 100644
--- /dev/null
+++ b/native/native_rust_library/RustCSAMetadataEmitter.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include "cxx.h"
+
+namespace comm {
+
+void sendAuthMetadataToJS(rust::String accessToken, rust::String userID);
+
+} // namespace comm
diff --git a/native/native_rust_library/RustCSAMetadataEmitter.cpp b/native/native_rust_library/RustCSAMetadataEmitter.cpp
new file mode 100644
--- /dev/null
+++ b/native/native_rust_library/RustCSAMetadataEmitter.cpp
@@ -0,0 +1,8 @@
+#include "RustCSAMetadataEmitter.h"
+#include "../cpp/CommonCpp/NativeModules/CommServicesAuthMetadataEmitter.h"
+
+namespace comm {
+void sendAuthMetadataToJS(rust::String accessToken, rust::String userID) {
+ CommServicesAuthMetadataEmitter::sendAuthMetadataToJS(accessToken, userID);
+}
+} // namespace comm
diff --git a/native/native_rust_library/src/lib.rs b/native/native_rust_library/src/lib.rs
--- a/native/native_rust_library/src/lib.rs
+++ b/native/native_rust_library/src/lib.rs
@@ -1,7 +1,9 @@
use backup::ffi::*;
use comm_opaque2::client::{Login, Registration};
use comm_opaque2::grpc::opaque_error_to_grpc_status as handle_error;
-use ffi::{bool_callback, string_callback, void_callback};
+use ffi::{
+ bool_callback, send_auth_metadata_to_js, string_callback, void_callback,
+};
use grpc_clients::identity::protos::authenticated::{
OutboundKeyInfo, OutboundKeysForUserRequest, UpdateUserPasswordFinishRequest,
UpdateUserPasswordStartRequest,
@@ -184,6 +186,19 @@
) -> Result<()>;
}
+ // Comm Services Auth Metadata Emission
+ #[namespace = "comm"]
+ unsafe extern "C++" {
+ include!("RustCSAMetadataEmitter.h");
+
+ #[allow(unused)]
+ #[cxx_name = "sendAuthMetadataToJS"]
+ fn send_auth_metadata_to_js(
+ access_token: String,
+ user_id: String,
+ ) -> Result<()>;
+ }
+
// Backup
extern "Rust" {
#[cxx_name = "createBackup"]
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 11:48 PM (21 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2592131
Default Alt Text
D10337.diff (6 KB)
Attached To
Mode
D10337: Enable sending auth metadata event from Rust
Attached
Detach File
Event Timeline
Log In to Comment