void CAdminServiceSkel::commandResult_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message) { H_AUTO(CAdminServiceSkel_commandResult_CR); uint32 commandId; nlRead(__message, serial, commandId); std::string serviceAlias; nlRead(__message, serial, serviceAlias); std::string result; nlRead(__message, serial, result); commandResult(sender, commandId, serviceAlias, result); }
void MPDPlaylistsConnection::save(QString name) { QByteArray data("save "); data += "\"" + name.toUtf8().replace("\\", "\\\\").replace("\"", "\\\"") + "\""; sendCommand(data); MPDError *mpdError = commandResult(); if(mpdError->isError()) { if(mpdError->errorString().endsWith("Playlist already exists\n")) { QMessageBox::warning(NULL, "Warning", "Playlist couldn't be saved since there already exists a playlist with the same name."); } } delete mpdError; disconnectFromMPD(); }