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