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