Kaydet (Commit) 7744ed92 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

CMIS: use the proxy settings from the options

Change-Id: I5b856ac166b67097e1921ec71eb5b7e1819fec41
üst 04f21f9a
......@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cmis, \
libcmis/libcmis-0.3.0-warnings.patch \
libcmis/libcmis-0.3.0-win.patch \
libcmis/libcmis-0.3.0.patch \
libcmis/libcmis-0.3.0-proxy.patch \
))
ifeq ($(OS)$(COM),WNTMSC)
......
This diff is collapsed.
......@@ -60,6 +60,7 @@
#include <ucbhelper/std_inputstream.hxx>
#include <ucbhelper/std_outputstream.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/proxydecider.hxx>
#include "auth_provider.hxx"
#include "cmis_content.hxx"
......@@ -256,6 +257,14 @@ namespace cmis
libcmis::Session* Content::getSession( const uno::Reference< ucb::XCommandEnvironment >& xEnv )
{
// Set the proxy if needed. We are doing that all times as the proxy data shouldn't be cached.
ucbhelper::InternetProxyDecider aProxyDecider( m_xContext );
INetURLObject aBindingUrl( m_aURL.getBindingUrl( ) );
const ucbhelper::InternetProxyServer& rProxy = aProxyDecider.getProxy(
INetURLObject::GetScheme( aBindingUrl.GetProtocol( ) ), aBindingUrl.GetHost(), aBindingUrl.GetPort() );
rtl::OUString sProxy = rProxy.aName + ":" + rtl::OUString::valueOf( rProxy.nPort );
libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), string() );
// Look for a cached session, key is binding url + repo id
rtl::OUString sSessionId = m_aURL.getBindingUrl( ) + m_aURL.getRepositoryId( );
if ( NULL == m_pSession )
......
......@@ -41,6 +41,7 @@
#include <ucbhelper/commandenvironment.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/proxydecider.hxx>
#include "auth_provider.hxx"
#include "cmis_content.hxx"
......@@ -138,6 +139,14 @@ namespace cmis
void RepoContent::getRepositories( const uno::Reference< ucb::XCommandEnvironment > & xEnv )
{
// Set the proxy if needed. We are doing that all times as the proxy data shouldn't be cached.
ucbhelper::InternetProxyDecider aProxyDecider( m_xContext );
INetURLObject aBindingUrl( m_aURL.getBindingUrl( ) );
const ucbhelper::InternetProxyServer& rProxy = aProxyDecider.getProxy(
INetURLObject::GetScheme( aBindingUrl.GetProtocol( ) ), aBindingUrl.GetHost(), aBindingUrl.GetPort() );
rtl::OUString sProxy = rProxy.aName + ":" + rtl::OUString::valueOf( rProxy.nPort );
libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), string() );
if ( m_aRepositories.empty() )
{
// Get the auth credentials
......
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