Skip to content

Commit f79c4fe

Browse files
chriscallahannick-someone
authored andcommitted
[OpenSearch] Add MediaType for "application/opensearchdescription+xml"
RELNOTES=Add MediaType for "application/opensearchdescription+xml" ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=273816540
1 parent 742846b commit f79c4fe

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

android/guava/src/com/google/common/net/MediaType.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,17 @@ private static MediaType addKnownType(MediaType mediaType) {
594594
createConstant(APPLICATION_TYPE, "vnd.oasis.opendocument.spreadsheet");
595595
public static final MediaType OPENDOCUMENT_TEXT =
596596
createConstant(APPLICATION_TYPE, "vnd.oasis.opendocument.text");
597+
598+
/**
599+
* <a href="https://tools.ietf.org/id/draft-ellermann-opensearch-01.html">OpenSearch</a>
600+
* Description files are XML files that describe how a website can be used as a search engine by
601+
* consumers (e.g. web browsers).
602+
*
603+
* @since NEXT
604+
*/
605+
public static final MediaType OPENSEARCH_DESCRIPTION_UTF_8 =
606+
createConstantUtf8(APPLICATION_TYPE, "opensearchdescription+xml");
607+
597608
public static final MediaType PDF = createConstant(APPLICATION_TYPE, "pdf");
598609
public static final MediaType POSTSCRIPT = createConstant(APPLICATION_TYPE, "postscript");
599610

guava/src/com/google/common/net/MediaType.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,17 @@ private static MediaType addKnownType(MediaType mediaType) {
594594
createConstant(APPLICATION_TYPE, "vnd.oasis.opendocument.spreadsheet");
595595
public static final MediaType OPENDOCUMENT_TEXT =
596596
createConstant(APPLICATION_TYPE, "vnd.oasis.opendocument.text");
597+
598+
/**
599+
* <a href="https://tools.ietf.org/id/draft-ellermann-opensearch-01.html">OpenSearch</a>
600+
* Description files are XML files that describe how a website can be used as a search engine by
601+
* consumers (e.g. web browsers).
602+
*
603+
* @since NEXT
604+
*/
605+
public static final MediaType OPENSEARCH_DESCRIPTION_UTF_8 =
606+
createConstantUtf8(APPLICATION_TYPE, "opensearchdescription+xml");
607+
597608
public static final MediaType PDF = createConstant(APPLICATION_TYPE, "pdf");
598609
public static final MediaType POSTSCRIPT = createConstant(APPLICATION_TYPE, "postscript");
599610

0 commit comments

Comments
 (0)