summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/ImplRepo_Service/Config_Backing_Store.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/Config_Backing_Store.h')
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Config_Backing_Store.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Config_Backing_Store.h b/TAO/orbsvcs/ImplRepo_Service/Config_Backing_Store.h
new file mode 100644
index 00000000000..e6a6d9b2b1b
--- /dev/null
+++ b/TAO/orbsvcs/ImplRepo_Service/Config_Backing_Store.h
@@ -0,0 +1,104 @@
+/* -*- C++ -*- */
+
+//=============================================================================
+/**
+* @file Config_Backing_Store.h
+*
+* $Id$
+*
+* These classes define ACE_Configuration implementations of the backing store.
+*
+* @author Darrell Brunsch <brunsch@cs.wustl.edu>
+* @author Priyanka Gontla <gontla_p@ociweb.com>
+*/
+//=============================================================================
+
+#ifndef CONFIG_BACKING_STORE_H
+#define CONFIG_BACKING_STORE_H
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+#include "Locator_Repository.h"
+
+class ACE_Configuration;
+
+/**
+* @class Config_Backing_Store
+*
+* @brief ACE_Configuration backing store interface containing all ImR persistent information.
+*
+*/
+class Config_Backing_Store : public Locator_Repository
+{
+public:
+ Config_Backing_Store(ACE_Configuration& config);
+
+ virtual ~Config_Backing_Store();
+
+ virtual int persistent_load();
+
+protected:
+ virtual int persistent_update(const Server_Info_Ptr& info);
+
+ virtual int persistent_update(const Activator_Info_Ptr& info);
+
+ virtual int persistent_remove(const ACE_CString& name, bool activator);
+
+ int remove(const ACE_CString& name, const ACE_TCHAR* key);
+
+ ACE_Configuration& config_;
+ int status_;
+
+private:
+ void loadServers();
+ void loadActivators();
+};
+
+/**
+* @class Heap_Backing_Store
+*
+* @brief Heap file backing store containing all ImR persistent information.
+*
+*/
+class Heap_Backing_Store : public Config_Backing_Store
+{
+public:
+ Heap_Backing_Store(const ACE_CString& filename, bool start_clean);
+
+ virtual ~Heap_Backing_Store();
+
+ virtual const char* repo_mode() const;
+
+private:
+ const ACE_CString filename_;
+ ACE_Configuration_Heap heap_;
+};
+
+/**
+* @class Registry_Backing_Store
+*
+* @brief Win32 registry backing store containing all ImR persistent information.
+*
+*/
+class Registry_Backing_Store : public Config_Backing_Store
+{
+public:
+ Registry_Backing_Store(const ACE_CString& filename, bool start_clean);
+
+ virtual ~Registry_Backing_Store();
+
+ virtual const char* repo_mode() const;
+
+private:
+#if defined (ACE_WIN32) && !defined (ACE_LACKS_WIN32_REGISTRY)
+ ACE_Configuration_Win32Registry win32registry_;
+#else
+ // invalid config to simplify #defines
+ ACE_Configuration_Heap invalid_config_;
+#endif
+};
+
+
+#endif /* CONFIG_BACKING_STORE_H */