LibreOffice Module configmgr (master)  1
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
configmgr::Components Class Reference

#include <components.hxx>

Collaboration diagram for configmgr::Components:
[legend]

Classes

class  WriteThread
 

Public Member Functions

rtl::Reference< NoderesolvePathRepresentation (OUString const &pathRepresentation, OUString *canonicRepresentation, std::vector< OUString > *path, int *finalizedLayer) const
 
rtl::Reference< NodegetTemplate (OUString const &fullName) const
 
void addRootAccess (rtl::Reference< RootAccess > const &access)
 
void removeRootAccess (RootAccess *access)
 
void initGlobalBroadcaster (Modifications const &modifications, rtl::Reference< RootAccess > const &exclude, Broadcaster *broadcaster)
 
void addModification (std::vector< OUString > const &path)
 
void writeModifications ()
 
void flushModifications ()
 
void insertExtensionXcsFile (bool shared, OUString const &fileUri)
 
void insertExtensionXcuFile (bool shared, OUString const &fileUri, Modifications *modifications)
 
void removeExtensionXcuFile (OUString const &fileUri, Modifications *modifications)
 
void insertModificationXcuFile (OUString const &fileUri, std::set< OUString > const &includedPaths, std::set< OUString > const &excludedPaths, Modifications *modifications)
 
css::beans::Optional< css::uno::Any > getExternalValue (OUString const &descriptor)
 
 Components (css::uno::Reference< css::uno::XComponentContext > const &context)
 
 ~Components ()
 

Static Public Member Functions

static ComponentsgetSingleton (css::uno::Reference< css::uno::XComponentContext > const &context)
 
static bool allLocales (OUString const &locale)
 

Private Types

enum  ModificationTarget {
  ModificationTarget::None,
  ModificationTarget::File,
  ModificationTarget::Dconf
}
 
typedef void FileParser(OUString const &, int, Data &, Partial const *, Modifications *, Additions *)
 
typedef config_map< css::uno::Reference< css::beans::XPropertySet > > ExternalServices
 

Private Member Functions

 Components (const Components &)=delete
 
Componentsoperator= (const Components &)=delete
 
void parseFileLeniently (FileParser *parseFile, OUString const &url, int layer, Partial const *partial, Modifications *modifications, Additions *additions)
 
void parseFiles (int layer, OUString const &extension, FileParser *parseFile, OUString const &url, bool recursive)
 
void parseFileList (int layer, FileParser *parseFile, OUString const &urls, bool recordAdditions)
 
void parseXcdFiles (int layer, OUString const &url)
 
void parseXcsXcuLayer (int layer, OUString const &url)
 
void parseXcsXcuIniLayer (int layer, OUString const &url, bool recordAdditions)
 
void parseResLayer (int layer, OUString const &url)
 
void parseModificationLayer (int layer, OUString const &url)
 
int getExtensionLayer (bool shared) const
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > context_
 
Data data_
 
o3tl::sorted_vector< RootAccess * > roots_
 
ExternalServices externalServices_
 
rtl::Reference< WriteThreadwriteThread_
 
int sharedExtensionLayer_
 
int userExtensionLayer_
 
ModificationTarget modificationTarget_
 
OUString modificationFileUrl_
 
std::shared_ptr< osl::Mutex > lock_
 

Detailed Description

Definition at line 50 of file components.hxx.

Member Typedef Documentation

typedef config_map< css::uno::Reference< css::beans::XPropertySet > > configmgr::Components::ExternalServices
private

Definition at line 144 of file components.hxx.

typedef void configmgr::Components::FileParser(OUString const &, int, Data &, Partial const *, Modifications *, Additions *)
private

Definition at line 104 of file components.hxx.

Member Enumeration Documentation

enum configmgr::Components::ModificationTarget
strongprivate
Enumerator
None 
File 
Dconf 

Definition at line 148 of file components.hxx.

Constructor & Destructor Documentation

configmgr::Components::Components ( const Components )
privatedelete
configmgr::Components::Components ( css::uno::Reference< css::uno::XComponentContext > const &  context)
explicit
configmgr::Components::~Components ( )

Member Function Documentation

void configmgr::Components::addModification ( std::vector< OUString > const &  path)
void configmgr::Components::addRootAccess ( rtl::Reference< RootAccess > const &  access)

Definition at line 223 of file components.cxx.

References roots_.

bool configmgr::Components::allLocales ( OUString const &  locale)
static
void configmgr::Components::flushModifications ( )

Definition at line 295 of file components.cxx.

References lock_, and writeThread_.

Referenced by ~Components().

int configmgr::Components::getExtensionLayer ( bool  shared) const
private

Definition at line 882 of file components.cxx.

References sharedExtensionLayer_, and userExtensionLayer_.

Referenced by insertExtensionXcsFile(), and insertExtensionXcuFile().

css::beans::Optional< css::uno::Any > configmgr::Components::getExternalValue ( OUString const &  descriptor)
Components & configmgr::Components::getSingleton ( css::uno::Reference< css::uno::XComponentContext > const &  context)
static

Definition at line 197 of file components.cxx.

References assert().

rtl::Reference< Node > configmgr::Components::getTemplate ( OUString const &  fullName) const
void configmgr::Components::initGlobalBroadcaster ( Modifications const &  modifications,
rtl::Reference< RootAccess > const &  exclude,
Broadcaster broadcaster 
)

Definition at line 231 of file components.cxx.

References configmgr::Modifications::getRoot(), and roots_.

Referenced by configmgr::RootAccess::commitChanges().

void configmgr::Components::insertExtensionXcsFile ( bool  shared,
OUString const &  fileUri 
)

Definition at line 307 of file components.cxx.

References data_, and getExtensionLayer().

void configmgr::Components::insertExtensionXcuFile ( bool  shared,
OUString const &  fileUri,
Modifications modifications 
)
void configmgr::Components::insertModificationXcuFile ( OUString const &  fileUri,
std::set< OUString > const &  includedPaths,
std::set< OUString > const &  excludedPaths,
Modifications modifications 
)
Components& configmgr::Components::operator= ( const Components )
privatedelete
void configmgr::Components::parseFileLeniently ( FileParser parseFile,
OUString const &  url,
int  layer,
Partial const *  partial,
Modifications modifications,
Additions additions 
)
private
void configmgr::Components::parseFileList ( int  layer,
FileParser parseFile,
OUString const &  urls,
bool  recordAdditions 
)
private
void configmgr::Components::parseFiles ( int  layer,
OUString const &  extension,
FileParser parseFile,
OUString const &  url,
bool  recursive 
)
private

Definition at line 662 of file components.cxx.

References i, parseFileLeniently(), SAL_MAX_UINT32, and SAL_WARN.

Referenced by parseModificationLayer(), parseResLayer(), and parseXcsXcuLayer().

void configmgr::Components::parseModificationLayer ( int  layer,
OUString const &  url 
)
private

Definition at line 864 of file components.cxx.

References parseFileLeniently(), parseFiles(), SAL_CONFIGFILE, and SAL_INFO.

Referenced by Components().

void configmgr::Components::parseResLayer ( int  layer,
OUString const &  url 
)
private

Definition at line 858 of file components.cxx.

References parseFiles(), and parseXcdFiles().

Referenced by Components().

void configmgr::Components::parseXcdFiles ( int  layer,
OUString const &  url 
)
private

Definition at line 743 of file components.cxx.

References data_, i, manager, name, SAL_MAX_UINT32, and SAL_WARN.

Referenced by parseResLayer(), and parseXcsXcuLayer().

void configmgr::Components::parseXcsXcuIniLayer ( int  layer,
OUString const &  url,
bool  recordAdditions 
)
private

Definition at line 824 of file components.cxx.

References i, and parseFileList().

Referenced by Components().

void configmgr::Components::parseXcsXcuLayer ( int  layer,
OUString const &  url 
)
private

Definition at line 818 of file components.cxx.

References parseFiles(), and parseXcdFiles().

Referenced by Components().

void configmgr::Components::removeExtensionXcuFile ( OUString const &  fileUri,
Modifications modifications 
)
void configmgr::Components::removeRootAccess ( RootAccess access)

Definition at line 227 of file components.cxx.

References roots_.

Referenced by configmgr::RootAccess::~RootAccess().

rtl::Reference< Node > configmgr::Components::resolvePathRepresentation ( OUString const &  pathRepresentation,
OUString *  canonicRepresentation,
std::vector< OUString > *  path,
int finalizedLayer 
) const

Definition at line 209 of file components.cxx.

References data_, and configmgr::Data::resolvePathRepresentation().

Referenced by configmgr::RootAccess::getNode().

void configmgr::Components::writeModifications ( )

Member Data Documentation

css::uno::Reference< css::uno::XComponentContext > configmgr::Components::context_
private

Definition at line 151 of file components.hxx.

Referenced by getExternalValue().

Data configmgr::Components::data_
private
ExternalServices configmgr::Components::externalServices_
private

Definition at line 154 of file components.hxx.

Referenced by getExternalValue().

std::shared_ptr<osl::Mutex> configmgr::Components::lock_
private
OUString configmgr::Components::modificationFileUrl_
private

Definition at line 159 of file components.hxx.

Referenced by Components(), and writeModifications().

ModificationTarget configmgr::Components::modificationTarget_
private

Definition at line 158 of file components.hxx.

Referenced by Components(), and writeModifications().

o3tl::sorted_vector< RootAccess * > configmgr::Components::roots_
private
int configmgr::Components::sharedExtensionLayer_
private

Definition at line 156 of file components.hxx.

Referenced by Components(), and getExtensionLayer().

int configmgr::Components::userExtensionLayer_
private

Definition at line 157 of file components.hxx.

Referenced by Components(), and getExtensionLayer().

rtl::Reference< WriteThread > configmgr::Components::writeThread_
private

Definition at line 155 of file components.hxx.

Referenced by flushModifications(), writeModifications(), and ~Components().


The documentation for this class was generated from the following files: