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 ******************************************************************/
22 * @file jni_action_set.h
24 * @brief This file contains the declaration of JniActionSet class
25 * and its members related to JniActionSet.
28 #ifndef __JNI_ACTIONSET_H_
29 #define __JNI_ACTIONSET_H_
35 #include "ThingsManager.h"
36 #include "ActionSet.h"
37 #include "jni_object.h"
38 #include "jni_action.h"
45 * @brief This class provides a set of functions to get and set ActionSet Class member variables
48 class JniActionSet : public JObject
54 JniActionSet(JNIEnv *env, jobject obj);
59 JniActionSet(JNIEnv *env);
68 * Retrieves target value from JniActionSet class object
70 * @param name - ActionSet Name
72 * @return Boolean, true on success, otherwise false
75 bool getJniActionSetName(std::string &name);
78 * Sets target value of JniActionSet class object
80 * @param name - ActionSet Name
82 * @return Boolean, true on success, otherwise false
85 bool setJniActionSetName(const std::string name);
88 * Retrieves capability values from JniActionSet class object
90 * @param actionList - List of Actions
92 * @return Boolean, true on success, otherwise false
94 bool getJniListOfActions(std::vector<OIC::Action *> &actionList);
97 * Converts actionSet class from java to CPP
99 * @param env - Default JNI Environment Pointer
100 * @param jnewActionSet - action set
102 * @return OIC CPP ActionSet
104 ActionSet *getActionSet(JNIEnv *env, jobject jnewActionSet);
107 * Converts Time class from java to CPP
109 * @param env - Default JNI Environment Pointer
110 * @param jnewActionSet - Java action set
111 * @param pActionSet - CPP action set
113 * @return Boolean, true on success, otherwise false
115 bool setTimeInfo(JNIEnv *env, jobject jnewActionSet, OIC::ActionSet *pActionSet);
117 #endif //__JNI_ACTIONSET_H_