OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2014 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_TRUSTED_DESC_NACL_DESC_FILE_INFO_H_ |
| 8 #define NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_FILE_INFO_H_ |
| 9 |
| 10 #include "native_client/src/include/nacl_base.h" |
| 11 #include "native_client/src/public/nacl_file_info.h" |
| 12 |
| 13 EXTERN_C_BEGIN |
| 14 |
| 15 struct NaClDesc; |
| 16 struct NaClFileToken; |
| 17 |
| 18 /* |
| 19 * NaClDescSetFileToken associates the contents of |token| with |desc| |
| 20 * as NaClDesc metadata. Any other metadata previously associated |
| 21 * with |desc| is released / destroyed. Returns non-zero value for |
| 22 * success. (Boolean function.) |
| 23 */ |
| 24 int NaClDescSetFileToken(struct NaClDesc *desc, |
| 25 struct NaClFileToken const *token); |
| 26 |
| 27 /* |
| 28 * NaClDescGetFileToken checks if there is metadata associated with |
| 29 * |desc| that contains a previously serialized NaClFileToken object. |
| 30 * If so, it writes the NaClFileToken pointed to by |out_token| with |
| 31 * the file token, and returns a non-zero value. (Boolean function.) |
| 32 */ |
| 33 int NaClDescGetFileToken(struct NaClDesc *desc, |
| 34 struct NaClFileToken *out_token); |
| 35 |
| 36 EXTERN_C_END |
| 37 |
| 38 #endif |
OLD | NEW |