Imported Upstream version 1.1.1
[platform/upstream/iotivity.git] / android / android_api / base / jni / JniOcDirectPairDevice.h
1 /*
2 * //******************************************************************
3 * //
4 * // Copyright 2016 Samsung Electronics All Rights Reserved.
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 #include "JniOcStack.h"
24 #include "JniOnDPDevicesFoundListener.h"
25 #include "OCDirectPairing.h"
26 #include <mutex>
27
28 #ifndef _Included_org_iotivity_base_OcDirectPairDevice
29 #define _Included_org_iotivity_base_OcDirectPairDevice
30
31 using namespace OC;
32
33 class JniOcDirectPairDevice
34 {
35     public:
36         JniOcDirectPairDevice(std::shared_ptr<OCDirectPairing> directPairingDevice);
37         ~JniOcDirectPairDevice();
38
39         static JniOcDirectPairDevice* getJniOcDirectPairDevicePtr(JNIEnv *env, jobject thiz);
40         static jintArray JconvertIntVectorToJavaList(JNIEnv *env, std::vector<OCPrm_t> &vector);
41
42         std::shared_ptr<OCDirectPairing> getPtr();
43         std::string getHost();
44         std::vector<OCPrm_t> getPairingMethods();
45         OCConnectivityType connectivityType();
46
47     private:
48           std::shared_ptr<OCDirectPairing> m_sharedDirectPairDevice;
49 };
50
51 /* DO NOT EDIT THIS FILE BEYOND THIS LINE - it is machine generated */
52
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56     /*
57      * Class:     org_iotivity_base_OcDirectPairDevice
58      * Method:    getDirectPairedDevices
59      * Signature: (Lorg/iotivity/base/OcDirectPairDevice/GetDirectPairedListener;)V
60      */
61     JNIEXPORT void JNICALL Java_org_iotivity_base_OcDirectPairDevice_getDirectPairedDevices
62         (JNIEnv *, jobject, jobject);
63
64    /*
65     * Class:     org_iotivity_base_OcDirectPairDevice
66     * Method:    getHost
67     * Signature: ()Ljava/lang/String;
68     */
69     JNIEXPORT jstring JNICALL Java_org_iotivity_base_OcDirectPairDevice_getHost
70         (JNIEnv *, jobject);
71
72     /*
73      * Class:     org_iotivity_base_OcDirectPairDevice
74      * Method:    getPairingMethods
75      * Signature: ()Ljava/util/List;
76      */
77     JNIEXPORT jintArray JNICALL Java_org_iotivity_base_OcDirectPairDevice_getPairingMethods
78         (JNIEnv *, jobject);
79
80     /*
81      * Class:     org_iotivity_base_OcDirectPairDevice
82      * Method:    doDirectPairing
83      * Signature: (Lorg/iotivity/base/OcDirectPairDevice;Lorg/iotivity/base/OcPrmType;
84      *           Ljava/lang/String;Lorg/iotivity/base/OcDirectPairDevice/DirectPairingListener;)V
85      */
86     JNIEXPORT void JNICALL Java_org_iotivity_base_OcDirectPairDevice_doDirectPairing
87         (JNIEnv *, jobject, jobject, jint, jstring, jobject);
88
89     /*
90     * Class:     org_iotivity_base_OcDirectPairDevice
91     * Method:    getConnectivityTypeN
92     * Signature: ()I
93     */
94     JNIEXPORT jint JNICALL Java_org_iotivity_base_OcDirectPairDevice_getConnectivityTypeN
95         (JNIEnv *env, jobject thiz);
96
97 #ifdef __cplusplus
98 }
99 #endif
100 #endif
101