Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: chromeos/dbus/shill_third_party_vpn_observer.h

Issue 681723003: Add new shill client for VPN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes nit from Steven Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/shill_third_party_vpn_observer.h
diff --git a/chromeos/dbus/shill_third_party_vpn_observer.h b/chromeos/dbus/shill_third_party_vpn_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..5b0e013ab29d68b8c1537381af9fcf10ca026ba8
--- /dev/null
+++ b/chromeos/dbus/shill_third_party_vpn_observer.h
@@ -0,0 +1,32 @@
+// Copyright 2014 The Chromium 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_DBUS_SHILL_THIRD_PARTY_VPN_OBSERVER_H_
+#define CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_OBSERVER_H_
+
+#include <stdint.h>
+
+namespace chromeos {
+
+// This is a base class for observers which handle signals sent by the
+// ThirdPartyVpnAdaptor in Shill.
+class ShillThirdPartyVpnObserver {
+ public:
+ // Ownership of |data| belongs to the caller, hence the contents should be
+ // consumed before the call returns, i.e., pointer should not be dereferenced
+ // after the function returns. The method takes raw data pointer and length
+ // instead of a type like vector to avoid additional memcpys.
+ virtual void OnPacketReceived(const uint8_t* data, size_t length) = 0;
+ virtual void OnPlatformMessage(uint32_t message) = 0;
+
+ protected:
+ virtual ~ShillThirdPartyVpnObserver() {}
+
+ private:
+ DISALLOW_ASSIGN(ShillThirdPartyVpnObserver);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_OBSERVER_H_
« no previous file with comments | « chromeos/dbus/shill_third_party_vpn_driver_client_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698