• 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 #include "call_manager_callback_test.h"
17 
18 namespace OHOS {
19 namespace Telephony {
20 constexpr int16_t RETURN_SUCCESS = 0;
21 
OnCallDetailsChange(const CallAttributeInfo & info)22 int32_t CallManagerCallbackTest::OnCallDetailsChange(const CallAttributeInfo &info)
23 {
24     std::cout << "----------OnCallDetailsChange--------" << std::endl
25               << "callId:" << info.callId << std::endl
26               << "callType:" << (int32_t)info.callType << std::endl
27               << "callState:" << (int32_t)info.callState << std::endl
28               << "conferenceState:" << (int32_t)info.conferenceState << std::endl
29               << "accountNumber:" << info.accountNumber << std::endl;
30     return RETURN_SUCCESS;
31 }
32 
OnCallEventChange(const CallEventInfo & info)33 int32_t CallManagerCallbackTest::OnCallEventChange(const CallEventInfo &info)
34 {
35     std::cout << "----------OnCallEventChange--------" << std::endl
36               << "eventId:" << (int32_t)info.eventId << std::endl;
37     return RETURN_SUCCESS;
38 }
39 
OnCallDisconnectedCause(DisconnectedDetails cause)40 int32_t CallManagerCallbackTest::OnCallDisconnectedCause(DisconnectedDetails cause)
41 {
42     std::cout << "----------OnCallDisconnectedCause--------" << std::endl
43               << "cause:" << (int32_t)cause << std::endl;
44     return RETURN_SUCCESS;
45 }
46 
OnReportAsyncResults(CallResultReportId reportId,AppExecFwk::PacMap & resultInfo)47 int32_t CallManagerCallbackTest::OnReportAsyncResults(CallResultReportId reportId, AppExecFwk::PacMap &resultInfo)
48 {
49     std::cout << "----------OnReportAsyncResults--------" << std::endl
50               << "reportId:" << (int32_t)reportId << std::endl;
51     return RETURN_SUCCESS;
52 }
53 
OnOttCallRequest(OttCallRequestId requestId,AppExecFwk::PacMap & info)54 int32_t CallManagerCallbackTest::OnOttCallRequest(OttCallRequestId requestId, AppExecFwk::PacMap &info)
55 {
56     std::cout << "----------OnOttCallRequest--------" << std::endl
57               << "requestId:" << (int32_t)requestId << std::endl;
58     return RETURN_SUCCESS;
59 }
60 } // namespace Telephony
61 } // namespace OHOS
62