df46e2e26e4b0f4ab71effd3190f9cb995d0e48d
[platform/core/api/multi-device-group.git] / src / mdg_util.h
1 /*
2  * Copyright (c) 2018 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  */
17
18 #ifndef __TIZEN_NETWORK_COMMON_MDG_UTIL_H__
19 #define __TIZEN_NETWORK_COMMON_MDG_UTIL_H__
20
21 #include <mdg_private.h>
22
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27
28 GVariant *mdg_create_variant_device(mdg_device_s *device);
29 mdg_device_s *mdg_get_device_from_variant(GVariant *va);
30 mdg_group_s *mdg_get_group_from_variant(GVariant *va);
31 void mdg_get_channel_from_variant(GVariant *va, char **device_id, char **channel_id);
32 void mdg_get_data_from_variant(GVariant *va, char **device_id, char **channel_id,
33         unsigned char **data, int *data_len);
34 void mdg_get_progress_from_variant(GVariant *va, char **file_path,
35         long *send_size, long *total_size, int *percent);
36
37 #ifdef __cplusplus
38 }
39 #endif
40
41 #endif /* __TIZEN_NETWORK_COMMON_MDG_UTIL_H__ */