Clean up some SonarQube warnings (trailing whitespace, etc).
[platform/upstream/iotivity.git] / android / android_api / base / jni / JniOcResourceResponse.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 #include "OCResourceResponse.h"
24
25 #ifndef _Included_org_iotivity_base_OcResourceResponse
26 #define _Included_org_iotivity_base_OcResourceResponse
27
28 using namespace OC;
29
30 class JniOcResourceResponse
31 {
32 public:
33     JniOcResourceResponse(std::shared_ptr<OCResourceResponse> resourceResponse);
34     ~JniOcResourceResponse();
35     void setErrorCode(const int eCode);
36     std::string getNewResourceUri(void);
37     void setNewResourceUri(const std::string newResourceUri);
38     void setHeaderOptions(const HeaderOptions& headerOptions);
39     void setRequestHandle(const OCRequestHandle& requestHandle);
40     void setResourceHandle(const OCResourceHandle& resourceHandle);
41     void setResponseResult(const OCEntityHandlerResult& responseResult);
42     void setResourceRepresentation(OCRepresentation& rep, std::string interfaceStr);
43     void setResourceRepresentation(OCRepresentation& rep);
44     std::shared_ptr<OCResourceResponse> getOCResourceResponse();
45     static JniOcResourceResponse* getJniOcResourceResponsePtr(JNIEnv *env, jobject thiz);
46 private:
47     std::shared_ptr<OCResourceResponse> m_response;
48 };
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54     /*
55     * Class:     org_iotivity_base_OcResourceResponse
56     * Method:    setErrorCode
57     * Signature: (I)V
58     */
59     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setErrorCode
60         (JNIEnv *, jobject, jint);
61
62     /*
63     * Class:     org_iotivity_base_OcResourceResponse
64     * Method:    getNewResourceUri
65     * Signature: ()Ljava/lang/String;
66     */
67     JNIEXPORT jstring JNICALL Java_org_iotivity_base_OcResourceResponse_getNewResourceUri
68         (JNIEnv *, jobject);
69
70     /*
71     * Class:     org_iotivity_base_OcResourceResponse
72     * Method:    setNewResourceUri
73     * Signature: (Ljava/lang/String;)V
74     */
75     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setNewResourceUri
76         (JNIEnv *, jobject, jstring);
77
78     /*
79     * Class:     org_iotivity_base_OcResourceResponse
80     * Method:    setHeaderOptions
81     * Signature: (Ljava/util/List;)V
82     */
83     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setHeaderOptions
84         (JNIEnv *, jobject, jobjectArray);
85
86     /*
87     * Class:     org_iotivity_base_OcResourceResponse
88     * Method:    setRequestHandle
89     * Signature: (Lorg/iotivity/base/OcRequestHandle;)V
90     */
91     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setRequestHandle
92         (JNIEnv *, jobject, jobject);
93
94     /*
95     * Class:     org_iotivity_base_OcResourceResponse
96     * Method:    setResourceHandle
97     * Signature: (Lorg/iotivity/base/OcResourceHandle;)V
98     */
99     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setResourceHandle
100         (JNIEnv *, jobject, jobject);
101
102     /*
103     * Class:     org_iotivity_base_OcResourceResponse
104     * Method:    setResponseResult
105     * Signature: (I)V
106     */
107     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setResponseResult
108         (JNIEnv *, jobject, jint);
109
110     /*
111     * Class:     org_iotivity_base_OcResourceResponse
112     * Method:    setResourceRepresentation
113     * Signature: (Lorg/iotivity/base/OcRepresentation;Ljava/lang/String;)V
114     */
115     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setResourceRepresentation
116         (JNIEnv *, jobject, jobject, jstring);
117
118     /*
119     * Class:     org_iotivity_base_OcResourceResponse
120     * Method:    setResourceRepresentation1
121     * Signature: (Lorg/iotivity/base/OcRepresentation;)V
122     */
123     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_setResourceRepresentation1
124         (JNIEnv *, jobject, jobject);
125
126     /*
127     * Class:     org_iotivity_base_OcResourceResponse
128     * Method:    create
129     * Signature: ()V
130     */
131     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_create
132         (JNIEnv *, jobject);
133
134     /*
135     * Class:     org_iotivity_base_OcResourceResponse
136     * Method:    dispose
137     * Signature: ()V
138     */
139     JNIEXPORT void JNICALL Java_org_iotivity_base_OcResourceResponse_dispose
140         (JNIEnv *, jobject);
141 #ifdef __cplusplus
142 }
143 #endif
144 #endif