Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / service / easy-setup / sdk / mediator / android / EasySetupCore / src / main / java / org / iotivity / service / easysetup / mediator / WiFiProvConfig.java
1 /**
2  * ***************************************************************
3  * <p>
4  * Copyright 2015 Samsung Electronics All Rights Reserved.
5  * <p>
6  * <p>
7  * <p>
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  * <p>
12  * http://www.apache.org/licenses/LICENSE-2.0
13  * <p>
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  * <p>
20  * ****************************************************************
21  */
22
23 package org.iotivity.service.easysetup.mediator;
24
25 import org.iotivity.service.easysetup.mediator.ProvisioningConfig;
26
27 /**
28  * This class contains on provisioning configuration information for for target network.
29  * It implements ProvisioningConfig interface and provide configuration object specific to WiFi target network
30  */
31 public class WiFiProvConfig implements ProvisioningConfig {
32
33     private final ConnType mConnType = ProvisioningConfig.ConnType.WiFi;
34
35     private final String mSsId;
36     private final String mPassword;
37
38     public WiFiProvConfig(String ssid, String pass) {
39         mSsId = ssid;
40         mPassword = pass;
41     }
42
43     @Override
44     public Object getConfig() {
45         return this;
46     }
47
48     @Override
49     public ConnType getConnType() {
50         return mConnType;
51     }
52
53     /**
54      * This method returns the SSID of the Target WIFI network
55      * @return SSID of Target Network
56      */
57     public String getSsId() {
58         return mSsId;
59     }
60
61     /**
62      * This method returns the password of the Target WIFI network
63      * @return password of Target Network
64      */
65     public String getPassword() {
66         return mPassword;
67     }
68
69 }