Fix invalid memory access
[platform/core/iot/iotcon.git] / lib / icl-resource-interfaces.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 #ifndef __IOT_CONNECTIVITY_MANAGER_LIBRARY_RESOURCE_INTERFACES_H__
17 #define __IOT_CONNECTIVITY_MANAGER_LIBRARY_RESOURCE_INTERFACES_H__
18
19 #include <glib.h>
20 #include "iotcon-types.h"
21
22 struct icl_resource_ifaces {
23         int ref_count;
24         GList *iface_list;
25 };
26
27 iotcon_resource_interfaces_h icl_resource_interfaces_ref(
28                 iotcon_resource_interfaces_h res_ifaces);
29 const char* icl_resource_interfaces_get_nth_data(iotcon_resource_interfaces_h res_ifaces,
30                 int index);
31 unsigned int icl_resource_interfaces_get_length(iotcon_resource_interfaces_h res_ifaces);
32
33 #endif /* __IOT_CONNECTIVITY_MANAGER_LIBRARY_RESOURCE_INTERFACES_H__ */