22#include <unordered_map>
25#include <com/sun/star/util/URL.hpp>
28#include <rtl/ustring.hxx>
34#define CFG_PATH_SEPARATOR "/"
36#define PROPERTY_PROTOCOLS "Protocols"
66typedef std::unordered_map<OUString, ProtocolHandler>
HandlerHash;
141 virtual void Notify(
const css::uno::Sequence< OUString >& lPropertyNames)
override;
implements configuration access for handler configuration @descr We use the ConfigItem mechanism to r...
virtual void Notify(const css::uno::Sequence< OUString > &lPropertyNames) override
virtual void ImplCommit() override
void setCache(HandlerCache *pCache)
void read(HandlerHash &rHandlerHash, PatternHash &rPatternHash)
use base class mechanism to fill given structures @descr User use us as a wrapper between configurati...
HandlerCFGAccess(const OUString &sPackage)
dtor of the config access class @descr It opens the configuration package automatically by using base...
static HandlerCFGAccess * s_pConfig
informs about config updates
static sal_Int32 m_nRefCount
ref count to construct/destruct internal member lists on demand by using singleton mechanism
HandlerCache()
ctor of the cache of all registered protocol handler @descr It tries to open the right configuration ...
void takeOver(HandlerHash aHandler, PatternHash aPattern)
static std::optional< PatternHash > s_pPattern
maps URL pattern to handler names
static std::optional< HandlerHash > s_pHandler
list of all registered handler registered by her uno implementation names
bool search(const OUString &sURL, ProtocolHandler *pReturn) const
dtor of the cache @descr It frees all used memory.
~HandlerCache()
dtor of the cache @descr It frees all used memory.
std::unordered_map< OUString, OUString > PatternHash
This hash use registered pattern of all protocol handlers as keys and provide her uno implementation ...
std::unordered_map< OUString, ProtocolHandler > HandlerHash
This hash holds protocol handler structs by her names.
constexpr OUStringLiteral PACKAGENAME_PROTOCOLHANDLER
Programmer can register his own services to handle different protocols.
std::vector< OUString > m_lProtocols
list of URL pattern which defines the protocols which this handler is registered for
OUString m_sUNOName
the uno implementation name of this handler