2 * ***************************************************************
4 * Copyright 2016 Samsung Electronics All Rights Reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * ****************************************************************
21 package org.iotivity.service.easysetup.mediator.enums;
24 * It defines various states of the cloud provisioning during easy setup process
26 public enum ProvStatus {
29 * Default state of the device
34 * Status indicating being connecting to target network
36 ES_STATE_CONNECTING_TO_ENROLLER(1),
39 * Status indicating successful connection to target network
41 ES_STATE_CONNECTED_TO_ENROLLER(2),
44 * Status indicating failure connection to target network
46 ES_STATE_CONNECTED_FAIL_TO_ENROLLER(3),
49 * Status indicating successful registration to cloud
51 ES_STATE_REGISTERED_TO_CLOUD(4),
54 * Status indicating failure registration to cloud
56 ES_STATE_REGISTRRED_FAIL_TO_CLOUD(5);
60 private ProvStatus(int value) {
64 public int getValue() {
68 public static ProvStatus fromInt(int i) {
69 for (ProvStatus b : ProvStatus.values()) {
70 if (b.getValue() == i) { return b; }