"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/filebrowser/file-browser-requests.cpp" between
seafile-client-7.0.4.tar.gz and seafile-client-7.0.5.tar.gz

About: Seafile (client) for the Seafile cloud storage system.

file-browser-requests.cpp  (seafile-client-7.0.4):file-browser-requests.cpp  (seafile-client-7.0.5)
skipping to change at line 27 skipping to change at line 27
const char kGetFilesUrl[] = "api2/repos/%1/file/"; const char kGetFilesUrl[] = "api2/repos/%1/file/";
const char kGetFileSharedLinkUrl[] = "api2/repos/%1/file/shared-link/"; const char kGetFileSharedLinkUrl[] = "api2/repos/%1/file/shared-link/";
const char kGetFileUploadUrl[] = "api2/repos/%1/upload-link/"; const char kGetFileUploadUrl[] = "api2/repos/%1/upload-link/";
const char kGetFileUpdateUrl[] = "api2/repos/%1/update-link/"; const char kGetFileUpdateUrl[] = "api2/repos/%1/update-link/";
const char kGetStarredFilesUrl[] = "api2/starredfiles/"; const char kGetStarredFilesUrl[] = "api2/starredfiles/";
const char kFileOperationCopy[] = "api2/repos/%1/fileops/copy/"; const char kFileOperationCopy[] = "api2/repos/%1/fileops/copy/";
const char kFileOperationMove[] = "api2/repos/%1/fileops/move/"; const char kFileOperationMove[] = "api2/repos/%1/fileops/move/";
const char kRemoveDirentsURL[] = "api2/repos/%1/fileops/delete/"; const char kRemoveDirentsURL[] = "api2/repos/%1/fileops/delete/";
const char kGetFileUploadedBytesUrl[] = "api/v2.1/repos/%1/file-uploaded-bytes/" ; const char kGetFileUploadedBytesUrl[] = "api/v2.1/repos/%1/file-uploaded-bytes/" ;
const char kGetSmartLink[] = "api/v2.1/smart-link/"; const char kGetSmartLink[] = "api/v2.1/smart-link/";
const char kGetUploadLinkUrl[] = "api/v2.1/upload-links/";
//const char kGetFileFromRevisionUrl[] = "api2/repos/%1/file/revision/"; //const char kGetFileFromRevisionUrl[] = "api2/repos/%1/file/revision/";
//const char kGetFileDetailUrl[] = "api2/repos/%1/file/detail/"; //const char kGetFileDetailUrl[] = "api2/repos/%1/file/detail/";
//const char kGetFileHistoryUrl[] = "api2/repos/%1/file/history/"; //const char kGetFileHistoryUrl[] = "api2/repos/%1/file/history/";
} // namespace } // namespace
GetDirentsRequest::GetDirentsRequest(const Account& account, GetDirentsRequest::GetDirentsRequest(const Account& account,
const QString& repo_id, const QString& repo_id,
const QString& path) const QString& path)
: SeafileApiRequest (account.getAbsoluteUrl(QString(kGetDirentsUrl).arg(repo _id)), : SeafileApiRequest (account.getAbsoluteUrl(QString(kGetDirentsUrl).arg(repo _id)),
skipping to change at line 511 skipping to change at line 513
if (!lock_owner.isEmpty()) { if (!lock_owner.isEmpty()) {
emit success(true, lock_owner); emit success(true, lock_owner);
} else { } else {
emit success(false, ""); emit success(false, "");
} }
return; return;
} }
} }
emit success(false, ""); emit success(false, "");
} }
GetUploadLinkRequest::GetUploadLinkRequest(const Account& account,
const QString& repo_id,
const QString& path)
: SeafileApiRequest(
account.getAbsoluteUrl(QString(kGetUploadLinkUrl)),
SeafileApiRequest::METHOD_POST, account.token),
path_(path)
{
setFormParam("repo_id", repo_id);
setFormParam("path", path);
}
void GetUploadLinkRequest::requestSuccess(QNetworkReply& reply)
{
json_error_t error;
json_t* root = parseJSON(reply, &error);
if (!root) {
qWarning("failed to parse json:%s\n", error.text);
emit failed(ApiError::fromJsonError());
return;
}
QScopedPointer<json_t, JsonPointerCustomDeleter> json(root);
QMap<QString, QVariant> dict = mapFromJSON(json.data(), &error);
QString upload_link = dict["link"].toString();
emit success(upload_link);
}
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)