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 OHOS_DISTRIBUTED_ABILITY_MANAGER_INTERFACE_H
17 #define OHOS_DISTRIBUTED_ABILITY_MANAGER_INTERFACE_H
18 
19 #include "continuation_extra_params.h"
20 #include "continuation_result.h"
21 #include "dtbabilitymgr_ipc_interface_code.h"
22 #include "device_connect_status.h"
23 #include "iremote_broker.h"
24 
25 namespace OHOS {
26 namespace DistributedSchedule {
27 namespace {
28 constexpr int32_t VALUE_NULL = -1; // no object in parcel
29 constexpr int32_t VALUE_OBJECT = 1; // object exist in parcel
30 }
31 class IDistributedAbilityManager : public OHOS::IRemoteBroker {
32 public:
33     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.DistributedSchedule.IDistributedAbilityManager");
34 
35     virtual int32_t Register(
36         const std::shared_ptr<ContinuationExtraParams>& continuationExtraParams, int32_t& token) = 0;
37     virtual int32_t Unregister(int32_t token) = 0;
38     virtual int32_t RegisterDeviceSelectionCallback(
39         int32_t token, const std::string& cbType, const sptr<IRemoteObject>& notifier) = 0;
40     virtual int32_t UnregisterDeviceSelectionCallback(int32_t token, const std::string& cbType) = 0;
41     virtual int32_t UpdateConnectStatus(int32_t token, const std::string& deviceId,
42         const DeviceConnectStatus& deviceConnectStatus) = 0;
43     virtual int32_t StartDeviceManager(
44         int32_t token, const std::shared_ptr<ContinuationExtraParams>& continuationExtraParams = nullptr) = 0;
45 };
46 } // namespace DistributedSchedule
47 } // namespace OHOS
48 #endif // OHOS_DISTRIBUTED_ABILITY_MANAGER_INTERFACE_H