• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 #ifndef OHOS_DISTRIBUTED_SCHED_INTERFACES_INNERKITS_DMS_NOTIFIER_H
16 #define OHOS_DISTRIBUTED_SCHED_INTERFACES_INNERKITS_DMS_NOTIFIER_H
17 
18 #include <string>
19 
20 #include "continuation_extra_params.h"
21 #include "continuation_result.h"
22 #include "iremote_object.h"
23 
24 namespace OHOS {
25 namespace DistributedSchedule {
26 class DmsNotifier : public virtual RefBase {
27 public:
28     DmsNotifier() = default;
29     virtual ~DmsNotifier() = default;
30 
31     virtual void DeviceOnlineNotify(const std::string& deviceId) = 0;
32     virtual void DeviceOfflineNotify(const std::string& deviceId) = 0;
33     virtual void ProcessNotifierDied(const sptr<IRemoteObject>& notifier) = 0;
34     virtual void ScheduleStartDeviceManager(const sptr<IRemoteObject>& appProxy, int32_t token,
35         const std::shared_ptr<ContinuationExtraParams>& continuationExtraParams = nullptr) = 0;
36     virtual int32_t OnDeviceConnect(int32_t token, const std::vector<ContinuationResult>& continuationResults) = 0;
37     virtual int32_t OnDeviceDisconnect(int32_t token, const std::vector<ContinuationResult>& continuationResults) = 0;
38     virtual int32_t OnDeviceCancel() = 0;
39 };
40 } // namespace DistributedSchedule
41 } // namespace OHOS
42 #endif // OHOS_DISTRIBUTED_SCHED_INTERFACES_INNERKITS_DMS_NOTIFIER_H