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

Unified Diff: native_client_sdk/src/libraries/nacl_io/googledrivefs/googledrivefs_node.cc

Issue 2505583002: [NaCl SDK] Add initial support for google drive to nacl_io (Closed)
Patch Set: Created 4 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: native_client_sdk/src/libraries/nacl_io/googledrivefs/googledrivefs_node.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/googledrivefs/googledrivefs_node.cc b/native_client_sdk/src/libraries/nacl_io/googledrivefs/googledrivefs_node.cc
new file mode 100644
index 0000000000000000000000000000000000000000..506ffd2d127193b7c1406d65d63e5d0c3424a50c
--- /dev/null
+++ b/native_client_sdk/src/libraries/nacl_io/googledrivefs/googledrivefs_node.cc
@@ -0,0 +1,70 @@
+// Copyright 2016 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.
+
+#include "nacl_io/googledrivefs/googledrivefs_node.h"
+
+#include <sys/stat.h>
+
+#include "nacl_io/googledrivefs/googledrivefs.h"
+#include "nacl_io/kernel_handle.h"
+#include "nacl_io/node.h"
+#include "nacl_io/osdirent.h"
+
+namespace nacl_io {
+
+GoogleDriveFsNode::GoogleDriveFsNode(GoogleDriveFs* googledrivefs)
+ : Node(googledrivefs) {}
+
+Error GoogleDriveFsNode::GetDents(size_t offs,
+ struct dirent* pdir,
+ size_t size,
+ int* out_bytes) {
+ // TODO: support getdents
+ LOG_ERROR("getdents not supported.");
+ return EPERM;
+}
+
+Error GoogleDriveFsNode::GetStat(struct stat* pstat) {
+ // TODO: support getstat
+ LOG_ERROR("getstat not supported.");
+ return EPERM;
+}
+
+Error GoogleDriveFsNode::Write(const HandleAttr& attr,
+ const void* buf,
+ size_t count,
+ int* out_bytes) {
+ // TODO: support write
+ LOG_ERROR("write not supported.");
+ return EPERM;
+}
+
+Error GoogleDriveFsNode::FTruncate(off_t length) {
+ // TODO: support ftruncate
+ LOG_ERROR("ftruncate not supported.");
+ return EPERM;
+}
+
+Error GoogleDriveFsNode::Read(const HandleAttr& attr,
+ void* buf,
+ size_t count,
+ int* out_bytes) {
+ // TODO: support read
+ LOG_ERROR("read not supported.");
+ return EPERM;
+}
+
+Error GoogleDriveFsNode::GetSize(off_t* out_size) {
+ // TODO: support getsize
+ LOG_ERROR("getsize not supported.");
+ return EPERM;
+}
+
+Error GoogleDriveFsNode::Init(int open_flags) {
+ // TODO: support init
+ LOG_ERROR("init not supported.");
+ return EPERM;
+}
+
+} // namespace nacl_io

Powered by Google App Engine
This is Rietveld 408576698