summaryrefslogtreecommitdiff
path: root/plugins/CloudFile/src/Services/microsoft_service.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
commit53fe3e46177d17b4941610de19f5cc6210700cb4 (patch)
treeb67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/CloudFile/src/Services/microsoft_service.cpp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/CloudFile/src/Services/microsoft_service.cpp')
-rw-r--r--plugins/CloudFile/src/Services/microsoft_service.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/CloudFile/src/Services/microsoft_service.cpp b/plugins/CloudFile/src/Services/microsoft_service.cpp
index c435bc19b4..992312e2a8 100644
--- a/plugins/CloudFile/src/Services/microsoft_service.cpp
+++ b/plugins/CloudFile/src/Services/microsoft_service.cpp
@@ -65,7 +65,7 @@ void COneDriveService::Login(HWND owner)
JSONNode root = GetJsonResponse(response);
JSONNode node = root.at("access_token");
- db_set_s(NULL, GetAccountName(), "TokenSecret", node.as_string().c_str());
+ db_set_s(0, GetAccountName(), "TokenSecret", node.as_string().c_str());
node = root.at("expires_in");
time_t expiresIn = time(0) + node.as_int();
@@ -154,7 +154,7 @@ void COneDriveService::HandleJsonError(JSONNode &node)
auto COneDriveService::UploadFile(const std::string &parentId, const std::string &fileName, const char *data, size_t size)
{
ptrA token(getStringA("TokenSecret"));
- BYTE strategy = db_get_b(NULL, MODULENAME, "ConflictStrategy", OnConflict::REPLACE);
+ BYTE strategy = g_plugin.getByte("ConflictStrategy", OnConflict::REPLACE);
OneDriveAPI::UploadFileRequest *request = !parentId.empty()
? new OneDriveAPI::UploadFileRequest(token, parentId.c_str(), fileName.c_str(), data, size, (OnConflict)strategy)
: new OneDriveAPI::UploadFileRequest(token, fileName.c_str(), data, size, (OnConflict)strategy);
@@ -168,7 +168,7 @@ auto COneDriveService::UploadFile(const std::string &parentId, const std::string
auto COneDriveService::CreateUploadSession(const std::string &parentId, const std::string &fileName)
{
ptrA token(getStringA("TokenSecret"));
- BYTE strategy = db_get_b(NULL, MODULENAME, "ConflictStrategy", OnConflict::REPLACE);
+ BYTE strategy = g_plugin.getByte("ConflictStrategy", OnConflict::REPLACE);
OneDriveAPI::CreateUploadSessionRequest *request = !parentId.empty()
? new OneDriveAPI::CreateUploadSessionRequest(token, parentId.c_str(), fileName.c_str(), (OnConflict)strategy)
: new OneDriveAPI::CreateUploadSessionRequest(token, fileName.c_str(), (OnConflict)strategy);