MPD  0.20.18
Functions
MimeType.hxx File Reference
#include <string>
#include <map>
Include dependency graph for MimeType.hxx:

Go to the source code of this file.

Functions

std::string GetMimeTypeBase (const char *s)
 Extract the part of the MIME type before the parameters, i.e. More...
 
std::map< std::string, std::string > ParseMimeTypeParameters (const char *s)
 Parse the parameters from a MIME type string. More...
 

Function Documentation

std::string GetMimeTypeBase ( const char *  s)

Extract the part of the MIME type before the parameters, i.e.

the part before the semicolon. If there is no semicolon, it returns the string as-is.

std::map<std::string, std::string> ParseMimeTypeParameters ( const char *  s)

Parse the parameters from a MIME type string.

Parameters are separated by semicolon. Example:

"foo/bar; param1=value1; param2=value2"