tool/Command.h
changeset 1166 006244d53f68
parent 1156 ecaf2a896ea3
child 1335 09c6fce1ae45
--- a/tool/Command.h	Mon Jul 28 14:06:03 2008 +0000
+++ b/tool/Command.h	Mon Jul 28 14:28:43 2008 +0000
@@ -14,13 +14,6 @@
 
 #include "MasterDevice.h"
 
-/*****************************************************************************/
-
-extern unsigned int masterIndex;
-extern int domainIndex;
-extern string dataTypeStr;
-extern bool force;
-
 /****************************************************************************/
 
 class InvalidUsageException:
@@ -71,6 +64,12 @@
         int getAlias() const;
         void setPosition(int);
         int getPosition() const;
+        void setDomain(int);
+        int getDomain() const;
+        void setDataType(const string &);
+        const string &getDataType() const;
+		void setForce(bool);
+		bool getForce() const;
 
         bool matchesSubstr(const string &) const;
         bool matchesAbbrev(const string &) const;
@@ -93,6 +92,8 @@
         SlaveList selectedSlaves(MasterDevice &);
         typedef list<ec_ioctl_config_t> ConfigList;
         ConfigList selectedConfigs(MasterDevice &);
+        typedef list<ec_ioctl_domain_t> DomainList;
+        DomainList selectedDomains(MasterDevice &);
 
         static string alStateString(uint8_t);
 
@@ -102,6 +103,9 @@
         Verbosity verbosity;
         int alias;
         int position;
+		int domain;
+		string dataType;
+		bool force;
 
         Command();
 };
@@ -143,4 +147,25 @@
 
 /****************************************************************************/
 
+inline int Command::getDomain() const
+{
+    return domain;
+}
+
+/****************************************************************************/
+
+inline const string &Command::getDataType() const
+{
+    return dataType;
+}
+
+/****************************************************************************/
+
+inline bool Command::getForce() const
+{
+    return force;
+}
+
+/****************************************************************************/
+
 #endif