Tizen Native API
7.0
|
Wi-Fi Direct provides API to manage Application Service Platform.
Required Header
#include <asp.h>
Overview
This set of functions is used to manage the settings of Application Service Platform. In addition, This set provides functions to discovery and manage sessions using Application Service Platform.
Related Features
This API is related with the following features:
- http://tizen.org/feature/network.wifi
- http://tizen.org/feature/network.wifi.direct
- http://tizen.org/feature/network.wifi.direct.asp
- http://tizen.org/feature/network.wifi.direct.display
- http://tizen.org/feature/network.wifi.direct.service_discovery
It is recommended to use feature related code in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on using features in your application can be found in the Feature Element.
Functions | |
int | asp_initialize (void) |
Initializes Application Service Platform (ASP). | |
int | asp_deinitialize (void) |
Deinitializes Application Service Platform (ASP). | |
int | asp_seek_set_search_result_cb (asp_seek_search_result_cb cb, void *user_data) |
Registers the callback function that will be invoked when a service found. | |
int | asp_seek_unset_search_result_cb (void) |
Unregisters the callback function that will invoked when a service found. | |
int | asp_advert_set_status_changed_cb (asp_advert_status_changed_cb cb, void *user_data) |
Registers the callback function that will invoked when the status of an advertisement to a service is changed. | |
int | asp_advert_unset_status_changed_cb (void) |
Unregisters the callback function that will invoked when the status of an advertisement to a service is changed. | |
int | asp_session_set_request_cb (asp_session_request_cb cb, void *user_data) |
Registers the callback called when ASP session connection is requested. | |
int | asp_session_unset_request_cb (void) |
Unregisters the callback called ASP when session connection is requested. | |
int | asp_session_set_config_request_cb (asp_session_config_request_cb cb, void *user_data) |
Registers the callback called when the session configuration is requested. | |
int | asp_session_unset_config_request_cb (void) |
Unregisters the callback called when the session configuration is requested. | |
int | asp_session_set_connect_status_cb (asp_session_connect_status_cb cb, void *user_data) |
Registers the callback called when the state of the session connection is changed. | |
int | asp_session_unset_connect_status_cb (void) |
Unregisters the callback called when the state of the session connection is changed. | |
int | asp_session_set_status_cb (asp_session_status_cb cb, void *user_data) |
Registers the callback called when the state of the session is changed. | |
int | asp_session_unset_status_cb (void) |
Unregisters the callback called when the state of the session is changed. | |
int | asp_session_set_port_status_cb (asp_session_port_status_cb cb, void *user_data) |
Registers the callback called when the state of the port is changed. | |
int | asp_session_unset_port_status_cb (void) |
Unregisters the callback called when the state of the port is changed. | |
int | asp_advert_create (char *instance_name, asp_advert_service_h *adv_service) |
Creates the description of a service to be advertised. | |
int | asp_advert_destroy (asp_advert_service_h adv_service) |
Destroys the description of a service to be advertised. | |
int | asp_advert_set_service_type (asp_advert_service_h adv_service, char *service_type) |
Sets the service type for a service to be advertised. | |
int | asp_advert_set_auto_accept (asp_advert_service_h adv_service, bool auto_accept) |
Sets auto accept for a service to be advertised. | |
int | asp_advert_add_info (asp_advert_service_h adv_service, const char *key, const char *value) |
Adds the information for a service to be advertised. | |
int | asp_advert_get_info (asp_advert_service_h adv_service, const char *key, int *length, char **value) |
Sets the information for a service to be advertised. | |
int | asp_advert_remove_info (asp_advert_service_h adv_service, const char *key) |
Sets the information for a service to be advertised. | |
int | asp_advert_set_status (asp_advert_service_h adv_service, unsigned char status) |
Sets the status for a service to be advertised. | |
int | asp_advert_set_discovery_tech (asp_advert_service_h adv_service, int discovery_tech) |
Sets the discovery mechanism for a service to be advertised. | |
int | asp_advert_set_preferred_connection (asp_advert_service_h adv_service, unsigned char preferred_connection) |
Sets the preferred connection for a service to be advertised. | |
int | asp_advert_set_p2p_role_scheme (asp_advert_service_h adv_service, asp_advert_p2p_role_scheme_e role) |
Sets the Wi-Fi P2P role for a service to be advertised. | |
int | asp_advert_get_p2p_role_scheme (asp_advert_service_h adv_service, asp_advert_p2p_role_scheme_e *role) |
Gets the Wi-Fi P2P role for a service to be advertised. | |
int | asp_advert_set_p2p_config_method (asp_advert_service_h adv_service, asp_wps_type_e config_method) |
Sets the P2P configuration method for a service to be advertised. | |
int | asp_advert_get_p2p_config_method (asp_advert_service_h adv_service, asp_wps_type_e *config_method) |
Gets the P2P configuration method for a service to be advertised. | |
int | asp_advert_set_p2p_response (asp_advert_service_h adv_service, char *rsp_info, int length) |
Sets the service response for an advertised service. | |
int | asp_advert_start_advertising (asp_advert_service_h adv_service) |
Starts to advertise a service. | |
int | asp_advert_stop_advertising (asp_advert_service_h adv_service) |
Stops a service advertisement. | |
int | asp_advert_change_service_status (asp_advert_service_h adv_service, unsigned char status) |
Changes the advertising service status. | |
int | asp_seek_create (char *service_type, asp_seek_service_h *seek_service) |
Creates the description of a seek operation. | |
int | asp_seek_destroy (asp_seek_service_h seek_service) |
Destroys the description of a seek operation. | |
int | asp_seek_add_info (asp_seek_service_h seek_service, const char *key) |
Adds the information for a service to be sought. | |
int | asp_seek_remove_info (asp_seek_service_h seek_service, const char *key) |
Removes the information for a service to be sought. | |
int | asp_seek_set_discovery_tech (asp_seek_service_h seek_service, int discovery_tech) |
Sets the discovery mechanism for a service to be sought. | |
int | asp_seek_set_preferred_connection (asp_seek_service_h seek_service, unsigned char preferred_connection) |
Sets the preferred connection for a service to be sought. | |
int | asp_seek_start (asp_seek_service_h seek_service) |
Starts to seek services on peer devices. | |
int | asp_seek_stop (asp_seek_service_h seek_service) |
Stops seeking services. | |
int | asp_session_create (char *service_mac, unsigned int adv_id, asp_session_h *session) |
Creates a local Application Service Platform (ASP) session. | |
int | asp_session_destroy (asp_session_h session) |
Destroys a local Application Service Platform (ASP) session. | |
int | asp_session_get_mac (asp_session_h session, char **session_mac) |
Gets the session MAC for an Application Service Platform session. | |
int | asp_session_get_id (asp_session_h session, unsigned int *session_id) |
Gets the ID of an Application Service Platform session. | |
int | asp_session_set_info (asp_session_h session, char *session_info) |
Sets the information for an Application Service Platform session. | |
int | asp_session_get_info (asp_session_h session, char **session_info) |
Gets the information for an Application Service Platform session. | |
int | asp_session_set_p2p_role_scheme (asp_session_h session, asp_advert_p2p_role_scheme_e role) |
Sets the Wi-Fi Direct group role in session. | |
int | asp_session_get_p2p_role_scheme (asp_session_h session, asp_advert_p2p_role_scheme_e *role) |
Gets the Wi-Fi Direct group role in session. | |
int | asp_session_set_p2p_config_method (asp_session_h session, asp_wps_type_e config_method) |
Sets the Preferred WSC Configuration method. | |
int | asp_session_get_p2p_config_method (asp_session_h session, asp_wps_type_e *config_method) |
Gets the Preferred WSC Configuration method. | |
int | asp_session_get_close_status (asp_session_h session, int *status) |
Gets the session close status. | |
int | asp_session_connect (asp_session_h session) |
Starts to connect the Application Service Platform session. | |
int | asp_session_confirm (asp_session_h session, bool confirmed, char *pin) |
Confirms the Application Service Platform(ASP) session request. | |
int | asp_session_get_handle (char *session_mac, unsigned int session_id, asp_session_h *session) |
Gets the Description of Application Service Platform (ASP) session to be connected. | |
int | asp_session_set_state_ready (asp_session_h session) |
Moves an Application Service Platform (ASP) session from Requested state to the Open state. | |
int | asp_session_close (asp_session_h session) |
Ends an Application Service Platform (ASP) session and releases associated resources. | |
int | asp_session_bind_port (asp_session_h session, char *ip_address, int port, int proto) |
Requests that incoming connections be allowed on a given port. | |
int | asp_session_release_port (asp_session_h session, char *ip_address, int port, int proto) |
Indicates that the service is no longer utilizing the port in the ASP session. | |
Typedefs | |
typedef void * | asp_advert_service_h |
The advertised service description. | |
typedef void * | asp_seek_service_h |
The searching service description. | |
typedef void * | asp_session_h |
The Application Service Platform (ASP) session description. | |
typedef void(* | asp_seek_search_result_cb )(int error_code, asp_seek_service_h seek_service, const char *service_mac, unsigned int adv_id, asp_wps_type_e config_method, const char *instance_name, const char *service_info, int info_size, unsigned char status, void *user_data) |
Called when the Application Service Platform (ASP) Service is found. | |
typedef void(* | asp_advert_status_changed_cb )(asp_advert_service_h adv_service, asp_service_status_e status, asp_advert_status_reason_e reason, void *user_data) |
Called when the status of an advertisement to a service is changed. | |
typedef void(* | asp_session_request_cb )(int error_code, asp_advert_service_h adv_service, asp_session_h session, const char *device_name, const char *info, int info_size, bool get_network_config_pin, const char *network_config_pin, void *user_data) |
Called when a remote device is attempting to initiate an ASP session. | |
typedef void(* | asp_session_config_request_cb )(int error_code, asp_session_h session, bool get_pin, const char *config_pin, void *user_data) |
Called when the Application Service Platform (ASP) has to provide a PIN value or collect a PIN value. | |
typedef void(* | asp_session_connect_status_cb )(int error_code, asp_session_h session, asp_connect_status_e status, const char *deferred_resp, int resp_size, void *user_data) |
Called when the Application Service Platform (ASP) reports progress on group formation. | |
typedef void(* | asp_session_status_cb )(int error_code, asp_session_h session, asp_session_state_e state, const char *additional_info, void *user_data) |
Called when the Application Service Platform (ASP) reports the state and status of an ASP session. | |
typedef void(* | asp_session_port_status_cb )(int error_code, asp_session_h session, const char *ip_address, int port, int proto, asp_port_status_e status, void *user_data) |
Called when the Application Service Platform (ASP) reports the status of the network port on the local and remote end of the ASP session. |
Typedef Documentation
typedef void* asp_advert_service_h |
The advertised service description.
- Since :
- 4.0
typedef void(* asp_advert_status_changed_cb)(asp_advert_service_h adv_service, asp_service_status_e status, asp_advert_status_reason_e reason, void *user_data) |
Called when the status of an advertisement to a service is changed.
- Since :
- 4.0
- Parameters:
-
[in] adv_service The service whose status has changed; the handle to the same object for which the callback was set [in] status The status of the service [in] reason The reason of the state change [in] user_data The user data passed from the callback registration function
- Precondition:
- The callback must be registered using asp_advert_set_status_cb().
asp_advert_start_advertising() and asp_change_service_state() invoke this callback.
typedef void(* asp_seek_search_result_cb)(int error_code, asp_seek_service_h seek_service, const char *service_mac, unsigned int adv_id, asp_wps_type_e config_method, const char *instance_name, const char *service_info, int info_size, unsigned char status, void *user_data) |
Called when the Application Service Platform (ASP) Service is found.
- Since :
- 4.0
- Remarks:
- service_mac, instance_name and service_info are valid only in the callback. To use outside the callback, make a copy.
- Parameters:
-
[in] error_code The error code.
ASP_ERROR_NONE Successful
ASP_ERROR_OUT_OF_MEMORY Out of memory
ASP_ERROR_OPERATION_FAILED Operation failed
[in] seek_service The seek service which found the current result; the handle to the same object for which the search was started [in] service_mac The P2P device address of the device which provides the service; NULL if not available [in] adv_id The service advertisement ID defined by remote P2P device [in] config_method The preferred Wi-Fi Simple Config (WSC) configuration method [in] instance_name The advertised service name defined by the remote P2P device; NULL if not available [in] service_info The advertised service information defined by the remote P2P device; NULL if not available [in] info_size The advertised service information payload size; if the information is not available, this is set to -1 [in] status The status of the service [in] user_data The user data passed from the callback registration function
- Precondition:
- The callback must be registered using asp_seek_set_search_result_cb().
asp_seek_start() must be called to invoke this callback.
typedef void* asp_seek_service_h |
The searching service description.
- Since :
- 4.0
typedef void(* asp_session_config_request_cb)(int error_code, asp_session_h session, bool get_pin, const char *config_pin, void *user_data) |
Called when the Application Service Platform (ASP) has to provide a PIN value or collect a PIN value.
- Since :
- 4.0
- Remarks:
- config_pin is valid only in the callback. To use outside the callback, make a copy.
- Parameters:
-
[in] error_code The error code.
ASP_ERROR_NONE Successful
ASP_ERROR_OUT_OF_MEMORY Out of memory
ASP_ERROR_OPERATION_FAILED Operation failed
[in] session The session for which the request is made; the handle to the same object for which the callback was set [in] get_pin ( true
= instruct the user to enter the PIN,false
= display the PIN provided in the config_pin parameter)[in] config_pin The WSC PIN value used for setting up; ignored if get_pin is true
[in] user_data The user data passed from the callback registration function
- Precondition:
- The callback must be registered using asp_session_set_config_request_cb().
asp_session_connect() must be called to invoke this callback.
typedef void(* asp_session_connect_status_cb)(int error_code, asp_session_h session, asp_connect_status_e status, const char *deferred_resp, int resp_size, void *user_data) |
Called when the Application Service Platform (ASP) reports progress on group formation.
- Since :
- 4.0
- Remarks:
- deferred_resp is valid only in the callback. To use outside the callback, make a copy.
- Parameters:
-
[in] error_code The error code.
ASP_ERROR_NONE Successful
ASP_ERROR_OUT_OF_MEMORY Out of memory
ASP_ERROR_OPERATION_FAILED Operation failed
[in] session The session for which progress is reported; the handle to the same object for which the callback was set [in] status The connection progress status [in] deferred_resp The service-specific data payload up to 144 bytes [in] resp_size The service-specific data payload size(up to 144) [in] user_data The user data passed from the callback registration function
- Precondition:
- The callback must be registered using asp_session_set_connect_status_cb()
- See also:
- asp_session_set_connect_status_cb()
typedef void* asp_session_h |
The Application Service Platform (ASP) session description.
- Since :
- 4.0
typedef void(* asp_session_port_status_cb)(int error_code, asp_session_h session, const char *ip_address, int port, int proto, asp_port_status_e status, void *user_data) |
Called when the Application Service Platform (ASP) reports the status of the network port on the local and remote end of the ASP session.
- Since :
- 4.0
- Remarks:
- ip_address is valid only in the callback. To use outside the callback, make a copy.
- Parameters:
-
[in] error_code The error code.
ASP_ERROR_NONE Successful
ASP_ERROR_OUT_OF_MEMORY Out of memory
ASP_ERROR_OPERATION_FAILED Operation failed
[in] session Application Service Platform session descriptor handle [in] ip_address The IP address for the port, local or remote [in] port The port number [in] proto The IANA protocol number [in] status The port status [in] user_data The user data passed from the callback registration function
- Precondition:
- The callback must be registered using asp_session_set_port_status_cb()
- See also:
- asp_session_set_port_status_cb()
typedef void(* asp_session_request_cb)(int error_code, asp_advert_service_h adv_service, asp_session_h session, const char *device_name, const char *info, int info_size, bool get_network_config_pin, const char *network_config_pin, void *user_data) |
Called when a remote device is attempting to initiate an ASP session.
- Since :
- 4.0
- Remarks:
- network_config_pin, device_name and info are valid only in the callback. To use outside the callback, make a copy.
- Parameters:
-
[in] error_code The error code.
ASP_ERROR_NONE Successful
ASP_ERROR_OUT_OF_MEMORY Out of memory
ASP_ERROR_OPERATION_FAILED Operation failed
[in] adv_service Service descriptor handle provided by the asp_advert_create() it is the "original" object not created specifically for the callback [in] session The session for which the request is made; the handle to the same object for which the callback was set [in] device_name Device name of the remote peer [in] info The service-specific data payload (up to 144 bytes); NULL if not available [in] info_size The service-specific data payload size (up to 144) [in] get_network_config_pin ( true
= requires WSC PIN to be entered by the asp_session_confirm(),false
= does not require PIN)[in] network_config_pin The WSC PIN value to be displayed; NULL if not available [in] user_data The user data passed from the callback registration function
- Precondition:
- The callback must be registered using asp_session_set_request_cb().
- See also:
- asp_session_set_request_cb()
typedef void(* asp_session_status_cb)(int error_code, asp_session_h session, asp_session_state_e state, const char *additional_info, void *user_data) |
Called when the Application Service Platform (ASP) reports the state and status of an ASP session.
- Since :
- 4.0
- Remarks:
- additional_info is valid only in the callback. To use outside the callback, make a copy.
- Parameters:
-
[in] error_code The error code.
ASP_ERROR_NONE Successful
ASP_ERROR_OUT_OF_MEMORY Out of memory
ASP_ERROR_OPERATION_FAILED Operation failed
[in] session The session for which status is reported; the handle to the same object for which the callback was set [in] state The session state [in] additional_info Additional information related to the SessionStatus event [in] user_data The user data passed from the callback registration function
- Precondition:
- The callback must be registered using asp_session_set_status_cb()
- See also:
- asp_session_set_status_cb()
Enumeration Type Documentation
Enumeration for the Wi-Fi P2P role assignment scheme.
- Since :
- 4.0
enum asp_connect_status_e |
Enumeration for Application Service Platform (ASP) Session connect status.
- Since :
- 4.0
- Enumerator:
enum asp_discovery_tech_e |
Enumeration for service discovery mechanism.
- Since :
- 4.0
- Enumerator:
enum asp_error_e |
Enumeration for Application Service Platform (ASP) error code.
- Since :
- 4.0
- Enumerator:
enum asp_port_status_e |
Enumeration for Application Service Platform (ASP) port status.
- Since :
- 4.0
- Enumerator:
enum asp_service_status_e |
Enumeration for Application Service Platform (ASP) session close status.
- Since :
- 4.0
- Enumerator:
enum asp_session_state_e |
Enumeration for Application Service Platform (ASP) general session state.
- Since :
- 4.0
enum asp_wps_type_e |
Enumeration for Wi-Fi WPS type.
- See also:
- asp_advert_set_p2p_config_method()
- asp_advert_get_p2p_config_method()
- asp_session_set_p2p_config_method()
- asp_session_get_p2p_config_method()
- Since :
- 4.0
Function Documentation
int asp_advert_add_info | ( | asp_advert_service_h | adv_service, |
const char * | key, | ||
const char * | value | ||
) |
Adds the information for a service to be advertised.
Application should set service information after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] key Service-defined key data specified in Section 6 of RFC6763 [in] value Service-defined value data specified in Section 6 of RFC6763 Only one value can be added for a given key. If a value is set for a key, and another value was set for the key before, the old value will be overwritten with the new one.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_change_service_status | ( | asp_advert_service_h | adv_service, |
unsigned char | status | ||
) |
Changes the advertising service status.
Application should change the advertising service status after advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] status Status of the service: ( 1
= available to use,0
= not available to use,2-255
= service specific information)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_start_advertising() before use
- See also:
- asp_advert_start_advertising()
int asp_advert_create | ( | char * | instance_name, |
asp_advert_service_h * | adv_service | ||
) |
Creates the description of a service to be advertised.
- Since :
- 4.0
- Remarks:
- The adv_service should be released using asp_advert_destroy().
- Parameters:
-
[in] instance_name Service instance name of a service type to be advertised. The length of this parameter be 63 byte or less and encoding shall be single-byte or multi-byte UTF-8 characters. If you want to advertise one of the original P2PS defined services, this shall be NULL. [out] adv_service service descriptor handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
- See also:
- asp_advert_destroy()
int asp_advert_destroy | ( | asp_advert_service_h | adv_service | ) |
Destroys the description of a service to be advertised.
If asp_advert_start_advertising() was called for a service, asp_advert_stop_advertising() should be called for it before destroying it.
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_get_info | ( | asp_advert_service_h | adv_service, |
const char * | key, | ||
int * | length, | ||
char ** | value | ||
) |
Sets the information for a service to be advertised.
Application should set service information after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Remarks:
- value should not be freed. It is recommended to make a copy of it to use.
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] key Service-defined key data specified in Section 6 of RFC6763 [in] length Length of service-defined value data specified in Section 6 of RFC6763 [in] value Service-defined value data specified in Section 6 of RFC6763
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_get_p2p_config_method | ( | asp_advert_service_h | adv_service, |
asp_wps_type_e * | config_method | ||
) |
Gets the P2P configuration method for a service to be advertised.
Application should Get configuration method after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] config_method preferred Wi-Fi Simple Config (WSC)configuration method.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_get_p2p_role_scheme | ( | asp_advert_service_h | adv_service, |
asp_advert_p2p_role_scheme_e * | role | ||
) |
Gets the Wi-Fi P2P role for a service to be advertised.
Application should Get role after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] role The role of the service:
ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable
ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume
the GO role
ASP_ADVERT_P2P_ROLE_SCHEME_GC - The receiving interface should assume the GC role
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_remove_info | ( | asp_advert_service_h | adv_service, |
const char * | key | ||
) |
Sets the information for a service to be advertised.
Application should set service information after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] key Service-defined key data specified to be removed
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_auto_accept | ( | asp_advert_service_h | adv_service, |
bool | auto_accept | ||
) |
Sets auto accept for a service to be advertised.
Application should set service auto accept after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] auto_accept Enables/Disables auto accept based on the value TRUE/FALSE
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_discovery_tech | ( | asp_advert_service_h | adv_service, |
int | discovery_tech | ||
) |
Sets the discovery mechanism for a service to be advertised.
Application should set discovery mechanism after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] discovery_tech The discovery mechanism; values of asp_discovery_tech_e combined with bitwise 'or'
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_p2p_config_method | ( | asp_advert_service_h | adv_service, |
asp_wps_type_e | config_method | ||
) |
Sets the P2P configuration method for a service to be advertised.
Application should set configuration method after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] config_method preferred Wi-Fi Simple Config (WSC) configuration method. Default value is ASP_WPS_TYPE_DEFAULT.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_p2p_response | ( | asp_advert_service_h | adv_service, |
char * | rsp_info, | ||
int | length | ||
) |
Sets the service response for an advertised service.
Application should set service response after creating service using asp_advert_create() and before advertising service using asp_advert_create().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] rsp_info Specified for a particular service up to 144 bytes. You can refer to Wi-Fi Peer-to-Peer Services Technical Specification, Wi-Fi Alliance. Available at: http://www.wi-fi.org [in] length The length of rsp_info in bytes, maximum length is 144
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_p2p_role_scheme | ( | asp_advert_service_h | adv_service, |
asp_advert_p2p_role_scheme_e | role | ||
) |
Sets the Wi-Fi P2P role for a service to be advertised.
Application should set role after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] role The role of the service:
ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable
ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume
the GO role, if it's not possible, ASP_ERROR_NETWORK_ROLE_REJECTED
is returned
ASP_ADVERT_P2P_ROLE_SCHEME_GC - The receiving interface should assume the GC role
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found ASP_ERROR_NETWORK_ROLE_REJECTED Network role rejected
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_preferred_connection | ( | asp_advert_service_h | adv_service, |
unsigned char | preferred_connection | ||
) |
Sets the preferred connection for a service to be advertised.
Application should set preferred connection after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] preferred_connection The preferred connection
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_service_type | ( | asp_advert_service_h | adv_service, |
char * | service_type | ||
) |
Sets the service type for a service to be advertised.
Application should set service type after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] service_type The unique type of a particular service. this shall be at least 1 character and no more than 15 characters long contain only US-ASCII [ANSI.X3.4-1986] letters 'A' - 'Z' and 'a' - 'z', digits '0' - '9', and hyphens ('-', ASCII 0x2D or decimal 45) contain at least one letter ('A' - 'Z' or 'a' - ‘z') not begin or end with a hyphen. If you want to advertise one of the original P2PS defined services, this means service name.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_status | ( | asp_advert_service_h | adv_service, |
unsigned char | status | ||
) |
Sets the status for a service to be advertised.
Application should set service status after creating service using asp_advert_create() and before advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create() [in] status Status of the service: ( 1
= available to use,0
= not available to use,2-255
= service specific information)
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
- See also:
- asp_advert_create()
int asp_advert_set_status_changed_cb | ( | asp_advert_status_changed_cb | cb, |
void * | user_data | ||
) |
Registers the callback function that will invoked when the status of an advertisement to a service is changed.
- Since :
- 4.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data passed from the callback registration function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
- Postcondition:
- asp_seek_search_result_cb() will be called under certain conditions, after calling asp_seek_start()
int asp_advert_start_advertising | ( | asp_advert_service_h | adv_service | ) |
Starts to advertise a service.
Application should start to advertise after creating service using asp_advert_create(). If the service is being advertised, no changes can be made to it.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_create() before use
int asp_advert_stop_advertising | ( | asp_advert_service_h | adv_service | ) |
Stops a service advertisement.
Application should cancel to advertise after advertising service using asp_advert_start_advertising().
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] adv_service Service descriptor handle provided by the asp_advert_create()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_advert_start_advertising() before use
- See also:
- asp_advert_start_advertising()
int asp_advert_unset_status_changed_cb | ( | void | ) |
Unregisters the callback function that will invoked when the status of an advertisement to a service is changed.
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_deinitialize | ( | void | ) |
Deinitializes Application Service Platform (ASP).
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_COMMUNICATION_FAILED Communication failed
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
- See also:
- asp_initialize()
int asp_initialize | ( | void | ) |
Initializes Application Service Platform (ASP).
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_RESOURCE_BUSY Device or resource busy ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_COMMUNICATION_FAILED Communication failed ASP_ERROR_OPERATION_FAILED Operation failed
- See also:
- asp_deinitialize()
int asp_seek_add_info | ( | asp_seek_service_h | seek_service, |
const char * | key | ||
) |
Adds the information for a service to be sought.
Application should set service information after creating service using asp_seek_create() and before seeking service using asp_seek_start().
- Since :
- 4.0
- Privilege Level:
- public
- Parameters:
-
[in] seek_service Service descriptor handle provided by the asp_seek_create() [in] key Service-defined key data to be searched, specified in Section 6 of RFC6763
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_seek_create() before use
- See also:
- asp_seek_create()
int asp_seek_create | ( | char * | service_type, |
asp_seek_service_h * | seek_service | ||
) |
Creates the description of a seek operation.
- Remarks:
- The seek_service should be released using asp_seek_destroy().
- Since :
- 4.0
- Parameters:
-
[in] service_type Service Type of a service being searched. this shall be at least 1 character and no more than 15 characters long contain only US-ASCII [ANSI.X3.4-1986] letters 'A' - 'Z' and 'a' - 'z', digits '0' - '9', and hyphens ('-', ASCII 0x2D or decimal 45) contain at least one letter ('A' - 'Z' or 'a' - ‘z') not begin or end with a hyphen. If you want to seek one of the original P2PS defined services, this means service name. [out] seek_service Service seek handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
- See also:
- asp_seek_destroy()
int asp_seek_destroy | ( | asp_seek_service_h | seek_service | ) |
Destroys the description of a seek operation.
If asp_seek_start() was called for a service, asp_seek_stop() should be called for it before destroying it. asp_seek_stop().
- Since :
- 4.0
- Parameters:
-
[in] seek_service Service seek handle provided by the asp_seek_create()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- A seek service handle must be created with asp_seek_create().
- See also:
- asp_seek_create
int asp_seek_remove_info | ( | asp_seek_service_h | seek_service, |
const char * | key | ||
) |
Removes the information for a service to be sought.
Application should set service information after creating service using asp_seek_create() and before seeking service using asp_seek_start().
- Since :
- 4.0
- Parameters:
-
[in] seek_service Service descriptor handle provided by the asp_seek_create() [in] key Service-defined key data to be searched, specified in Section 6 of RFC6763
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_seek_create() before use
- See also:
- asp_seek_create()
int asp_seek_set_discovery_tech | ( | asp_seek_service_h | seek_service, |
int | discovery_tech | ||
) |
Sets the discovery mechanism for a service to be sought.
Application should set service information after creating service using asp_seek_create() and before seeking service using asp_seek_start().
- Since :
- 4.0
- Parameters:
-
[in] seek_service Service descriptor handle provided by the asp_seek_create() [in] discovery_tech The discovery mechanism, values of asp_discovery_tech_e combined with bitwise 'or'
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_seek_create() before use
- See also:
- asp_seek_create()
int asp_seek_set_preferred_connection | ( | asp_seek_service_h | seek_service, |
unsigned char | preferred_connection | ||
) |
Sets the preferred connection for a service to be sought.
Application should set service information after creating service using asp_seek_create() and before seeking service using asp_seek_start().
- Since :
- 4.0
- Parameters:
-
[in] seek_service Service descriptor handle provided by the asp_seek_create() [in] preferred_connection The preferred connection
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- This API needs asp_seek_create() before use
- See also:
- asp_seek_create()
int asp_seek_set_search_result_cb | ( | asp_seek_search_result_cb | cb, |
void * | user_data | ||
) |
Registers the callback function that will be invoked when a service found.
- Since :
- 4.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data passed from the callback registration function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
- Postcondition:
- asp_search_result_cb will be called under certain conditions, after calling asp_seek_start()
int asp_seek_start | ( | asp_seek_service_h | seek_service | ) |
Starts to seek services on peer devices.
If the service is currently seeking, no changes can be made to it.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] seek_service Service seek handle provided by the asp_seek_create()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- A seek service handle must be created with asp_seek_create().
- See also:
- asp_seek_create()
- asp_seek_stop()
int asp_seek_stop | ( | asp_seek_service_h | seek_service | ) |
Stops seeking services.
Application should cancel to seek service after searching service using asp_seek_start().
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] seek_service Service seek handle provided by the asp_seek_create()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SERVICE_NOT_FOUND Service not found
- Precondition:
- A seek service handle must be created with asp_seek_create().
- See also:
- asp_seek_start()
int asp_seek_unset_search_result_cb | ( | void | ) |
Unregisters the callback function that will invoked when a service found.
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_bind_port | ( | asp_session_h | session, |
char * | ip_address, | ||
int | port, | ||
int | proto | ||
) |
Requests that incoming connections be allowed on a given port.
- Since :
- 4.0
- Parameters:
-
[in] session ASP session descriptor handle provided by the asp_session_request_cb() callback or asp_session_create() [in] ip_address The IP address on which the port is being used [in] port The port number [in] proto The IANA protocol number
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
int asp_session_close | ( | asp_session_h | session | ) |
Ends an Application Service Platform (ASP) session and releases associated resources.
The ASP may tear down the underlying ASP P2P group if not other ASP sessions are using it.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] session ASP session descriptor handle provided by the asp_session_request_cb() callback or asp_session_create()
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
int asp_session_confirm | ( | asp_session_h | session, |
bool | confirmed, | ||
char * | pin | ||
) |
Confirms the Application Service Platform(ASP) session request.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] session ASP session descriptor handle provided by the asp_session_request_cb() callback or asp_session_create() if pin is requested. [in] confirmed ( true
= confirm session,false
= reject session)[in] pin If session requests the WSC PIN
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
int asp_session_connect | ( | asp_session_h | session | ) |
Starts to connect the Application Service Platform session.
- Since :
- 4.0
- Privilege Level:
- public
- Privilege:
- http://tizen.org/privilege/wifidirect
- Parameters:
-
[in] session Application Service Platform session descriptor handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_PERMISSION_DENIED Permission denied ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_create | ( | char * | service_mac, |
unsigned int | adv_id, | ||
asp_session_h * | session | ||
) |
Creates a local Application Service Platform (ASP) session.
- Since :
- 4.0
- Remarks:
- The session should be released using asp_session_destroy().
- Parameters:
-
[in] service_mac P2P device address of remote P2P device provided by asp_seek_search_result_cb() [in] adv_id The advertisement ID provided by asp_seek_search_result_cb() [out] session ASP session descriptor handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed
- See also:
- asp_session_destroy()
int asp_session_destroy | ( | asp_session_h | session | ) |
Destroys a local Application Service Platform (ASP) session.
Application should create session by asp_session_create().
- Since :
- 4.0
- Parameters:
-
[in] session Application Service Platform session descriptor handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_get_close_status | ( | asp_session_h | session, |
int * | status | ||
) |
Gets the session close status.
This call is valid only for closed sessions (sessions in the ASP_SESSION_STATE_CLOSED state). If the session does not identify a closed session, ASP_ERROR_NOT_PERMITTED is returned.
- Since :
- 4.0
- Parameters:
-
[in] session ASP session descriptor handle provided by the asp_session_request_cb() callback, asp_session_create(), or asp_session_get_handle() [out] status The session close status
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_SESSION_NOT_FOUND Session not found
int asp_session_get_handle | ( | char * | session_mac, |
unsigned int | session_id, | ||
asp_session_h * | session | ||
) |
Gets the Description of Application Service Platform (ASP) session to be connected.
- Since :
- 4.0
- Parameters:
-
[in] session_mac The MAC address of the P2P device that assigned the value of session_id, as provided by the asp_session_request_cb() callback or asp_session_create() if pin is requested. [in] session_id The session ID [out] session Peer-to-Peer service session descriptor handle
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- See also:
- asp_session_create()
int asp_session_get_id | ( | asp_session_h | session, |
unsigned int * | session_id | ||
) |
Gets the ID of an Application Service Platform session.
Application should create local session by asp_session_create() or receive request by asp_session_request_cb().
- Since :
- 4.0
- Parameters:
-
[in] session Application Service Platform session descriptor handle [out] session_id The session ID
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
int asp_session_get_info | ( | asp_session_h | session, |
char ** | session_info | ||
) |
Gets the information for an Application Service Platform session.
Application should get session_info after creating session by asp_session_create() and before requesting to connect session by asp_session_connect().
- Since :
- 4.0
- Remarks:
- session_info should not be freed. It is recommended to make a copy of it to use.
- Parameters:
-
[in] session Application Service Platform session descriptor handle provided by the asp_session_create() [out] session_info detailed information about session
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_get_mac | ( | asp_session_h | session, |
char ** | session_mac | ||
) |
Gets the session MAC for an Application Service Platform session.
Application should request to connect session by asp_session_connect() or receive request by asp_session_request_cb().
- Since :
- 4.0
- Remarks:
- session_mac should not be freed. It is recommended to make a copy of it to use.
- Parameters:
-
[in] session Application Service Platform session descriptor handle [out] session_mac The session MAC is the MAC address of P2P device which assigned the session ID
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_connect() before use.
int asp_session_get_p2p_config_method | ( | asp_session_h | session, |
asp_wps_type_e * | config_method | ||
) |
Gets the Preferred WSC Configuration method.
- Since :
- 4.0
- Parameters:
-
[in] session Application Service Platform session descriptor handle provided by the asp_session_create() [out] config_method Preferred WSC Configuration method
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_get_p2p_role_scheme | ( | asp_session_h | session, |
asp_advert_p2p_role_scheme_e * | role | ||
) |
Gets the Wi-Fi Direct group role in session.
- Since :
- 4.0
- Parameters:
-
[in] session Application Service Platform session descriptor handle provided by the asp_session_create() [in] role The role of the service:
ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable
ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume
the GO role
ASP_ADVERT_P2P_ROLE_SCHEME_GC - The receiving interface should assume the GC role
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_release_port | ( | asp_session_h | session, |
char * | ip_address, | ||
int | port, | ||
int | proto | ||
) |
Indicates that the service is no longer utilizing the port in the ASP session.
- Since :
- 4.0
- Parameters:
-
[in] session ASP session descriptor handle provided by the asp_session_request_cb() callback or asp_session_create() [in] ip_address The IP address on which the port is being used [in] port The port number [in] proto The IANA protocol number
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
int asp_session_set_config_request_cb | ( | asp_session_config_request_cb | cb, |
void * | user_data | ||
) |
Registers the callback called when the session configuration is requested.
- Since :
- 4.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data passed from the callback registration function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_set_connect_status_cb | ( | asp_session_connect_status_cb | cb, |
void * | user_data | ||
) |
Registers the callback called when the state of the session connection is changed.
- Since :
- 4.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data passed from the callback registration function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_set_info | ( | asp_session_h | session, |
char * | session_info | ||
) |
Sets the information for an Application Service Platform session.
Application should set session_info after creating session by asp_session_create() and before requesting to connect session by asp_session_connect().
- Since :
- 4.0
- Parameters:
-
[in] session Application Service Platform session descriptor handle provided by the asp_session_create() [in] session_info Detailed information about the session. The session_info parameter is defined for each service section and up to 144 bytes. You can refer to Wi-Fi Peer-to-Peer Services Technical Specification, Wi-Fi Alliance. Available at: http://www.wi-fi.org
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_set_p2p_config_method | ( | asp_session_h | session, |
asp_wps_type_e | config_method | ||
) |
Sets the Preferred WSC Configuration method.
Application should set the config method after creating session by asp_session_create() and before requesting to connect session by asp_session_connect().
- Since :
- 4.0
- Parameters:
-
[in] session Application Service Platform session descriptor handle provided by the asp_session_create() [in] config_method Preferred WSC Configuration method. Default value is ASP_WPS_TYPE_DEFAULT.
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_set_p2p_role_scheme | ( | asp_session_h | session, |
asp_advert_p2p_role_scheme_e | role | ||
) |
Sets the Wi-Fi Direct group role in session.
Application should set role after creating session by asp_session_create() and before requesting to connect session by asp_session_connect().
- Since :
- 4.0
- Parameters:
-
[in] session Application Service Platform session descriptor handle provided by the asp_session_create() [in] role The role of the service:
ASP_ADVERT_P2P_ROLE_SCHEME_ANY - All roles are acceptable
ASP_ADVERT_P2P_ROLE_SCHEME_GO - The receiving interface should assume
the GO role, if it's not possible, ASP_ERROR_NETWORK_ROLE_REJECTED
is returned
ASP_ADVERT_P2P_ROLE_SCHEME_GC - The receiving interface should assume the GC role
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found ASP_ERROR_NETWORK_ROLE_REJECTED Network role rejected
- Precondition:
- This API needs asp_session_create() before use.
- See also:
- asp_session_create()
int asp_session_set_port_status_cb | ( | asp_session_port_status_cb | cb, |
void * | user_data | ||
) |
Registers the callback called when the state of the port is changed.
- Since :
- 4.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data passed from the callback registration function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_set_request_cb | ( | asp_session_request_cb | cb, |
void * | user_data | ||
) |
Registers the callback called when ASP session connection is requested.
- Since :
- 4.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data passed from the callback registration function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_set_state_ready | ( | asp_session_h | session | ) |
Moves an Application Service Platform (ASP) session from Requested state to the Open state.
- Since :
- 4.0
- Parameters:
-
[in] session ASP session descriptor handle provided by the asp_session_request_cb() callback
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_PERMITTED Operation not permitted ASP_ERROR_OUT_OF_MEMORY Out of memory ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized ASP_ERROR_OPERATION_FAILED Operation failed ASP_ERROR_SESSION_NOT_FOUND Session not found
- Precondition:
- Peer-to-Peer service must be advertised by asp_advert_start_advertising().
Local device should be listening or finding remote P2P device by asp_advert_start_advertising()
- See also:
- asp_advert_start_advertising()
int asp_session_set_status_cb | ( | asp_session_status_cb | cb, |
void * | user_data | ||
) |
Registers the callback called when the state of the session is changed.
- Since :
- 4.0
- Parameters:
-
[in] cb The callback function to invoke [in] user_data The user data passed from the callback registration function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_INVALID_PARAMETER Invalid parameter ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_unset_config_request_cb | ( | void | ) |
Unregisters the callback called when the session configuration is requested.
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_unset_connect_status_cb | ( | void | ) |
Unregisters the callback called when the state of the session connection is changed.
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_unset_port_status_cb | ( | void | ) |
Unregisters the callback called when the state of the port is changed.
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_unset_request_cb | ( | void | ) |
Unregisters the callback called ASP when session connection is requested.
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().
int asp_session_unset_status_cb | ( | void | ) |
Unregisters the callback called when the state of the session is changed.
- Since :
- 4.0
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
ASP_ERROR_NONE Successful ASP_ERROR_NOT_SUPPORTED Not supported ASP_ERROR_NOT_INITIALIZED Not initialized
- Precondition:
- Application Service Platform (ASP) must be initialized by asp_initialize().