Fix C# TCT RemovePersistentGroup_CHECK_NO_EXCEPTION issue
[platform/core/connectivity/wifi-direct-manager.git] / include / wifi-direct-group.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 /**
21  * This file declares wifi direct group functions and structures.
22  *
23  * @file                wifi-direct-group.h
24  * @author      Gibyoung Kim (lastkgb.kim@samsung.com)
25  * @version     0.7
26  */
27
28 #ifndef __WIFI_DIRECT_GROUP_H__
29 #define __WIFI_DIRECT_GROUP_H__
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #define IFACE_NAME_LEN 16
36
37 typedef enum {
38         WFD_GROUP_FLAG_NONE,
39         WFD_GROUP_FLAG_PERSISTENT,
40         WFD_GROUP_FLAG_AUTONOMOUS,
41 } wfd_group_flag_e;
42
43 typedef struct {
44         int pending;
45         char ifname[IFACE_NAME_LEN+1];
46         char ssid[DEV_NAME_LEN+1];
47         unsigned char bssid[MACADDR_LEN];
48         unsigned char go_dev_addr[MACADDR_LEN];
49         int flags;      /* Autonomous, Persistent */
50         int role;               /* local device role */
51         int freq;               /* MHz */
52         GList *members;
53         int member_count;
54         char passphrase[PASSPHRASE_LEN_MAX + 1];
55 } wfd_group_s;
56
57 wfd_group_s *wfd_create_pending_group(void *data, unsigned char * bssid);
58 int wfd_group_complete(void *data, wfd_oem_event_s *group_info);
59 int wfd_destroy_group(void * data);
60 int wfd_group_add_member(wfd_group_s *group, unsigned char *addr);
61 int wfd_group_remove_member(wfd_group_s *group, unsigned char *addr);
62 #if 0
63 int wfd_group_get_channel(wfd_group_s *group);
64 int wfd_group_get_flags(wfd_group_s *group);
65 int wfd_group_get_members();
66 int wfd_group_make_persistent();
67 #endif
68 int wfd_group_is_autonomous(wfd_group_s *group);
69 wfd_device_s *wfd_group_find_member_by_addr(wfd_group_s *group, unsigned char *addr);
70
71 #ifdef __cplusplus
72 }
73 #endif
74
75 #endif /* __WIFI_DIRECT_GROUP_H__ */