30 #ifndef HDMI_CCEC_OSAL_STOPPABLE_HPP_
31 #define HDMI_CCEC_OSAL_STOPPABLE_HPP_
35 CCEC_OSAL_BEGIN_NAMESPACE
44 Stoppable(
int state = RUNNING) : state(state) {}
46 virtual void stop(
bool block =
false) = 0;
47 virtual bool isStopped(
void) {
48 return state == STOPPED;
52 virtual void runStarted(
void) {
55 virtual void stopStarted(
void) {
56 if (state == RUNNING) state = STOPPING;
58 virtual bool isStopping(
void) {
59 return ((state == STOPPING) || (state == STOPPED));
61 virtual bool isRunning(
void) {
62 return state == RUNNING;
64 virtual void stopCompleted(
void) {
72 CCEC_OSAL_END_NAMESPACE