PolicyManager: Initial classes for PM variables.

The PolicyManager code will reside on the new sub-directory
policy_manager/ to reduce the accidental coupling of this code with
other parts of the Update Engine. The subdirectory '.' is included
in the include path to allow code in subdirectories use the full
path such as "policy_manager/variable.h" when including files
instead of a relative path.

This first patch adds the basic interface for PM variables to be
exposed by PM providers. The patch includes the Variable class.

BUG=None
TEST=None, only interfaces were added.

Change-Id: I16828ba08a1ccf7f318b986b718319bbacea59ee
Reviewed-on: https://chromium-review.googlesource.com/181536
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/policy_manager/variable.h b/policy_manager/variable.h
new file mode 100644
index 0000000..46defbc
--- /dev/null
+++ b/policy_manager/variable.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_VARIABLE_H
+#define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_VARIABLE_H
+
+#include <string>
+
+#include <base/time.h>
+
+namespace chromeos_policy_manager {
+
+// Interface to a Policy Manager variable to be implemented by the providers.
+template<typename T>
+class Variable {
+ public:
+  virtual ~Variable() {}
+
+ protected:
+  // Gets the current value of the variable. The current value is copied to a
+  // new object and returned. The caller of this method owns the object and
+  // should delete it.
+  //
+  // In case of and error getting the current value or the |timeout| timeout is
+  // exceeded, a NULL value is returned and the |errmsg| is set.
+  //
+  // The caller can pass a NULL value for |errmsg|, in which case the error
+  // message won't be set.
+  virtual const T* GetValue(base::TimeDelta timeout, std::string* errmsg) = 0;
+};
+
+}  // namespace chromeos_policy_manager
+
+#endif  // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_VARIABLE_H