From dd3affd5ce50ae8469b9a76a3f48d1fdf911706f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 3 Jul 2015 16:43:24 +0200 Subject: API UPSDTE --- src/main/thrift/bwlp.thrift | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'src/main/thrift/bwlp.thrift') diff --git a/src/main/thrift/bwlp.thrift b/src/main/thrift/bwlp.thrift index c79e2d6..1612354 100644 --- a/src/main/thrift/bwlp.thrift +++ b/src/main/thrift/bwlp.thrift @@ -35,13 +35,15 @@ enum AuthenticationError { enum ImageDataError { INVALID_DATA, - UNKNOWN_IMAGE + UNKNOWN_IMAGE, + INVALID_SHARE_MODE } enum ShareMode { - LOCAL, - PUBLISH, - DOWNLOAD + LOCAL, // Managed by local user, do not upload to master server + PUBLISH, // Managed by local user, upload new versions to master server + DOWNLOAD, // Managed by remote user, automatically download new versions + FROZEN // Managed by remote user, but do not download any new versions } enum NetDirection { @@ -232,7 +234,7 @@ struct LectureSummary { 1: UUID lectureId, 2: string lectureName, 3: UUID imageVersionId, - 4: string imageName, + 4: UUID imageBaseId, 5: bool isEnabled, 6: UnixTimestamp startTime, 7: UnixTimestamp endTime, @@ -258,6 +260,8 @@ struct LectureRead { 8: UnixTimestamp endTime, 9: UnixTimestamp lastUsed, 10: i32 useCount, + 20: UnixTimestamp createTime, + 21: UnixTimestamp updateTime, 11: UUID ownerId, 12: UUID updaterId, 13: string runscript, @@ -267,7 +271,7 @@ struct LectureRead { 17: bool isExam, 18: bool hasInternetAccess, 19: LecturePermissions defaultPermissions, - 20: optional LecturePermissions userPermissions, + 22: optional LecturePermissions userPermissions, } struct TransferInformation { @@ -315,8 +319,12 @@ exception TImageDataException { // ############################################# service SatelliteServer { + // Get server (thrift interface) version int getVersion(), + // Get number of items returned per page (for calls that have a page parameter) + i32 getPageSize(), + // File transfer related TransferInformation requestImageVersionUpload(1: Token userToken, 2: UUID imageBaseId, 3: i64 fileSize, 4: list blockHashes) throws (1:TTransferRejectedException rejection, 2:TAuthorizationException authError), @@ -345,7 +353,7 @@ service SatelliteServer { * Image related */ // Get image list. tagSearch can be null, which disables this type of filtering and returns all - list getImageList(1: Token userToken, 2: list tagSearch) + list getImageList(1: Token userToken, 2: list tagSearch, 3: i32 page) throws (1:TAuthorizationException authError, 2:TInternalServerError serverError), // Query detailed information about an image ImageDetailsRead getImageDetails(1: Token userToken, 2: UUID imageBaseId) @@ -383,14 +391,11 @@ service SatelliteServer { void updateLecture(1: Token userToken, 2: UUID lectureId, 3: LectureWrite lecture) throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError), // Get list of all lectures - list getLectureList(1: Token userToken) + list getLectureList(1: Token userToken, 2: i32 page) throws (1:TAuthorizationException authError, 2:TInternalServerError serverError), // Get detailed lecture information LectureRead getLectureDetails(1: Token userToken, 2: UUID lectureId) throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError), - // Get list of lectures that are using the given image version - list getLecturesByImageVersion(1: Token userToken, 2: UUID imageVersionId) - throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError), // Delete given lecture void deleteLecture(1: Token userToken, 2: UUID lectureId) throws (1:TAuthorizationException authError, 2:TNotFoundException notFound, 3:TInternalServerError serverError), -- cgit v1.2.3-55-g7522