diff options
Diffstat (limited to 'plugins/CloudFile/src/Services/google_service.cpp')
-rw-r--r-- | plugins/CloudFile/src/Services/google_service.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/CloudFile/src/Services/google_service.cpp b/plugins/CloudFile/src/Services/google_service.cpp index 3877506b0f..dda31097da 100644 --- a/plugins/CloudFile/src/Services/google_service.cpp +++ b/plugins/CloudFile/src/Services/google_service.cpp @@ -46,7 +46,7 @@ void CGDriveService::Login() ptrA refreshToken(db_get_sa(NULL, GetAccountName(), "RefreshToken")); if (token && refreshToken && refreshToken[0]) { GDriveAPI::RefreshTokenRequest request(refreshToken); - NLHR_PTR response(request.Send(hConnection)); + NLHR_PTR response(request.Send(m_hConnection)); JSONNode root = GetJsonResponse(response); @@ -81,21 +81,21 @@ unsigned CGDriveService::RequestAccessTokenThread(void *owner, void *param) GetDlgItemTextA(hwndDlg, IDC_OAUTH_CODE, requestToken, _countof(requestToken)); GDriveAPI::GetAccessTokenRequest request(requestToken); - NLHR_PTR response(request.Send(service->hConnection)); + NLHR_PTR response(request.Send(service->m_hConnection)); if (response == nullptr || response->resultCode != HTTP_CODE_OK) { const char *error = response->dataLength ? response->pData : service->HttpStatusToError(response->resultCode); - Netlib_Logf(service->hConnection, "%s: %s", service->GetAccountName(), error); + Netlib_Logf(service->m_hConnection, "%s: %s", service->GetAccountName(), error); //ShowNotification(TranslateT("server does not respond"), MB_ICONERROR); return 0; } JSONNode root = JSONNode::parse(response->pData); if (root.empty()) { - Netlib_Logf(service->hConnection, "%s: %s", service->GetAccountName(), service->HttpStatusToError(response->resultCode)); + Netlib_Logf(service->m_hConnection, "%s: %s", service->GetAccountName(), service->HttpStatusToError(response->resultCode)); //ShowNotification(TranslateT("server does not respond"), MB_ICONERROR); return 0; } @@ -103,7 +103,7 @@ unsigned CGDriveService::RequestAccessTokenThread(void *owner, void *param) JSONNode node = root.at("error_description"); if (!node.isnull()) { ptrW error_description(mir_a2u_cp(node.as_string().c_str(), CP_UTF8)); - Netlib_Logf(service->hConnection, "%s: %s", service->GetAccountName(), service->HttpStatusToError(response->resultCode)); + Netlib_Logf(service->m_hConnection, "%s: %s", service->GetAccountName(), service->HttpStatusToError(response->resultCode)); //ShowNotification((wchar_t*)error_description, MB_ICONERROR); return 0; } @@ -131,7 +131,7 @@ unsigned CGDriveService::RevokeAccessTokenThread(void *param) ptrA token(db_get_sa(NULL, service->GetAccountName(), "TokenSecret")); GDriveAPI::RevokeAccessTokenRequest request(token); - NLHR_PTR response(request.Send(service->hConnection)); + NLHR_PTR response(request.Send(service->m_hConnection)); return 0; } @@ -149,7 +149,7 @@ void CGDriveService::UploadFile(const char *parentId, const char *name, const ch { ptrA token(db_get_sa(NULL, GetAccountName(), "TokenSecret")); GDriveAPI::UploadFileRequest request(token, parentId, name, data, size); - NLHR_PTR response(request.Send(hConnection)); + NLHR_PTR response(request.Send(m_hConnection)); JSONNode root = GetJsonResponse(response); JSONNode node = root.at("id"); @@ -160,7 +160,7 @@ void CGDriveService::CreateUploadSession(const char *parentId, const char *name, { ptrA token(db_get_sa(NULL, GetAccountName(), "TokenSecret")); GDriveAPI::CreateUploadSessionRequest request(token, parentId, name); - NLHR_PTR response(request.Send(hConnection)); + NLHR_PTR response(request.Send(m_hConnection)); HandleHttpError(response); @@ -181,7 +181,7 @@ void CGDriveService::CreateUploadSession(const char *parentId, const char *name, void CGDriveService::UploadFileChunk(const char *uploadUri, const char *chunk, size_t chunkSize, uint64_t offset, uint64_t fileSize, char *fileId) { GDriveAPI::UploadFileChunkRequest request(uploadUri, chunk, chunkSize, offset, fileSize); - NLHR_PTR response(request.Send(hConnection)); + NLHR_PTR response(request.Send(m_hConnection)); HandleHttpError(response); @@ -202,7 +202,7 @@ void CGDriveService::CreateFolder(const char *path, char *folderId) { ptrA token(db_get_sa(NULL, GetAccountName(), "TokenSecret")); GDriveAPI::CreateFolderRequest request(token, path); - NLHR_PTR response(request.Send(hConnection)); + NLHR_PTR response(request.Send(m_hConnection)); JSONNode root = GetJsonResponse(response); JSONNode node = root.at("id"); @@ -213,7 +213,7 @@ void CGDriveService::CreateSharedLink(const char *itemId, char *url) { ptrA token(db_get_sa(NULL, GetAccountName(), "TokenSecret")); GDriveAPI::GrantPermissionsRequest request(token, itemId); - NLHR_PTR response(request.Send(hConnection)); + NLHR_PTR response(request.Send(m_hConnection)); HandleHttpError(response); @@ -296,7 +296,7 @@ UINT CGDriveService::Upload(FileTransferParam *ftp) } while (ftp->NextFile()); } catch (Exception &ex) { - Netlib_Logf(hConnection, "%s: %s", MODULE, ex.what()); + Netlib_Logf(m_hConnection, "%s: %s", MODULE, ex.what()); ftp->SetStatus(ACKRESULT_FAILED); return ACKRESULT_FAILED; } |