1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef TELEPHONY_CALLBACK_EVENT_ID_H
17 #define TELEPHONY_CALLBACK_EVENT_ID_H
18 
19 namespace OHOS {
20 namespace Telephony {
21 enum class TelephonyCallbackEventId : uint32_t {
22     EVENT_REMOVE_ONCE = 0,
23     EVENT_ON_CALL_STATE_UPDATE = 1,
24     EVENT_ON_SIGNAL_INFO_UPDATE = 2,
25     EVENT_ON_NETWORK_STATE_UPDATE = 3,
26     EVENT_ON_SIM_STATE_UPDATE = 4,
27     EVENT_ON_CELL_INFOMATION_UPDATE = 5,
28     EVENT_ON_CELLULAR_DATA_CONNECTION_UPDATE = 6,
29     EVENT_ON_CELLULAR_DATA_FLOW_UPDATE = 7,
30     EVENT_ON_CFU_INDICATOR_UPDATE = 8,
31     EVENT_ON_VOICE_MAIL_MSG_INDICATOR_UPDATE = 9,
32     EVENT_ON_ICC_ACCOUNT_UPDATE = 10,
33 };
34 
35 template<typename EnumClass>
36 auto ToUint32t(EnumClass const value) -> typename std::underlying_type<EnumClass>::type
37 {
38     return static_cast<typename std::underlying_type<EnumClass>::type>(value);
39 }
40 } // namespace Telephony
41 } // namespace OHOS
42 #endif // TELEPHONY_CALLBACK_EVENT_ID_H