Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: src/trusted/desc/nacl_desc_file_token.h

Issue 261683002: Make a NaClDesc ctor for creating descs from NaClFileInfo. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: sync copies before deleting Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/trusted/desc/nacl_desc_file_token.h
diff --git a/src/trusted/desc/nacl_desc_file_token.h b/src/trusted/desc/nacl_desc_file_token.h
new file mode 100644
index 0000000000000000000000000000000000000000..e9f0fecb8e747502e30ae8b4c77df23c3f6933cf
--- /dev/null
+++ b/src/trusted/desc/nacl_desc_file_token.h
@@ -0,0 +1,37 @@
+/*
+ * 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_TOKEN_H_
+#define NATIVE_CLIENT_SRC_TRUSTED_DESC_NACL_DESC_FILE_TOKEN_H_
+
+#include "native_client/src/include/nacl_base.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);
+
+EXTERN_C_END
+
+#endif

Powered by Google App Engine
This is Rietveld 408576698