2 * Network Configuration Module
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * This file declares wifi direct session functions and structures.
23 * @file wifi-direct-session.h
24 * @author Gibyoung Kim (lastkgb.kim@samsung.com)
28 #ifndef __WIFI_DIRECT_SESSION_H__
29 #define __WIFI_DIRECT_SESSION_H__
44 SESSION_STATE_CREATED,
45 SESSION_STATE_STARTED,
48 SESSION_STATE_KEY_NEG,
49 SESSION_STATE_COMPLETED,
50 SESSION_STATE_STOPPED,
54 SESSION_DIRECTION_INCOMING,
55 SESSION_DIRECTION_OUTGOING,
56 } session_direction_e;
64 unsigned int retry_gsrc;
71 char wps_pin[PINSTR_LEN+1];
72 unsigned int session_id;
73 unsigned char service_mac[MACADDR_LEN];
74 unsigned char session_mac[MACADDR_LEN];
77 wfd_session_s *wfd_create_session(void *data, unsigned char *peer_addr, int wps_mode, int direction);
78 int wfd_destroy_session(void *data);
79 int wfd_session_start(wfd_session_s *session);
80 int wfd_session_connect(wfd_session_s *session);
81 int wfd_session_cancel(wfd_session_s *session, unsigned char *peer_addr);
82 int wfd_session_reject(wfd_session_s *session, unsigned char *peer_addr);
83 int wfd_session_wps(wfd_session_s *session);
84 int wfd_session_invite(wfd_session_s *session);
85 int wfd_session_join(wfd_session_s *session);
86 wfd_device_s *wfd_session_get_peer(wfd_session_s *session);
87 unsigned char *wfd_session_get_peer_addr(wfd_session_s *session);
89 int wfd_session_get_state(wfd_session_s *session);
90 int wfd_session_stop(wfd_session_s *session);
92 int wfd_session_complete(wfd_session_s *session);
93 int wfd_session_timer(wfd_session_s *session, int start);
95 int wfd_session_process_event(wfd_manager_s *manager, wfd_oem_event_s *event);
96 int wfd_session_asp_session_start(wfd_session_s *session, wfd_oem_asp_prov_s *params);
97 int wfd_session_asp_connect(wfd_session_s *session, int role);
98 int wfd_session_asp_persistent_connect(wfd_session_s *session, int persist_group_id);
104 #endif /* __WIFI_DIRECT_SESSION_H__ */