void DriveManager::Rename (const QString& id, const QString& newName) { if (id.isEmpty ()) return; ApiCallQueue_ << [this, id, newName] (const QString& key) { RequestRenameItem (id, newName, key); }; RequestAccessToken (); }
void DropboxAuthenticator::RedirectArrived(LocalRedirectServer* server) { server->deleteLater(); QUrl request_url = server->request_url(); qLog(Debug) << Q_FUNC_INFO << request_url; uid_ = request_url.queryItemValue("uid"); RequestAccessToken(); }
void DriveManager::Move (const QString& id, const QString& parentId) { if (id.isEmpty ()) return; ApiCallQueue_ << [this, id, parentId] (const QString& key) { RequestMoveItem (id, parentId, key); }; RequestAccessToken (); }
void OAuthenticator::RedirectArrived(QTcpSocket* socket, QByteArray buffer) { buffer.append(socket->readAll()); if (socket->atEnd() || buffer.endsWith("\r\n\r\n")) { socket->deleteLater(); const QByteArray& code = ParseHttpRequest(buffer); qLog(Debug) << "Code:" << code; RequestAccessToken(code, socket->localPort()); } else { NewClosure(socket, SIGNAL(readyReady()), this, SLOT(RedirectArrived(QTcpSocket*, QByteArray)), socket, buffer); } }
void DriveManager::RequestFileChanges (qlonglong startId) { ApiCallQueue_ << [this, startId] (const QString& key) { GetFileChanges (startId, key); }; RequestAccessToken (); }
void DriveManager::Copy (const QString& id, const QString& parentId) { ApiCallQueue_ << [this, id, parentId] (const QString& key) { RequestCopyItem (id, parentId, key); }; RequestAccessToken (); }
void DriveManager::CreateDirectory (const QString& name, const QString& parentId) { ApiCallQueue_ << [this, name, parentId] (const QString& key) { RequestCreateDirectory (name, parentId, key); }; RequestAccessToken (); }
void DriveManager::Upload (const QString& filePath, const QStringList& parentId) { QString parent = parentId.value (0); ApiCallQueue_ << [this, filePath, parent] (const QString& key) { RequestUpload (filePath, parent, key); }; RequestAccessToken (); }
void DriveManager::ShareEntry (const QString& id) { ApiCallQueue_ << [this, id] (const QString& key) { RequestSharingEntry (id, key); }; RequestAccessToken (); }
void DriveManager::RestoreEntryFromTrash (const QString& id) { ApiCallQueue_ << [this, id] (const QString& key) { RequestRestoreEntryFromTrash (id, key); }; RequestAccessToken (); }
void OAuthenticator::RedirectArrived(LocalRedirectServer* server, QUrl url) { server->deleteLater(); QUrl request_url = server->request_url(); qLog(Debug) << Q_FUNC_INFO << request_url; RequestAccessToken(request_url.queryItemValue("code").toUtf8(), url); }