Skip to content

Commit

Permalink
Created a mimetype message and added it to ListSupportedMimeTypesResp…
Browse files Browse the repository at this point in the history
…onse
  • Loading branch information
glpatcern committed Sep 10, 2021
1 parent 8639343 commit 8078210
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 12 deletions.
7 changes: 5 additions & 2 deletions cs3/app/registry/v1beta1/registry_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ message ListSupportedMimeTypesResponse {
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The list of supported mime types with the apps which they can be opened with.
map<string, AppProviderList> mime_types = 3;
// The list of supported mime types and their properties.
MimeTypeList mime_types = 3;
// REQUIRED.
// The list of supported apps indexed by mime type.
map<string, AppProviderList> apps = 4;
}

message GetDefaultAppProviderForMimeTypeRequest {
Expand Down
21 changes: 21 additions & 0 deletions cs3/app/registry/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,24 @@ message ProviderInfo {
message AppProviderList {
repeated ProviderInfo app_providers = 1;
}

// Represents a mime type and its corresponding file extension.
message MimeType {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// 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;
}

// Holds a list of mime types.
message MimeTypeList {
repeated MimeType mime_types = 1;
}
139 changes: 134 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ <h2>Table of Contents</h2>
</li>

<li>
<a href="#cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse.MimeTypesEntry"><span class="badge">M</span>ListSupportedMimeTypesResponse.MimeTypesEntry</a>
<a href="#cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse.AppsEntry"><span class="badge">M</span>ListSupportedMimeTypesResponse.AppsEntry</a>
</li>

<li>
Expand Down Expand Up @@ -613,11 +613,23 @@ <h2>Table of Contents</h2>
<a href="#cs3.app.registry.v1beta1.AppProviderList"><span class="badge">M</span>AppProviderList</a>
</li>

<li>
<a href="#cs3.app.registry.v1beta1.MimeType"><span class="badge">M</span>MimeType</a>
</li>

<li>
<a href="#cs3.app.registry.v1beta1.MimeTypeList"><span class="badge">M</span>MimeTypeList</a>
</li>

<li>
<a href="#cs3.app.registry.v1beta1.ProviderInfo"><span class="badge">M</span>ProviderInfo</a>
</li>


<li>
<a href="#cs3.app.registry.v1beta1.ProviderInfo.Capability"><span class="badge">E</span>ProviderInfo.Capability</a>
</li>



</ul>
Expand Down Expand Up @@ -5621,10 +5633,18 @@ <h3 id="cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse">ListSupportedMi

<tr>
<td>mime_types</td>
<td><a href="#cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse.MimeTypesEntry">ListSupportedMimeTypesResponse.MimeTypesEntry</a></td>
<td><a href="#cs3.app.registry.v1beta1.MimeTypeList">MimeTypeList</a></td>
<td></td>
<td><p>REQUIRED.
The list of supported mime types and their properties. </p></td>
</tr>

<tr>
<td>apps</td>
<td><a href="#cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse.AppsEntry">ListSupportedMimeTypesResponse.AppsEntry</a></td>
<td>repeated</td>
<td><p>REQUIRED.
The list of supported mime types with the apps which they can be opened with. </p></td>
The list of supported apps indexed by mime type. </p></td>
</tr>

</tbody>
Expand All @@ -5634,7 +5654,7 @@ <h3 id="cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse">ListSupportedMi



<h3 id="cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse.MimeTypesEntry">ListSupportedMimeTypesResponse.MimeTypesEntry</h3>
<h3 id="cs3.app.registry.v1beta1.ListSupportedMimeTypesResponse.AppsEntry">ListSupportedMimeTypesResponse.AppsEntry</h3>
<p></p>


Expand Down Expand Up @@ -5832,6 +5852,79 @@ <h3 id="cs3.app.registry.v1beta1.AppProviderList">AppProviderList</h3>



<h3 id="cs3.app.registry.v1beta1.MimeType">MimeType</h3>
<p>Represents a mime type and its corresponding file extension.</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>opaque</td>
<td><a href="#cs3.types.v1beta1.Opaque">cs3.types.v1beta1.Opaque</a></td>
<td></td>
<td><p>OPTIONAL.
Opaque information. </p></td>
</tr>

<tr>
<td>mime_type</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The mime type. </p></td>
</tr>

<tr>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The friendly name of this mime type. </p></td>
</tr>

<tr>
<td>ext</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The file extension mapped to this mime type. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.app.registry.v1beta1.MimeTypeList">MimeTypeList</h3>
<p>Holds a list of mime types.</p>


<table class="field-table">
<thead>
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>mime_types</td>
<td><a href="#cs3.app.registry.v1beta1.MimeType">MimeType</a></td>
<td>repeated</td>
<td><p> </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.app.registry.v1beta1.ProviderInfo">ProviderInfo</h3>
<p>Represents the information of the app provider.</p>

Expand Down Expand Up @@ -5867,12 +5960,19 @@ <h3 id="cs3.app.registry.v1beta1.ProviderInfo">ProviderInfo</h3>
For example, tcp://localhost:1099. </p></td>
</tr>

<tr>
<td>capability</td>
<td><a href="#cs3.app.registry.v1beta1.ProviderInfo.Capability">ProviderInfo.Capability</a></td>
<td></td>
<td><p> </p></td>
</tr>

<tr>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>OPTIONAL.
A human-readable name of the app provider. </p></td>
A human-readable name of the underlying app. </p></td>
</tr>

<tr>
Expand Down Expand Up @@ -5910,6 +6010,35 @@ <h3 id="cs3.app.registry.v1beta1.ProviderInfo">ProviderInfo</h3>



<h3 id="cs3.app.registry.v1beta1.ProviderInfo.Capability">ProviderInfo.Capability</h3>
<p>REQUIRED.</p><p>The capability of the underlying app.</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
</thead>
<tbody>

<tr>
<td>CAPABILITY_INVALID</td>
<td>0</td>
<td><p></p></td>
</tr>

<tr>
<td>CAPABILITY_VIEWER</td>
<td>1</td>
<td><p>The app is a simple viewer.</p></td>
</tr>

<tr>
<td>CAPABILITY_EDITOR</td>
<td>2</td>
<td><p>The app is a full editor.</p></td>
</tr>

</tbody>
</table>




Expand Down
74 changes: 69 additions & 5 deletions proto.lock
Original file line number Diff line number Diff line change
Expand Up @@ -678,14 +678,19 @@
"id": 2,
"name": "opaque",
"type": "cs3.types.v1beta1.Opaque"
},
{
"id": 3,
"name": "mime_types",
"type": "MimeTypeList"
}
],
"maps": [
{
"key_type": "string",
"field": {
"id": 3,
"name": "mime_types",
"id": 4,
"name": "apps",
"type": "AppProviderList"
}
}
Expand Down Expand Up @@ -851,6 +856,24 @@
{
"protopath": "cs3:/:app:/:registry:/:v1beta1:/:resources.proto",
"def": {
"enums": [
{
"name": "ProviderInfo.Capability",
"enum_fields": [
{
"name": "CAPABILITY_INVALID"
},
{
"name": "CAPABILITY_VIEWER",
"integer": 1
},
{
"name": "CAPABILITY_EDITOR",
"integer": 2
}
]
}
],
"messages": [
{
"name": "ProviderInfo",
Expand All @@ -873,21 +896,26 @@
},
{
"id": 4,
"name": "capability",
"type": "Capability"
},
{
"id": 5,
"name": "name",
"type": "string"
},
{
"id": 5,
"id": 6,
"name": "description",
"type": "string"
},
{
"id": 6,
"id": 7,
"name": "icon",
"type": "string"
},
{
"id": 7,
"id": 8,
"name": "desktop_only",
"type": "bool"
}
Expand All @@ -903,6 +931,42 @@
"is_repeated": true
}
]
},
{
"name": "MimeType",
"fields": [
{
"id": 1,
"name": "opaque",
"type": "cs3.types.v1beta1.Opaque"
},
{
"id": 2,
"name": "mime_type",
"type": "string"
},
{
"id": 3,
"name": "name",
"type": "string"
},
{
"id": 4,
"name": "ext",
"type": "string"
}
]
},
{
"name": "MimeTypeList",
"fields": [
{
"id": 1,
"name": "mime_types",
"type": "MimeType",
"is_repeated": true
}
]
}
],
"imports": [
Expand Down

0 comments on commit 8078210

Please sign in to comment.