Commit 88c67824 authored by Srikanth Raju's avatar Srikanth Raju

ML: Remove leading underscores from core functions

parent d4d1d2ec
......@@ -397,15 +397,15 @@ struct ml_person_t
* @return The media library object. NULL if the media library
* object could not be loaded
*/
VLC_EXPORT( media_library_t*, __ml_Hold, ( vlc_object_t* p_this ) );
#define ml_Hold( a ) __ml_Hold( VLC_OBJECT(a) )
VLC_EXPORT( media_library_t*, ml_Hold, ( vlc_object_t* p_this ) );
#define ml_Hold( a ) ml_Hold( VLC_OBJECT(a) )
/**
* @brief Discard your ref to media library
* @param p_this The object holding the media library
*/
VLC_EXPORT( void, __ml_Release, ( vlc_object_t* p_this ) );
#define ml_Release(a) __ml_Release( VLC_OBJECT(a))
VLC_EXPORT( void, ml_Release, ( vlc_object_t* p_this ) );
#define ml_Release(a) ml_Release( VLC_OBJECT(a) )
/**
* @brief Create a Media Library VLC object.
......@@ -413,13 +413,13 @@ VLC_EXPORT( void, __ml_Release, ( vlc_object_t* p_this ) );
* @param psz_name Name for the module
* @return The ML object.
*/
VLC_EXPORT( media_library_t*, __ml_Create, ( vlc_object_t *p_this, char* psz_name ) );
VLC_EXPORT( media_library_t*, ml_Create, ( vlc_object_t *p_this, char* psz_name ) );
/**
* @brief Destructor for the Media library singleton
* @param p_this Parent the ML object is attached to
*/
VLC_EXPORT( void, __ml_Destroy, ( vlc_object_t* p_this ) );
VLC_EXPORT( void, ml_Destroy, ( vlc_object_t* p_this ) );
/**
* @brief Control the Media Library
......@@ -821,7 +821,7 @@ static inline int ml_FtreeHasOp( ml_ftree_t* tree )
* If op = ML_OP_NONE, then you are connecting to a tree consisting of
* only SPECIAL nodes.
* If op = ML_OP_NOT, then right MUST be NULL
* op must not be ML_OP_SPECIAL, @see __ml_FtreeSpec
* op must not be ML_OP_SPECIAL, @see ml_FtreeSpec
* @param left part of the tree
* @param right part of the tree
* @return Pointer to new tree
......@@ -839,7 +839,7 @@ VLC_EXPORT( ml_ftree_t*, ml_OpConnectChilds, ( ml_op_e op, ml_ftree_t* left,
* @return Pointer to new tree
* @note Use the helpers
*/
VLC_EXPORT( ml_ftree_t*, __ml_FtreeSpec, ( ml_ftree_t* tree,
VLC_EXPORT( ml_ftree_t*, ml_FtreeSpec, ( ml_ftree_t* tree,
ml_select_e crit,
int limit,
char* sort ) );
......@@ -865,10 +865,10 @@ static inline ml_ftree_t* ml_FtreeFastAnd( ml_ftree_t* left,
#define ml_FtreeOr( left, right ) ml_OpConnectChilds( ML_OP_OR, left, right )
#define ml_FtreeNot( left ) ml_OpConnectChilds( ML_OP_NOT, left, NULL )
#define ml_FtreeSpecAsc( tree, str ) __ml_FtreeSpec( tree, ML_SORT_ASC, 0, str )
#define ml_FtreeSpecDesc( tree, str ) __ml_FtreeSpec( tree, ML_SORT_DESC, 0, str )
#define ml_FtreeSpecLimit( tree, limit ) __ml_FtreeSpec( tree, ML_LIMIT, limit, NULL )
#define ml_FtreeSpecDistinct( tree ) __ml_FtreeSpec( tree, ML_DISTINCT, 0, NULL )
#define ml_FtreeSpecAsc( tree, str ) ml_FtreeSpec( tree, ML_SORT_ASC, 0, str )
#define ml_FtreeSpecDesc( tree, str ) ml_FtreeSpec( tree, ML_SORT_DESC, 0, str )
#define ml_FtreeSpecLimit( tree, limit ) ml_FtreeSpec( tree, ML_LIMIT, limit, NULL )
#define ml_FtreeSpecDistinct( tree ) ml_FtreeSpec( tree, ML_DISTINCT, 0, NULL )
/*****************************************************************************
......@@ -1038,12 +1038,12 @@ static inline int ml_Update( media_library_t *p_media_library,
* @param id The id of the row to update
* @param ... The update data. [SelectType [RoleType] Value]
*/
#define ml_UpdateSimple( ml, sel, lval, id, ... ) \
__ml_UpdateSimple( ml, sel, lval, id, __VA_ARGS__, ML_END )
VLC_EXPORT( int, __ml_UpdateSimple, ( media_library_t *p_media_library,
VLC_EXPORT( int, ml_UpdateSimple, ( media_library_t *p_media_library,
ml_select_e selected_type,
const char* psz_lvalue,
int id, ... ) );
#define ml_UpdateSimple( ml, sel, lval, id, ... ) \
ml_UpdateSimple( ml, sel, lval, id, __VA_ARGS__, ML_END )
/**
* @brief Generic DELETE function
......
......@@ -780,7 +780,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* Get the ML */
if( var_GetBool( p_libvlc, "load-media-library-on-startup" ) == true )
{
priv->p_ml = __ml_Create( VLC_OBJECT( p_libvlc ), NULL );
priv->p_ml = ml_Create( VLC_OBJECT( p_libvlc ), NULL );
if( !priv->p_ml )
{
msg_Err( p_libvlc, "ML initialization failed" );
......@@ -992,7 +992,7 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
media_library_t* p_ml = priv->p_ml;
if( p_ml )
{
__ml_Destroy( VLC_OBJECT( p_ml ) );
ml_Destroy( VLC_OBJECT( p_ml ) );
vlc_object_release( p_ml );
libvlc_priv(p_playlist->p_libvlc)->p_ml = NULL;
}
......
......@@ -241,14 +241,14 @@ LocaleFree
make_URI
make_path
mdate
__ml_Create
__ml_Destroy
__ml_Hold
__ml_Release
ml_Create
ml_Destroy
ml_Hold
ml_Release
media_New
ml_OpConnectChilds
__ml_FtreeSpec
__ml_UpdateSimple
ml_FtreeSpec
ml_UpdateSimple
ml_GetPersonsFromMedia
ml_DeletePersonTypeFromMedia
ml_PlaySmartPlaylistBasedOn
......
......@@ -39,7 +39,7 @@
* @brief Destroy the medialibrary object
* @param Parent object that holds the media library object
*/
void __ml_Destroy( vlc_object_t * p_this )
void ml_Destroy( vlc_object_t * p_this )
{
media_library_t* p_ml = ( media_library_t* )p_this;
module_unneed( p_ml, p_ml->p_module );
......@@ -76,7 +76,7 @@ static void *ml_gc_init (ml_gc_object_t *p_gc, void (*pf_destruct) (ml_gc_object
* @return p_ml created and attached, module loaded. NULL if
* not able to load
*/
media_library_t *__ml_Create( vlc_object_t *p_this, char *psz_name )
media_library_t *ml_Create( vlc_object_t *p_this, char *psz_name )
{
media_library_t *p_ml = NULL;
......@@ -101,13 +101,14 @@ media_library_t *__ml_Create( vlc_object_t *p_this, char *psz_name )
return p_ml;
}
#undef ml_Hold
/**
* @brief Acquire a reference to the media library singleton
* @param p_this Object that holds the reference
* @return media_library_t The ml object. NULL if not compiled with
* media library or if unable to load
*/
media_library_t* __ml_Hold( vlc_object_t* p_this )
media_library_t* ml_Hold( vlc_object_t* p_this )
{
media_library_t* p_ml = NULL;
p_ml = libvlc_priv (p_this->p_libvlc)->p_ml;
......@@ -116,7 +117,7 @@ media_library_t* __ml_Hold( vlc_object_t* p_this )
var_GetBool( p_this->p_libvlc, "load-media-library-on-startup" ) == false )
{
libvlc_priv (p_this->p_libvlc)->p_ml
= __ml_Create( VLC_OBJECT( p_this->p_libvlc ), NULL );
= ml_Create( VLC_OBJECT( p_this->p_libvlc ), NULL );
p_ml = libvlc_priv (p_this->p_libvlc)->p_ml;
}
if( p_ml )
......@@ -124,11 +125,12 @@ media_library_t* __ml_Hold( vlc_object_t* p_this )
return p_ml;
}
#undef ml_Release
/**
* @brief Release a reference to the media library singleton
* @param p_this Object that holds the reference
*/
void __ml_Release( vlc_object_t* p_this )
void ml_Release( vlc_object_t* p_this )
{
media_library_t* p_ml;
p_ml = libvlc_priv (p_this->p_libvlc)->p_ml;
......@@ -175,6 +177,7 @@ ml_media_t* media_New( media_library_t* p_ml, int id,
return p_ml->functions.pf_GetMedia( p_ml, id, select, reload );
}
#undef ml_UpdateSimple
/**
* @brief Update a given table
* @param p_media_library The media library object
......@@ -183,7 +186,7 @@ ml_media_t* media_New( media_library_t* p_ml, int id,
* @param id The id of the row to update
* @param ... The update data. [SelectType [RoleType] Value] ... ML_END
*/
int __ml_UpdateSimple( media_library_t *p_media_library,
int ml_UpdateSimple( media_library_t *p_media_library,
ml_select_e selected_type,
const char* psz_lvalue,
int id, ... )
......@@ -280,7 +283,7 @@ int __ml_UpdateSimple( media_library_t *p_media_library,
* If op = ML_OP_NONE, then you are connecting to a tree consisting of
* only SPECIAL nodes.
* If op = ML_OP_NOT, then right MUST be NULL
* op must not be ML_OP_SPECIAL, @see __ml_FtreeSpec
* op must not be ML_OP_SPECIAL, @see ml_FtreeSpec
* @param left part of the tree
* @param right part of the tree
* @return Pointer to new tree
......@@ -329,6 +332,7 @@ ml_ftree_t* ml_OpConnectChilds( ml_op_e op, ml_ftree_t* left,
return p_parent;
}
#undef ml_FtreeSpec
/**
* @brief Attaches a special node to a tree
* @param tree Tree to attach special node to
......@@ -338,7 +342,7 @@ ml_ftree_t* ml_OpConnectChilds( ml_op_e op, ml_ftree_t* left,
* @return Pointer to new tree
* @note Use the helpers
*/
ml_ftree_t* __ml_FtreeSpec( ml_ftree_t* tree,
ml_ftree_t* ml_FtreeSpec( ml_ftree_t* tree,
ml_select_e crit,
int limit,
char* sort )
......
......@@ -399,26 +399,28 @@ vlm_t *vlm_New (vlc_object_t *obj)
#ifndef MEDIA_LIBRARY
#include<vlc_media_library.h>
media_library_t* __ml_Hold ( vlc_object_t* p_this )
#undef ml_Hold
media_library_t* ml_Hold ( vlc_object_t* p_this )
{
VLC_UNUSED( p_this );
return NULL;
}
void __ml_Release ( vlc_object_t* p_this )
#undef ml_Release
void ml_Release ( vlc_object_t* p_this )
{
VLC_UNUSED( p_this );
assert( 0 );
}
media_library_t* __ml_Create ( vlc_object_t *p_this, char* psz_name )
media_library_t* ml_Create ( vlc_object_t *p_this, char* psz_name )
{
VLC_UNUSED( p_this );
VLC_UNUSED( psz_name );
return NULL;
}
void __ml_Destroy( vlc_object_t * p_this )
void ml_Destroy( vlc_object_t * p_this )
{
VLC_UNUSED( p_this );
assert( 0 );
......@@ -434,7 +436,8 @@ ml_media_t* media_New( media_library_t* p_ml, int id, ml_select_e select, bool r
return NULL;
}
int __ml_UpdateSimple( media_library_t *p_media_library, ml_select_e selected_type,
#undef ml_UpdateSimple
int ml_UpdateSimple( media_library_t *p_media_library, ml_select_e selected_type,
const char* psz_lvalue, int id, ... )
{
VLC_UNUSED( p_media_library );
......@@ -454,7 +457,7 @@ ml_ftree_t* ml_OpConnectChilds( ml_op_e op, ml_ftree_t* left, ml_ftree_t* right
return NULL;
}
ml_ftree_t* __ml_FtreeSpec( ml_ftree_t* tree, ml_select_e crit, int limit,
ml_ftree_t* ml_FtreeSpec( ml_ftree_t* tree, ml_select_e crit, int limit,
char* sort )
{
VLC_UNUSED( tree );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment