Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3368568
D5339.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D5339.diff
View Options
diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
--- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
+++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
@@ -64,6 +64,8 @@
virtual void clearNotifyToken() const = 0;
virtual void setCurrentUserID(std::string userID) const = 0;
virtual std::string getCurrentUserID() const = 0;
+ virtual void setDeviceID(std::string deviceID) const = 0;
+ virtual std::string getDeviceID() const = 0;
virtual void clearSensitiveData() const = 0;
};
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
@@ -63,6 +63,8 @@
void clearNotifyToken() const override;
void setCurrentUserID(std::string userID) const override;
std::string getCurrentUserID() const override;
+ void setDeviceID(std::string deviceID) const override;
+ std::string getDeviceID() const override;
void clearSensitiveData() const override;
};
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
@@ -914,6 +914,14 @@
return this->getMetadata("current_user_id");
}
+void SQLiteQueryExecutor::setDeviceID(std::string deviceID) const {
+ this->setMetadata("device_id", deviceID);
+};
+
+std::string SQLiteQueryExecutor::getDeviceID() const {
+ return this->getMetadata("device_id");
+};
+
void SQLiteQueryExecutor::setMetadata(std::string entry_name, std::string data)
const {
Metadata entry{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 8:16 PM (41 m, 53 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2586057
Default Alt Text
D5339.diff (1 KB)
Attached To
Mode
D5339: [native] Add wrapper functions for getting and setting device id in cpp
Attached
Detach File
Event Timeline
Log In to Comment