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

Function ParseProtocolFeature

src/command/ClientCommands.cxx:120–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120static ProtocolFeature
121ParseProtocolFeature(Request request)
122{
123 if (request.empty())
124 throw ProtocolError(ACK_ERROR_ARG, "Not enough arguments");
125
126 ProtocolFeature result = ProtocolFeature::None();
127
128 for (const char *name : request) {
129 auto type = protocol_feature_parse_i(name);
130 if (type == PF_NUM_OF_ITEM_TYPES)
131 throw ProtocolError(ACK_ERROR_ARG, "Unknown protocol feature");
132
133 result |= type;
134 }
135
136 return result;
137}
138
139CommandResult
140handle_protocol(Client &client, Request request, Response &r)

Callers 1

handle_protocolFunction · 0.85

Calls 2

protocol_feature_parse_iFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected