X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fadapter%2FPulse-Eight%2FUSBCECAdapterMessageQueue.h;h=7e01436372250ec30ae63c7911f87343e6bdc82b;hb=95587b956c69ead0b46d301f5ca70e977890c3fd;hp=b81c908fafb6bf2b4ed5a7ba84df0b1b90441ffb;hpb=8b0462ea5e37459446a493c124e4c2d7a9e6b108;p=deb_libcec.git diff --git a/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h b/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h index b81c908..7e01436 100644 --- a/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h +++ b/src/lib/adapter/Pulse-Eight/USBCECAdapterMessageQueue.h @@ -33,6 +33,7 @@ #include "lib/platform/threads/threads.h" #include "lib/platform/util/buffer.h" +#include "lib/platform/util/timeutils.h" #include #include "USBCECAdapterMessage.h" @@ -118,6 +119,11 @@ namespace CEC bool ProvidesExtendedResponse(void); + /*! + * @return True when a fire and forget packet timed out or succeeded, false otherwise + */ + bool TimedOutOrSucceeded(void) const; + CCECAdapterMessageQueue * m_queue; CCECAdapterMessage * m_message; /**< the message that was sent */ uint8_t m_iPacketsLeft; /**< the amount of acks that we're waiting on */ @@ -125,6 +131,7 @@ namespace CEC bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */ PLATFORM::CCondition m_condition; /**< the condition to wait on */ PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */ + PLATFORM::CTimeout m_queueTimeout; /**< ack timeout for fire and forget commands */ }; class CCECAdapterMessageQueue : public PLATFORM::CThread @@ -170,6 +177,8 @@ namespace CEC virtual void *Process(void); + void CheckTimedOutMessages(void); + private: CUSBCECAdapterCommunication * m_com; /**< the communication handler */ PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */