ls: added uri_has_scheme()

uri_has_scheme() checks if an URI contains the sub string "://", which
makes MPD assume that it is a remote URI.
This commit is contained in:
Max Kellermann 2008-12-16 21:22:10 +01:00
parent e0be4400cf
commit c50115f9a2
2 changed files with 10 additions and 0 deletions

View File

@ -42,6 +42,10 @@ void printRemoteUrlHandlers(struct client *client)
}
}
bool uri_has_scheme(const char *uri)
{
return strstr(uri, "://") != NULL;
}
bool isRemoteUrl(const char *url)
{

View File

@ -28,6 +28,12 @@ struct client;
const char *getSuffix(const char *utf8file);
/**
* Checks whether the specified URI has a schema in the form
* "scheme://".
*/
bool uri_has_scheme(const char *uri);
bool isRemoteUrl(const char *url);
const struct decoder_plugin *