## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# iutil/cfgmgr.h

Go to the documentation of this file.

    00001 /*
    00002     Copyright (C) 2001 by Martin Geisse <mgeisse@gmx.net>
    00003
    00004     This library is free software; you can redistribute it and/or
    00005     modify it under the terms of the GNU Library General Public
    00006     License as published by the Free Software Foundation; either
    00007     version 2 of the License, or (at your option) any later version.
    00008
    00009     This library is distributed in the hope that it will be useful,
    00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012     Library General Public License for more details.
    00013
    00014     You should have received a copy of the GNU Library General Public
    00015     License along with this library; if not, write to the Free
    00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    00017 */
    00018
    00019 #ifndef __CS_IUTIL_CFGMGR_H__
    00020 #define __CS_IUTIL_CFGMGR_H__
    00021
    00027 #include "csutil/scf.h"
    00028
    00029 #include "iutil/cfgfile.h"
    00030
    00031 struct iVFS;
    00032
    00033
    00077 struct iConfigManager : public iConfigFile
    00078 {
    00079   SCF_INTERFACE(iConfigManager, 2,0,0);
    00080   enum
    00081   {
    00082     PriorityMin =       -1000000000,
    00083     PriorityVeryLow =   -100,
    00084     PriorityLow =       -50,
    00085     PriorityMedium =    0,
    00086     PriorityHigh =      50,
    00087     PriorityVeryHigh =  100,
    00088     PriorityMax =       1000000000
    00089   };
    00090
    00092   enum
    00093   {
    00094     // plug-in priority
    00095     ConfigPriorityPlugin        = PriorityVeryLow,
    00096     // application priority
    00097     ConfigPriorityApplication   = PriorityLow,
    00098     // user priority (application-neutral)
    00099     ConfigPriorityUserGlobal    = PriorityMedium,
    00100     // user priority (application-specific)
    00101     ConfigPriorityUserApp       = PriorityHigh,
    00102     // command-line priority
    00103     ConfigPriorityCmdLine       = PriorityVeryHigh
    00104   };
    00105
    00110   virtual void AddDomain(iConfigFile*, int priority) = 0;
    00120   virtual iConfigFile* AddDomain(char const* path, iVFS*, int priority) = 0;
    00128   virtual void RemoveDomain(iConfigFile*) = 0;
    00130   virtual void RemoveDomain(char const* path) = 0;
    00135   virtual iConfigFile* LookupDomain(char const* path) const = 0;
    00137   virtual void SetDomainPriority(char const* path, int priority) = 0;
    00142   virtual void SetDomainPriority(iConfigFile*, int priority) = 0;
    00147   virtual int GetDomainPriority(char const* path) const = 0;
    00152   virtual int GetDomainPriority(iConfigFile*) const = 0;
    00153
    00159   virtual bool SetDynamicDomain(iConfigFile*) = 0;
    00165   virtual iConfigFile* GetDynamicDomain() const = 0;
    00167   virtual void SetDynamicDomainPriority(int priority) = 0;
    00169   virtual int GetDynamicDomainPriority() const = 0;
    00170
    00172   virtual void FlushRemoved() = 0;
    00173 };
    00176 #endif // __CS_IUTIL_CFGMGR_H__