added code to close the netlink socket.
[contrib/iotivity.git] / android / android_api / base / src / main / java / org / iotivity / base / OcPlatformInfo.java
1 /*
2  *******************************************************************
3  *
4  * Copyright 2015 Intel Corporation.
5  *
6  *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21  */
22
23 package org.iotivity.base;
24
25 /**
26  * This class describes the platform properties. All non-Null properties will be
27  * included in a platform discovery request.
28  */
29 public class OcPlatformInfo {
30     private String mPlatformId;
31     private String mManufacturerName;
32     private String mManufacturerUrl;
33     private String mModelNumber;
34     private String mDateOfManufacture;
35     private String mPlatformVersion;
36     private String mOperatingSystemVersion;
37     private String mHardwareVersion;
38     private String mFirmwareVersion;
39     private String mSupportUrl;
40     private String mSystemTime;
41
42     /**
43      * construct OcPlatformInfo with mandatory fields which cannot be null
44      * manufacturerName cannot be > 16 chars
45      * manufacturerUrl cannot be > 32 chars
46      */
47     public OcPlatformInfo(String platformId, String manufacturerName,
48                           String manufacturerUrl) {
49         this.mPlatformId = platformId;
50         this.mManufacturerName = manufacturerName;
51         this.mManufacturerUrl = manufacturerUrl;
52     }
53
54     public OcPlatformInfo(String platformId,
55                           String manufacturerName,
56                           String manufacturerUrl,
57                           String modelNumber,
58                           String dateOfManufacture,
59                           String platformVersion,
60                           String operatingSystemVersion,
61                           String hardwareVersion,
62                           String firmwareVersion,
63                           String supportUrl,
64                           String systemTime) {
65         this(platformId, manufacturerName, manufacturerUrl);
66         this.mModelNumber = modelNumber;
67         this.mDateOfManufacture = dateOfManufacture;
68         this.mPlatformVersion = platformVersion;
69         this.mOperatingSystemVersion = operatingSystemVersion;
70         this.mHardwareVersion = hardwareVersion;
71         this.mFirmwareVersion = firmwareVersion;
72         this.mSupportUrl = supportUrl;
73         this.mSystemTime = systemTime;
74     }
75
76     public String getPlatformId() {
77         return mPlatformId;
78     }
79
80     public void setPlatformId(String platformId) {
81         this.mPlatformId = platformId;
82     }
83
84     public String getManufacturerName() {
85         return mManufacturerName;
86     }
87
88     public void setManufacturerName(String manufacturerName) {
89         this.mManufacturerName = manufacturerName;
90     }
91
92     public String getManufacturerUrl() {
93         return mManufacturerUrl;
94     }
95
96     public void setManufacturerUrl(String manufacturerUrl) {
97         this.mManufacturerUrl = manufacturerUrl;
98     }
99
100     public String getModelNumber() {
101         return mModelNumber;
102     }
103
104     public void setModelNumber(String modelNumber) {
105         this.mModelNumber = modelNumber;
106     }
107
108     public String getDateOfManufacture() {
109         return mDateOfManufacture;
110     }
111
112     public void setDateOfManufacture(String dateOfManufacture) {
113         this.mDateOfManufacture = dateOfManufacture;
114     }
115
116     public String getPlatformVersion() {
117         return mPlatformVersion;
118     }
119
120     public void setPlatformVersion(String platformVersion) {
121         this.mPlatformVersion = platformVersion;
122     }
123
124     public String getOperatingSystemVersion() {
125         return mOperatingSystemVersion;
126     }
127
128     public void setOperatingSystemVersion(String operatingSystemVersion) {
129         this.mOperatingSystemVersion = operatingSystemVersion;
130     }
131
132     public String getHardwareVersion() {
133         return mHardwareVersion;
134     }
135
136     public void setHardwareVersion(String hardwareVersion) {
137         this.mHardwareVersion = hardwareVersion;
138     }
139
140     public String getFirmwareVersion() {
141         return mFirmwareVersion;
142     }
143
144     public void setFirmwareVersion(String firmwareVersion) {
145         this.mFirmwareVersion = firmwareVersion;
146     }
147
148     public String getSupportUrl() {
149         return mSupportUrl;
150     }
151
152     public void setSupportUrl(String supportUrl) {
153         this.mSupportUrl = supportUrl;
154     }
155
156     public String getSystemTime() {
157         return mSystemTime;
158     }
159
160     public void setSystemTime(String systemTime) {
161         this.mSystemTime = systemTime;
162     }
163 }