1 /* *****************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 ******************************************************************/
23 * This file contains the declaration of Things Maintenance API's
24 * for JNI implementation.
27 #ifndef JNI_THINGS_MAINTENANCE_H_
28 #define JNI_THINGS_MAINTENANCE_H_
34 #include <jni_string.h>
41 * API to let thing(device) reboot.
42 * The target thing could be a group of multiple things or a single thing.
44 * @param resource - resource type representing the target group
46 * @return OCStackResult - return value of this API.
47 * It returns OC_STACK_OK if success.
49 * NOTE: OCStackResult is defined in ocstack.h.
51 JNIEXPORT jint JNICALL JNIThingsMaintenanceReboot
52 (JNIEnv *env, jobject interfaceObject, jobject resource);
55 * API for factory reset on thing(device).
56 * The target thing could be a group of multiple things or a single thing.
58 * @param resource - resource type representing the target group
60 * @return OCStackResult - return value of this API.
61 * It returns OC_STACK_OK if success.
63 * NOTE: OCStackResult is defined in ocstack.h.
65 JNIEXPORT jint JNICALL JNIThingsMaintenanceFactoryReset
66 (JNIEnv *env, jobject interfaceObject, jobject resource);
70 * API for showing the list of supported Maintenance units.
72 * @return std::string - return value of this API.
73 * It returns the list in JSON format
75 JNIEXPORT jstring JNICALL JNIThingsMaintenanceGetListOfSupportedConfigurationUnits
76 (JNIEnv *env, jobject interfaceObject);
81 #endif //JNI_THINGS_MAINTENANCE_H_