• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-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_CONTEXT_H
17 #define I_CONTEXT_H
18 
19 #include "i_delegate_tasks.h"
20 #include "i_device_manager.h"
21 #include "i_drag_manager.h"
22 #ifdef OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
23 #include "i_dinput_adapter.h"
24 #include "i_input_adapter.h"
25 #include "i_socket_session_manager.h"
26 #include "i_plugin_manager.h"
27 #endif // OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
28 #include "i_timer_manager.h"
29 
30 namespace OHOS {
31 namespace Msdp {
32 namespace DeviceStatus {
33 struct MouseLocation {
34     int32_t physicalX { 0 };
35     int32_t physicalY { 0 };
36 };
37 
38 class IContext {
39 public:
40     IContext() = default;
41     virtual ~IContext() = default;
42 
43     virtual IDelegateTasks& GetDelegateTasks() = 0;
44     virtual IDeviceManager& GetDeviceManager() = 0;
45     virtual ITimerManager& GetTimerManager() = 0;
46     virtual IDragManager& GetDragManager() = 0;
47 
48 #ifdef OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
49     virtual ISocketSessionManager& GetSocketSessionManager() = 0;
50     virtual IPluginManager& GetPluginManager() = 0;
51     virtual IInputAdapter& GetInput() = 0;
52     virtual IDInputAdapter& GetDInput() = 0;
53 #endif // OHOS_BUILD_ENABLE_INTENTION_FRAMEWORK
54 };
55 } // namespace DeviceStatus
56 } // namespace Msdp
57 } // namespace OHOS
58 #endif // I_CONTEXT_H