1 /*
2  * Copyright (c) 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_DP_ISUBSCRIBE_PROFILE_LISTENER_H
17 #define OHOS_DP_ISUBSCRIBE_PROFILE_LISTENER_H
18 
19 #include "trust_device_profile.h"
20 #include "device_profile.h"
21 #include "service_profile.h"
22 #include "characteristic_profile.h"
23 #include "iremote_broker.h"
24 
25 namespace OHOS {
26 namespace DistributedDeviceProfile {
27 class IProfileChangeListener : public IRemoteBroker {
28 public:
29     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.DeviceProfile.IProfileListener");
30     IProfileChangeListener() = default;
31     virtual ~IProfileChangeListener() = default;
32     virtual int32_t OnTrustDeviceProfileAdd(const TrustDeviceProfile& profile) = 0;
33     virtual int32_t OnTrustDeviceProfileDelete(const TrustDeviceProfile& profile) = 0;
34     virtual int32_t OnTrustDeviceProfileUpdate(const TrustDeviceProfile& oldProfile,
35         const TrustDeviceProfile& newProfile) = 0;
36     virtual int32_t OnDeviceProfileAdd(const DeviceProfile& profile) = 0;
37     virtual int32_t OnDeviceProfileDelete(const DeviceProfile& profile) = 0;
38     virtual int32_t OnDeviceProfileUpdate(const DeviceProfile& oldProfile, const DeviceProfile& newProfile) = 0;
39     virtual int32_t OnServiceProfileAdd(const ServiceProfile& profile) = 0;
40     virtual int32_t OnServiceProfileDelete(const ServiceProfile& profile) = 0;
41     virtual int32_t OnServiceProfileUpdate(const ServiceProfile& oldProfile, const ServiceProfile& newProfile) = 0;
42     virtual int32_t OnCharacteristicProfileAdd(const CharacteristicProfile& profile) = 0;
43     virtual int32_t OnCharacteristicProfileDelete(const CharacteristicProfile& profile) = 0;
44     virtual int32_t OnCharacteristicProfileUpdate(const CharacteristicProfile& oldProfile,
45         const CharacteristicProfile& newProfile) = 0;
46 };
47 } // namespace DistributedDeviceProfile
48 } // namespace OHOS
49 #endif // OHOS_DP_ISUBSCRIBE_PROFILE_LISTENER_H
50