| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include <stdint.h> |
| 9 |
| 9 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" |
| 10 #include "chromeos/dbus/permission_broker_client.h" | 12 #include "chromeos/dbus/permission_broker_client.h" |
| 11 | 13 |
| 12 namespace chromeos { | 14 namespace chromeos { |
| 13 | 15 |
| 14 class CHROMEOS_EXPORT FakePermissionBrokerClient | 16 class CHROMEOS_EXPORT FakePermissionBrokerClient |
| 15 : public PermissionBrokerClient { | 17 : public PermissionBrokerClient { |
| 16 public: | 18 public: |
| 17 FakePermissionBrokerClient(); | 19 FakePermissionBrokerClient(); |
| 18 ~FakePermissionBrokerClient() override; | 20 ~FakePermissionBrokerClient() override; |
| 19 | 21 |
| 20 void Init(dbus::Bus* bus) override; | 22 void Init(dbus::Bus* bus) override; |
| 21 void CheckPathAccess(const std::string& path, | 23 void CheckPathAccess(const std::string& path, |
| 22 const ResultCallback& callback) override; | 24 const ResultCallback& callback) override; |
| 23 void RequestPathAccess(const std::string& path, | 25 void RequestPathAccess(const std::string& path, |
| 24 int interface_id, | 26 int interface_id, |
| 25 const ResultCallback& callback) override; | 27 const ResultCallback& callback) override; |
| 26 void OpenPath(const std::string& path, | 28 void OpenPath(const std::string& path, |
| 27 const OpenPathCallback& callback) override; | 29 const OpenPathCallback& callback) override; |
| 28 void RequestTcpPortAccess(uint16 port, | 30 void RequestTcpPortAccess(uint16_t port, |
| 29 const std::string& interface, | 31 const std::string& interface, |
| 30 const dbus::FileDescriptor& lifeline_fd, | 32 const dbus::FileDescriptor& lifeline_fd, |
| 31 const ResultCallback& callback) override; | 33 const ResultCallback& callback) override; |
| 32 void RequestUdpPortAccess(uint16 port, | 34 void RequestUdpPortAccess(uint16_t port, |
| 33 const std::string& interface, | 35 const std::string& interface, |
| 34 const dbus::FileDescriptor& lifeline_fd, | 36 const dbus::FileDescriptor& lifeline_fd, |
| 35 const ResultCallback& callback) override; | 37 const ResultCallback& callback) override; |
| 36 void ReleaseTcpPort(uint16 port, | 38 void ReleaseTcpPort(uint16_t port, |
| 37 const std::string& interface, | 39 const std::string& interface, |
| 38 const ResultCallback& callback) override; | 40 const ResultCallback& callback) override; |
| 39 void ReleaseUdpPort(uint16 port, | 41 void ReleaseUdpPort(uint16_t port, |
| 40 const std::string& interface, | 42 const std::string& interface, |
| 41 const ResultCallback& callback) override; | 43 const ResultCallback& callback) override; |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 DISALLOW_COPY_AND_ASSIGN(FakePermissionBrokerClient); | 46 DISALLOW_COPY_AND_ASSIGN(FakePermissionBrokerClient); |
| 45 }; | 47 }; |
| 46 | 48 |
| 47 } // namespace chromeos | 49 } // namespace chromeos |
| 48 | 50 |
| 49 #endif // CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ | 51 #endif // CHROMEOS_DBUS_FAKE_PERMISSION_BROKER_CLIENT_H_ |
| OLD | NEW |