pzapit: add -lockrc/-unlockrc options; port from martii

I've pulled it from Duckbox-Developers/neutrino-mp-cst-next
and modified it to work


Origin commit data
------------------
Commit: 0330515abc
Author: GetAway <get-away@t-online.de>
Date: 2016-12-11 (Sun, 11 Dec 2016)
This commit is contained in:
GetAway
2016-12-11 16:53:32 +01:00
committed by vanhofen
parent 0086404fb3
commit f199989c9a
9 changed files with 79 additions and 11 deletions

View File

@@ -611,6 +611,19 @@ void CZapitClient::getVolume(unsigned int *left, unsigned int *right)
close_connection();
}
void CZapitClient::lockRc(const bool b)
{
CZapitMessages::commandBoolean msg;
//VALGRIND_PARANOIA;
msg.truefalse = b;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mutex);
send(CZapitMessages::CMD_LOCKRC, (char*)&msg, sizeof(msg));
close_connection();
}
#if 0
//never used
delivery_system_t CZapitClient::getDeliverySystem(void)