Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / service / resource-hosting / android / resource_hosting / jni / ResourceHosing_JNI.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
22 #ifndef RESOURCEHOSTING_JNI_H_
23 #define RESOURCEHOSTING_JNI_H_
24
25 #include <jni.h>
26 #include <thread>
27 #include <atomic>
28 #include <unistd.h>
29
30 #define TAG "OIC-JNI"
31
32 #define JNI_CURRENT_VERSION JNI_VERSION_1_6
33 #define OCSTACK_OK  0
34 #define OCSTACK_ERROR  255
35 #define HOSTING_THREAD_ERROR  -2
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /*
42  * Class:     org_iotivity_service_resourcehosting_ResourceHosting
43  * Method:    OICCoordinatorStart
44  * Signature: ()V
45  */
46 JNIEXPORT jint JNICALL Java_org_iotivity_ResourceHosting_ResourceHosting_OICCoordinatorStart
47 (JNIEnv *, jobject);
48 /*
49  * @Class:     org_iotivity_service_resourcehosting_ResourceHosting
50  * @Method:    OICCoordinatorStop
51  * @Signature: ()V
52  */
53
54 JNIEXPORT jint JNICALL Java_org_iotivity_ResourceHosting_ResourceHosting_OICCoordinatorStop
55 (JNIEnv *, jobject);
56 /*
57  * Class:     org_iotivity_service_resourcehosting_ResourceHosting
58  * Method:    ResourceHostingInit
59  * Signature: ()V
60  */
61 JNIEXPORT jint JNICALL Java_org_iotivity_ResourceHosting_ResourceHosting_ResourceHostingInit
62 (JNIEnv *env, jobject obj,jstring j_addr);
63 /*
64  * Class:     org_iotivity_service_resourcehosting_ResourceHosting
65  * Method:    ResourceHostingTerminate
66  * Signature: (Ljava/lang/String;)V
67  */
68 JNIEXPORT jint JNICALL Java_org_iotivity_ResourceHosting_ResourceHosting_ResourceHostingTerminate
69 (JNIEnv *env, jobject obj);
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif /* RESOURCEHOSTING_JNI_H_ */