1 /*
2  * Copyright (C) 2023 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 I_VOIP_CALL_MANAGER_CALLBACK_H
17 #define I_VOIP_CALL_MANAGER_CALLBACK_H
18 
19 #include "iremote_broker.h"
20 #include "pac_map.h"
21 #include "voip_call_manager_info.h"
22 
23 namespace OHOS {
24 namespace Telephony {
25 class IVoipCallManagerCallback : public IRemoteBroker {
26 public:
IVoipCallManagerCallback()27     IVoipCallManagerCallback() : bundleName_("") {}
28     virtual ~IVoipCallManagerCallback() = default;
29 
30     enum {
31             INTERFACE_REPORT_VOIP_CALL_EVENT_CHANGE = 0,
32         };
33 
34     virtual int32_t OnVoipCallEventChange(const VoipCallEventInfo &event) = 0;
35 
SetBundleName(const std::string & name)36     void SetBundleName(const std::string &name)
37     {
38         bundleName_ = name;
39     }
40 
GetBundleName()41     std::string GetBundleName()
42     {
43         return bundleName_;
44     }
45 
SetUid(int32_t uid)46     void SetUid(int32_t uid)
47     {
48         uid_ = uid;
49     }
50 
GetUid()51     int32_t GetUid()
52     {
53         return uid_;
54     }
55 
56 public:
57     std::string bundleName_ = "";
58     int32_t uid_ = 0;
59     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.IVoipCallManagerCallback");
60 };
61 } // namespace Telephony
62 } // namespace OHOS
63 
64 #endif
65