OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. |
| 5 */ |
| 6 #ifndef PACKAGES_LIBRARIES_NACL_MOUNTS_DEV_RANDOMDEVICE_H_ |
| 7 #define PACKAGES_LIBRARIES_NACL_MOUNTS_DEV_RANDOMDEVICE_H_ |
| 8 |
| 9 #include "../dev/Device.h" |
| 10 |
| 11 // RandomDevice |
| 12 class RandomDevice : public Device { |
| 13 public: |
| 14 RandomDevice(int (*get_random_bytes)(void *buf, size_t count, size_t *nread)) |
| 15 : get_random_bytes_(get_random_bytes) {} |
| 16 virtual ~RandomDevice() {} |
| 17 virtual int GetInode() { return 2; } |
| 18 private: |
| 19 int (*get_random_bytes_)(void *buf, size_t count, size_t *nread); |
| 20 |
| 21 DISALLOW_COPY_AND_ASSIGN(RandomDevice); |
| 22 } |
| 23 |
| 24 #endif |
| 25 |
OLD | NEW |