2 * Copyright (c) 2019 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __RUA_CONTEXT_H__
18 #define __RUA_CONTEXT_H__
20 #include <rua_types.h>
27 * @brief The RUA context handle.
30 typedef struct rua_context_s *rua_context_h;
33 * @brief Destroyes the RUA context handle.
36 * @param[in] context The RUA context handle
37 * @return @c 0 on success,
38 * otherwise a negative error value
40 int rua_context_destroy(rua_context_h context);
43 * @brief Gets the application ID of the instance.
45 * @remarks You should release @a app_id using free().
47 * @param[in] context The RUA context handle
48 * @param[out] app_id The application ID
49 * @return @c 0 on success,
50 * otherwise a negative error value
52 int rua_context_get_app_id(rua_context_h context, char **app_id);
55 * @brief Gets the ID of the instance.
56 * @details The function returns RUA_ERROR_NONE, event if @a instance_id is null.
58 * @remarks You should release @a instance_id using free().
60 * @param[in] context The RUA context handle
61 * @param[out] instance_id The instance ID
62 * @return @c 0 on success,
63 * otherwise a negative error value
65 int rua_context_get_instance_id(rua_context_h context, char **instance_id);
68 * @brief Gets the component ID of the instance.
69 * @details The function returns RUA_ERROR_NONE, event if @a component_id is null.
71 * @remarks You should release @a component_id using free().
73 * @param[in] context The RUA context handle
74 * @param[out] component_id The component ID
75 * @return @c 0 on success,
76 * otherwise a negative error value
78 int rua_context_get_component_id(rua_context_h context, char **component_id);
84 #endif /*__RUA_CONTEXT_H__*/