you can put the IsRunning() check in CPeripheralCecAdapter::ToggleDevice instead and keep IsRunning private