LibreOffice Module framework (master) 1
|
#include <protocolhandlercache.hxx>
Public Member Functions | |
HandlerCache () | |
ctor of the cache of all registered protocol handler @descr It tries to open the right configuration package automatically and fill the internal structures. More... | |
~HandlerCache () | |
dtor of the cache @descr It frees all used memory. More... | |
bool | search (const OUString &sURL, ProtocolHandler *pReturn) const |
dtor of the cache @descr It frees all used memory. More... | |
bool | search (const css::util::URL &aURL, ProtocolHandler *pReturn) const |
search for a registered handler by using a URL struct @descr We combine necessary parts of this struct to a valid URL string and call our other search method ... It's a helper for outside code. More... | |
void | takeOver (HandlerHash aHandler, PatternHash aPattern) |
Static Private Attributes | |
static std::optional< HandlerHash > | s_pHandler |
list of all registered handler registered by her uno implementation names More... | |
static std::optional< PatternHash > | s_pPattern |
maps URL pattern to handler names More... | |
static HandlerCFGAccess * | s_pConfig = nullptr |
informs about config updates More... | |
static sal_Int32 | m_nRefCount = 0 |
ref count to construct/destruct internal member lists on demand by using singleton mechanism More... | |
Definition at line 88 of file protocolhandlercache.hxx.
framework::HandlerCache::HandlerCache | ( | ) |
ctor of the cache of all registered protocol handler @descr It tries to open the right configuration package automatically and fill the internal structures.
After that the cache can be used for read access on this data and perform some search operations on it.
Definition at line 83 of file protocolhandlercache.cxx.
References m_nRefCount, framework::PACKAGENAME_PROTOCOLHANDLER, framework::HandlerCFGAccess::read(), s_pConfig, s_pHandler, s_pPattern, and framework::HandlerCFGAccess::setCache().
framework::HandlerCache::~HandlerCache | ( | ) |
dtor of the cache @descr It frees all used memory.
In further implementations (may if we support write access too) it's a good place to flush changes back to the configuration - but not needed yet.
Definition at line 104 of file protocolhandlercache.cxx.
References m_nRefCount, s_pConfig, s_pHandler, s_pPattern, and framework::HandlerCFGAccess::setCache().
bool framework::HandlerCache::search | ( | const css::util::URL & | aURL, |
ProtocolHandler * | pReturn | ||
) | const |
search for a registered handler by using a URL struct @descr We combine necessary parts of this struct to a valid URL string and call our other search method ... It's a helper for outside code.
Definition at line 148 of file protocolhandlercache.cxx.
bool framework::HandlerCache::search | ( | const OUString & | sURL, |
ProtocolHandler * | pReturn | ||
) | const |
dtor of the cache @descr It frees all used memory.
In further implementations (may if we support write access too) it's a good place to flush changes back to the configuration - but not needed yet.
Definition at line 126 of file protocolhandlercache.cxx.
References s_pPattern.
Referenced by framework::DispatchProvider::implts_searchProtocolHandler(), and search().
void framework::HandlerCache::takeOver | ( | HandlerHash | aHandler, |
PatternHash | aPattern | ||
) |
Definition at line 153 of file protocolhandlercache.cxx.
References s_pHandler, and s_pPattern.
Referenced by framework::HandlerCFGAccess::Notify().
|
staticprivate |
ref count to construct/destruct internal member lists on demand by using singleton mechanism
Definition at line 100 of file protocolhandlercache.hxx.
Referenced by HandlerCache(), and ~HandlerCache().
|
staticprivate |
informs about config updates
Definition at line 98 of file protocolhandlercache.hxx.
Referenced by HandlerCache(), and ~HandlerCache().
|
staticprivate |
list of all registered handler registered by her uno implementation names
initialize static member of class HandlerCache @descr We use a singleton pattern to implement this handler cache.
That means it use two static member list to hold all necessary information and a ref count mechanism to create/destroy it on demand.
Definition at line 94 of file protocolhandlercache.hxx.
Referenced by HandlerCache(), takeOver(), and ~HandlerCache().
|
staticprivate |
maps URL pattern to handler names
Definition at line 96 of file protocolhandlercache.hxx.
Referenced by HandlerCache(), search(), takeOver(), and ~HandlerCache().