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

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: Updated the interface to better suit the upper layer 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
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..e9b4cc8cfdd61a4a28cfd0be6793748119fe960f
--- /dev/null
+++ b/chromeos/dbus/shill_third_party_vpn_observer.h
@@ -0,0 +1,28 @@
+// 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 "base/basictypes.h"
pneubeck (no reviews) 2014/11/11 13:09:35 should be base/macros.h instead.
kaliamoorthi 2014/11/11 14:58:34 This is for uint32
+
+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
pneubeck (no reviews) 2014/11/11 13:09:35 why not just passing a vector<uint8> or a string i
kaliamoorthi 2014/11/11 14:58:34 As we discussed this is to reduce memcpy. I docume
+ // consumed before the call returns, i.e., pointer should not be dereferenced
+ // after the function returns.
+ virtual void OnPacketReceived(const uint8* data, size_t length) = 0;
+ virtual void OnPlatformMessage(uint32 message) = 0;
+
+ protected:
+ virtual ~ShillThirdPartyVpnObserver() {}
pneubeck (no reviews) 2014/11/11 13:09:35 Add also a private: DISALLOW_ASSIGN
kaliamoorthi 2014/11/11 14:58:34 Done.
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_SHILL_THIRD_PARTY_VPN_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698