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 #include "i_dsoftbus_adapter.h" 23 #include "i_input_adapter.h" 24 #include "i_socket_session_manager.h" 25 #include "i_plugin_manager.h" 26 #include "i_timer_manager.h" 27 28 namespace OHOS { 29 namespace Msdp { 30 namespace DeviceStatus { 31 struct MouseLocation { 32 int32_t physicalX { 0 }; 33 int32_t physicalY { 0 }; 34 }; 35 36 class IContext { 37 public: 38 IContext() = default; 39 virtual ~IContext() = default; 40 41 virtual IDelegateTasks& GetDelegateTasks() = 0; 42 virtual IDeviceManager& GetDeviceManager() = 0; 43 virtual ITimerManager& GetTimerManager() = 0; 44 virtual IDragManager& GetDragManager() = 0; 45 46 virtual ISocketSessionManager& GetSocketSessionManager() = 0; 47 virtual IPluginManager& GetPluginManager() = 0; 48 virtual IInputAdapter& GetInput() = 0; 49 virtual IDSoftbusAdapter& GetDSoftbus() = 0; 50 }; 51 } // namespace DeviceStatus 52 } // namespace Msdp 53 } // namespace OHOS 54 #endif // I_CONTEXT_H