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_COORDINATION_H 17 #define I_COORDINATION_H 18 19 #include <functional> 20 #include <memory> 21 #include <vector> 22 23 #include "i_context.h" 24 #include "key_event.h" 25 #include "stream_session.h" 26 27 namespace OHOS { 28 namespace Msdp { 29 namespace DeviceStatus { 30 class ICoordination { 31 public: 32 virtual void PrepareCoordination() = 0; 33 virtual void UnprepareCoordination() = 0; 34 virtual int32_t ActivateCoordination(SessionPtr sess, int32_t userData, 35 const std::string &remoteNetworkId, int32_t startDeviceId) = 0; 36 virtual int32_t DeactivateCoordination(SessionPtr sess, int32_t userData, bool isUnchained) = 0; 37 virtual int32_t GetCoordinationState(SessionPtr sess, int32_t userData, const std::string &deviceId) = 0; 38 virtual int32_t RegisterCoordinationListener(SessionPtr sess) = 0; 39 virtual int32_t UnregisterCoordinationListener(SessionPtr sess) = 0; 40 virtual void Dump(int32_t fd) = 0; 41 }; 42 43 extern "C" ICoordination* CreateICoordination(IContext *context); 44 } // namespace DeviceStatus 45 } // namespace Msdp 46 } // namespace OHOS 47 #endif // I_COORDINATION_H