summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/ImplRepo_Service/Activator_Options.h
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:21 +0000
commit3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch)
tree197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/orbsvcs/ImplRepo_Service/Activator_Options.h
parent6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff)
downloadATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz
Repo restructuring
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/Activator_Options.h')
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Activator_Options.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Activator_Options.h b/TAO/orbsvcs/ImplRepo_Service/Activator_Options.h
new file mode 100644
index 00000000000..45f351a0f44
--- /dev/null
+++ b/TAO/orbsvcs/ImplRepo_Service/Activator_Options.h
@@ -0,0 +1,105 @@
+// -*- C++ -*-
+
+//=============================================================================
+/**
+ * @file Activator_Options.h
+ *
+ * $Id$
+ *
+ * @brief Definition of the Options class for the Implementation Repository.
+ *
+ * @author Darrell Brunsch <brunsch@cs.wustl.edu>
+ */
+//=============================================================================
+
+#ifndef ACTIVATOR_OPTIONS_H
+#define ACTIVATOR_OPTIONS_H
+
+#include "activator_export.h"
+
+#include "ace/SString.h"
+
+#if !defined (ACE_LACKS_PRAGMA_ONCE)
+# pragma once
+#endif /* ACE_LACKS_PRAGMA_ONCE */
+
+/**
+ * @class Options
+ *
+ * This is where all the settings for TAO's Implementation Repository are
+ * stored.
+ */
+class Activator_Export Activator_Options
+{
+public:
+
+ enum SERVICE_COMMAND {
+ SC_NONE,
+ SC_INSTALL,
+ SC_REMOVE,
+ SC_INSTALL_NO_LOCATOR
+ };
+
+ Activator_Options ();
+
+ /// Parse the command-line arguments and initialize the options.
+ int init (int argc, char *argv[]);
+ /// This version should only be used when run as an nt service.
+ int init_from_registry();
+
+ /// Service Mode
+ bool service (void) const;
+
+ /// Notify the ImR when server processes die.
+ /// Note : Currently this only works on Unix.
+ bool notify_imr (void) const;
+
+ /// Debug level for the Implementation Repository.
+ unsigned int debug (void) const;
+
+ /// Returns the file where the IOR should be stored.
+ const ACE_CString& ior_filename (void) const;
+
+ /// The nt service command to run (install/remove)
+ SERVICE_COMMAND service_command(void) const;
+
+ /// Save the command line arguments as registry settings. (Windows only)
+ int save_registry_options ();
+
+ const char* cmdline(void) const;
+
+ const ACE_CString& name(void) const;
+
+private:
+ /// Parses and pulls out arguments for the ImR
+ int parse_args (int &argc, char *argv[]);
+
+ /// Print the usage information.
+ void print_usage (void) const;
+
+ /// Loads options from the registry
+ int load_registry_options ();
+
+private:
+
+ /// Our extra command line arguments
+ ACE_CString cmdline_;
+
+ /// Debug level.
+ unsigned int debug_;
+
+ /// File where the IOR of the server object is stored.
+ ACE_CString ior_output_file_;
+
+ /// Should we run as a service?
+ bool service_;
+
+ bool notify_imr_;
+
+ /// SC_NONE, SC_INSTALL, SC_REMOVE, ...
+ SERVICE_COMMAND service_command_;
+
+ ACE_CString name_;
+};
+
+#endif