Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

cfgmgr.h

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 __IUTIL_CFGMGR_H__
00020 #define __IUTIL_CFGMGR_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "iutil/cfgfile.h"
00024 
00025 SCF_VERSION(iConfigManager, 0, 0, 3);
00026 
00061 struct iConfigManager : public iConfigFile
00062 {
00063   enum
00064   {
00065     PriorityMin =       -1000000000,
00066     PriorityVeryLow =   -100,
00067     PriorityLow =       -50,
00068     PriorityMedium =    0,
00069     PriorityHigh =      +50,
00070     PriorityVeryHigh =  +100,
00071     PriorityMax =       +1000000000
00072   };
00073 
00075   enum
00076   {
00077     // plug-in priority
00078     ConfigPriorityPlugin        = PriorityVeryLow,
00079     // application priority
00080     ConfigPriorityApplication   = PriorityLow,
00081     // user priority (application-neutral)
00082     ConfigPriorityUserGlobal    = PriorityMedium,
00083     // user priority (application-specific)
00084     ConfigPriorityUserApp       = PriorityHigh,
00085     // command-line priority
00086     ConfigPriorityCmdLine       = PriorityVeryHigh
00087   };
00088 
00090   virtual void AddDomain(iConfigFile*, int priority) = 0;
00095   virtual iConfigFile *AddDomain(char const* path, iVFS*, int priority) = 0;
00097   virtual void RemoveDomain(iConfigFile*) = 0;
00099   virtual void RemoveDomain(char const* path) = 0;
00101   virtual iConfigFile* LookupDomain(char const* path) const = 0;
00103   virtual void SetDomainPriority(char const* path, int priority) = 0;
00105   virtual void SetDomainPriority(iConfigFile*, int priority) = 0;
00107   virtual int GetDomainPriority(char const* path) const = 0;
00109   virtual int GetDomainPriority(iConfigFile*) const = 0;
00110 
00115   virtual bool SetDynamicDomain(iConfigFile*) = 0;
00117   virtual iConfigFile *GetDynamicDomain() const = 0;
00119   virtual void SetDynamicDomainPriority(int priority) = 0;
00121   virtual int GetDynamicDomainPriority() const = 0;
00122 
00124   virtual void FlushRemoved() = 0;
00125 };
00126 
00127 #endif // __IUTIL_CFGMGR_H__

Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000