MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / NamesTypes

Method NamesTypes

src/command/StickerCommands.cxx:146–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144 }
145
146 CommandResult NamesTypes(const char *type) {
147 auto data = CallbackContext{
148 .name = "",
149 .sticker_type = sticker_type,
150 .response = response,
151 .is_song = StringIsEqual("song", sticker_type)
152 };
153
154 auto callback = [](const char *found_value, const char *found_type, void *user_data) {
155 auto context = reinterpret_cast<CallbackContext *>(user_data);
156 context->response.Fmt("name: {}\n", found_value);
157 context->response.Fmt("type: {}\n", found_type);
158 };
159
160 sticker_database.NamesTypes(type, callback, &data);
161
162 return CommandResult::OK;
163 }
164
165protected:
166 DomainHandler(Response &_response,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected