Imported Upstream version 1.0.0
[platform/upstream/iotivity.git] / service / things-manager / sdk / java / jni / tm / inc / jni_things_maintenance.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  * @file
23  * This file contains the declaration of Things Maintenance  API's
24  * for JNI implementation.
25  */
26
27 #ifndef JNI_THINGS_MAINTENANCE_H_
28 #define JNI_THINGS_MAINTENANCE_H_
29
30 #include <stdio.h>
31 #include <string.h>
32
33 #include <jni.h>
34 #include <jni_string.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /**
41  * API to let thing(device) reboot.
42  * The target thing could be a group of multiple things or a single thing.
43  *
44  * @param resource       - resource type representing the target group
45  *
46  * @return OCStackResult - return value of this API.
47  *                         It returns OC_STACK_OK if success.
48  *
49  * NOTE: OCStackResult is defined in ocstack.h.
50  */
51 JNIEXPORT jint JNICALL JNIThingsMaintenanceReboot
52 (JNIEnv *env, jobject interfaceObject, jobject resource);
53
54 /**
55  * API for factory reset on thing(device).
56  * The target thing could be a group of multiple things or a single thing.
57  *
58  * @param resource       - resource type representing the target group
59  *
60  * @return OCStackResult - return value of this API.
61  *                         It returns OC_STACK_OK if success.
62  *
63  * NOTE: OCStackResult is defined in ocstack.h.
64  */
65 JNIEXPORT jint JNICALL JNIThingsMaintenanceFactoryReset
66 (JNIEnv *env, jobject interfaceObject, jobject resource);
67
68
69 /**
70  * API for showing the list of supported Maintenance units.
71  *
72  * @return std::string - return value of this API.
73  *                       It returns the list in JSON format
74  */
75 JNIEXPORT jstring JNICALL JNIThingsMaintenanceGetListOfSupportedConfigurationUnits
76 (JNIEnv *env, jobject interfaceObject);
77
78 #ifdef __cplusplus
79 }
80 #endif
81 #endif //JNI_THINGS_MAINTENANCE_H_