Skip to content

Commit 4c92b80

Browse files
committed
add protocol fields to ocm share
1 parent 22e2269 commit 4c92b80

File tree

3 files changed

+61
-96
lines changed

3 files changed

+61
-96
lines changed

cs3/ocm/core/v1beta1/ocm_core_api.proto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ option objc_class_prefix = "COC";
2929
option php_namespace = "Cs3\\Ocm\\Core\\V1Beta1";
3030

3131
import "cs3/identity/user/v1beta1/resources.proto";
32-
import "cs3/ocm/core/v1beta1/resources.proto";
3332
import "cs3/storage/provider/v1beta1/resources.proto";
3433
import "cs3/rpc/v1beta1/status.proto";
3534
import "cs3/types/v1beta1/types.proto";
35+
import "cs3/sharing/ocm/v1beta1/resources.proto";
3636

3737
// OCM Core API
3838
//
@@ -85,10 +85,10 @@ message CreateOCMCoreShareRequest {
8585
cs3.storage.provider.v1beta1.ResourceType resource_type = 8;
8686
// REQUIRED.
8787
// Recipient share type.
88-
ShareType share_type = 9;
88+
cs3.sharing.ocm.v1beta1.ShareType share_type = 9;
8989
// REQUIRED.
9090
// The protocols which are used to establish synchronisation.
91-
repeated Protocol protocols = 10;
91+
repeated cs3.sharing.ocm.v1beta1.Protocol protocols = 10;
9292
}
9393

9494
message CreateOCMCoreShareResponse {

cs3/ocm/core/v1beta1/resources.proto

Lines changed: 0 additions & 84 deletions
This file was deleted.

cs3/sharing/ocm/v1beta1/resources.proto

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,12 @@ message Share {
7070
// REQUIRED.
7171
// Last modification time of the share.
7272
cs3.types.v1beta1.Timestamp mtime = 9;
73-
// Defines the type of share based on its origin.
74-
enum ShareType {
75-
SHARE_TYPE_INVALID = 0;
76-
// A regular file or folder share.
77-
SHARE_TYPE_REGULAR = 1;
78-
// A file or folder transfer.
79-
SHARE_TYPE_TRANSFER = 2;
80-
}
81-
// Specifies the type of the share.
73+
// REQUIRED.
74+
// Recipient share type.
8275
ShareType share_type = 10;
76+
// REQUIRED.
77+
// The protocols which are used to establish synchronisation.
78+
repeated Protocol protocols = 11;
8379
}
8480

8581
// The permissions for a share.
@@ -176,3 +172,56 @@ message ShareGrant {
176172
// The share permissions for the grant.
177173
SharePermissions permissions = 2;
178174
}
175+
176+
// Defines the type of share based on its recipient.
177+
enum ShareType {
178+
// Share of type user.
179+
SHARE_TYPE_USER = 0;
180+
// Share of type group.
181+
SHARE_TYPE_GROUP = 1;
182+
}
183+
184+
185+
// The protocol which is used to establish synchronisation.
186+
message Protocol {
187+
// REQUIRED.
188+
oneof term {
189+
WebDAVProtocol webdap_options = 1;
190+
WebappProtocol webapp_options = 2;
191+
DatatxProtocol datatx_oprions = 3;
192+
cs3.types.v1beta1.Opaque generic_options = 4;
193+
}
194+
}
195+
196+
// Defines the options for the WebDAV protocol.
197+
message WebDAVProtocol {
198+
// REQUIRED.
199+
// Secret used to access the resource.
200+
string shared_secret = 1;
201+
// REQUIRED.
202+
// Permissions of the shared resource.
203+
cs3.sharing.ocm.v1beta1.SharePermissions permissions = 2;
204+
// REQUIRED.
205+
// WebDAV URI used to access the resource.
206+
string uri = 3;
207+
}
208+
209+
// Defines the options for the Webapp protocol.
210+
message WebappProtocol {
211+
// REQUIRED.
212+
// Template URI to open the resource with a remote app.
213+
string uriTemplate = 1;
214+
}
215+
216+
// Defines the options for the Datatx protocol.
217+
message DatatxProtocol {
218+
// REQUIRED.
219+
// Secret used to access the source of the data transfer.
220+
string shared_secret = 1;
221+
// REQUIRED.
222+
// Source URI for the data transfer.
223+
string source_uri = 2;
224+
// REQUIRED.
225+
// Size in bytes of the source.
226+
uint64 size = 3;
227+
}

0 commit comments

Comments
 (0)