From b8c4d0354449956a3ba11cd581a3d865932a9063 Mon Sep 17 00:00:00 2001 From: Giuseppe Lo Presti Date: Tue, 14 Sep 2021 12:48:56 +0200 Subject: [PATCH] Reworked API for listing the supported mime types --- cs3/app/registry/v1beta1/registry_api.proto | 5 +- cs3/app/registry/v1beta1/resources.proto | 28 +- docs/index.html | 116 +- proto.lock | 9350 +------------------ 4 files changed, 53 insertions(+), 9446 deletions(-) diff --git a/cs3/app/registry/v1beta1/registry_api.proto b/cs3/app/registry/v1beta1/registry_api.proto index 4cb6622f..4875b40e 100644 --- a/cs3/app/registry/v1beta1/registry_api.proto +++ b/cs3/app/registry/v1beta1/registry_api.proto @@ -57,7 +57,7 @@ service RegistryAPI { rpc AddAppProvider(AddAppProviderRequest) returns (AddAppProviderResponse); // Returns a list of the available app providers known by this registry. rpc ListAppProviders(ListAppProvidersRequest) returns (ListAppProvidersResponse); - // Returns a list of the supported mime types along with the apps which they can opened with. + // Returns a list of the supported mime types along with the apps which they can be opened with. rpc ListSupportedMimeTypes(ListSupportedMimeTypesRequest) returns (ListSupportedMimeTypesResponse); // Returns the default app provider which serves a specified mime type. rpc GetDefaultAppProviderForMimeType(GetDefaultAppProviderForMimeTypeRequest) returns (GetDefaultAppProviderForMimeTypeResponse); @@ -138,9 +138,6 @@ message ListSupportedMimeTypesResponse { // REQUIRED. // The list of supported mime types and their properties. MimeTypeList mime_types = 3; - // REQUIRED. - // The list of supported apps indexed by mime type. - map apps = 4; } message GetDefaultAppProviderForMimeTypeRequest { diff --git a/cs3/app/registry/v1beta1/resources.proto b/cs3/app/registry/v1beta1/resources.proto index 15daac4c..63de2b19 100644 --- a/cs3/app/registry/v1beta1/resources.proto +++ b/cs3/app/registry/v1beta1/resources.proto @@ -57,7 +57,7 @@ message ProviderInfo { string name = 5; // OPTIONAL. // Information to describe the functionalities - // offered by the app provider. Meant to be read + // offered by the underlying app. Meant to be read // by humans. string description = 6; // OPTIONAL. @@ -68,13 +68,8 @@ message ProviderInfo { bool desktop_only = 8; } -// Holds a list of app providers which can open a particular mime type. -message AppProviderList { - repeated ProviderInfo app_providers = 1; -} - // Represents a mime type and its corresponding file extension. -message MimeType { +message MimeTypeInfo { // OPTIONAL. // Opaque information. cs3.types.v1beta1.Opaque opaque = 1; @@ -82,14 +77,23 @@ message MimeType { // The mime type. string mime_type = 2; // REQUIRED. - // The friendly name of this mime type. - string name = 3; - // REQUIRED. // The file extension mapped to this mime type. - string ext = 4; + string ext = 3; + // REQUIRED. + // The list of app providers which can open this mime type + repeated ProviderInfo app_providers = 4; + // OPTIONAL. + // The friendly name of this mime type. + string name = 5; + // OPTIONAL. + // Human-readable information to describe the mime type. + string description = 6; + // OPTIONAL. + // A URI to a static asset which represents the mime type icon. + string icon = 7; } // Holds a list of mime types. message MimeTypeList { - repeated MimeType mime_types = 1; + repeated MimeTypeInfo mime_types = 1; } diff --git a/docs/index.html b/docs/index.html index ecf9e43f..ecb1610d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -582,10 +582,6 @@

Table of Contents

MListSupportedMimeTypesResponse -
  • - MListSupportedMimeTypesResponse.AppsEntry -
  • -
  • MSetDefaultAppProviderForMimeTypeRequest
  • @@ -610,11 +606,7 @@

    Table of Contents