Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

hyp.ker.regserver_utility.h

00001 /*
00002 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00003  Hyperion Pattern.
00004  Hyperion Pattern is a part of the Hyperion Project.
00005 ----------------------------------------------------------
00006  Copyright (c) 2001 Pierre Rebours.
00007 
00008  This library is free software; you can redistribute it and/or
00009  modify it under the terms of the GNU Lesser General Public
00010  License as published by the Free Software Foundation; either
00011  version 2.1 of the License, or (at your option) any later version.
00012 
00013  This library is distributed in the hope that it will be useful,
00014  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00016  
00017  See hyp.license.txt file for more information about the license.
00018  
00019  Web: http://lagrandeporte.multimania.com/hyperion
00020  Email: amtycho@yahoo.fr
00021 ----------------------------------------------------------
00022  CVS
00023  $Log$
00024 \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
00025 */
00026 
00027 #ifndef _hyp_ker_reg_utility_h_
00028 #define _hyp_ker_reg_utility_h_
00029 
00030 #ifndef hyp_KERNEL_CORE_INSIDE
00031 #error Inclusion not allowed (include hyp.kernel.core.h instead)
00032 #endif
00033 
00034 
00041 class IImplRegistry
00042 {
00043 public:
00049         virtual void SetKey(const std::string& ParentKey,const std::string& Key) =0;
00050 
00056         virtual void DeleteKey(const std::string& ParentKey, const std::string& Key) =0;
00057 
00065         virtual void SetValueNameAndValue(const std::string& ParentKey,
00066                 const std::string& Key,
00067                 const std::string& ValueName,
00068                 const std::string& Value) =0;
00069 
00076         virtual std::string GetValueFromValueName(const std::string& ParentKey,
00077                 const std::string& Key,
00078                 const std::string& ValueName) =0;       
00079         
00080                 
00081         //depend de l'implementation
00082         /*
00083         virtual void SetKeyRoot(const std::string&) =0;
00084         */
00085         
00086 };
00087 
00088 
00089 
00090 class hyp_ker_DLL CRegistryUtility
00091 {
00092         IImplRegistry* m_pImplRegistry;
00093 
00094 public:
00098         enum ERegistryType { 
00099                 reg_win32,      
00100                 reg_std         
00101         };
00102 
00103 #ifdef hyp_USE_REGISTRY
00104         CRegistryUtility(ERegistryType =reg_win32);
00105 #else
00106         CRegistryUtility(ERegistryType =reg_std);
00107 #endif
00108 
00109         ~CRegistryUtility();
00110 
00111         void RegisterServer(const std::string&, const CGuid&, const std::string&);
00112         void UnregisterServer(const CGuid&);
00113         std::string GetPathInprocessServer(const CGuid&);
00114         
00115         CGuid GetCLSIDFromProgID(const std::string&);
00116         std::string GetProgIDFromCLSID(const CGuid&);   
00117 };
00118 
00119 
00120 #endif

Top of Page
written by Pierre Rebours © 2000-2001. Terms of Use.