| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
| 4 found in the LICENSE file. | 4 found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H | 7 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H |
| 8 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H | 8 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H |
| 9 | 9 |
| 10 #include "ppapi/c/pp_completion_callback.h" | 10 #include "ppapi/c/pp_completion_callback.h" |
| 11 #include "ppapi/c/pp_instance.h" | 11 #include "ppapi/c/pp_instance.h" |
| 12 | 12 |
| 13 namespace ppapi_proxy { | 13 namespace ppapi_proxy { |
| 14 | 14 |
| 15 // Loads |url| asynchronously notifying the |callback| of the final result. | 15 // Loads |url| asynchronously notifying the |callback| of the final result. |
| 16 // If the call cannot be completed asynchronously, |callback| | 16 // If the call cannot be completed asynchronously, |callback| |
| 17 // will not be invoked. Returns one of the PP_ERROR codes. | 17 // will not be invoked. Returns one of the PP_ERROR codes. |
| 18 int32_t StreamAsFile(PP_Instance instance, | 18 int32_t StreamAsFile(PP_Instance instance, |
| 19 const char* url, | 19 const char* url, |
| 20 struct PP_CompletionCallback callback); | 20 struct PP_CompletionCallback callback); |
| 21 | 21 |
| 22 // Returns an open file descriptor for a |url| loaded using StreamAsFile() | 22 // Returns an open file descriptor for a |url| loaded using StreamAsFile() |
| 23 // or -1 if it has not been loaded. | 23 // or -1 if it has not been loaded. |
| 24 int GetFileDesc(PP_Instance instance, | 24 int GetFileDesc(PP_Instance instance, |
| 25 const char* url); | 25 const char* url); |
| 26 | 26 |
| 27 } // namespace ppapi_proxy | 27 } // namespace ppapi_proxy |
| 28 | 28 |
| 29 #endif /* NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H */ | 29 #endif /* NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_NACL_FILE_H */ |
| OLD | NEW |