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

Unified Diff: ppapi/cpp/dev/filesystem_provider.h

Issue 1093383002: [WIP] Provided file system from NACL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved several modules to chromeos folder. Created 5 years, 5 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 | « ppapi/c/pp_errors.h ('k') | ppapi/cpp/dev/filesystem_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/filesystem_provider.h
diff --git a/ppapi/cpp/dev/filesystem_provider.h b/ppapi/cpp/dev/filesystem_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..c1660e4b0b537c1304af6946e6279d812f78cae5
--- /dev/null
+++ b/ppapi/cpp/dev/filesystem_provider.h
@@ -0,0 +1,74 @@
+// Copyright 2015 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.
+#ifndef FILESYSTEM_PROVIDER_H
+#define FILESYSTEM_PROVIDER_H
+
+#include <string>
+#include <vector>
+
+#include "ppapi/c/dev/ppb_filesystemprovider_dev.h"
+#include "ppapi/cpp/resource.h"
+#include "ppapi/cpp/var_dictionary.h"
+#include "ppapi/cpp/var_array.h"
+
+namespace pp{
+
+class CompletionCallback;
+template <class T> class CompletionCallbackWithOutput;
+class InstanceHandle;
+class Instance;
+
+class Filesystem_Provider_Dev : Resource {
+ public:
+ // Creates it but doesn't mount it
+ Filesystem_Provider_Dev( pp::Instance *instance );
+ virtual ~Filesystem_Provider_Dev();
+ static bool IsAvailable();
+
+ // PPB_FilesystemProvider interfaces
+ int32_t Mount(
+ const std::string& filesystem_id,
+ const std::string& display_name,
+ bool writable,
+ int32_t opened_files_limit,
+ const CompletionCallback& cc );
+ int32_t Unmount(
+ const std::string& filesystem_id,
+ const CompletionCallback& cc );
+ int32_t Notify(const VarDictionary& options_notify);
+
+ // Response for requests
+ int32_t SendSuccessResponse(
+ const PP_OperationType_Dev operation_type,
+ int32_t request_id);
+ int32_t SendErrorResponse(
+ const PP_OperationType_Dev& operation_type,
+ int32_t error,
+ int32_t request_id);
+ // Special Responses
+ int32_t SendMetadataSuccessResponse(
+ const VarDictionary& metadata,
+ int32_t request_id);
+ int32_t SendReadDirectorySuccessResponse(
+ const VarArray& entries,
+ bool has_more,
+ int32_t request_id );
+ int32_t SendReadFileSuccessResponse(
+ uint32_t data_size,
+ const char* data,
+ bool has_more,
+ int32_t request_id );
+ int32_t GetNextRequest(
+ const CompletionCallbackWithOutput<PP_FilesystemRequest>& cc);
+ int32_t ReleaseRequestBuffer(int32_t request_id);
+
+protected:
+ InstanceHandle associated_instance_;
+
+}; // class Filesystem_Provider_Dev
+
+} // namespace pp
+
+#endif // FILESYSTEM_PROVIDER_H
+
« no previous file with comments | « ppapi/c/pp_errors.h ('k') | ppapi/cpp/dev/filesystem_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698