Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3391085
D5339.id17478.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.id17478.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
@@ -893,6 +893,14 @@
return this->getMetadata("current_user_id");
}
+void SQLiteQueryExecutor::setDeviceID(std::string deviceID) const {
+ setMetadata("device_id", deviceID);
+};
+
+std::string SQLiteQueryExecutor::getDeviceID() const {
+ return 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
Sun, Dec 1, 2:11 AM (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2603307
Default Alt Text
D5339.id17478.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