Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
3e22604e
Commit
3e22604e
authored
Apr 24, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More documentation for vlc_services_discovery.h
parent
bf343c29
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
18 deletions
+33
-18
include/vlc_services_discovery.h
include/vlc_services_discovery.h
+9
-2
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+24
-16
No files found.
include/vlc_services_discovery.h
View file @
3e22604e
...
...
@@ -37,16 +37,20 @@
extern
"C"
{
# endif
/*
/*
*
* @{
*/
/**
* Main service discovery structure to build a SD module
*/
struct
services_discovery_t
{
VLC_COMMON_MEMBERS
module_t
*
p_module
;
/**< Loaded module */
/**< Event manager
/
* You should access it through setters, outside of the core */
* You should access it through setters, outside of the core */
vlc_event_manager_t
event_manager
;
char
*
psz_name
;
/**< Main name of the SD */
...
...
@@ -62,6 +66,7 @@ struct services_discovery_t
/**
* Service discovery categories
* \see vlc_sd_probe_Add
*/
enum
services_discovery_category_e
{
...
...
@@ -90,6 +95,7 @@ enum services_discovery_capability_e
/**
* Service discovery descriptor
* \see services_discovery_command_e
*/
typedef
struct
{
...
...
@@ -99,6 +105,7 @@ typedef struct
int
i_capabilities
;
/**< \see services_discovery_capability_e */
}
services_discovery_descriptor_t
;
/***********************************************************************
* Service Discovery
***********************************************************************/
...
...
src/playlist/services_discovery.c
View file @
3e22604e
...
...
@@ -103,8 +103,8 @@ static void services_discovery_Destructor ( vlc_object_t *p_obj );
* That's how the playlist get's Service Discovery information
*/
/*******************************************************************
**
**
* Create
/*******************************************************************
//
**
* Create
a Service discovery
***********************************************************************/
services_discovery_t
*
vlc_sd_Create
(
vlc_object_t
*
p_super
,
const
char
*
cfg
)
...
...
@@ -130,8 +130,8 @@ services_discovery_t *vlc_sd_Create( vlc_object_t *p_super,
return
p_sd
;
}
/*******************************************************************
**
**
* Start
/*******************************************************************
//
**
* Start
a Service Discovery
***********************************************************************/
bool
vlc_sd_Start
(
services_discovery_t
*
p_sd
)
{
...
...
@@ -152,8 +152,8 @@ bool vlc_sd_Start ( services_discovery_t * p_sd )
return
true
;
}
/*******************************************************************
**
**
* Stop
/*******************************************************************
//
**
* Stop
a Service Discovery
***********************************************************************/
void
vlc_sd_Stop
(
services_discovery_t
*
p_sd
)
{
...
...
@@ -167,6 +167,9 @@ void vlc_sd_Stop ( services_discovery_t * p_sd )
p_sd
->
p_module
=
NULL
;
}
/*******************************************************************//**
* Destroy a Service Discovery
***********************************************************************/
void
vlc_sd_Destroy
(
services_discovery_t
*
p_sd
)
{
config_ChainDestroy
(
p_sd
->
p_cfg
);
...
...
@@ -174,8 +177,8 @@ void vlc_sd_Destroy( services_discovery_t *p_sd )
vlc_object_release
(
p_sd
);
}
/*******************************************************************
**
**
* Destructor
/*******************************************************************
//
**
* Destructor
of the Service Discovery
***********************************************************************/
static
void
services_discovery_Destructor
(
vlc_object_t
*
p_obj
)
{
...
...
@@ -184,8 +187,10 @@ static void services_discovery_Destructor ( vlc_object_t *p_obj )
vlc_event_manager_fini
(
&
p_sd
->
event_manager
);
}
/***********************************************************************
* GetLocalizedName
/*******************************************************************//**
* Get the Localized Name
*
* This is useful for interfaces and libVLC
***********************************************************************/
char
*
services_discovery_GetLocalizedName
(
services_discovery_t
*
p_sd
)
...
...
@@ -193,8 +198,11 @@ services_discovery_GetLocalizedName ( services_discovery_t * p_sd )
return
strdup
(
module_get_name
(
p_sd
->
p_module
,
true
)
);
}
/***********************************************************************
* EventManager
/*******************************************************************//**
* Getter for the EventManager
*
* You can receive event notification
* This is the preferred way to get new items
***********************************************************************/
vlc_event_manager_t
*
services_discovery_EventManager
(
services_discovery_t
*
p_sd
)
...
...
@@ -202,8 +210,8 @@ services_discovery_EventManager ( services_discovery_t * p_sd )
return
&
p_sd
->
event_manager
;
}
/*******************************************************************
**
**
* Add
Item
/*******************************************************************
//
**
* Add
an item to the Service Discovery listing
***********************************************************************/
void
services_discovery_AddItem
(
services_discovery_t
*
p_sd
,
input_item_t
*
p_item
,
...
...
@@ -217,8 +225,8 @@ services_discovery_AddItem ( services_discovery_t * p_sd, input_item_t * p_item,
vlc_event_send
(
&
p_sd
->
event_manager
,
&
event
);
}
/*******************************************************************
**
**
* Remove
Item
/*******************************************************************
//
**
* Remove
an item from the Service Discovery listing
***********************************************************************/
void
services_discovery_RemoveItem
(
services_discovery_t
*
p_sd
,
input_item_t
*
p_item
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment