* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
*/
-int wifi_aware_publish_set_service_specific_info(wifi_aware_publish_h publish, unsigned char *service_specific_info, size_t len);
+int wifi_aware_publish_set_service_specific_info(wifi_aware_publish_h publish, const unsigned char *service_specific_info, size_t len);
/**
* @brief Set the match filter of the service. It is used to decide whether accepting a subscribe request or not.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
*/
-int wifi_aware_publish_set_match_filter(wifi_aware_publish_h publish, unsigned char *match_filter, size_t len);
+int wifi_aware_publish_set_match_filter(wifi_aware_publish_h publish, const unsigned char *match_filter, size_t len);
/**
* @brief TODO (Need decision to add) Set whether notifying a termination of the service or not.
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
*/
-int wifi_aware_subscribe_set_service_specific_info(wifi_aware_subscribe_h subscribe, unsigned char *service_specific_info, size_t len);
+int wifi_aware_subscribe_set_service_specific_info(wifi_aware_subscribe_h subscribe, const unsigned char *service_specific_info, size_t len);
/**
* @brief
* @return 0 on success, otherwise a negative error value
* @retval #WIFI_AWARE_ERROR_NONE
*/
-int wifi_aware_subscribe_set_match_filter(wifi_aware_subscribe_h subscribe, unsigned char *match_filter, size_t len);
+int wifi_aware_subscribe_set_match_filter(wifi_aware_subscribe_h subscribe, const unsigned char *match_filter, size_t len);
/**
* @brief
*/
typedef void(*wifi_aware_service_discovered_cb)(wifi_aware_session_h session,
wifi_aware_peer_h peer,
- unsigned char *service_specific_info, size_t service_specific_info_len,
+ const unsigned char *service_specific_info, size_t service_specific_info_len,
void *user_data);
/**
int wifi_aware_send_message(
wifi_aware_session_h session,
wifi_aware_peer_h peer,
- unsigned char *message, size_t len,
+ const unsigned char *message, size_t len,
wifi_aware_send_message_result_cb callback, void *user_data);
/**
typedef void(*wifi_aware_message_received_cb)(
wifi_aware_session_h session,
wifi_aware_peer_h peer,
- unsigned char *message, size_t len, void *user_data);
+ const unsigned char *message, size_t len, void *user_data);
/**
* @brief
* @param[in] data_path
* @param[in] key
*/
-int wifi_aware_data_path_set_psk(wifi_aware_data_path_h data_path, char *key);
+int wifi_aware_data_path_set_psk(wifi_aware_data_path_h data_path, const char *key);
/**
* @brief Set a PMK for Wi-Fi Aware Data Path. It can be used only when secury_type is WIFI_AWARE_SECURITY_TYPE_PMK.
* @param[in] data_path
* @param[in] key Pairwise Master Key. Its length should be 32
*/
-int wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path, unsigned char *key);
+int wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path, const unsigned char *key);
// only for responder
/**
* @param[in] service_specific_info
* @param[in] service_specific_info_len
*/
-int wifi_aware_data_path_set_service_specific_info(wifi_aware_data_path_h data_path, unsigned char *service_specific_info, size_t service_specific_info_len);
+int wifi_aware_data_path_set_service_specific_info(wifi_aware_data_path_h data_path, const unsigned char *service_specific_info, size_t service_specific_info_len);
// TODO:
// We are considering
// removing wifi_aware_data_path_set_service_specific_info() and
* @param[in] user_data
*/
typedef void(*wifi_aware_data_path_open_cb)(wifi_aware_data_path_h data_path, wifi_aware_error_e error,
- unsigned char *mac, unsigned char *service_specific_info, size_t service_specific_info_len, void *user_data);
+ const unsigned char *mac, const unsigned char *service_specific_info, size_t service_specific_info_len, void *user_data);
/**
* @brief Start to open a Wi-Fi Aware Data Path.
wifi_aware_security_type_e security_type);
int _wifi_aware_data_path_set_psk(wifi_aware_data_path_h data_path, const char *key);
int _wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path,
- unsigned char *key);
+ const unsigned char *key);
int _wifi_aware_data_path_set_service_specific_info(wifi_aware_data_path_h data_path,
- unsigned char *service_specific_info, size_t service_specific_info_len);
+ const unsigned char *service_specific_info, size_t service_specific_info_len);
int _wifi_aware_data_path_destroy(wifi_aware_data_path_h data_path);
int _wifi_aware_data_path_open(wifi_aware_data_path_h data_path,
wifi_aware_data_path_open_cb callback, void *user_data);
unsigned int ndp_id, uint16_t pub_sub_id, unsigned int peer_id);
int wifi_aware_gdbus_ndp_psk(wifi_aware_data_path_h data_path,
uint16_t pub_sub_id, unsigned int peer_id, wifi_aware_data_path_role_e role,
- unsigned char *specific_info, size_t specific_info_len,
- const char *psk,
- GAsyncReadyCallback cb);
+ const unsigned char *specific_info, size_t specific_info_len,
+ const char *psk, GAsyncReadyCallback cb);
int wifi_aware_gdbus_ndp_pmk(wifi_aware_data_path_h data_path,
uint16_t pub_sub_id, unsigned int peer_id, wifi_aware_data_path_role_e role,
- unsigned char *specific_info, size_t specific_info_len,
+ const unsigned char *specific_info, size_t specific_info_len,
const unsigned char *pmk, size_t pmk_len,
GAsyncReadyCallback cb);
#ifdef __cplusplus
wifi_aware_publish_type_e publish_type);
void _wifi_aware_publish_set_service_name(wifi_aware_publish_h publish, const char *service_name);
void _wifi_aware_publish_set_service_specific_info(wifi_aware_publish_h publish,
- unsigned char *service_specific_info, size_t len);
+ const unsigned char *service_specific_info, size_t len);
void _wifi_aware_publish_set_match_filter(wifi_aware_publish_h publish,
- unsigned char *match_filter, size_t len);
+ const unsigned char *match_filter, size_t len);
void _wifi_aware_publish_set_enable_termination_event(wifi_aware_publish_h publish, bool enable);
void _wifi_aware_publish_set_enable_ranging(wifi_aware_publish_h publish, bool enable);
wifi_aware_publish_request_s *_wifi_aware_publish_get_request(wifi_aware_publish_h publish_handle);
wifi_aware_subscribe_type_e subscribe_type);
void _wifi_aware_subscribe_set_service_name(wifi_aware_subscribe_h subscribe, const char *service_name);
void _wifi_aware_subscribe_set_service_specific_info(wifi_aware_subscribe_h subscribe,
- unsigned char *service_specific_info, size_t len);
+ const unsigned char *service_specific_info, size_t len);
void _wifi_aware_subscribe_set_match_filter(wifi_aware_subscribe_h subscribe,
- unsigned char *match_filter, size_t len);
+ const unsigned char *match_filter, size_t len);
void _wifi_aware_subscribe_set_enable_termination_event(wifi_aware_subscribe_h subscribe, bool enable);
wifi_aware_subscribe_request_s *_wifi_aware_subscribe_get_request(wifi_aware_subscribe_h subscribe_handle);
uint16_t _wifi_aware_session_get_subscribe_id(wifi_aware_session_h session);
void _wifi_aware_unset_message_received_cb(wifi_aware_session_h session);
int _wifi_aware_send_message(wifi_aware_session_h session, wifi_aware_peer_h peer,
- unsigned char *message, size_t len,
+ const unsigned char *message, size_t len,
wifi_aware_send_message_result_cb callback, void *user_data);
//void _mac_address_changed(GDBusConnection *connection,
return WIFI_AWARE_ERROR_NONE;
}
-int _wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path, unsigned char *key)
+int _wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path, const unsigned char *key)
{
__WIFI_AWARE_FUNC_ENTER__;
}
int _wifi_aware_data_path_set_service_specific_info(wifi_aware_data_path_h data_path,
- unsigned char *service_specific_info, size_t service_specific_info_len)
+ const unsigned char *service_specific_info, size_t service_specific_info_len)
{
__WIFI_AWARE_FUNC_ENTER__;
}
static void __data_path_invoke_callback(wifi_aware_data_path_h data_path, wifi_aware_error_e error,
- unsigned char *mac, unsigned char *specific_info, size_t specific_info_len)
+ const unsigned char *mac, const unsigned char *specific_info, size_t specific_info_len)
{
RET_IF(data_path == NULL, "data path handle is NULL");
wifi_aware_data_path_s *ndp = (wifi_aware_data_path_s *)data_path;
int wifi_aware_gdbus_ndp_psk(wifi_aware_data_path_h data_path,
uint16_t pub_sub_id, unsigned int peer_id, wifi_aware_data_path_role_e role,
- unsigned char *specific_info, size_t specific_info_len,
+ const unsigned char *specific_info, size_t specific_info_len,
const char *psk,
GAsyncReadyCallback cb)
{
int wifi_aware_gdbus_ndp_pmk(wifi_aware_data_path_h data_path,
uint16_t pub_sub_id, unsigned int peer_id, wifi_aware_data_path_role_e role,
- unsigned char *specific_info, size_t specific_info_len,
+ const unsigned char *specific_info, size_t specific_info_len,
const unsigned char *pmk, size_t pmk_len,
GAsyncReadyCallback cb)
{
}
static void __wifi_aware_discovered_cb(wifi_aware_session_h session, wifi_aware_peer_h peer,
- unsigned char *specific_info, size_t specific_info_len)
+ const unsigned char *specific_info, size_t specific_info_len)
{
RET_IF(session == NULL, "Session is NULL");
wifi_aware_session_s *handle = (wifi_aware_session_s *)session;
}
static void __wifi_aware_received_cb(wifi_aware_session_h session, wifi_aware_peer_h peer,
- unsigned char *specific_info, size_t specific_info_len)
+ const unsigned char *specific_info, size_t specific_info_len)
{
RET_IF(session == NULL, "Session is NULL");
wifi_aware_session_s *handle = (wifi_aware_session_s *)session;
}
void _wifi_aware_publish_set_service_specific_info(wifi_aware_publish_h publish,
- unsigned char *service_specific_info, size_t len)
+ const unsigned char *service_specific_info, size_t len)
{
wifi_aware_publish_request_s *req = (wifi_aware_publish_request_s *)publish;
memcpy(req->specific_info, service_specific_info, len);
}
void _wifi_aware_publish_set_match_filter(wifi_aware_publish_h publish,
- unsigned char *match_filter, size_t len)
+ const unsigned char *match_filter, size_t len)
{
wifi_aware_publish_request_s *req = (wifi_aware_publish_request_s *)publish;
memcpy(req->match_filter, match_filter, len);
}
void _wifi_aware_subscribe_set_service_specific_info(wifi_aware_subscribe_h subscribe,
- unsigned char *service_specific_info, size_t len)
+ const unsigned char *service_specific_info, size_t len)
{
wifi_aware_subscribe_request_s *req = (wifi_aware_subscribe_request_s *)subscribe;
memcpy(req->specific_info, service_specific_info, len);
}
void _wifi_aware_subscribe_set_match_filter(wifi_aware_subscribe_h subscribe,
- unsigned char *match_filter, size_t len)
+ const unsigned char *match_filter, size_t len)
{
wifi_aware_subscribe_request_s *req = (wifi_aware_subscribe_request_s *)subscribe;
memcpy(req->match_filter, match_filter, len);
int _wifi_aware_send_message(wifi_aware_session_h session,
wifi_aware_peer_h peer,
- unsigned char *message, size_t len,
+ const unsigned char *message, size_t len,
wifi_aware_send_message_result_cb callback, void *user_data)
{
__WIFI_AWARE_FUNC_ENTER__;
}
API int wifi_aware_publish_set_service_specific_info(wifi_aware_publish_h publish,
- unsigned char *service_specific_info, size_t len)
+ const unsigned char *service_specific_info, size_t len)
{
__WIFI_AWARE_FUNC_ENTER__;
CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_WIFI_AWARE);
}
API int wifi_aware_publish_set_match_filter(wifi_aware_publish_h publish,
- unsigned char *match_filter, size_t len)
+ const unsigned char *match_filter, size_t len)
{
__WIFI_AWARE_FUNC_ENTER__;
CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_WIFI_AWARE);
API int wifi_aware_subscribe_set_service_specific_info(
wifi_aware_subscribe_h subscribe,
- unsigned char *service_specific_info, size_t len)
+ const unsigned char *service_specific_info, size_t len)
{
__WIFI_AWARE_FUNC_ENTER__;
CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_WIFI_AWARE);
API int wifi_aware_subscribe_set_match_filter(
wifi_aware_subscribe_h subscribe,
- unsigned char *match_filter, size_t len)
+ const unsigned char *match_filter, size_t len)
{
__WIFI_AWARE_FUNC_ENTER__;
CHECK_FEATURE_SUPPORTED(TIZEN_FEATURE_WIFI_AWARE);
API int wifi_aware_send_message(wifi_aware_session_h session,
wifi_aware_peer_h peer,
- unsigned char *message, size_t len,
+ const unsigned char *message, size_t len,
wifi_aware_send_message_result_cb callback, void *user_data)
{
__WIFI_AWARE_FUNC_ENTER__;
return ret;
}
-API int wifi_aware_data_path_set_psk(wifi_aware_data_path_h data_path, char *key)
+API int wifi_aware_data_path_set_psk(wifi_aware_data_path_h data_path, const char *key)
{
int ret = WIFI_AWARE_ERROR_NONE;
return ret;
}
-API int wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path, unsigned char *key)
+API int wifi_aware_data_path_set_pmk(wifi_aware_data_path_h data_path, const unsigned char *key)
{
int ret = WIFI_AWARE_ERROR_NONE;
return ret;
}
-API int wifi_aware_data_path_set_service_specific_info(wifi_aware_data_path_h data_path, unsigned char *service_specific_info, size_t service_specific_info_len)
+API int wifi_aware_data_path_set_service_specific_info(wifi_aware_data_path_h data_path, const unsigned char *service_specific_info, size_t service_specific_info_len)
{
int ret = WIFI_AWARE_ERROR_NONE;