Fix memory leak
[platform/core/connectivity/asp-manager.git] / src / tech / asp-tech-ble.c
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
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  * Standard headers
19  *****************************************************************************/
20
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <string.h>
24 #include <time.h>
25
26 /*****************************************************************************
27  * System headers
28  *****************************************************************************/
29
30 #include <glib.h>
31 #include<dlog.h>
32
33 /*****************************************************************************
34  * Application Service Platform Daemon headers
35  *****************************************************************************/
36 #include "asp-manager-util.h"
37 #include "asp-service.h"
38 #include "asp-session.h"
39 #include "asp-tech.h"
40 #include "asp-tech-ble.h"
41
42 /*****************************************************************************
43  * Macros and Typedefs
44  *****************************************************************************/
45
46 /* TODO : define service data structure */
47
48 /*****************************************************************************
49  * Global Variables
50  *****************************************************************************/
51
52 /* TODO : define local memory for service data structure */
53
54 /*****************************************************************************
55  * Local Functions Definition
56  *****************************************************************************/
57
58 gint32 asp_tech_ble_init()
59 {
60         __ASP_LOG_FUNC_ENTER__;
61         gint32 result = 0;
62
63         __ASP_LOG_FUNC_EXIT__;
64         return result;
65 }
66
67 gint32 asp_tech_ble_deinit()
68 {
69         __ASP_LOG_FUNC_ENTER__;
70         gint32 result = 0;
71
72         __ASP_LOG_FUNC_EXIT__;
73         return result;
74 }
75
76 gint32 asp_tech_ble_advertise(asp_service_advertise_s *service, gint32 replace)
77 {
78         __ASP_LOG_FUNC_ENTER__;
79         gint32 result = 0;
80
81         __ASP_LOG_FUNC_EXIT__;
82         return result;
83 }
84
85 gint32 asp_tech_ble_cancel_advertise(asp_service_advertise_s *service)
86 {
87         __ASP_LOG_FUNC_ENTER__;
88         gint32 result = 0;
89
90         __ASP_LOG_FUNC_EXIT__;
91         return result;
92 }
93
94 gint32 asp_tech_ble_seek(asp_service_seek_s *service)
95 {
96         __ASP_LOG_FUNC_ENTER__;
97         gint32 result = 0;
98
99         __ASP_LOG_FUNC_EXIT__;
100         return result;
101 }
102
103 gint32 asp_tech_ble_cancel_seek(asp_service_seek_s *service)
104 {
105         __ASP_LOG_FUNC_ENTER__;
106         gint32 result = 0;
107
108         __ASP_LOG_FUNC_EXIT__;
109         return result;
110 }
111
112 gint32 asp_tech_ble_connect_session(asp_tech_session_request_params_s *params)
113 {
114         __ASP_LOG_FUNC_ENTER__;
115         gint32 result = 0;
116
117         __ASP_LOG_FUNC_EXIT__;
118         return result;
119 }
120
121 gint32 asp_tech_ble_confirm_session(const guint8 *session_mac, gint32 session_id, gint32 confirm, guint32 pin)
122 {
123         __ASP_LOG_FUNC_ENTER__;
124         gint32 result = 0;
125
126         __ASP_LOG_FUNC_EXIT__;
127         return result;
128 }
129
130 gint32 asp_tech_ble_destroy_connection(const guint8 *peer_id, gint32 peer_id_length)
131 {
132         __ASP_LOG_FUNC_ENTER__;
133         gint32 result = 0;
134
135         __ASP_LOG_FUNC_EXIT__;
136         return result;
137 }
138
139 gint32 asp_tech_ble_is_peer_connected(const guint8 *peer_id, gint32 peer_id_length, gint32 *is_connected)
140 {
141         __ASP_LOG_FUNC_ENTER__;
142         gint32 result = 0;
143
144         __ASP_LOG_FUNC_EXIT__;
145         return result;
146 }
147
148 asp_tech_ops_s asp_tech_ble_ops = {
149                 .init = asp_tech_ble_init,
150                 .deinit = asp_tech_ble_deinit,
151                 .advertise = asp_tech_ble_advertise,
152                 .cancel_advertise = asp_tech_ble_cancel_advertise,
153                 .seek = asp_tech_ble_seek,
154                 .cancel_seek = asp_tech_ble_cancel_seek,
155                 .connect_session = asp_tech_ble_connect_session,
156                 .confirm_session = asp_tech_ble_confirm_session,
157                 .destroy_connection = asp_tech_ble_destroy_connection,
158                 .is_peer_connected = asp_tech_ble_is_peer_connected,
159                 .session_request_cb = NULL,
160                 .session_request_cb_user_data = NULL,
161                 .session_config_request_cb = NULL,
162                 .connect_status_cb = NULL,
163                 .connect_status_cb_user_data = NULL,
164                 .ip_assigned_cb = NULL,
165                 .ip_assigned_cb_user_data = NULL,
166 };