1 /* 2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef POWER_STATE_TOKEN_IF_H 10 #define POWER_STATE_TOKEN_IF_H 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif /* __cplusplus */ 15 16 typedef enum { 17 PSM_STATE_IDLE, /* Idle state */ 18 PSM_STATE_ACTIVE, /* Activated state */ 19 PSM_STATE_INACTIVE, /* Error state */ 20 } HdfPsmState; 21 22 struct IPowerStateToken { 23 void (*AcquireWakeLock)(struct IPowerStateToken *); 24 void (*ReleaseWakeLock)(struct IPowerStateToken *); 25 }; 26 27 #ifdef __cplusplus 28 } 29 #endif /* __cplusplus */ 30 31 #endif /* POWER_STATE_TOKEN_IF_H */