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 (std::u16string_view 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 (std::u16string_view locale)
 

Private Types

enum class  ModificationTarget {
  None ,
  File ,
  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, std::u16string_view 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, std::u16string_view 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 51 of file components.hxx.

Member Typedef Documentation

◆ ExternalServices

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

Definition at line 145 of file components.hxx.

◆ FileParser

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

Definition at line 105 of file components.hxx.

Member Enumeration Documentation

◆ ModificationTarget

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

Definition at line 149 of file components.hxx.

Constructor & Destructor Documentation

◆ Components() [1/2]

configmgr::Components::Components ( const Components )
privatedelete

◆ Components() [2/2]

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

◆ ~Components()

configmgr::Components::~Components ( )

Member Function Documentation

◆ addModification()

void configmgr::Components::addModification ( std::vector< OUString > const &  path)

◆ addRootAccess()

void configmgr::Components::addRootAccess ( rtl::Reference< RootAccess > const &  access)

Definition at line 225 of file components.cxx.

References roots_.

◆ allLocales()

bool configmgr::Components::allLocales ( std::u16string_view  locale)
static

◆ flushModifications()

void configmgr::Components::flushModifications ( )

Definition at line 297 of file components.cxx.

References lock_, and writeThread_.

Referenced by ~Components().

◆ getExtensionLayer()

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

Definition at line 884 of file components.cxx.

References sharedExtensionLayer_, and userExtensionLayer_.

Referenced by insertExtensionXcsFile(), and insertExtensionXcuFile().

◆ getExternalValue()

css::beans::Optional< css::uno::Any > configmgr::Components::getExternalValue ( std::u16string_view  descriptor)

◆ getSingleton()

Components & configmgr::Components::getSingleton ( css::uno::Reference< css::uno::XComponentContext > const &  context)
static

Definition at line 199 of file components.cxx.

◆ getTemplate()

rtl::Reference< Node > configmgr::Components::getTemplate ( OUString const &  fullName) const

◆ initGlobalBroadcaster()

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

◆ insertExtensionXcsFile()

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

Definition at line 309 of file components.cxx.

References data_, and getExtensionLayer().

◆ insertExtensionXcuFile()

void configmgr::Components::insertExtensionXcuFile ( bool  shared,
OUString const &  fileUri,
Modifications modifications 
)

◆ insertModificationXcuFile()

void configmgr::Components::insertModificationXcuFile ( OUString const &  fileUri,
std::set< OUString > const &  includedPaths,
std::set< OUString > const &  excludedPaths,
Modifications modifications 
)

◆ operator=()

Components & configmgr::Components::operator= ( const Components )
privatedelete

◆ parseFileLeniently()

void configmgr::Components::parseFileLeniently ( FileParser parseFile,
OUString const &  url,
int  layer,
Partial const *  partial,
Modifications modifications,
Additions additions 
)
private

◆ parseFileList()

void configmgr::Components::parseFileList ( int  layer,
FileParser parseFile,
std::u16string_view  urls,
bool  recordAdditions 
)
private

◆ parseFiles()

void configmgr::Components::parseFiles ( int  layer,
OUString const &  extension,
FileParser parseFile,
OUString const &  url,
bool  recursive 
)
private

◆ parseModificationLayer()

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

Definition at line 866 of file components.cxx.

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

Referenced by Components().

◆ parseResLayer()

void configmgr::Components::parseResLayer ( int  layer,
std::u16string_view  url 
)
private

Definition at line 860 of file components.cxx.

References parseFiles(), and parseXcdFiles().

Referenced by Components().

◆ parseXcdFiles()

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

Definition at line 745 of file components.cxx.

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

Referenced by parseResLayer(), and parseXcsXcuLayer().

◆ parseXcsXcuIniLayer()

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

Definition at line 826 of file components.cxx.

References i, parseFileList(), and prefix.

Referenced by Components().

◆ parseXcsXcuLayer()

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

Definition at line 820 of file components.cxx.

References parseFiles(), and parseXcdFiles().

Referenced by Components().

◆ removeExtensionXcuFile()

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

◆ removeRootAccess()

void configmgr::Components::removeRootAccess ( RootAccess access)

Definition at line 229 of file components.cxx.

References roots_.

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

◆ resolvePathRepresentation()

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

Definition at line 211 of file components.cxx.

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

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

◆ writeModifications()

void configmgr::Components::writeModifications ( )

Member Data Documentation

◆ context_

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

Definition at line 152 of file components.hxx.

Referenced by getExternalValue().

◆ data_

Data configmgr::Components::data_
private

◆ externalServices_

ExternalServices configmgr::Components::externalServices_
private

Definition at line 155 of file components.hxx.

Referenced by getExternalValue().

◆ lock_

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

◆ modificationFileUrl_

OUString configmgr::Components::modificationFileUrl_
private

Definition at line 160 of file components.hxx.

Referenced by Components(), and writeModifications().

◆ modificationTarget_

ModificationTarget configmgr::Components::modificationTarget_
private

Definition at line 159 of file components.hxx.

Referenced by Components(), and writeModifications().

◆ roots_

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

◆ sharedExtensionLayer_

int configmgr::Components::sharedExtensionLayer_
private

Definition at line 157 of file components.hxx.

Referenced by Components(), and getExtensionLayer().

◆ userExtensionLayer_

int configmgr::Components::userExtensionLayer_
private

Definition at line 158 of file components.hxx.

Referenced by Components(), and getExtensionLayer().

◆ writeThread_

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

Definition at line 156 of file components.hxx.

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


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