1fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera/* 2fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * Copyright (C) 2010 The Android Open Source Project 3fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * 4fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * Licensed under the Apache License, Version 2.0 (the "License"); 5fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * you may not use this file except in compliance with the License. 6fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * You may obtain a copy of the License at 7fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * 8fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * http://www.apache.org/licenses/LICENSE-2.0 9fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * 10fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * Unless required by applicable law or agreed to in writing, software 11fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * distributed under the License is distributed on an "AS IS" BASIS, 12fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * See the License for the specific language governing permissions and 14fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * limitations under the License. 15fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera */ 16fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 17fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera#ifndef __MIMETYPEUTIL_H__ 18fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera#define __MIMETYPEUTIL_H__ 19fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 20fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera#include <utils/String8.h> 21fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 22fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbeheranamespace android { 23fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 24fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbeheraclass MimeTypeUtil { 25fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 26fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbeherapublic: 27fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 28fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera MimeTypeUtil() {} 29fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 30fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera virtual ~MimeTypeUtil() {} 31fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 32fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera/** 33fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * May convert the mimetype if there is a well known 34fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * replacement mimetype otherwise the original mimetype 35fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * is returned. 36fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * 37fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * @param mimeType - mimetype in lower case to convert. 38fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * 39fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera * @return mimetype or null. 40fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera */ 41fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbeherastatic String8 convertMimeType(String8& mimeType); 42fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 43fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera}; 44fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera}; 45fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera 46fdd65a0fc7df2c878cc601e4c0f4021cb264f051Pravat Dalbehera#endif /* __MIMETYPEUTIL_H__ */ 47