* @since_tizen 3.0
*/
typedef enum {
- DNSSD_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
- DNSSD_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory*/
- DNSSD_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */
- DNSSD_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter*/
- DNSSD_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
- DNSSD_ERROR_NOT_INITIALIZED = TIZEN_ERROR_DNSSD | 0x01, /**< Not Initialized */
- DNSSD_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_DNSSD | 0x02, /**< Already registered */
- DNSSD_ERROR_NAME_CONFLICT = TIZEN_ERROR_DNSSD | 0x03, /**< Name conflict */
+ DNSSD_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+ DNSSD_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory*/
+ DNSSD_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Invalid operation */
+ DNSSD_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter*/
+ DNSSD_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
+ DNSSD_ERROR_NOT_INITIALIZED = TIZEN_ERROR_DNSSD | 0x01, /**< Not Initialized */
+ DNSSD_ERROR_ALREADY_REGISTERED = TIZEN_ERROR_DNSSD | 0x02, /**< Already registered */
+ DNSSD_ERROR_NAME_CONFLICT = TIZEN_ERROR_DNSSD | 0x03, /**< Name conflict */
DNSSD_ERROR_SERVICE_NOT_RUNNING = TIZEN_ERROR_DNSSD | 0x04, /**< Background daemon not running */
- DNSSD_ERROR_SERVICE_NOT_FOUND = TIZEN_ERROR_DNSSD | 0x05, /**< Service not found */
- DNSSD_ERROR_OPERATION_FAILED = TIZEN_ERROR_DNSSD | 0x06, /**< Operation failed */
+ DNSSD_ERROR_SERVICE_NOT_FOUND = TIZEN_ERROR_DNSSD | 0x05, /**< Service not found */
+ DNSSD_ERROR_OPERATION_FAILED = TIZEN_ERROR_DNSSD | 0x06, /**< Operation failed */
} dnssd_error_e;
+
/**
* @brief Enumeration for Network Service Discovery DNSSD browse state.
* @since_tizen 3.0
*/
typedef enum {
- DNSSD_SERVICE_STATE_AVAILABLE, /**<Available DNS-SD service found */
- DNSSD_SERVICE_STATE_UNAVAILABLE, /**<DNS-SD service not available */
- DNSSD_SERVICE_STATE_NAME_LOOKUP_FAILED, /**<Lookup failure for service name */
- DNSSD_SERVICE_STATE_HOST_NAME_LOOKUP_FAILED, /**<Lookup failure for host name and port number */
- DNSSD_SERVICE_STATE_ADDRESS_LOOKUP_FAILED, /**<Lookup failure for IP address */
+ DNSSD_SERVICE_STATE_AVAILABLE, /**<Available DNS-SD service found */
+ DNSSD_SERVICE_STATE_UNAVAILABLE, /**<DNS-SD service not available */
+ DNSSD_SERVICE_STATE_NAME_LOOKUP_FAILED, /**<Lookup failure for service name */
+ DNSSD_SERVICE_STATE_HOST_NAME_LOOKUP_FAILED, /**<Lookup failure for host name and port number */
+ DNSSD_SERVICE_STATE_ADDRESS_LOOKUP_FAILED, /**<Lookup failure for IP address */
} dnssd_service_state_e;
+
/**
- * @brief The DNSSD service handle
+ * @brief The DNSSD service handle.
* @since_tizen 3.0
*/
typedef unsigned int dnssd_service_h;
+
/**
- * @brief The DNSSD Browser handle
+ * @brief The DNSSD Browser handle.
* @since_tizen 3.0
*/
typedef unsigned int dnssd_browser_h;
+
/**
* @brief Called when the registration of DNSSD service is finished.
* @since_tizen 3.0
* @param[in] user_data The user data passed from the request function
* @see dnssd_register_local_service()
*/
-typedef void (*dnssd_registered_cb) (dnssd_error_e result,
- dnssd_service_h local_service, void *user_data);
+typedef void (*dnssd_registered_cb) (dnssd_error_e result, dnssd_service_h local_service, void *user_data);
+
/**
* @brief Called when a DNSSD service is found.
* @details remote_service is valid only when service_state is
* DNSSD_SERVICE_STATE_AVAILABLE or DNSSD_SERVICE_STATE_UNAVAILABLE.
- * In case of service_state DNSSD_SERVICE_STATE_UNAVAILABLE application
+ * In case of service_state DNSSD_SERVICE_STATE_UNAVAILABLE, application
* can only use dnssd_service_get_type() and dnssd_service_get_name().
* Other get functions can only be used when service_state is
* DNSSD_SERVICE_STATE_AVAILABLE.
* @since_tizen 3.0
- * @param[in] service_state The DNSSD service state of remote service.
+ * @param[in] service_state The DNSSD service state of remote service
* @param[in] remote_service The DNSSD remote service handle
* @param[in] user_data The user data passed from the request function
* @see dnssd_start_browsing_service()
*/
-typedef void (*dnssd_found_cb) (dnssd_service_state_e service_state,
- dnssd_service_h remote_service, void *user_data);
+typedef void (*dnssd_found_cb) (dnssd_service_state_e service_state, dnssd_service_h remote_service, void *user_data);
+
/**
* @brief Initializes DNSSD.
* @since_tizen 3.0
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
*/
int dnssd_initialize(void);
+
/**
- * @brief Deinitializes DNSSD
+ * @brief Deinitializes DNSSD.
* @since_tizen 3.0
- * @return 0 on success, otherwise negative error value
- * @retval #DNSSD_ERROR_NONE Successful
- * @pre DNS-SD service must be initialized by dnssd_initialize().
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_INVALID_OPERATION Invalid Operation
+ * @pre DNS-SD service must be initialized by dnssd_initialize().
*/
int dnssd_deinitialize(void);
+
/**
* @brief Creates a DNSSD local service handle.
* @since_tizen 3.0
* @param[in] service_type The DNSSD service type. It is expressed as type
* followed by protocol, separated by a dot(e.g. "_ftp._tcp"). It
* must begin with an underscore, followed by 1-15 characters which
- * may be letters, digits or hyphens. The transport protocol must be
+ * may be letters, digits, or hyphens. The transport protocol must be
* "_tcp" or "_udp". New service types should be registered at
* http://www.dns-sd.org/ServiceTypes.html.
* @param[out] dnssd_service The DNSSD local handle
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of memory
* @see dnssd_destroy_local_service()
* @pre This API needs dnssd_initialize() before use
*/
-int dnssd_create_local_service(const char *service_type,
- dnssd_service_h *dnssd_service);
+int dnssd_create_local_service(const char *service_type, dnssd_service_h *dnssd_service);
+
/**
* @brief Destroys the DNSSD local service handle.
* @details Destroying a local service doesn't deregister local service. If
- * local service was registered using dnssd_register_local_service()
+ * local service was registered using dnssd_register_local_service(),
* then it must be deregistered using dnssd_deregister_local_service()
* before destroying the local service.
* @since_tizen 3.0
* @remarks You must destroy only local services created using dnssd_create_local_service().
* @param[in] dnssd_service The DNSSD local service handle
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @see dnssd_create_local_service()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
int dnssd_destroy_local_service(dnssd_service_h dnssd_service);
+
/**
* @brief Sets the name of DNSSD local service.
* @details Application should set name after creating local service using
* @remarks You must pass only local services created using dnssd_create_local_service().
* @param[in] local_service The DNSSD local service handle
* @param[in] service_name The name of DNSSD local service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @see dnssd_create_local_service()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
-int dnssd_service_set_name(dnssd_service_h local_service,
- const char *service_name);
+int dnssd_service_set_name(dnssd_service_h local_service, const char *service_name);
+
/**
* @brief Sets the port number of DNSSD local service.
* @remarks You must pass only local services created using dnssd_create_local_service().
* @param[in] local_service The DNSSD local service handle
* @param[in] port The port number of DNSSD local service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @see dnssd_create_local_service()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
int dnssd_service_set_port(dnssd_service_h local_service, int port);
+
/**
* @brief Adds the TXT record.
* @details TXT record should be added after registering local service using
* @remarks You must pass only local services created using dnssd_create_local_service().
* @param[in] local_service The DNSSD local service handle
* @param[in] key The key of the TXT record. A null-terminated string which only
- * contains printable ASCII values (0x20-0x7E), excluding '=' (0x3D).
- * Keys should be 9 characters or fewer excluding NULL. Keys are case
- * insensitivie. Keys for known service types can be found at
- * http://www.dns-sd.org/ServiceTypes.html. For details see section
- * 6.4 of http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt.
+ * contains printable ASCII values (0x20-0x7E), excluding '=' (0x3D).
+ * Keys should be 9 characters or fewer excluding NULL. Keys are case
+ * insensitivie. Keys for known service types can be found at
+ * http://www.dns-sd.org/ServiceTypes.html. For details, see section
+ * 6.4 of http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt.
* @param[in] length The length of the value of the TXT record in bytes. The
- * total size of a typical DNS-SD TXT record is intended to be small
- * (upto 200 bytes). For details see section 6.2 of
- * http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt.
+ * total size of a typical DNS-SD TXT record is intended to be small
+ * (upto 200 bytes). For details, see section 6.2 of
+ * http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt
* @param[in] value The value of the TXT record. It can be any binary value. For
- * value that represent textual data, UTF-8 is STRONGLY recommended.
- * For value that represent textual data, value_length should NOT
- * include the terminating null (if any) at the end of the string. If
- * NULL, then "key" will be added with no value. If non-NULL but
- * value_length is zero, then "key=" will be added with empty value.
- * For details see section 6.5 of
- * http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt.
- * @return 0 on success, otherwise negative error value
+ * value that represents textual data, UTF-8 is STRONGLY recommended.
+ * For value that represents textual data, value_length should NOT
+ * include the terminating null (if any) at the end of the string. If
+ * NULL, then "key" will be added with no value. If non-NULL but
+ * value_length is zero, then "key=" will be added with empty value.
+ * For details see section 6.5 of
+ * http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory
* @see dnssd_create_local_service()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
-int dnssd_service_add_txt_record(dnssd_service_h local_service,
- const char *key, unsigned short length, const void *value);
+int dnssd_service_add_txt_record(dnssd_service_h local_service, const char *key, unsigned short length, const void *value);
+
/**
* @brief Removes the TXT record.
* @remarks You must pass only local services created using dnssd_create_local_service().
* @param[in] local_service The DNSSD local service handle
* @param[in] key The key of the TXT record to be removed
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @see dnssd_create_local_service()
* @see dnssd_service_add_txt_record()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
-int dnssd_service_remove_txt_record(dnssd_service_h local_service,
- const char *key);
+int dnssd_service_remove_txt_record(dnssd_service_h local_service, const char *key);
+
/**
* @brief Sets/updates the DNS resource record.
* @details If the resource record for the type has been previously added using
- * dnssd_service_set_record() then the record will be updated. DNS
+ * dnssd_service_set_record(), then the record will be updated. DNS
* resource record can be set only after local_service is registered
- * using dnssd_register_local_service(). data is added using
+ * using dnssd_register_local_service(). Data is added using
* dnssd_service_add_txt_record() and then obtained using
* dnssd_service_get_all_txt_record() to pass here.
* @since_tizen 3.0
* @remarks You must pass only local services created using dnssd_create_local_service().
* @param[in] local_service The DNSSD local service handle
- * @param[in] type The resource record type. For details see
- * RFC 1035 and RFC 2782.
- * @param[in] length The length of the resource record in bytes.
- * @param[in] data The data contained in resource record to be added.
- * @return 0 on success, otherwise negative error value
+ * @param[in] type The resource record type. For details see, RFC 1035 and RFC 2782
+ * @param[in] length The length of the resource record in bytes
+ * @param[in] data The data contained in resource record to be added
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory
* @see dnssd_create_local_service()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
-int dnssd_service_set_record(dnssd_service_h local_service, unsigned short type,
- unsigned short length, const void *data);
+int dnssd_service_set_record(dnssd_service_h local_service, unsigned short type, unsigned short length, const void *data);
+
/**
* @brief Unsets the DNS resource record. DNS resource record for the given type
* @since_tizen 3.0
* @remarks You must pass only local services created using dnssd_create_local_service().
* @param[in] local_service The DNSSD local service handle
- * @param[in] type The resource record type. For details see
- * RFC 1035 and RFC 2782.
- * @return 0 on success, otherwise negative error value
+ * @param[in] type The resource record type. For details, see RFC 1035 and RFC 2782
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed
* @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @see dnssd_create_local_service()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
-int dnssd_service_unset_record(dnssd_service_h local_service,
- unsigned short type);
+int dnssd_service_unset_record(dnssd_service_h local_service, unsigned short type);
+
/**
* @brief Registers the DNSSD local service for publishing.
* @param[in] local_service The DNSSD local service handle
* @param[in] register_cb The callback function to be called
* @param[in] user_data The user data passed to the callback function
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_OPERATION_FAILED Operation failed
* @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @see dnssd_create_local_service()
- * @pre This API needs dnssd_create_local_service() before use
+ * @pre This API needs dnssd_create_local_service() before use.
*/
-int dnssd_register_local_service(dnssd_service_h local_service,
- dnssd_registered_cb register_cb, void *user_data);
+int dnssd_register_local_service(dnssd_service_h local_service, dnssd_registered_cb register_cb, void *user_data);
+
/**
* @brief Deregisters the DNSSD local service.
* @since_tizen 3.0
* @remarks You must pass only local services registered using dnssd_register_local_service().
* @param[in] local_service The DNSSD local service handle
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
* @see dnssd_create_local_service()
* @see dnssd_register_local_service()
- * @pre This API needs dnssd_register_local_service() before use
+ * @pre This API needs dnssd_register_local_service() before use.
*/
int dnssd_deregister_local_service(dnssd_service_h local_service);
+
/**
* @brief Starts browsing the DNSSD remote service.
- * @details found_cb would be called only if there are any service available of
+ * @details found_cb would be called only if there are any services available of
* service_type provided in the argument. Application will keep
* browsing for available/unavailable services until it calls
* dnssd_stop_browsing_service().
* @since_tizen 3.0
* @param[in] service_type The DNSSD service type to browse. It is expressed
- * as type followed by protocol, separated by a dot(e.g. "_ftp._tcp")
- * . It must begin with an underscore, followed by 1-15 characters
- * which may be letters, digits or hyphens. The transport protocol
- * must be "_tcp" or "_udp". New service types should be registered
- * at http://www.dns-sd.org/ServiceTypes.html.
+ * as type followed by protocol, separated by a dot(e.g. "_ftp._tcp").
+ * It must begin with an underscore, followed by 1-15 characters
+ * which may be letters, digits, or hyphens. The transport protocol
+ * must be "_tcp" or "_udp". New service types should be registered
+ * at http://www.dns-sd.org/ServiceTypes.html
* @param[out] dnssd_service The DNSSD browse service handle
* @param[in] found_cb The callback function to be called
* @param[in] user_data The user data passed to the callback function
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
- * @pre This API needs dnssd_initialize() before use
+ * @pre This API needs dnssd_initialize() before use.
*/
-int dnssd_start_browsing_service(const char *service_type,
- dnssd_browser_h *dnssd_service, dnssd_found_cb found_cb,
- void *user_data);
+int dnssd_start_browsing_service(const char *service_type, dnssd_browser_h *dnssd_service, dnssd_found_cb found_cb, void *user_data);
+
/**
* @brief Stops browsing the DNSSD remote service.
* @since_tizen 3.0
* @param[in] dnssd_service The DNSSD browse service handle returned by
- * dnssd_start_browsing_service().
- * @return 0 on success, otherwise negative error value
+ * dnssd_start_browsing_service()
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
- * @pre This API needs dnssd_start_browsing_service() before use
+ * @pre This API needs dnssd_start_browsing_service() before use.
*/
int dnssd_stop_browsing_service(dnssd_browser_h dnssd_service);
+
/**
* @brief Gets the type of DNSSD local/remote service.
* @since_tizen 3.0
* @remarks You must release @a service_type using free().
* @param[in] dnssd_service The DNSSD local/remote service handle
* @param[out] service_type The type of DNSSD service. It is expressed as type
- * followed by protocol, separated by a dot(e.g. "_ftp._tcp"). It
- * must begin with an underscore, followed by 1-15 characters which
- * may be letters, digits or hyphens. The transport protocol must be
- * "_tcp" or "_udp". New service types should be registered at
- * http://www.dns-sd.org/ServiceTypes.html.
- * @return 0 on success, otherwise negative error value
+ * followed by protocol, separated by a dot(e.g. "_ftp._tcp"). It
+ * must begin with an underscore, followed by 1-15 characters which
+ * may be letters, digits, or hyphens. The transport protocol must be
+ * "_tcp" or "_udp". New service types should be registered at
+ * http://www.dns-sd.org/ServiceTypes.html
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
*/
int dnssd_service_get_type(dnssd_service_h dnssd_service, char **service_type);
+
/**
* @brief Gets the name of DNSSD local/remote service.
* @since_tizen 3.0
* @remarks You must release @a service_name using free().
* @param[in] dnssd_service The DNSSD local/remote service handle
* @param[out] service_name The name of DNSSD service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
*/
int dnssd_service_get_name(dnssd_service_h dnssd_service, char **service_name);
+
/**
- * @brief Gets the ip of DNSSD remote service.
+ * @brief Gets the IP of DNSSD remote service.
* @since_tizen 3.0
* @remarks You must release @a ip_v4_address, @a ip_v6_address using free().
* @param[in] dnssd_service The DNSSD remote service handle
* @param[out] ip_v4_address The IP version 4 address of DNSSD service. If there
- * are no IPv4 Address then it would contain NULL and should not be
- * freed.
+ * is no IPv4 Address, then it would contain NULL and should not be freed
* @param[out] ip_v6_address The IP version 6 address of DNSSD service. If there
- * are no IPv6 Address then it would contain NULL and should not be
- * freed.
- * @return 0 on success, otherwise negative error value
+ * is no IPv6 Address, then it would contain NULL and should not be freed
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_OUT_OF_MEMORY Out of Memory
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
*/
-int dnssd_service_get_ip(dnssd_service_h dnssd_service, char **ip_v4_address,
- char **ip_v6_address);
+int dnssd_service_get_ip(dnssd_service_h dnssd_service, char **ip_v4_address, char **ip_v6_address);
+
/**
* @brief Gets the port number of DNSSD local/remote service.
* @since_tizen 3.0
* @param[in] dnssd_service The DNSSD service local/remote handle
* @param[out] port The port number of DNSSD service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
*/
int dnssd_service_get_port(dnssd_service_h dnssd_service, int *port);
+
/**
* @brief Gets the TXT record.
* @details TXT record gives additional information about the service. Some
* services discovered via dnssd_start_browsing_service() may need
* more than just IP address and port number to completely identify
- * the service instance. For example, A web server typically has
+ * the service instance. For example, a web server typically has
* multiple pages, each identified by its own URL. So additional data
* is stored in a TXT record. Check Section 6 of
* http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt for
* http://www.dns-sd.org/ServiceTypes.html. TXT record is stored in a
* structured form using key/value pairs.
* @since_tizen 3.0
- * @remarks You must release @a value using free().
+ * @remarks You must release @value using free().
* @param[in] dnssd_service The DNSSD local/remote service handle
- * @param[out] length The length of the value of the TXT record in bytes.
- * @param[out] value The value of the TXT record.
- * @return 0 on success, otherwise negative error value
+ * @param[out] length The length of the value of the TXT record in bytes
+ * @param[out] value The value of the TXT record
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #DNSSD_ERROR_NONE Successful
* @retval #DNSSD_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #DNSSD_ERROR_NOT_SUPPORTED Not Supported
* @retval #DNSSD_ERROR_SERVICE_NOT_RUNNING Service Not Running
* @retval #DNSSD_ERROR_NOT_INITIALIZED Not Initialized
*/
-int dnssd_service_get_all_txt_record(dnssd_service_h dnssd_service,
- unsigned short *length, void **value);
+int dnssd_service_get_all_txt_record(dnssd_service_h dnssd_service, unsigned short *length, void **value);
+
/**
* @}
* @{
*/
+
/**
* @brief Enumeration for Network Service Discovery SSDP error code.
* @since_tizen 3.0
*/
typedef enum {
- SSDP_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
- SSDP_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ SSDP_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+ SSDP_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
SSDP_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */
- SSDP_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
- SSDP_ERROR_NOT_INITIALIZED = TIZEN_ERROR_SSDP|0x01, /**< Not initialized */
- SSDP_ERROR_OPERATION_FAILED = TIZEN_ERROR_SSDP|0x04, /**< Operation failed */
- SSDP_ERROR_SERVICE_NOT_FOUND = TIZEN_ERROR_SSDP|0x05, /**< Service not found */
- SSDP_ERROR_SERVICE_ALREADY_REGISTERED = TIZEN_ERROR_SSDP|0x06, /**< Service already registered */
+ SSDP_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
+ SSDP_ERROR_NOT_INITIALIZED = TIZEN_ERROR_SSDP|0x01, /**< Not initialized */
+ SSDP_ERROR_OPERATION_FAILED = TIZEN_ERROR_SSDP|0x04, /**< Operation failed */
+ SSDP_ERROR_SERVICE_NOT_FOUND = TIZEN_ERROR_SSDP|0x05, /**< Service not found */
+ SSDP_ERROR_SERVICE_ALREADY_REGISTERED = TIZEN_ERROR_SSDP|0x06, /**< Service already registered */
} ssdp_error_e;
+
/**
* @brief Enumeration for Network Service Discovery SSDP service browse state.
* @since_tizen 3.0
*/
typedef enum {
- SSDP_SERVICE_STATE_AVAILABLE, /**< A new service is available */
- SSDP_SERVICE_STATE_UNAVAILABLE, /**< A service is not available */
+ SSDP_SERVICE_STATE_AVAILABLE, /**< A new service is available */
+ SSDP_SERVICE_STATE_UNAVAILABLE, /**< A service is not available */
} ssdp_service_state_e;
+
/**
- * @brief The SSDP service handle
+ * @brief The SSDP service handle.
* @since_tizen 3.0
*/
typedef unsigned int ssdp_service_h;
+
/**
- * @brief The SSDP browser handle
+ * @brief The SSDP browser handle.
* @since_tizen 3.0
*/
typedef unsigned int ssdp_browser_h;
+
/**
* @brief Called when the registration of SSDP service is finished.
* @since_tizen 3.0
* @param[in] user_data The user data passed from the request function
* @see ssdp_register_local_service()
*/
-typedef void (*ssdp_registered_cb) (ssdp_error_e result,
- ssdp_service_h ssdp_local_service, void *user_data);
+typedef void (*ssdp_registered_cb) (ssdp_error_e result, ssdp_service_h ssdp_local_service, void *user_data);
+
/**
- * @brief Called when a service has become available or unavailable
+ * @brief Called when a service has become available or unavailable.
* @since_tizen 3.0
* @param[in] state The state of found service
* @param[in] ssdp_service The SSDP remote service handle
* @param[in] user_data The user data passed from the request function
* @see ssdp_start_browsing_service()
*/
-typedef void (*ssdp_found_cb) (ssdp_service_state_e state,
- ssdp_service_h ssdp_remote_service, void *user_data);
+typedef void (*ssdp_found_cb) (ssdp_service_state_e state, ssdp_service_h ssdp_remote_service, void *user_data);
+
/**
* @brief Initializes SSDP.
* @since_tizen 3.0
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_OPERATION_FAILED Operation failed
* @retval #SSDP_ERROR_NOT_SUPPORTED Not supported
*/
int ssdp_initialize(void);
+
/**
* @brief Deinitializes SSDP.
* @since_tizen 3.0
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_SUPPORTED Not supported
*/
int ssdp_deinitialize(void);
+
/**
* @brief Creates a SSDP local service handle.
* @since_tizen 3.0
* @remarks You must release @a local_service using ssdp_destroy_local_service().
- * @param[in] target The SSDP local service's target. It may be a device type or a service type specified in UPnP forum (http://upnp.org).
+ * @param[in] target The SSDP local service's target. It may be a device type or a service type specified in UPnP forum (http://upnp.org)
* @param[out] local_service The SSDP local service handle
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory
* @retval #SSDP_ERROR_NOT_SUPPORTED Not supported
* @see ssdp_destroy_local_service()
- * @pre This API needs ssdp_initialize() before use
+ * @pre This API needs ssdp_initialize() before use.
*/
int ssdp_create_local_service(const char *target, ssdp_service_h *local_service);
+
/**
* @brief Destroys the SSDP local service handle.
* @details You must call ssdp_deregister_local_service() before destroying the local service.
* @since_tizen 3.0
* @param[in] local_service The SSDP local service handle
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_INVALID_PARAMETER Invalid parameter
*/
int ssdp_destroy_local_service(ssdp_service_h local_service);
+
/**
* @brief Sets the USN (Unique Service Name) of SSDP local service. The USN format is specified in UPnP forum (http://upnp.org).
* @since_tizen 3.0
- * @remarks You must pass only @a unregistered local_service created using ssdp_create_local_service(). If @a local_service is already registered, you cannot set @a usn
+ * @remarks You must pass only @a unregistered local_service created using ssdp_create_local_service().
+ * If @a local_service is already registered, you cannot set @usn.
* @param[in] local_service The SSDP local service handle
* @param[in] usn The USN of SSDP local service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
*/
int ssdp_service_set_usn(ssdp_service_h local_service, const char *usn);
+
/**
* @brief Sets the URL (Uniform Resource Locator) for description of SSDP local service. See RFC 3986.
* @since_tizen 3.0
- * @remarks You must pass only unregistered @a local_service created using ssdp_create_local_service(). If @a local_service is already registered, you cannot set @a url
+ * @remarks You must pass only unregistered @a local_service created using ssdp_create_local_service().
+ * If @a local_service is already registered, you cannot set @url.
* @param[in] local_service The SSDP local service handle
* @param[in] url The URL of SSDP local service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
*/
int ssdp_service_set_url(ssdp_service_h local_service, const char *url);
+
/**
* @brief Gets the target of SSDP service.
* @since_tizen 3.0
* @remarks You must release @a target using free().
* @param[in] service The SSDP service handle
* @param[out] target The target of SSDP service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
*/
int ssdp_service_get_target(ssdp_service_h service, char **target);
+
/**
* @brief Gets the USN of SSDP service.
* @since_tizen 3.0
* @remarks You must release @a usn using free().
* @param[in] service The SSDP service handle
* @param[out] usn The USN of SSDP service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
*/
int ssdp_service_get_usn(ssdp_service_h service, char **usn);
+
/**
* @brief Gets the URL of SSDP service.
* @since_tizen 3.0
* @remarks You must release @a url using free().
* @param[in] service The SSDP service handle
* @param[out] url The URL of SSDP service
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
*/
int ssdp_service_get_url(ssdp_service_h service, char **url);
+
/**
* @brief Registers the SSDP local service for publishing.
* @details You must set a USN and a URL of the local service before ssdp_register_local_service() is called.
* @param[in] local_service The SSDP local service handle
* @param[in] registered_cb The callback function to be called
* @param[in] user_data The user data passed to the callback function
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
* @retval #SSDP_ERROR_OPERATION_FAILED Operation failed
* @retval #SSDP_ERROR_NOT_SUPPORTED Not supported
* @retval #SSDP_ERROR_SERVICE_ALREADY_REGISTERED Service already registered
- * @pre This API needs ssdp_service_set_usn() and ssdp_service_set_url() before use
+ * @pre This API needs ssdp_service_set_usn() and ssdp_service_set_url() before use.
*/
-int ssdp_register_local_service(ssdp_service_h local_service,
- ssdp_registered_cb registered_cb, void *user_data);
+int ssdp_register_local_service(ssdp_service_h local_service, ssdp_registered_cb registered_cb, void *user_data);
+
/**
* @brief Deregisters the SSDP local service.
* @since_tizen 3.0
* @remarks You must pass only local_service created using ssdp_create_local_service().
* @param[in] local_service The SSDP local service handle
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
*/
int ssdp_deregister_local_service(ssdp_service_h local_service);
+
/**
* @brief Starts browsing the SSDP remote service.
- * @details ssdp_start_browsing_service() keeps browsing services until calling ssdp_stop_browsing_service()
+ * @details ssdp_start_browsing_service() keeps browsing services until calling ssdp_stop_browsing_service().
* @since_tizen 3.0
* @param[in] target The target to browse
* @param[out] ssdp_browser The SSDP browser handle
* @param[in] found_cb The callback function to be called
* @param[in] user_data The user data passed to the callback function
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
* @retval #SSDP_ERROR_OUT_OF_MEMORY Out of memory
* @retval #SSDP_ERROR_NOT_SUPPORTED Not supported
*/
-int ssdp_start_browsing_service(const char* target, ssdp_browser_h* ssdp_browser,
- ssdp_found_cb found_cb, void *user_data);
+int ssdp_start_browsing_service(const char* target, ssdp_browser_h* ssdp_browser, ssdp_found_cb found_cb, void *user_data);
+
/**
* @brief Stops browsing the SSDP remote service.
* @since_tizen 3.0
* @param[in] ssdp_browser The SSDP browser handle
- * @return 0 on success, otherwise negative error value
+ * @return @c 0 on success,
+ * otherwise negative error value
* @retval #SSDP_ERROR_NONE Successful
* @retval #SSDP_ERROR_NOT_INITIALIZED Not initialized
* @retval #SSDP_ERROR_SERVICE_NOT_FOUND Service not found
*/
int ssdp_stop_browsing_service(ssdp_browser_h ssdp_browser);
+
/**
* @}
*/