Page MenuHomePhabricator

D3941.id12537.diff
No OneTemporary

D3941.id12537.diff

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
@@ -72,6 +72,8 @@
# comm native mutual code
../../cpp/CommonCpp/NativeModules
../../cpp/CommonCpp/NativeModules/InternalModules
+ ../../cpp/CommonCpp/NativeModules/MessageOperationsUtilities
+ ../../cpp/CommonCpp/NativeModules/MessageOperationsUtilities/MessageSpecs
../../cpp/CommonCpp/DatabaseManagers
../../cpp/CommonCpp/Tools
../../cpp/CommonCpp/grpc/_generated
@@ -121,7 +123,10 @@
./build/third-party-ndk/folly/folly/String.cpp
./build/third-party-ndk/folly/folly/portability/SysUio.cpp
./build/third-party-ndk/folly/folly/net/NetOps.cpp
-
+ ./build/third-party-ndk/folly/folly/dynamic.cpp
+ ./build/third-party-ndk/folly/folly/json.cpp
+ ./build/third-party-ndk/folly/folly/json_pointer.cpp
+ ./build/third-party-ndk/folly/folly/Unicode.cpp
# double-conversion
${DOUBLE_CONVERSION_SOURCES}
diff --git a/native/cpp/CommonCpp/NativeModules/MessageOperationsUtilities/MessageOperationsUtilities.h b/native/cpp/CommonCpp/NativeModules/MessageOperationsUtilities/MessageOperationsUtilities.h
new file mode 100644
--- /dev/null
+++ b/native/cpp/CommonCpp/NativeModules/MessageOperationsUtilities/MessageOperationsUtilities.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "../../DatabaseManagers/DatabaseManager.h"
+#include "../../DatabaseManagers/entities/Media.h"
+#include "../../DatabaseManagers/entities/Message.h"
+
+#include <folly/dynamic.h>
+#include <string>
+#include <vector>
+
+namespace comm {
+typedef std::pair<Message, std::vector<Media>> ClientDBMessageInfo;
+class MessageOperationsUtilities {
+private:
+ static ClientDBMessageInfo translateRawMessageInfoToClientDBMessageInfo(
+ const folly::dynamic &rawMessageInfo);
+ static Media translateMediaToClientDBMediaInfo(
+ const folly::dynamic &rawMediaInfo,
+ const std::string &container,
+ const std::string &thread);
+
+public:
+ static std::vector<ClientDBMessageInfo>
+ translateStringToClientDBMessageInfos(std::string rawMessageInfoString);
+ static void storeNotification(std::string rawMessageInfoString);
+};
+} // namespace comm

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 9:39 AM (18 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2521798
Default Alt Text
D3941.id12537.diff (2 KB)

Event Timeline