Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0fd6235a
Commit
0fd6235a
authored
Sep 02, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/Registry: add FindPlaylistPluginBySuffix()
parent
4d117451
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
PlaylistRegistry.cxx
src/playlist/PlaylistRegistry.cxx
+4
-4
PlaylistRegistry.hxx
src/playlist/PlaylistRegistry.hxx
+9
-2
No files found.
src/playlist/PlaylistRegistry.cxx
View file @
0fd6235a
...
...
@@ -274,15 +274,15 @@ playlist_list_open_stream(InputStreamPtr &&is, const char *uri)
return
nullptr
;
}
bool
playlist_suffix_supported
(
const
char
*
suffix
)
noexcept
const
PlaylistPlugin
*
FindPlaylistPluginBySuffix
(
const
char
*
suffix
)
noexcept
{
assert
(
suffix
!=
nullptr
);
playlist_plugins_for_each_enabled
(
plugin
)
{
if
(
plugin
->
SupportsSuffix
(
suffix
))
return
true
;
return
plugin
;
}
return
false
;
return
nullptr
;
}
src/playlist/PlaylistRegistry.hxx
View file @
0fd6235a
...
...
@@ -78,12 +78,19 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix);
std
::
unique_ptr
<
SongEnumerator
>
playlist_list_open_stream
(
InputStreamPtr
&&
is
,
const
char
*
uri
);
gcc_pure
const
PlaylistPlugin
*
FindPlaylistPluginBySuffix
(
const
char
*
suffix
)
noexcept
;
/**
* Determines if there is a playlist plugin which can handle the
* specified file name suffix.
*/
gcc_pure
bool
playlist_suffix_supported
(
const
char
*
suffix
)
noexcept
;
inline
bool
playlist_suffix_supported
(
const
char
*
suffix
)
noexcept
{
return
FindPlaylistPluginBySuffix
(
suffix
)
!=
nullptr
;
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment