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__
40 SESSION_STATE_CREATED,
41 SESSION_STATE_STARTED,
44 SESSION_STATE_KEY_NEG,
45 SESSION_STATE_COMPLETED,
46 SESSION_STATE_STOPPED,
50 SESSION_DIRECTION_INCOMING,
51 SESSION_DIRECTION_OUTGOING,
52 } session_direction_e;
59 unsigned int retry_gsrc;
66 char wps_pin[PINSTR_LEN+1];
67 unsigned int session_id;
68 unsigned char service_mac[MACADDR_LEN];
69 unsigned char session_mac[MACADDR_LEN];
72 wfd_session_s *wfd_create_session(void *data, unsigned char *peer_addr, int wps_mode, int direction);
73 int wfd_destroy_session(void *data);
74 int wfd_session_start(wfd_session_s *session);
75 int wfd_session_connect(wfd_session_s *session);
76 int wfd_session_cancel(wfd_session_s *session, unsigned char *peer_addr);
77 int wfd_session_reject(wfd_session_s *session, unsigned char *peer_addr);
78 int wfd_session_wps(wfd_session_s *session);
79 int wfd_session_invite(wfd_session_s *session);
80 int wfd_session_join(wfd_session_s *session);
81 wfd_device_s *wfd_session_get_peer(wfd_session_s *session);
82 unsigned char *wfd_session_get_peer_addr(wfd_session_s *session);
84 int wfd_session_get_state(wfd_session_s *session);
85 int wfd_session_stop(wfd_session_s *session);
87 int wfd_session_complete(wfd_session_s *session);
88 int wfd_session_timer(wfd_session_s *session, int start);
90 int wfd_session_process_event(wfd_manager_s *manager, wfd_oem_event_s *event);
91 int wfd_session_asp_session_start(wfd_session_s *session, wfd_oem_asp_prov_s *params);
92 int wfd_session_asp_connect(wfd_session_s *session, int role);
93 int wfd_session_asp_persistent_connect(wfd_session_s *session, int persist_group_id);
95 #endif /* __WIFI_DIRECT_SESSION_H__ */