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 CELLULAR_DATA_EVENT_CODE_H 17 #define CELLULAR_DATA_EVENT_CODE_H 18 19 namespace OHOS { 20 namespace Telephony { 21 class CellularDataEventCode { 22 public: 23 /** 24 * The event code that drives the state transition 25 */ 26 static const int32_t BASE = 0x00040000; 27 static const int32_t MSG_SM_CONNECT = BASE + 0; 28 static const int32_t MSG_SM_DISCONNECT = BASE + 1; 29 static const int32_t MSG_SM_DISCONNECT_ALL = BASE + 2; 30 static const int32_t MSG_SM_TEAR_DOWN_NOW = BASE + 3; 31 static const int32_t MSG_SM_LOST_CONNECTION = BASE + 4; 32 static const int32_t MSG_SM_DRS_OR_RAT_CHANGED = BASE + 5; 33 static const int32_t MSG_SM_DATA_ROAM_ON = BASE + 6; 34 static const int32_t MSG_SM_DATA_ROAM_OFF = BASE + 7; 35 static const int32_t MSG_SM_BW_REFRESH_RESPONSE = BASE + 8; 36 static const int32_t MSG_SM_VOICE_CALL_STARTED = BASE + 9; 37 static const int32_t MSG_SM_VOICE_CALL_ENDED = BASE + 10; 38 static const int32_t MSG_SM_GET_LAST_FAIL_DONE = BASE + 11; 39 static const int32_t MSG_ESTABLISH_DATA_CONNECTION = BASE + 12; 40 static const int32_t MSG_ESTABLISH_DATA_CONNECTION_COMPLETE = BASE + 13; 41 static const int32_t MSG_DISCONNECT_DATA_COMPLETE = BASE + 14; 42 static const int32_t MSG_STATE_MACHINE_INIT = BASE + 15; 43 static const int32_t MSG_STATE_MACHINE_QUIT = BASE + 16; 44 static const int32_t MSG_SETTING_SWITCH = BASE + 17; 45 static const uint32_t MSG_ASYNCHRONOUS_REGISTER_EVENT_ID = BASE + 18; 46 static const uint32_t MSG_RUN_MONITOR_TASK = BASE + 19; 47 static const uint32_t MSG_STALL_DETECTION_EVENT_ID = BASE + 20; 48 static const uint32_t MSG_REQUEST_NETWORK = BASE + 21; 49 static const uint32_t MSG_APN_CHANGED = BASE + 22; 50 static const uint32_t MSG_SET_RIL_ATTACH_APN = BASE + 23; 51 static const uint32_t MSG_GET_RIL_BANDWIDTH = BASE + 24; 52 static const uint32_t MSG_SET_RIL_BANDWIDTH = BASE + 25; 53 static const uint32_t MSG_CONNECT_TIMEOUT_CHECK = BASE + 26; 54 static const uint32_t MSG_DISCONNECT_TIMEOUT_CHECK = BASE + 27; 55 static const uint32_t MSG_DB_SETTING_ENABLE_CHANGED = BASE + 28; 56 static const uint32_t MSG_DB_SETTING_ROAMING_CHANGED = BASE + 29; 57 static const uint32_t MSG_SET_DATA_PERMITTED = BASE + 30; 58 }; 59 } // namespace Telephony 60 } // namespace OHOS 61 #endif // CELLULAR_DATA_EVENT_CODE_H 62