summaryrefslogtreecommitdiffstats
path: root/src/main/thrift
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/thrift')
-rw-r--r--src/main/thrift/imagemaster.thrift26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/main/thrift/imagemaster.thrift b/src/main/thrift/imagemaster.thrift
index 7986d4c..0b8b95b 100644
--- a/src/main/thrift/imagemaster.thrift
+++ b/src/main/thrift/imagemaster.thrift
@@ -34,6 +34,10 @@ enum ImageDataError {
UNKNOWN_IMAGE
}
+enum UploadError {
+ INVALID_CRC
+}
+
exception AuthorizationException {
1: AuthorizationError number,
2: string message
@@ -57,6 +61,11 @@ exception ImageDataException {
2: string message
}
+exception UploadException {
+ 1: UploadError numberm
+ 2: string message
+}
+
struct UserInfo {
1: string userId,
2: string firstName,
@@ -76,6 +85,15 @@ struct FtpCredentials {
3: string filename
}
+struct UploadInfos {
+ 1: string token,
+ 2: list<i32> missingBlocks
+}
+
+struct DownloadInfos {
+ 1: string token
+}
+
struct ServerSessionData {
1: ID sessionId
}
@@ -107,13 +125,9 @@ service ImageServer {
ServerSessionData serverAuthenticate(1:string organization, 2:binary challengeResponse) throws (1:ServerAuthenticationException failure),
- FtpCredentials submitImage(1:string serverSessionId, 2:ImageData imageDescription) throws (1:AuthorizationException failure, 2: ImageDataException failure2),
-
- bool finishedUpload(1:string ftpUser, 2:ImageData imageDescription) throws (1: ImageDataException failure),
-
- FtpCredentials getImage(1:UUID uuid, 2:string serverSessionId) throws (1:AuthorizationException failure, 2: ImageDataException failure2),
+ UploadInfos submitImage(1:string serverSessionId, 2:ImageData imageDescription) throws (1:AuthorizationException failure, 2: ImageDataException failure2, 3: UploadException failure3),
- bool finishedDownload(1:string ftpUser)
+ DownloadInfos getImage(1:UUID uuid, 2:string serverSessionId) throws (1:AuthorizationException failure, 2: ImageDataException failure2),
}