[vlc-devel] [RFC PATCH 5/8] dsm: don't export too common functions

Thomas Guillem thomas at gllm.fr
Thu Nov 27 12:00:15 CET 2014


---
 modules/access/dsm/access.c | 10 +++++++---
 modules/access/dsm/common.h |  9 +++------
 modules/access/dsm/sd.c     |  6 +++---
 3 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index 50dc0f7..9b8f912 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -36,6 +36,10 @@
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
+static int Open( vlc_object_t * );
+static void Close( vlc_object_t * );
+
+#define vlc_sd_probe_Open bdsm_sd_probe_Open
 
 #define USER_TEXT N_("SMB user name")
 #define USER_LONGTEXT N_("User name that will " \
@@ -68,7 +72,7 @@ vlc_module_begin ()
         set_category( CAT_PLAYLIST )
         set_subcategory( SUBCAT_PLAYLIST_SD )
         set_capability( "services_discovery", 0 )
-        set_callbacks( SdOpen, SdClose )
+        set_callbacks( bdsm_SdOpen, bdsm_SdClose )
 
         VLC_SD_PROBE_SUBMODULE
 
@@ -96,7 +100,7 @@ static int BrowserInit( access_t *p_access );
 /*****************************************************************************
  * Open: Initialize module's data structures and libdsm
  *****************************************************************************/
-int Open( vlc_object_t *p_this )
+static int Open( vlc_object_t *p_this )
 {
     access_t     *p_access = (access_t*)p_this;
     access_sys_t *p_sys;
@@ -133,7 +137,7 @@ int Open( vlc_object_t *p_this )
 /*****************************************************************************
  * Close: free unused data structures
  *****************************************************************************/
-void Close( vlc_object_t *p_this )
+static void Close( vlc_object_t *p_this )
 {
     access_t     *p_access = (access_t*)p_this;
     access_sys_t *p_sys = p_access->p_sys;
diff --git a/modules/access/dsm/common.h b/modules/access/dsm/common.h
index 8805b66..4da7798 100644
--- a/modules/access/dsm/common.h
+++ b/modules/access/dsm/common.h
@@ -29,12 +29,9 @@
 #include <vlc_services_discovery.h>
 #include <vlc_url.h>
 
-int Open( vlc_object_t * );
-void Close( vlc_object_t * );
-
-int SdOpen( vlc_object_t * );
-void SdClose( vlc_object_t * );
-int vlc_sd_probe_Open( vlc_object_t * );
+int bdsm_SdOpen( vlc_object_t * );
+void bdsm_SdClose( vlc_object_t * );
+int bdsm_sd_probe_Open( vlc_object_t * );
 
 struct access_sys_t
 {
diff --git a/modules/access/dsm/sd.c b/modules/access/dsm/sd.c
index ad2c5a0..9b581f6 100644
--- a/modules/access/dsm/sd.c
+++ b/modules/access/dsm/sd.c
@@ -37,7 +37,7 @@ struct services_discovery_sys_t
     netbios_ns      *ns;
 };
 
-int vlc_sd_probe_Open (vlc_object_t *p_this)
+int bdsm_sd_probe_Open (vlc_object_t *p_this)
 {
     vlc_probe_t *p_probe = (vlc_probe_t *)p_this;
 
@@ -47,7 +47,7 @@ int vlc_sd_probe_Open (vlc_object_t *p_this)
     return VLC_PROBE_CONTINUE;
 }
 
-int SdOpen (vlc_object_t *p_this)
+int bdsm_SdOpen (vlc_object_t *p_this)
 {
     services_discovery_t *p_sd = (services_discovery_t *)p_this;
     services_discovery_sys_t *p_sys = malloc (sizeof (*p_sys));
@@ -97,7 +97,7 @@ int SdOpen (vlc_object_t *p_this)
         return VLC_EGENERIC;
 }
 
-void SdClose (vlc_object_t *p_this)
+void bdsm_SdClose (vlc_object_t *p_this)
 {
     services_discovery_t *sd = (services_discovery_t *)p_this;
     services_discovery_sys_t *p_sys = sd->p_sys;
-- 
2.1.3




More information about the vlc-devel mailing list