[vlc-devel] [PATCH v6 1/7] upnp: Rename handle to client_handle
Johan Gunnarsson
johan.gunnarsson at gmail.com
Wed Dec 4 21:39:57 CET 2019
This in preparation for next patch that adds a device_handle.
---
modules/services_discovery/upnp-wrapper.cpp | 10 +++++-----
modules/services_discovery/upnp-wrapper.hpp | 4 ++--
modules/services_discovery/upnp.cpp | 8 ++++----
modules/stream_out/dlna/dlna.hpp | 2 +-
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/modules/services_discovery/upnp-wrapper.cpp b/modules/services_discovery/upnp-wrapper.cpp
index 8190aa0a6d..bbff2f3061 100644
--- a/modules/services_discovery/upnp-wrapper.cpp
+++ b/modules/services_discovery/upnp-wrapper.cpp
@@ -41,14 +41,14 @@ UpnpInstanceWrapper::Listeners UpnpInstanceWrapper::s_listeners;
vlc_mutex_t UpnpInstanceWrapper::s_lock = VLC_STATIC_MUTEX;
UpnpInstanceWrapper::UpnpInstanceWrapper()
- : m_handle( -1 )
+ : m_client_handle( -1 )
, m_refcount( 0 )
{
}
UpnpInstanceWrapper::~UpnpInstanceWrapper()
{
- UpnpUnRegisterClient( m_handle );
+ UpnpUnRegisterClient( m_client_handle );
UpnpFinish();
}
@@ -86,7 +86,7 @@ UpnpInstanceWrapper *UpnpInstanceWrapper::get(vlc_object_t *p_obj)
ixmlRelaxParser( 1 );
/* Register a control point */
- i_res = UpnpRegisterClient( Callback, NULL, &instance->m_handle );
+ i_res = UpnpRegisterClient( Callback, NULL, &instance->m_client_handle );
if( i_res != UPNP_E_SUCCESS )
{
msg_Err( p_obj, "Client registration failed: %s", UpnpGetErrorMessage( i_res ) );
@@ -122,9 +122,9 @@ void UpnpInstanceWrapper::release()
delete p_delete;
}
-UpnpClient_Handle UpnpInstanceWrapper::handle() const
+UpnpClient_Handle UpnpInstanceWrapper::client_handle() const
{
- return m_handle;
+ return m_client_handle;
}
int UpnpInstanceWrapper::Callback(Upnp_EventType event_type, UpnpEventPtr p_event, void *p_user_data)
diff --git a/modules/services_discovery/upnp-wrapper.hpp b/modules/services_discovery/upnp-wrapper.hpp
index 4469b22ed6..03116c14a1 100644
--- a/modules/services_discovery/upnp-wrapper.hpp
+++ b/modules/services_discovery/upnp-wrapper.hpp
@@ -70,7 +70,7 @@ public:
private:
static UpnpInstanceWrapper* s_instance;
static vlc_mutex_t s_lock;
- UpnpClient_Handle m_handle;
+ UpnpClient_Handle m_client_handle;
int m_refcount;
typedef std::shared_ptr<Listener> ListenerPtr;
typedef std::vector<ListenerPtr> Listeners;
@@ -80,7 +80,7 @@ public:
// This increases the refcount before returning the instance
static UpnpInstanceWrapper* get( vlc_object_t* p_obj );
void release();
- UpnpClient_Handle handle() const;
+ UpnpClient_Handle client_handle() const;
void addListener(ListenerPtr listener);
void removeListener(ListenerPtr listener);
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 4f0a8d24c2..4fe697beb2 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -271,7 +271,7 @@ SearchThread( void *p_data )
services_discovery_sys_t *p_sys = reinterpret_cast<services_discovery_sys_t *>( p_sd->p_sys );
/* Search for media servers */
- int i_res = UpnpSearchAsync( p_sys->p_upnp->handle(), 5,
+ int i_res = UpnpSearchAsync( p_sys->p_upnp->client_handle(), 5,
MEDIA_SERVER_DEVICE_TYPE, MEDIA_SERVER_DEVICE_TYPE );
if( i_res != UPNP_E_SUCCESS )
{
@@ -280,7 +280,7 @@ SearchThread( void *p_data )
}
/* Search for Sat Ip servers*/
- i_res = UpnpSearchAsync( p_sys->p_upnp->handle(), 5,
+ i_res = UpnpSearchAsync( p_sys->p_upnp->client_handle(), 5,
SATIP_SERVER_DEVICE_TYPE, MEDIA_SERVER_DEVICE_TYPE );
if( i_res != UPNP_E_SUCCESS )
msg_Err( p_sd, "Error sending search request: %s", UpnpGetErrorMessage( i_res ) );
@@ -1249,7 +1249,7 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
/* Setup an interruptible callback that will call sendActionCb if not
* interrupted by vlc_interrupt_kill */
i11eCb = new Upnp_i11e_cb( sendActionCb, &p_response );
- i_res = UpnpSendActionAsync( sys->p_upnp->handle(),
+ i_res = UpnpSendActionAsync( sys->p_upnp->client_handle(),
m_psz_root,
CONTENT_DIRECTORY_SERVICE_TYPE,
NULL, /* ignored in SDK, must be NULL */
@@ -1587,7 +1587,7 @@ void *SearchThread(void *data)
renderer_discovery_sys_t *p_sys = (renderer_discovery_sys_t*)p_rd->p_sys;
int i_res;
- i_res = UpnpSearchAsync(p_sys->p_upnp->handle(), UPNP_SEARCH_TIMEOUT_SECONDS,
+ i_res = UpnpSearchAsync(p_sys->p_upnp->client_handle(), UPNP_SEARCH_TIMEOUT_SECONDS,
MEDIA_RENDERER_DEVICE_TYPE, MEDIA_RENDERER_DEVICE_TYPE);
if( i_res != UPNP_E_SUCCESS )
{
diff --git a/modules/stream_out/dlna/dlna.hpp b/modules/stream_out/dlna/dlna.hpp
index 128ee1c423..6bda6a7587 100644
--- a/modules/stream_out/dlna/dlna.hpp
+++ b/modules/stream_out/dlna/dlna.hpp
@@ -76,7 +76,7 @@ public:
: parent(p_stream)
, base_url(base_url)
, device_url(device_url)
- , handle(upnp->handle())
+ , handle(upnp->client_handle())
, ConnectionID("0")
, AVTransportID("0")
, RcsID("0")
--
2.17.1
More information about the vlc-devel
mailing list