Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / android / android_api / base / jni / JniOcResourceRequest.h
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 #include "JniOcStack.h"
23
24 #ifndef _Included_org_iotivity_base_OcResourceRequest
25 #define _Included_org_iotivity_base_OcResourceRequest
26
27 using namespace OC;
28
29 class JniOcResourceRequest
30 {
31 public:
32     JniOcResourceRequest(const std::shared_ptr<OCResourceRequest> resourceRequest);
33
34     ~JniOcResourceRequest();
35
36     std::string getRequestType();
37
38     const QueryParamsMap& getQueryParameters() const;
39
40     int getRequestHandlerFlag() const;
41
42     const OCRepresentation& getResourceRepresentation() const;
43
44     const ObservationInfo& getObservationInfo() const;
45
46     void setResourceUri(const std::string resourceUri);
47
48     std::string getResourceUri(void);
49
50     const HeaderOptions& getHeaderOptions() const;
51
52     const OCRequestHandle& getRequestHandle() const;
53
54     const OCResourceHandle& getResourceHandle() const;
55
56     static JniOcResourceRequest* getJniOcResourceRequestPtr
57         (JNIEnv *env, jobject thiz);
58
59 private:
60     std::shared_ptr<OCResourceRequest> m_request;
61 };
62
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66
67     /*
68     * Class:     org_iotivity_base_OcResourceRequest
69     * Method:    getRequestTypeNative
70     * Signature: ()Ljava/lang/String;
71     */
72     JNIEXPORT jstring JNICALL Java_org_iotivity_base_OcResourceRequest_getRequestTypeNative
73         (JNIEnv *, jobject);
74
75     /*
76     * Class:     org_iotivity_base_OcResourceRequest
77     * Method:    getQueryParameters
78     * Signature: ()Ljava/util/Map;
79     */
80     JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcResourceRequest_getQueryParameters
81         (JNIEnv *, jobject);
82
83     /*
84     * Class:     org_iotivity_base_OcResourceRequest
85     * Method:    getRequestHandlerFlagNative
86     * Signature: ()I
87     */
88     JNIEXPORT jint JNICALL Java_org_iotivity_base_OcResourceRequest_getRequestHandlerFlagNative
89         (JNIEnv *, jobject);
90
91     /*
92     * Class:     org_iotivity_base_OcResourceRequest
93     * Method:    getResourceRepresentation
94     * Signature: ()Lorg/iotivity/base/OcRepresentation;
95     */
96     JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcResourceRequest_getResourceRepresentation
97         (JNIEnv *, jobject);
98
99     /*
100     * Class:     org_iotivity_base_OcResourceRequest
101     * Method:    getObservationInfo
102     * Signature: ()Lorg/iotivity/base/ObservationInfo;
103     */
104     JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcResourceRequest_getObservationInfo
105         (JNIEnv *, jobject);
106
107     /*
108     * Class:     org_iotivity_base_OcResourceRequest
109     * Method:    setResourceUri
110     * Signature: (Ljava/lang/String;)V
111     */
112     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceRequest_setResourceUri
113         (JNIEnv *, jobject, jstring);
114
115     /*
116     * Class:     org_iotivity_base_OcResourceRequest
117     * Method:    getResourceUri
118     * Signature: ()Ljava/lang/String;
119     */
120     JNIEXPORT jstring JNICALL Java_org_iotivity_base_OcResourceRequest_getResourceUri
121         (JNIEnv *, jobject);
122
123     /*
124     * Class:     org_iotivity_base_OcResourceRequest
125     * Method:    getHeaderOptions
126     * Signature: ()Ljava/util/List;
127     */
128     JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcResourceRequest_getHeaderOptions
129         (JNIEnv *, jobject);
130
131     /*
132     * Class:     org_iotivity_base_OcResourceRequest
133     * Method:    getRequestHandle
134     * Signature: ()Lorg/iotivity/base/OcRequestHandle;
135     */
136     JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcResourceRequest_getRequestHandle
137         (JNIEnv *, jobject);
138
139     /*
140     * Class:     org_iotivity_base_OcResourceRequest
141     * Method:    getResourceHandle
142     * Signature: ()Lorg/iotivity/base/OcResourceHandle;
143     */
144     JNIEXPORT jobject JNICALL Java_org_iotivity_base_OcResourceRequest_getResourceHandle
145         (JNIEnv *, jobject);
146
147     /*
148     * Class:     org_iotivity_base_OcResourceRequest
149     * Method:    dispose
150     * Signature: ()V
151     */
152     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceRequest_dispose
153         (JNIEnv *, jobject);
154
155 #ifdef __cplusplus
156 }
157 #endif
158 #endif