Merge "Add new CAPI for registering SRP service with TXT records" into tizen
authorPyun DoHyun <dh79.pyun@samsung.com>
Tue, 6 Sep 2022 23:48:56 +0000 (23:48 +0000)
committerGerrit Code Review <gerrit@review>
Tue, 6 Sep 2022 23:48:56 +0000 (23:48 +0000)
1  2 
include/thread.h
src/thread-srp.c

index 5ff2eff1890d24cf9cecece76856022c3c7690ca,01ace893d65380832ec33d90eeaa3907f62b0210..62c4debd78cb2c6bd0164db235484050ac110bea
@@@ -1473,10 -1473,34 +1473,34 @@@ int thread_srp_client_set_host_address(
   * @pre thread API must be initialized with thread_initialize().
   * @see thread_srp_client_start()
   * @see thread_srp_client_set_host_address()
+  * @see thread_srp_client_register_service_full()
   */
  int thread_srp_client_register_service(thread_instance_h instance,
 -      const char *service_name, const char *service_type, uint64_t port);
 +      const char *service_name, const char *service_type, uint16_t port);
  
+ /**
+  * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
+  * @brief Register Service to SRP server
+  * @since_tizen 7.0
+  *
+  * This is an extended version of thread_srp_client_register_service()
+  * which allows to set priority, weight and TXT entries.
+  *
+  * @return 0 on success, otherwise a negative error value.
+  * @retval #THREAD_ERROR_NONE  Successful
+  * @retval #THREAD_ERROR_NOT_INITIALIZED  Not initialized
+  * @retval #THREAD_ERROR_OPERATION_FAILED  Operation failed
+  * @retval #THREAD_ERROR_NOT_SUPPORTED  Not supported
+  *
+  * @pre thread API must be initialized with thread_initialize().
+  * @see thread_srp_client_start()
+  * @see thread_srp_client_set_host_address()
+  * @see thread_srp_client_register_service()
+  */
+ int thread_srp_client_register_service_full(thread_instance_h instance,
+       const char *service_name, const char *service_type, uint16_t port, uint16_t priority,
+       uint16_t weight, const thread_dns_txt_entry_s *txt_entries, uint8_t num_txt_entries);
  /**
   * @ingroup CAPI_NETWORK_THREAD_SRP_MODULE
   * @brief Remove Service from SRP server
Simple merge