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 NETWORK_SEARCH_CALLBACK_BASE_H
17 #define NETWORK_SEARCH_CALLBACK_BASE_H
18 
19 #include <string>
20 
21 #include "refbase.h"
22 
23 namespace OHOS {
24 namespace Telephony {
25 class NetworkSearchCallBackBase : public virtual RefBase {
26 public:
27     virtual ~NetworkSearchCallBackBase() = default;
28 
29     /**
30      * @brief Whether cellular data has internet capability.
31      *
32      * @param slotId[in], sim slot id
33      * @param cid[in], Context identification
34      * @return Return true if has, false if hasn't.
35      */
HasInternetCapability(int32_t slotId,int32_t cId)36     virtual bool HasInternetCapability(int32_t slotId, int32_t cId)
37     {
38         return false;
39     }
40     /**
41      * @brief Clear cellular data connections.
42      *
43      * @param slotId[in], sim slot id
44      */
ClearCellularDataConnections(int32_t slotId)45     virtual void ClearCellularDataConnections(int32_t slotId) {}
46     /**
47      * @brief Clear the call corresponding to slotId
48      *
49      * @param slotId[in], sim slot id
50      */
ClearCellularCallList(int32_t slotId)51     virtual void ClearCellularCallList(int32_t slotId) {}
52     /**
53      * @brief Set whether the device can make calls
54      * @param slotId[in], sim slot id
55      * @param callType[in], indicate the call type is cs or ims. 0 is cs, 1 is ims
56      * @param isReadyToCall[in], indicate whether the device can make calls
57      */
SetReadyToCall(int32_t slotId,int32_t callType,bool isReadyToCall)58     virtual void SetReadyToCall(int32_t slotId, int32_t callType, bool isReadyToCall) {}
59 };
60 } // namespace Telephony
61 } // namespace OHOS
62 #endif // NET_SUPPLIER_CALLBACK_BASE_H