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

Unified Diff: chromeos/dbus/permission_broker_client.h

Issue 960033002: Add firewall methods to chromeos::PermissionBrokerClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months 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/permission_broker_client.h
diff --git a/chromeos/dbus/permission_broker_client.h b/chromeos/dbus/permission_broker_client.h
index 752f82baad59385778da72127e1b822e0e58765a..aa14757418bb4f0ce98533ffb869da33899e02f1 100644
--- a/chromeos/dbus/permission_broker_client.h
+++ b/chromeos/dbus/permission_broker_client.h
@@ -12,6 +12,10 @@
#include "chromeos/chromeos_export.h"
#include "chromeos/dbus/dbus_client.h"
+namespace dbus {
+class FileDescriptor;
+}
+
namespace chromeos {
// PermissionBrokerClient is used to communicate with the permission broker, a
@@ -42,6 +46,38 @@ class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient {
int interface_id,
const ResultCallback& callback) = 0;
+ // Requests the |port| be opened on the firewall for incoming TCP/IP
+ // connections received on |interface| (an empty string indicates all
+ // interfaces). An open pipe must be passed as |lifeline_fd| so that the
+ // permission broker can monitor the lifetime of the calling process.
+ virtual void RequestTcpPortAccess(uint16 port,
+ const std::string& interface,
+ const dbus::FileDescriptor& lifeline_fd,
+ const ResultCallback& callback) = 0;
+
+ // Requests the |port| be opened on the firewall for incoming UDP packets
+ // received on |interface| (an empty string indicates all interfaces). An open
+ // pipe must be passed as |lifeline_fd| so that the permission broker can
+ // monitor the lifetime of the calling process.
+ virtual void RequestUdpPortAccess(uint16 port,
+ const std::string& interface,
+ const dbus::FileDescriptor& lifeline_fd,
+ const ResultCallback& callback) = 0;
+
+ // Releases a request for an open firewall port for TCP/IP connections. The
+ // |port| and |interface| parameters must be the same as a previous call to
+ // RequestTcpPortAccess.
+ virtual void ReleaseTcpPort(uint16 port,
+ const std::string& interface,
+ const ResultCallback& callback) = 0;
+
+ // Releases a request for an open firewall port for UDP packets. The |port|
+ // and |interface| parameters must be the same as a previous call to
+ // RequestUdpPortAccess.
+ virtual void ReleaseUdpPort(uint16 port,
+ const std::string& interface,
+ const ResultCallback& callback) = 0;
+
protected:
PermissionBrokerClient();

Powered by Google App Engine
This is Rietveld 408576698