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 OHOS_IDMS_INTERACTIVE_ADAPTER_H 17 #define OHOS_IDMS_INTERACTIVE_ADAPTER_H 18 19 #include <string> 20 21 #include "caller_info.h" 22 #include "dm_device_info.h" 23 #include "message_parcel.h" 24 #include "want.h" 25 26 namespace OHOS { 27 namespace DistributedSchedule { 28 typedef struct { 29 int32_t (*StartRemoteAbilityAdapter)(const OHOS::AAFwk::Want& want, int32_t callerUid, int32_t requestCode, 30 uint32_t accessToken); 31 int32_t (*StartAbilityFromRemoteAdapter)(MessageParcel& data, MessageParcel& reply); 32 33 int32_t (*StopAbilityFromRemoteAdapter)(MessageParcel& data, MessageParcel& reply); 34 35 int32_t (*ConnectRemoteAbilityAdapter)(const OHOS::AAFwk::Want& want, const sptr<IRemoteObject>& connect, 36 int32_t callerUid, int32_t callerPid, uint32_t accessToken); 37 int32_t (*ConnectAbilityFromRemoteAdapter)(MessageParcel& data, MessageParcel& reply); 38 39 int32_t (*DisconnectRemoteAbilityAdapter)(const sptr<IRemoteObject>& connect, int32_t callerUid, 40 uint32_t accessToken); 41 int32_t (*DisconnectAbilityFromRemoteAdapter)(MessageParcel& data, MessageParcel& reply); 42 43 int32_t (*NotifyAbilityLifecycleChangedFromRemoteAdapter)(MessageParcel& data, MessageParcel& reply); 44 45 void (*OnDeviceOnlineEx)(const OHOS::DistributedHardware::DmDeviceInfo& deviceInfo); 46 void (*OnDeviceOfflineEx)(const OHOS::DistributedHardware::DmDeviceInfo& deviceInfo); 47 void (*OnDeviceInfoChangedEx)(const OHOS::DistributedHardware::DmDeviceInfo& deviceInfo); 48 } IDmsInteractiveAdapter; 49 } // namespace DistributedSchedule 50 } // namespace OHOS 51 #endif // OHOS_IDMS_INTERACTIVE_ADAPTER_H 52