[vlc-devel] [PATCH v3 1/6] upnp: Rename handle to client_handle
Johan Gunnarsson
johan.gunnarsson at gmail.com
Thu Jul 25 23:26:01 CEST 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 c001492f37..38f18a1192 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 ) );
@@ -123,9 +123,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 3002599172..c59592b0b3 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 a467caaaa8..72644d0565 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