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

Unified Diff: libraries/nacl-mounts/dev/Device.h

Issue 10377102: Added simplest device mount implementation (includes NullDevice and RandomDevice) (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « libraries/nacl-mounts/dev/DevMount.cc ('k') | libraries/nacl-mounts/dev/NullDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libraries/nacl-mounts/dev/Device.h
===================================================================
--- libraries/nacl-mounts/dev/Device.h (revision 0)
+++ libraries/nacl-mounts/dev/Device.h (revision 0)
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2012 The Native Client 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 PACKAGES_LIBRARIES_NACL_MOUNTS_DEV_DEVICE_H_
+#define PACKAGES_LIBRARIES_NACL_MOUNTS_DEV_DEVICE_H_
+
+#include <sys/types.h>
+#include "../util/macros.h"
+
+// Device
+class Device {
+ public:
+ Device() {}
+ virtual ~Device() {}
+ virtual int Read(off_t offset, void *buf, size_t count) = 0;
+ virtual int Write(off_t offset, const void *buf, size_t count) = 0;
+};
+
+#endif
+
« no previous file with comments | « libraries/nacl-mounts/dev/DevMount.cc ('k') | libraries/nacl-mounts/dev/NullDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698