replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / service / easy-setup / mediator / richsdk / android / EasySetupCore / src / main / jni / JniSecurityStatusListener.h
1 /******************************************************************
2  *
3  * Copyright 2016 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_ES_SECURITY_PROVISIONING_STATUS_LISTENER_H_
22 #define __JNI_ES_SECURITY_PROVISIONING_STATUS_LISTENER_H_
23
24 #include <jni.h>
25
26 #include "RemoteEnrollee.h"
27 #include "ESRichCommon.h"
28
29 #include "JniJvm.h"
30
31 class JniRemoteEnrollee;
32
33 using namespace OIC::Service;
34
35 class JniSecurityStatusListener
36 {
37     public:
38         /**
39          * @brief constructor
40          */
41         JniSecurityStatusListener(JNIEnv *env, jobject jListener, JniRemoteEnrollee *resource);
42
43         /**
44          * @brief destructor
45         */
46         ~JniSecurityStatusListener();
47
48         /**
49          * @brief callback function that will be passed to Native layer
50         */
51         void secProvisionStatusCallback (std::shared_ptr<SecProvisioningStatus> secProvisioningStatus);
52
53     private:
54         jweak m_jwListener;
55         JniRemoteEnrollee *m_ownerResource;
56         void checkExAndRemoveListener(JNIEnv *env);
57 };
58
59 #endif //__JNI_ES_SECURITY_PROVISIONING_STATUS_LISTENER_H_