• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 #include "tel_cellular_data_ffi.h"
17 #include "tel_cellular_data_impl.h"
18 
19 using namespace OHOS::FFI;
20 
21 namespace OHOS {
22 namespace Telephony {
23 extern "C" {
24 
FfiCellularDataGetDefaultCellularDataSlotId()25     int32_t FfiCellularDataGetDefaultCellularDataSlotId()
26     {
27         return CellularDataImpl::GetDefaultCellularDataSlotId();
28     }
29 
FfiCellularDataGetCellularDataFlowType(int32_t * errCode)30     int32_t FfiCellularDataGetCellularDataFlowType(int32_t *errCode)
31     {
32         return CellularDataImpl::GetCellularDataFlowType(*errCode);
33     }
34 
FfiCellularDataGetCellularDataState(int32_t * errCode)35     int32_t FfiCellularDataGetCellularDataState(int32_t *errCode)
36     {
37         return CellularDataImpl::GetCellularDataState(*errCode);
38     }
39 
FfiCellularDataIsCellularDataEnabled(int32_t * errCode)40     bool FfiCellularDataIsCellularDataEnabled(int32_t *errCode)
41     {
42         return CellularDataImpl::IsCellularDataEnabled(*errCode);
43     }
44 
FfiCellularDataIsCellularDataRoamingEnabled(int32_t slotId,int32_t * errCode)45     bool FfiCellularDataIsCellularDataRoamingEnabled(int32_t slotId, int32_t *errCode)
46     {
47         return CellularDataImpl::IsCellularDataRoamingEnabled(slotId, *errCode);
48     }
49 
FfiCellularDataGetDefaultCellularDataSimId()50     int32_t FfiCellularDataGetDefaultCellularDataSimId()
51     {
52         return CellularDataImpl::GetDefaultCellularDataSimId();
53     }
54 }
55 }  // namespace Telephony
56 }  // namespace OHOS
57