LibreOffice Module extensions (master) 1
Functions
download.cxx File Reference
#include <sal/config.h>
#include <string_view>
#include <curl/curl.h>
#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <osl/file.h>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "download.hxx"
Include dependency graph for download.cxx:

Go to the source code of this file.

Functions

static void openFile (OutData &out)
 
static OString getStringValue (const uno::Reference< container::XNameAccess > &xNameAccess, const OUString &aName)
 
static sal_Int32 getInt32Value (const uno::Reference< container::XNameAccess > &xNameAccess, const OUString &aName)
 
static size_t write_function (void *ptr, size_t size, size_t nmemb, void *stream)
 
static int progress_callback (void *clientp, curl_off_t dltotal, curl_off_t dlnow, SAL_UNUSED_PARAMETER curl_off_t, SAL_UNUSED_PARAMETER curl_off_t)
 
static bool curl_run (std::u16string_view rURL, OutData &out, const OString &aProxyHost, sal_Int32 nProxyPort)
 

Function Documentation

◆ curl_run()

static bool curl_run ( std::u16string_view  rURL,
OutData &  out,
const OString &  aProxyHost,
sal_Int32  nProxyPort 
)
static

Definition at line 213 of file download.cxx.

References aURL, openFile(), OUStringToOString(), progress_callback(), and write_function().

Referenced by Download::start().

◆ getInt32Value()

static sal_Int32 getInt32Value ( const uno::Reference< container::XNameAccess > &  xNameAccess,
const OUString &  aName 
)
static

Definition at line 113 of file download.cxx.

References aName, and n.

Referenced by Download::getProxyForURL().

◆ getStringValue()

static OString getStringValue ( const uno::Reference< container::XNameAccess > &  xNameAccess,
const OUString &  aName 
)
static

Definition at line 103 of file download.cxx.

References aName, and OUStringToOString().

Referenced by Download::getProxyForURL().

◆ openFile()

static void openFile ( OutData &  out)
static

Definition at line 58 of file download.cxx.

References aURL, and nIndex.

Referenced by curl_run(), and write_function().

◆ progress_callback()

static int progress_callback ( void *  clientp,
curl_off_t  dltotal,
curl_off_t  dlnow,
SAL_UNUSED_PARAMETER  curl_off_t,
SAL_UNUSED_PARAMETER  curl_off_t 
)
static

Definition at line 143 of file download.cxx.

Referenced by curl_run().

◆ write_function()

static size_t write_function ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  stream 
)
static

Definition at line 126 of file download.cxx.

References openFile(), size, and stream.

Referenced by curl_run().