VLC 4.0.0-dev
|
This file lists functions and structures for service discovery (SD) in vlc. More...
Go to the source code of this file.
Data Structures | |
struct | services_discovery_callbacks |
struct | services_discovery_owner_t |
struct | services_discovery_t |
Main service discovery structure to build a SD module. More... | |
struct | services_discovery_descriptor_t |
Service discovery descriptor. More... | |
#define | vlc_sd_GetNames(obj, pln, pcat) vlc_sd_GetNames(VLC_OBJECT(obj), pln, pcat) |
#define | vlc_sd_Create(obj, a, b) vlc_sd_Create( VLC_OBJECT( obj ), a, b ) |
#define | VLC_SD_PROBE_SUBMODULE |
#define | VLC_SD_PROBE_HELPER(name, longname, cat) |
enum | services_discovery_category_e { SD_CAT_DEVICES = 1 , SD_CAT_LAN , SD_CAT_INTERNET , SD_CAT_MYCOMPUTER } |
Service discovery categories. More... | |
enum | services_discovery_command_e { SD_CMD_SEARCH = 1 , SD_CMD_DESCRIPTOR } |
Service discovery control commands. More... | |
enum | services_discovery_capability_e { SD_CAP_SEARCH = 1 } |
Service discovery capabilities. More... | |
static int | vlc_sd_control (services_discovery_t *p_sd, int i_control, va_list args) |
Ask for a research in the SD. More... | |
char ** | vlc_sd_GetNames (vlc_object_t *, char ***, int **) |
Gets the list of available services discovery plugins. More... | |
services_discovery_t * | vlc_sd_Create (vlc_object_t *parent, const char *chain, const struct services_discovery_owner_t *owner) |
Creates a services discoverer. More... | |
void | vlc_sd_Destroy (services_discovery_t *) |
static void | services_discovery_AddItem (services_discovery_t *sd, input_item_t *item) |
Added top-level service callback. More... | |
static void | services_discovery_AddSubItem (services_discovery_t *sd, input_item_t *parent, input_item_t *item) |
Added service callback. More... | |
static void | services_discovery_AddItemCat (services_discovery_t *sd, input_item_t *item, const char *category) |
Added service backward compatibility callback. More... | |
static void | services_discovery_RemoveItem (services_discovery_t *sd, input_item_t *item) |
Removed service callback. More... | |
int | vlc_sd_probe_Add (vlc_probe_t *, const char *, const char *, int category) |
This file lists functions and structures for service discovery (SD) in vlc.
#define vlc_sd_Create | ( | obj, | |
a, | |||
b | |||
) | vlc_sd_Create( VLC_OBJECT( obj ), a, b ) |
#define vlc_sd_GetNames | ( | obj, | |
pln, | |||
pcat | |||
) | vlc_sd_GetNames(VLC_OBJECT(obj), pln, pcat) |
#define VLC_SD_PROBE_HELPER | ( | name, | |
longname, | |||
cat | |||
) |
#define VLC_SD_PROBE_SUBMODULE |
Service discovery categories.
|
inlinestatic |
Added top-level service callback.
This is a convenience wrapper for services_discovery_AddSubItem(). It covers the most comomn case wherby the added item is a top-level service, i.e. it has no parent node.
References services_discovery_owner_t::cbs, services_discovery_callbacks::item_added, and services_discovery_t::owner.
|
inlinestatic |
Added service backward compatibility callback.
category | Optional name of a group that the item belongs in (for backward compatibility with legacy modules) |
References services_discovery_owner_t::cbs, services_discovery_callbacks::item_added, and services_discovery_t::owner.
|
inlinestatic |
Added service callback.
A services discovery module invokes this function when it "discovers" a new service, i.e. a new input item.
The caller is responsible for releasing its own reference(s) eventually. Keeping a reference is necessary to call services_discovery_RemoveItem() or to alter the item later. However, if the caller will never remove nor alter the item, it can drop its reference(s) immediately.
sd | services discoverer / services discovery module instance |
item | input item to add |
References services_discovery_owner_t::cbs, services_discovery_callbacks::item_added, and services_discovery_t::owner.
|
inlinestatic |
Removed service callback.
A services discovery module invokes this function when it senses that a service is no longer available.
References services_discovery_owner_t::cbs, services_discovery_callbacks::item_removed, and services_discovery_t::owner.
|
inlinestatic |
Ask for a research in the SD.
p_sd | the Service Discovery |
i_control | the command to issue |
args | the argument list |
References services_discovery_t::pf_control, and VLC_EGENERIC.
services_discovery_t * vlc_sd_Create | ( | vlc_object_t * | parent, |
const char * | chain, | ||
const struct services_discovery_owner_t * | owner | ||
) |
Creates a services discoverer.
void vlc_sd_Destroy | ( | services_discovery_t * | sd | ) |
References config_ChainDestroy(), module_unneed, services_discovery_t::p_cfg, services_discovery_t::p_module, services_discovery_t::psz_name, and vlc_object_delete.
Referenced by vlc_media_source_Delete(), and vlc_sd_Create().
char ** vlc_sd_GetNames | ( | vlc_object_t * | obj, |
char *** | pppsz_longnames, | ||
int ** | pp_categories | ||
) |
Gets the list of available services discovery plugins.
References vlc_sd_probe_t::category, count, vlc_sd_probe_t::longname, vlc_sd_probe_t::name, unlikely, vlc_alloc(), and vlc_probe.
int vlc_sd_probe_Add | ( | vlc_probe_t * | probe, |
const char * | name, | ||
const char * | longname, | ||
int | category | ||
) |
References vlc_sd_probe_t::longname, vlc_sd_probe_t::name, name, strdup(), unlikely, VLC_ENOMEM, vlc_probe_add(), and VLC_PROBE_CONTINUE.