1/* Copyright 2013 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6/* From private/ppb_isolated_file_system_private.idl,
7 *   modified Fri Nov  8 02:21:15 2013.
8 */
9
10#ifndef PPAPI_C_PRIVATE_PPB_ISOLATED_FILE_SYSTEM_PRIVATE_H_
11#define PPAPI_C_PRIVATE_PPB_ISOLATED_FILE_SYSTEM_PRIVATE_H_
12
13#include "ppapi/c/pp_completion_callback.h"
14#include "ppapi/c/pp_instance.h"
15#include "ppapi/c/pp_macros.h"
16#include "ppapi/c/pp_resource.h"
17#include "ppapi/c/pp_stdint.h"
18
19#define PPB_ISOLATEDFILESYSTEM_PRIVATE_INTERFACE_0_2 \
20    "PPB_IsolatedFileSystem_Private;0.2"
21#define PPB_ISOLATEDFILESYSTEM_PRIVATE_INTERFACE \
22    PPB_ISOLATEDFILESYSTEM_PRIVATE_INTERFACE_0_2
23
24/**
25 * @file
26 */
27
28
29/**
30 * @addtogroup Enums
31 * @{
32 */
33/**
34 * The <code>PP_IsolatedFileSystemType_Private</code> values indicate the type
35 * of isolated file systems.
36 */
37typedef enum {
38  /** Type for invalid file systems */
39  PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID = 0,
40  /** Type for CRX file systems */
41  PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX = 1,
42  /** Type for PluginPrivate file systems */
43  PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE = 2
44} PP_IsolatedFileSystemType_Private;
45PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_IsolatedFileSystemType_Private, 4);
46/**
47 * @}
48 */
49
50/**
51 * @addtogroup Interfaces
52 * @{
53 */
54/* <code>PPB_IsolatedFileSystem_Private</code> interface */
55struct PPB_IsolatedFileSystem_Private_0_2 {
56  /**
57   * Open() opens a file system corresponding the given file system type.
58   *
59   * When opening the CRX file system, this should be called from an extension
60   * context, otherwise it will fail.
61   *
62   * @param[in] instance A <code>PP_Instance</code> identifying the instance
63   * with the file system.
64   * @param[in] type A file system type as defined by
65   * <code>PP_IsolatedFileSystemType_Private</code> enum.
66   * @param[out] file_system An output <code>PP_Resource</code> corresponding
67   * to a PPB_FileSystem.
68   * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
69   * completion of Open.
70   *
71   * @return An int32_t containing an error code from <code>pp_errors.h</code>.
72   */
73  int32_t (*Open)(PP_Instance instance,
74                  PP_IsolatedFileSystemType_Private type,
75                  PP_Resource* file_system,
76                  struct PP_CompletionCallback callback);
77};
78
79typedef struct PPB_IsolatedFileSystem_Private_0_2
80    PPB_IsolatedFileSystem_Private;
81/**
82 * @}
83 */
84
85#endif  /* PPAPI_C_PRIVATE_PPB_ISOLATED_FILE_SYSTEM_PRIVATE_H_ */
86
87