• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021-2022 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 CALL_SUPERPRIVACY_CONTROL_MANAGER_H
17 #define CALL_SUPERPRIVACY_CONTROL_MANAGER_H
18 
19 #include "singleton.h"
20 
21 
22 /**
23  * @ClassName: CallSuperPrivacyControlManager
24  * @Description: check super privacy mode in CallSuperPrivacyControlManager
25  */
26 namespace OHOS {
27 namespace Telephony {
28 class CallSuperPrivacyControlManager {
29 public:
30     static const int SUPER_PRIVACY_MODE_REQUEST_SUCCESS = 0;
31     bool GetIsChangeSuperPrivacyMode();
32     void SetIsChangeSuperPrivacyMode(bool isChangeSuperPrivacyMode);
33     int32_t GetOldSuperPrivacyMode();
34     void SetOldSuperPrivacyMode();
35     int32_t CloseSuperPrivacyMode();
36     void CloseCallSuperPrivacyMode(std::u16string &number, int32_t &accountId,
37 	int32_t &videoState, int32_t &dialType, int32_t &dialScene, int32_t &callType);
38     void CloseAnswerSuperPrivacyMode(int32_t callId, int32_t videoState);
39     void RestoreSuperPrivacyMode();
40     bool GetCurrentIsSuperPrivacyMode();
41     void RegisterSuperPrivacyMode();
42     void CloseAllCall();
43 
44 private:
45     bool isChangeSuperPrivacyMode = false;
46     int32_t oldSuperPrivacyMode = -1;
47     static void ParamChangeCallback(const char *key, const char *value, void *context);
48     static void SuperPrivacyModeChangeEvent();
49 };
50 } // namespace Telephony
51 } // namespace OHOS
52 
53 #endif // CALL_POLICY_H
54