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 ThingsMaintenanceCallbacks class.
26 #ifndef JNI_THINGS_MAINTENANCE_CALLBACKS_H_
27 #define JNI_THINGS_MAINTENANCE_CALLBACKS_H_
31 #include "ThingsMaintenance.h"
34 * This class provides a set of callback functions for things maintenance.
36 class ThingsMaintenanceCallbacks
40 ThingsMaintenanceCallbacks() {}
41 virtual ~ThingsMaintenanceCallbacks() {}
44 * This callback method is called when a response for the reboot request
47 * @param headerOptions - It comprises of optionID and optionData as members.
48 * @param rep - Configuration parameters are carried as a pair of attribute key and value
49 * in a form of OCRepresentation instance.
50 * @param eCode - error code.
52 static void onRebootResponse(const OC::HeaderOptions &headerOptions,
53 const OC::OCRepresentation &rep,
57 * This callback method is called when a response for the factoryReset request
60 * @param headerOptions - It comprises of optionID and optionData as members.
61 * @param rep - Configuration parameters are carried as a pair of attribute key and value
62 * in a form of OCRepresentation instance.
63 * @param eCode - error code.
65 static void onFactoryResetResponse(const OC::HeaderOptions &headerOptions,
66 const OC::OCRepresentation &rep,
70 * This method invokes the Callback function with particular name and signature.
72 * @param headerOptions - It comprises of optionID and optionData as members.
73 * @param rep - Configuration parameters are carried as a pair of attribute key and value
74 * in a form of OCRepresentation instance.
75 * @param eCode - error code.
76 * @param callbackName - callbackName to be invoked.
77 * @param signature - Signature of the callback method to be called.
79 static void invokeCallback(const OC::HeaderOptions &headerOptions,
80 const OC::OCRepresentation &rep, const int eCode,
81 const char *callbackName, const char *signature);
83 #endif //JNI_THINGS_MAINTENANCE_CALLBACKS_H_