shill: Basic VPN service framework.

The manager uses a VPNProvider (similar to DeviceInfo and ModemInfo) to manage
VPN services. For each VPN service the VPNProvider instantiates an appropriate
VPNDriver (e.g., OpenVPNDriver) based on the service arguments and associates it
with the generic VPN service.

BUG=chromium-os:26835,chromium-os:26836,chromium-os:26838,chromium-os:26839
TEST=unit tests

Change-Id: Ia1bdbe49ecbb6d5b50a732dcef4a15e1feaa4f69
Reviewed-on: https://gerrit.chromium.org/gerrit/16956
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
diff --git a/vpn_service.h b/vpn_service.h
new file mode 100644
index 0000000..485867a
--- /dev/null
+++ b/vpn_service.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2012 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 SHILL_VPN_SERVICE_
+#define SHILL_VPN_SERVICE_
+
+#include <base/memory/scoped_ptr.h>
+#include <gtest/gtest_prod.h>  // for FRIEND_TEST
+
+#include "shill/service.h"
+
+namespace shill {
+
+class VPNDriver;
+
+class VPNService : public Service {
+ public:
+  VPNService(ControlInterface *control_interface,
+             EventDispatcher *dispatcher,
+             Metrics *metrics,
+             Manager *manager,
+             VPNDriver *driver);  // Takes ownership of |driver|.
+  virtual ~VPNService();
+
+  // Inherited from Service.
+  virtual void Connect(Error *error);
+
+  virtual std::string GetStorageIdentifier() const;
+
+ private:
+  FRIEND_TEST(VPNServiceTest, GetDeviceRpcId);
+
+  virtual std::string GetDeviceRpcId(Error *error);
+
+  scoped_ptr<VPNDriver> driver_;
+
+  DISALLOW_COPY_AND_ASSIGN(VPNService);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_VPN_SERVICE_