MPD  0.20.15
Data Structures | Functions
LocateUri.hxx File Reference
#include "check.h"
#include "Compiler.h"
#include "fs/AllocatedPath.hxx"
Include dependency graph for LocateUri.hxx:

Go to the source code of this file.

Data Structures

struct  LocatedUri
 

Functions

LocatedUri LocateUri (const char *uri, const Client *client)
 Classify a URI. More...
 

Function Documentation

◆ LocateUri()

LocatedUri LocateUri ( const char *  uri,
const Client client 
)

Classify a URI.

Throws #std::runtime_error on error.

Parameters
clientthe Client that is used to determine whether a local file is allowed; nullptr disables the check and allows all local files
storagea Storage instance which may be used to convert absolute URIs to relative ones, using Storage::MapToRelativeUTF8(); that feature is disabled if this parameter is nullptr