Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
discovery_api [2024/02/07 02:58]
neds
discovery_api [2024/02/07 19:05] (current)
neds [Low level C Library]
Line 17: Line 17:
 **Example code:** **Example code:**
  
-See hdhomerun_discover_example.c for an example of using the discover API.+See [[https://​github.com/​Silicondust/​libhdhomerun/​blob/​master/​hdhomerun_discover_example.c|hdhomerun_discover_example.c]] for an example of using the discover API.
 Header files: Header files:
  
Line 133: Line 133:
     * IPv6 link-local – the Scope ID is used if specified, auto-detected if 0.     * IPv6 link-local – the Scope ID is used if specified, auto-detected if 0.
     * IPv6 non link-local – set Scope ID to 0.     * IPv6 non link-local – set Scope ID to 0.
-  * **device_types:​** array of uint32_t values specifying the types of devices to detect. See hdhomerun_discover2_find_devices_broadcast() for the description.+  * **device_types:​** array of uint32_t values specifying the types of devices to detect. See [[#hdhomerun_discover2_find_devices_broadcast()]] for the description.
   * **device_types_count:​** number of entries in the device_types array provided.   * **device_types_count:​** number of entries in the device_types array provided.
  
Line 154: Line 154:
 **Parameters:​** **Parameters:​**
   * **ds:** discover object.   * **ds:** discover object.
-  * **flags:** specify which IP types to use for discover. See hdhomerun_discover2_find_devices_broadcast() for the description.+  * **flags:** specify which IP types to use for discover. See [[#hdhomerun_discover2_find_devices_broadcast()]] for the description.
   * **device_id:​** uint32_t device id (serial number) of the device to locate.   * **device_id:​** uint32_t device id (serial number) of the device to locate.
  
Line 176: Line 176:
 **Parameters:​** **Parameters:​**
   * **ds:** discover object.   * **ds:** discover object.
-  * **flags:** specify which IP types to use for discover. See hdhomerun_discover2_find_devices_broadcast() for the description.+  * **flags:** specify which IP types to use for discover. See [[#hdhomerun_discover2_find_devices_broadcast()]] for the description.
   * **target_addr:​** IP address to send discover request to.   * **target_addr:​** IP address to send discover request to.
     * IPv4 and IPv6 addresses supported.     * IPv4 and IPv6 addresses supported.
Line 315: Line 315:
   * **device:** device object from hdhomerun_discover2_iter_device_first() or hdhomerun_discover2_iter_device_next().   * **device:** device object from hdhomerun_discover2_iter_device_first() or hdhomerun_discover2_iter_device_next().
  
-Returns:+**Returns:**
   * The DeviceAuth string reported by the device. The returned result must be copied if the value needs to be accessed by the app beyond the scope of the current discover action.   * The DeviceAuth string reported by the device. The returned result must be copied if the value needs to be accessed by the app beyond the scope of the current discover action.
   * NULL if the device did not report a DeviceAuth string during discovery.   * NULL if the device did not report a DeviceAuth string during discovery.
Line 384: Line 384:
 **Returns:​** **Returns:​**
   * Base URL as a string. The returned result must be copied if the value needs to be accessed by the app beyond the scope of the current discover action. The Base URL is always present and cannot be NULL.   * Base URL as a string. The returned result must be copied if the value needs to be accessed by the app beyond the scope of the current discover action. The Base URL is always present and cannot be NULL.
 +
 +</​WRAP>​
 +</​WRAP>​
 +
 +===== hdhomerun_discover2_device_if_get_lineup_url() =====
 +<WRAP indent>
 +<​code>​const char *hdhomerun_discover2_device_if_get_lineup_url(struct hdhomerun_discover2_device_if_t *device_if);</​code>​
 +Return the lineup URL (lineup.json) of the device as a string. Only present for devices of type TUNER.
 +
 +<WRAP indent>
 +**Parameters:​**
 +  * **device_if:​** device-if object from hdhomerun_discover2_iter_device_if_first() or hdhomerun_discover2_iter_device_if_next().
 +
 +**Returns:​**
 +  * Lineup URL as a string. The returned result must be copied if the value needs to be accessed by the app beyond the scope of the current discover action.
 +  * NULL if the device is not type TUNER.
 +
 +</​WRAP>​
 +</​WRAP>​
 +
 +===== hdhomerun_discover2_device_if_get_storage_url() =====
 +<WRAP indent>
 +<​code>​const char *hdhomerun_discover2_device_if_get_storage_url(struct hdhomerun_discover2_device_if_t *device_if);</​code>​
 +Return the storage URL (recorded_files.json) of the device as a string. Only present for devices of type STORAGE.
 +
 +<WRAP indent>
 +**Parameters:​**
 +  * **device_if:​** device-if object from hdhomerun_discover2_iter_device_if_first() or hdhomerun_discover2_iter_device_if_next().
 +
 +**Returns:​**
 +  * Storage URL as a string. The returned result must be copied if the value needs to be accessed by the app beyond the scope of the current discover action.
 +  * NULL if the device is not type STORAGE.
  
 </​WRAP>​ </​WRAP>​
  • Last modified: 2024/02/07 02:58