diff --git a/cs3/appprovider/v0alpha/appprovider.proto b/cs3/appprovider/v0alpha/appprovider.proto index 74d9c3a..62b6bb9 100644 --- a/cs3/appprovider/v0alpha/appprovider.proto +++ b/cs3/appprovider/v0alpha/appprovider.proto @@ -58,14 +58,21 @@ service AppProviderService { } message OpenRequest { + // OPTIONAL. + // Opaque information. + cs3.types.Opaque opaque = 1; // REQUIRED. - // The id of the resource to be opened. - cs3.storageproviderv0alpha.ResourceId resource_id = 1; + // The resource information. + cs3.storageproviderv0alpha.ResourceInfo resource_info = 2; // REQUIRED. - // The access token the application provider will use when contacting - // the storage provider storing the resource pointed by resource_id. + // The access token this application provider will use when contacting + // the storage provider to read and write. // Service implementors MUST make sure that the access token only grants - // access to the resource the open request is made. + // access to the requested resource. + // Service implementors should use a ResourceId rather than a filename to grant access, as + // ResourceIds MUST NOT change when a resource is renamed. + // The access token MUST be short-lived. + // TODO(labkode): investigate token derivation techniques. string access_token = 3; } @@ -77,6 +84,8 @@ message OpenResponse { // Opaque information. cs3.types.Opaque opaque = 2; // REQUIRED. - // The url to render, usually inside an IFrame in the client. + // The url that user agents will render to clients. + // Usually the rendering happens by using HTML iframes, + // at least, Office 365, Collabora, OnlyOffice do like that. string iframe_url = 3; } diff --git a/cs3/appregistry/v0alpha/appregistry.proto b/cs3/appregistry/v0alpha/appregistry.proto index 9af5bb4..c8762b4 100644 --- a/cs3/appregistry/v0alpha/appregistry.proto +++ b/cs3/appregistry/v0alpha/appregistry.proto @@ -30,6 +30,7 @@ option php_namespace = "CS3\\AppRegistryV0Alpha"; import "cs3/appregistry/v0alpha/resources.proto"; import "cs3/rpc/status.proto"; +import "cs3/storageprovider/v0alpha/resources.proto"; import "cs3/types/types.proto"; // App Registry API @@ -49,26 +50,23 @@ import "cs3/types/types.proto"; // Any method MAY return UNKNOWN. // Any method MAY return UNAUTHENTICATED. service AppRegistryService { - // Returns the app provider that is reponsible for the given - // resource reference. - // MUST return CODE_NOT_FOUND if the reference does not exist. - rpc GetAppProvider(GetAppProviderRequest) returns (GetAppProviderResponse); + // Returns the app providers that are capable of handling this resource info. + // MUST return CODE_NOT_FOUND if no providers are available. + rpc GetAppProviders(GetAppProvidersRequest) returns (GetAppProvidersResponse); // Returns a list of the available app providers known by this registry. rpc ListAppProviders(ListAppProvidersRequest) returns (ListAppProvidersResponse); } -message GetAppProviderRequest { +message GetAppProvidersRequest { // OPTIONAL. // Opaque information. cs3.types.Opaque opaque = 1; // REQUIRED. - // The mimetype of the resource. - // For example, application/text or - // image/png. - string mime_type = 3; + // The resource information. + cs3.storageproviderv0alpha.ResourceInfo resource_info = 2; } -message GetAppProviderResponse { +message GetAppProvidersResponse { // REQUIRED. // The response status. cs3.rpc.Status status = 1; @@ -76,8 +74,8 @@ message GetAppProviderResponse { // Opaque information. cs3.types.Opaque opaque = 2; // REQUIRED. - // The app provider for the given extension and mimetype. - ProviderInfo provider = 3; + // The app providers available for the given resource info. + repeated ProviderInfo providers = 3; } message ListAppProvidersRequest { diff --git a/docs/index.html b/docs/index.html index e3bdc24..b126e3d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -282,11 +282,11 @@

Table of Contents