1 /*
2  * Copyright (c) 2021-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_I_DISTRIBUTED_DEVICE_PROFILE_H
17 #define OHOS_I_DISTRIBUTED_DEVICE_PROFILE_H
18 
19 #include <list>
20 
21 #include "iremote_broker.h"
22 #include "service_characteristic_profile.h"
23 #include "iprofile_event_notifier.h"
24 #include "profile_event.h"
25 #include "subscribe_info.h"
26 #include "sync_options.h"
27 
28 namespace OHOS {
29 namespace DeviceProfile {
30 class IDistributedDeviceProfile : public IRemoteBroker {
31 public:
32     virtual int32_t PutDeviceProfile(const ServiceCharacteristicProfile& profile) = 0;
33     virtual int32_t GetDeviceProfile(const std::string& udid, const std::string& serviceId,
34         ServiceCharacteristicProfile& profile) = 0;
35     virtual int32_t DeleteDeviceProfile(const std::string& serviceId) = 0;
36     virtual int32_t SubscribeProfileEvents(const std::list<SubscribeInfo>& subscribeInfos,
37         const sptr<IRemoteObject>& profileEventNotifier,
38         std::list<ProfileEvent>& failedEvents) = 0;
39     virtual int32_t UnsubscribeProfileEvents(const std::list<ProfileEvent>& profileEvents,
40         const sptr<IRemoteObject>& profileEventNotifier,
41         std::list<ProfileEvent>& failedEvents) = 0;
42     virtual int32_t SyncDeviceProfile(const SyncOptions& syncOptions,
43         const sptr<IRemoteObject>& profileEventNotifier) = 0;
44 
45     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.DeviceProfile.IDistributedDeviceProfile");
46 };
47 } // namespace DeviceProfile
48 } // namespace OHOS
49 #endif // OHOS_I_DISTRIBUTED_DEVICE_PROFILE_H