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
ec497404
Commit
ec497404
authored
Feb 04, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a module_Exists() function for Simple_Prefs. Don't use too much this function.
parent
c06614ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
include/vlc_modules.h
include/vlc_modules.h
+2
-0
src/misc/modules.c
src/misc/modules.c
+25
-0
No files found.
include/vlc_modules.h
View file @
ec497404
...
...
@@ -108,3 +108,5 @@ struct module_t
VLC_EXPORT
(
module_t
*
,
__module_Need
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
,
vlc_bool_t
)
);
#define module_Unneed(a,b) __module_Unneed(VLC_OBJECT(a),b)
VLC_EXPORT
(
void
,
__module_Unneed
,
(
vlc_object_t
*
,
module_t
*
)
);
#define module_Exist(a,b) __module_Exists(VLC_OBJECT(a),b)
VLC_EXPORT
(
vlc_bool_t
,
__module_Exists
,
(
vlc_object_t
*
,
const
char
*
)
);
src/misc/modules.c
View file @
ec497404
...
...
@@ -740,6 +740,31 @@ void __module_Unneed( vlc_object_t * p_this, module_t * p_module )
return
;
}
/*****************************************************************************
* module_Exists: tell if a module exists.
*****************************************************************************
* This function is a boolean function that tells if a module exist or not.
*****************************************************************************/
vlc_bool_t
__module_Exists
(
vlc_object_t
*
p_this
,
const
char
*
psz_name
)
{
vlc_list_t
*
p_list
;
int
i
;
p_list
=
vlc_list_find
(
p_this
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
for
(
i
=
0
;
i
<
p_list
->
i_count
;
i
++
)
{
if
(
!
strcmp
(
((
module_t
*
)
p_list
->
p_values
[
i
].
p_object
)
->
psz_shortname
,
psz_name
)
)
{
/* We can release the list, and return yes */
vlc_list_release
(
p_list
);
return
VLC_TRUE
;
}
}
vlc_list_release
(
p_list
);
return
VLC_FALSE
;
}
/*****************************************************************************
* Following functions are local.
*****************************************************************************/
...
...
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