2 * Application Service Platform(ASP)
4 * Copyright (c) 2015 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 definitions, macros and structures.
24 * @author Yu Jiung (jiung.yu@samsung.com)
28 #ifndef __ASP_CLIENT_H__
29 #define __ASP_CLIENT_H__
35 #define ASP_SERVICE_INFO_MAX_LEN 200
38 * Application Service Platform(ASP) advertise data structure
42 long long unsigned search_id;
45 unsigned char preferred_connection;
49 unsigned int config_method;
50 unsigned char tran_id;
55 GHashTable *service_info_map;
57 } asp_client_advert_s;
60 * Application Service Platform(ASP) seek data structure
64 long long unsigned search_id;
67 unsigned char preferred_connection;
71 unsigned int config_method;
72 unsigned char tran_id;
76 GHashTable *service_info_map;
81 * Application Service Platform(ASP) session data structure
84 char session_mac[MACSTR_LEN]; /* the MAC address of the P2P device that generated the session ID */
85 unsigned int session_id;
86 char service_mac[MACSTR_LEN];
87 unsigned int advertisement_id;
93 char *session_information;
95 /* session information for each local setting */
98 unsigned char local_ip[4];
99 char *deferred_session_response;
100 } asp_client_session_s;
105 asp_seek_search_result_cb seek_search_result_cb;
106 asp_advert_status_changed_cb advert_status_changed_cb;
108 asp_session_request_cb session_request_cb;
109 asp_session_config_request_cb session_config_request_cb;
110 asp_session_connect_status_cb session_connect_status_cb;
111 asp_session_status_cb session_status_cb;
112 asp_session_port_status_cb session_port_status_cb;
114 void *user_data_for_cb_seek_search_result;
115 void *user_data_for_cb_advert_status_changed;
117 void *user_data_for_cb_session_request;
118 void *user_data_for_cb_session_config_request;
119 void *user_data_for_cb_session_connect_status;
120 void *user_data_for_cb_session_status;
121 void *user_data_for_cb_session_port_status;
124 void asp_process_seek_search_result(GDBusConnection *connection,
125 const gchar *object_path, GVariant *parameters);
126 void asp_process_advert_status_changed(GDBusConnection *connection,
127 const gchar *object_path, GVariant *parameters);
129 void asp_process_session_request(GDBusConnection *connection,
130 const gchar *object_path, GVariant *parameters);
131 void asp_process_session_config_request(GDBusConnection *connection,
132 const gchar *object_path, GVariant *parameters);
133 void asp_process_session_connect_status(GDBusConnection *connection,
134 const gchar *object_path, GVariant *parameters);
135 void asp_process_session_status(GDBusConnection *connection,
136 const gchar *object_path, GVariant *parameters);
137 void asp_process_session_port_status(GDBusConnection *connection,
138 const gchar *object_path, GVariant *parameters);
140 #endif /** __ASP_CLIENT_H__ */