- CWaitForResponse(void) {}
- ~CWaitForResponse(void)
- {
- Clear();
- }
-
- void Clear()
- {
- PLATFORM::CLockObject lock(m_mutex);
- for (std::map<cec_opcode, CResponse*>::iterator it = m_waitingFor.begin(); it != m_waitingFor.end(); it++)
- it->second->Broadcast();
- m_waitingFor.clear();
- }
-
- bool Wait(cec_opcode opcode, uint32_t iTimeout = CEC_DEFAULT_TRANSMIT_WAIT)
- {
- CResponse *response = GetEvent(opcode);
- return response ? response->Wait(iTimeout) : false;
- }
-
- void Received(cec_opcode opcode)
- {
- CResponse *response = GetEvent(opcode);
- if (response)
- response->Broadcast();
- }
+ CWaitForResponse(void);
+ ~CWaitForResponse(void);
+
+ void Clear();
+ bool Wait(cec_opcode opcode, uint32_t iTimeout = CEC_DEFAULT_TRANSMIT_WAIT);
+ void Received(cec_opcode opcode);