1 /*
2  * Copyright (c) 2024 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 PRIVACY_WINDOW_MANAGER_AGENT_H
17 #define PRIVACY_WINDOW_MANAGER_AGENT_H
18 
19 #include "iremote_stub.h"
20 #include "nocopyable.h"
21 #include "privacy_window_manager_interface.h"
22 
23 namespace OHOS {
24 namespace Security {
25 namespace AccessToken {
26 using WindowChangeCallback = void (*)(uint32_t, bool);
27 
28 class PrivacyWindowManagerAgent : public IRemoteStub<IWindowManagerAgent> {
29 public:
30     PrivacyWindowManagerAgent(WindowChangeCallback callback);
31     ~PrivacyWindowManagerAgent() = default;
32 
33     int OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option) override;
34     void UpdateCameraFloatWindowStatus(uint32_t accessTokenId, bool isShowing) override;
35     void UpdateCameraWindowStatus(uint32_t accessTokenId, bool isShowing) override;
36 private:
37     WindowChangeCallback callback_;
38 };
39 } // namespace AccessToken
40 } // namespace Security
41 } // namespace OHOS
42 #endif // PRIVACY_WINDOW_MANAGER_AGENT_H
43 
44