OLD | NEW |
(Empty) | |
| 1 /* |
| 2 Copyright (c) 2011 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 |
| 7 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H |
| 8 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H |
| 9 |
| 10 #include "ppapi/c/pp_completion_callback.h" |
| 11 #include "ppapi/c/pp_instance.h" |
| 12 |
| 13 namespace ppapi_proxy { |
| 14 |
| 15 // Loads |url| asynchronously notifying the |callback| of the final result. |
| 16 // If the call cannot be completed asynchronously, |callback| |
| 17 // will not be invoked. Returns one of the PP_ERROR codes. |
| 18 int32_t StreamAsFile(PP_Instance instance, |
| 19 const char* url, |
| 20 struct PP_CompletionCallback callback); |
| 21 |
| 22 // Returns an open file descriptor for a |url| loaded using StreamAsFile() |
| 23 // or -1 if it has not been loaded. |
| 24 int GetFileDesc(PP_Instance instance, |
| 25 const char* url); |
| 26 |
| 27 } // namespace ppapi_proxy |
| 28 |
| 29 #endif /* NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H */ |
OLD | NEW |