Add legacy connection handler for addtional group iface
[platform/core/connectivity/wifi-direct-manager.git] / include / wifi-direct-service.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2014 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 service functions and structures.
22  *
23  * @file                wifi-direct-service.h
24  * @author      Gibyoung Kim (lastkgb.kim@samsung.com)
25  * @version     0.7
26  */
27
28 #ifndef __WIFI_DIRECT_SERVICE_H__
29 #define __WIFI_DIRECT_SERVICE_H__
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 typedef enum {
36         WFD_SERVICE_TYPE_ALL,
37         WFD_SERVICE_TYPE_BONJOUR,
38         WFD_SERVICE_TYPE_UPNP,
39         WFD_SERVICE_TYPE_WS_DISCOVERY,
40         WFD_SERVICE_TYPE_WIFI_DISPLAY,
41         WFD_SERVICE_TYPE_VENDOR = 0xff,
42 } wfd_service_type_e;
43
44 typedef enum {
45         WFD_BONJOUR_RDATA_PTR = 0x0c,
46         WFD_BONJOUR_RDATA_TXT = 0x10,
47 } wfd_bonjour_rdata_type_e;
48
49 typedef struct {
50         int version;
51         char *service;
52 } wfd_service_upnp_s;
53
54 typedef struct {
55         char *query;
56         wfd_bonjour_rdata_type_e rdata_type;
57         char *rdata;
58 } wfd_service_bonjour_s;
59
60 typedef struct {
61         int type;
62         int id;
63         int status;
64         char *str_ptr;
65         union {
66                 struct {
67                         char *version;
68                         char *service;
69                 } upnp;
70                 struct {
71                         char *query;
72                         char *rdata;
73                         wfd_bonjour_rdata_type_e rdata_type;
74                 } bonjour;
75                 struct {
76                         char *info1;
77                         char *info2;
78                 } vendor;
79         } data;
80 } wfd_service_s;
81
82
83 int wfd_service_add(int type, char *data, int *service_id);
84 int wfd_service_del(int service_id);
85 #if 0
86 int wfd_service_disc_req(unsigned char *addr, int type, char *data);
87 int wfd_service_disc_cancel(int handle);
88 #endif
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif /* __WIFI_DIRECT_SERVICE_H__ */