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_SERVICE_PROFILE_H
17 #define OHOS_DP_SERVICE_PROFILE_H
18 
19 #include <cstdint>
20 #include <string>
21 #include "dp_parcel.h"
22 
23 namespace OHOS {
24 namespace DistributedDeviceProfile {
25 class ServiceProfile : public DpParcel {
26 public:
27     ServiceProfile(const std::string& deviceId, const std::string& serviceName, const std::string& serviceType);
28     ServiceProfile();
29     ~ServiceProfile();
30 
31     std::string GetDeviceId() const;
32     void SetDeviceId(const std::string& deviceId);
33     std::string GetServiceName() const;
34     void SetServiceName(const std::string& serviceName);
35     std::string GetServiceType() const;
36     void SetServiceType(const std::string& serviceType);
37     bool Marshalling(MessageParcel& parcel) const override;
38     bool UnMarshalling(MessageParcel& parcel) override;
39     bool operator!=(const ServiceProfile& serviceProfile) const;
40     std::string dump() const override;
41 
42 private:
43     std::string deviceId_ = "";
44     std::string serviceName_ = "";
45     std::string serviceType_ = "";
46 };
47 } // namespace DistributedDeviceProfile
48 } // namespace OHOS
49 #endif //OHOS_DP_SERVICE_PROFILE_H
50