2 * ***************************************************************
\r
4 * Copyright 2015 Samsung Electronics All Rights Reserved.
\r
8 * Licensed under the Apache License, Version 2.0 (the "License");
\r
9 * you may not use this file except in compliance with the License.
\r
10 * You may obtain a copy of the License at
\r
12 * http://www.apache.org/licenses/LICENSE-2.0
\r
14 * Unless required by applicable law or agreed to in writing, software
\r
15 * distributed under the License is distributed on an "AS IS" BASIS,
\r
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
17 * See the License for the specific language governing permissions and
\r
18 * limitations under the License.
\r
20 * ****************************************************************
\r
23 package org.iotivity.service.easysetup.mediator;
\r
25 public class IpOnBoardingConnection implements OnBoardingConnection {
\r
27 private boolean mIsConnected;
\r
29 private String mHardwareAddress;
\r
30 private String mDeviceName;
\r
34 * After creating the Soft AP at Mediator & on-boarding the-
\r
35 * -Enrollee device on it provisioning needs to be delayed by at least 2000 ms for Android Mediator
\r
37 private int mThrottlingDelay = 2000 ;
\r
39 int getThrottlingDelay() {
\r
40 return mThrottlingDelay;
\r
43 IpOnBoardingConnection(boolean enrolleeOnboarded) {
\r
44 mThrottlingDelay = 0;
\r
46 mIsConnected = enrolleeOnboarded; // Always true for this constructor
\r
49 IpOnBoardingConnection(){}
\r
51 public void setHardwareAddress(String address) {
\r
52 mHardwareAddress = address;
\r
55 public String getHardwareAddress() {
\r
56 return mHardwareAddress;
\r
59 public void setDeviceName(String name) {
\r
63 public String getDeviceName() {
\r
67 public void setConnectivity(boolean connected) {
\r
68 mIsConnected = connected;
\r
71 public void setIp(String ip) {
\r
75 public String getIp() {
\r
80 public String getDesc() {
\r
81 return "Description";
\r
85 public boolean isConnected() {
\r
86 return mIsConnected;
\r
90 public Object getConnection() {
\r