Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / android / android_api / base / src / main / java / org / iotivity / base / ResourceProperty.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  * Resource Properties.
27  */
28 public enum ResourceProperty {
29     /**
30      * When none of the bits are set, the resource is non-discoverable &
31      * non-observable by the client.
32      */
33     RES_PROP_NONE(0),
34     /**
35      * When this bit is set, the resource is allowed to be discovered by clients.
36      */
37     DISCOVERABLE(1 << 0),
38     /**
39      * When this bit is set, the resource is allowed to be observed by clients.
40      */
41     OBSERVABLE(1 << 1),
42     /**
43      * When this bit is set, the resource is initialized, otherwise the resource
44      * is 'inactive'. 'inactive' signifies that the resource has been marked for
45      * deletion or is already deleted.
46      */
47     ACTIVE(1 << 2),
48     /**
49      * When this bit is set, the resource has been marked as 'slow'.
50      * 'slow' signifies that responses from this resource can expect delays in
51      * processing its requests from clients.
52      */
53     SLOW(1 << 3),
54     /**
55      * When this bit is set, the resource is a secure resource.
56      */
57     SECURE(1 << 4),
58     /**
59      * When this bit is set, the resource is allowed to be discovered only
60      * if discovery request contains an explicit querystring.
61      * Ex: GET /oic/res?rt=oic.sec.acl
62      */
63     EXPLICIT_DISCOVERABLE(1 << 5),;
64
65     private int value;
66
67     private ResourceProperty(int value) {
68         this.value = value;
69     }
70
71     public int getValue() {
72         return this.value;
73     }
74 }