Page MenuHomePhabricator

D3941.id12877.diff
No OneTemporary

D3941.id12877.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,26 @@
+#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 {
+ 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:45 AM (18 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2521917
Default Alt Text
D3941.id12877.diff (2 KB)

Event Timeline