Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / service / resource-encapsulation / android / service / src / main / jni / JniRcsResourceAttributes.h
1 /******************************************************************
2  *
3  * Copyright 2015 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ******************************************************************/
20
21 #ifndef JNI_RCS_RESOURCE_ATTRIBUTES_H_
22 #define JNI_RCS_RESOURCE_ATTRIBUTES_H_
23
24 #include <jni.h>
25
26 namespace OIC
27 {
28     namespace Service
29     {
30         class RCSResourceAttributes;
31     }
32 }
33
34 class JNIEnvWrapper;
35
36 void initRCSResourceAttributes(JNIEnvWrapper*);
37 void clearRCSResourceAttributes(JNIEnvWrapper*);
38
39 jobject newAttributesObject(JNIEnv*, const OIC::Service::RCSResourceAttributes&);
40 jobject newAttributesObject(JNIEnvWrapper*, const OIC::Service::RCSResourceAttributes&);
41
42 OIC::Service::RCSResourceAttributes toNativeAttributes(JNIEnv*, jobject);
43 OIC::Service::RCSResourceAttributes toNativeAttributes(JNIEnvWrapper*, jobject);
44
45 void writeNativeAttributesFromMap(JNIEnv*, jobject mapObj,
46         OIC::Service::RCSResourceAttributes& targetAttrs);
47 void writeNativeAttributesFromMap(JNIEnvWrapper*, jobject mapObj,
48         OIC::Service::RCSResourceAttributes& targetAttrs);
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 JNIEXPORT jboolean JNICALL
55 Java_org_iotivity_service_RcsResourceAttributes_nativeIsEmpty(JNIEnv*, jobject);
56
57 JNIEXPORT jint JNICALL
58 Java_org_iotivity_service_RcsResourceAttributes_nativeSize(JNIEnv*, jobject);
59
60 JNIEXPORT jboolean JNICALL
61 Java_org_iotivity_service_RcsResourceAttributes_nativeRemove(JNIEnv*, jobject, jstring keyObj);
62
63 JNIEXPORT void JNICALL
64 Java_org_iotivity_service_RcsResourceAttributes_nativeClear(JNIEnv*, jobject);
65
66 JNIEXPORT jboolean JNICALL
67 Java_org_iotivity_service_RcsResourceAttributes_nativeContains(JNIEnv*, jobject, jstring keyObj);
68
69 JNIEXPORT void JNICALL
70 Java_org_iotivity_service_RcsResourceAttributes_nativeAddKeys(JNIEnv*, jobject, jstring setObj);
71
72 JNIEXPORT jobject JNICALL
73 Java_org_iotivity_service_RcsResourceAttributes_nativeExtract(JNIEnv*, jobject, jstring keyObj);
74
75 JNIEXPORT void JNICALL
76 Java_org_iotivity_service_RcsResourceAttributes_nativeExtractAll(JNIEnv*, jobject, jobject);
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif  //JNI_RCS_RESOURCE_ATTRIBUTES_H_