Chromium Code Reviews| Index: src/trusted/desc/nacl_desc_file_info.h |
| diff --git a/src/trusted/desc/nacl_desc_file_info.h b/src/trusted/desc/nacl_desc_file_info.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..611352dbb62d60397c2896c4495752bd7d622622 |
| --- /dev/null |
| +++ b/src/trusted/desc/nacl_desc_file_info.h |
| @@ -0,0 +1,45 @@ |
| +/* |
| + * Copyright (c) 2014 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 NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_FILE_INFO_H_ |
| +#define NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_FILE_INFO_H_ |
| + |
| +#include "native_client/src/include/nacl_base.h" |
| +#include "native_client/src/public/nacl_file_info.h" |
| + |
| +EXTERN_C_BEGIN |
| + |
| +struct NaClDesc; |
| +struct NaClFileToken; |
| + |
| +/* |
| + * NaClDescSetFileToken associates the contents of |token| with |desc| |
| + * as NaClDesc metadata. Any other metadata previously associated |
| + * with |desc| is released / destroyed. Returns non-zero value for |
| + * success. (Boolean function.) |
| + */ |
| +int NaClDescSetFileToken(struct NaClDesc *desc, |
| + struct NaClFileToken const *token); |
| + |
| +/* |
| + * NaClDescGetFileToken checks if there is metadata associated with |
| + * |desc| that contains a previously serialized NaClFileToken object. |
| + * If so, it writes the NaClFileToken pointed to by |out_token| with |
| + * the file token, and returns a non-zero value. (Boolean function.) |
| + */ |
| +int NaClDescGetFileToken(struct NaClDesc *desc, |
| + struct NaClFileToken *out_token); |
| + |
| +/* |
| + * Creates a NaClDesc from the file handle and metadata in |info|, |
| + * and associates that desc with the metadata. |
| + */ |
| +struct NaClDesc *NaClDescIoFromFileInfo(struct NaClFileInfo info, |
|
Mark Seaborn
2014/05/15 00:36:10
This is intended to be called from the Chromium si
jvoung (off chromium)
2014/05/16 18:02:05
Done.
Yes it is intended to be called from Chrome
|
| + int mode); |
| + |
| +EXTERN_C_END |
| + |
| +#endif |