diff options
author | Simon Rettberg | 2014-10-02 15:33:59 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-10-02 15:33:59 +0200 |
commit | 4a057de0f17a17453f603feaf5fb9a5f4c1a5ef1 (patch) | |
tree | ad6d03421e96092289c8130336076403342f2f6c /src/main/thrift | |
parent | better exception handling. (diff) | |
download | master-sync-shared-4a057de0f17a17453f603feaf5fb9a5f4c1a5ef1.tar.gz master-sync-shared-4a057de0f17a17453f603feaf5fb9a5f4c1a5ef1.tar.xz master-sync-shared-4a057de0f17a17453f603feaf5fb9a5f4c1a5ef1.zip |
Rename and clean up some structs and member names
Diffstat (limited to 'src/main/thrift')
-rw-r--r-- | src/main/thrift/imagemaster.thrift | 66 |
1 files changed, 38 insertions, 28 deletions
diff --git a/src/main/thrift/imagemaster.thrift b/src/main/thrift/imagemaster.thrift index c6bd3cb..1a28c43 100644 --- a/src/main/thrift/imagemaster.thrift +++ b/src/main/thrift/imagemaster.thrift @@ -20,11 +20,6 @@ enum AuthenticationError { GENERIC_ERROR, INVALID_CREDENTIALS, ACCOUNT_SUSPENDED, - BANNED_NETWORK -} - -enum ServerAuthenticationError { - GENERIC_ERROR, INVALID_ORGANIZATION, INVALID_KEY, CHALLENGE_FAILED, @@ -57,11 +52,6 @@ exception AuthenticationException { exception InvalidTokenException { } -exception ServerAuthenticationException { - 1: ServerAuthenticationError number, - 2: string message -} - exception ImageDataException { 1: ImageDataError number, 2: string message @@ -81,7 +71,13 @@ struct UserInfo { 1: string userId, 2: string firstName, 3: string lastName, - 4: string eMail + 4: string eMail, + 5: string organizationId +} + +struct OrganizationData { + 1: string organizationId, + 2: string displayName, } struct SessionData { @@ -107,35 +103,49 @@ struct ServerSessionData { struct ImageData { 1: UUID uuid, - 2: i32 imageVersion, - 3: string imageName, - 4: UnixTimestamp imageCreateTime, - 5: UnixTimestamp imageUpdateTime, - 6: string imageOwner, - 7: string contentOperatingSystem, - 8: bool statusIsValid, - 9: bool statusIsDeleted, - 10: string imageShortDescription, - 11: string imageLongDescription, - 12: i64 fileSize + 2: i32 revision, + 3: string title, + 4: UnixTimestamp createTime, + 5: UnixTimestamp updateTime, + 6: string ownerLogin, + 7: string operatingSystem, + 8: bool isValid, + 9: bool isDeleted, + // 10: deleted, do not reuse! + 11: string description, + 12: i64 fileSize, } service ImageServer { +/* + * Client calls + */ bool ping(), - SessionData authenticate(1:string username, 2:string password) throws (1:AuthenticationException failure), + SessionData authenticate(1:string login, 2:string password) throws (1:AuthenticationException failure), + + list<OrganizationData> getOrganizations(), + + list<UserInfo> findUser(1:ID sessionId, 2:string organizationId, 3:string searchTerm) throws (1:AuthorizationException failure), + + list<ImageData> getPublicImages(1:ID sessionId, 2:i32 page) throws (1:AuthorizationException failure), +/* + * Server calls + */ UserInfo getUserFromToken(1:Token token) throws (1:InvalidTokenException failure), - binary startServerAuthentication(1:string organization) throws (1: ServerAuthenticationException failure), - bool isServerAuthenticated(1:string serverSessionId), - ServerSessionData serverAuthenticate(1:string organization, 2:binary challengeResponse) throws (1:ServerAuthenticationException failure), + binary startServerAuthentication(1:string organization) throws (1: AuthenticationException failure), + + ServerSessionData serverAuthenticate(1:string organizationId, 2:binary challengeResponse) throws (1:AuthenticationException failure), + + UploadData submitImage(1:ID serverSessionId, 2:ImageData imageDescription, 3:list<i32> crcSums) throws (1:AuthorizationException failure, 2: ImageDataException failure2, 3: UploadException failure3), - UploadData submitImage(1:string serverSessionId, 2:ImageData imageDescription, 3:list<i32> crcSums) throws (1:AuthorizationException failure, 2: ImageDataException failure2, 3: UploadException failure3), + DownloadData getImage(2:ID serverSessionId, 1:UUID uuid) throws (1:AuthorizationException failure, 2: ImageDataException failure2), - DownloadData getImage(2:string serverSessionId, 1:UUID uuid) throws (1:AuthorizationException failure, 2: ImageDataException failure2), + bool publishUser(1:ID serverSessionId, 2:UserInfo user) throws (1:AuthorizationException failure), } |