• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 CARRIER_CALL_H
17 #define CARRIER_CALL_H
18 
19 #include "call_base.h"
20 #include "cellular_call_connection.h"
21 
22 namespace OHOS {
23 namespace Telephony {
24 class CarrierCall : public CallBase {
25 public:
26     explicit CarrierCall(DialParaInfo &info);
27     CarrierCall(DialParaInfo &info, AppExecFwk::PacMap &extras);
28     ~CarrierCall();
29     int32_t CarrierDialingProcess();
30     int32_t CarrierAnswerCall(int32_t videoState);
31     int32_t CarrierRejectCall();
32     int32_t CarrierHangUpCall();
33     int32_t CarrierHoldCall();
34     int32_t CarrierUnHoldCall();
35     int32_t CarrierSetMute(int32_t mute, int32_t slotId);
36     void GetCallAttributeCarrierInfo(CallAttributeInfo &info);
37     bool GetEmergencyState() override;
38     int32_t CarrierSwitchCall();
39     int32_t StartDtmf(char str) override;
40     int32_t StopDtmf() override;
41     int32_t PostDialProceed(bool proceed) override;
42     int32_t GetSlotId() override;
43     int32_t CarrierCombineConference();
44     int32_t CarrierSeparateConference();
45     int32_t CarrierKickOutFromConference();
46     int32_t IsSupportConferenceable() override;
47     void SetSlotId(int32_t slotId) override;
48     void SetCallIndex(int32_t index) override;
49     int32_t GetCallIndex() override;
50 
51 protected:
52     int32_t PackCellularCallInfo(CellularCallInfo &callInfo);
53 
54 private:
55     DialScene dialScene_;
56     int32_t slotId_;
57     int32_t index_;
58     bool isEcc_;
59     std::mutex mutex_;
60     std::shared_ptr<CellularCallConnection> cellularCallConnectionPtr_;
61 };
62 } // namespace Telephony
63 } // namespace OHOS
64 
65 #endif // CARRIER_CALL_H
66