Implement listing tests to a JSON file for iOS gtest test launcher
[chromium-blink-merge.git] / ppapi / c / dev / ppb_buffer_dev.h
blob5e05f05061ddaa1d29a1b034bc38827e6c3064fd
1 /* Copyright (c) 2012 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 */
6 /* From dev/ppb_buffer_dev.idl modified Wed Oct 5 14:06:02 2011. */
8 #ifndef PPAPI_C_DEV_PPB_BUFFER_DEV_H_
9 #define PPAPI_C_DEV_PPB_BUFFER_DEV_H_
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_macros.h"
14 #include "ppapi/c/pp_resource.h"
15 #include "ppapi/c/pp_stdint.h"
17 #define PPB_BUFFER_DEV_INTERFACE_0_4 "PPB_Buffer(Dev);0.4"
18 #define PPB_BUFFER_DEV_INTERFACE PPB_BUFFER_DEV_INTERFACE_0_4
20 /**
21 * @file
22 * This file defines the <code>PPB_Buffer_Dev</code> interface.
26 /**
27 * @addtogroup Interfaces
28 * @{
30 struct PPB_Buffer_Dev_0_4 {
31 /**
32 * Allocates a buffer of the given size in bytes. The return value will have
33 * a non-zero ID on success, or zero on failure. Failure means the module
34 * handle was invalid. The buffer will be initialized to contain zeroes.
36 PP_Resource (*Create)(PP_Instance instance, uint32_t size_in_bytes);
37 /**
38 * Returns PP_TRUE if the given resource is a Buffer. Returns PP_FALSE if the
39 * resource is invalid or some type other than a Buffer.
41 PP_Bool (*IsBuffer)(PP_Resource resource);
42 /**
43 * Gets the size of the buffer. Returns PP_TRUE on success, PP_FALSE
44 * if the resource is not a buffer. On failure, |*size_in_bytes| is not set.
46 PP_Bool (*Describe)(PP_Resource resource, uint32_t* size_in_bytes);
47 /**
48 * Maps this buffer into the plugin address space and returns a pointer to
49 * the beginning of the data.
51 void* (*Map)(PP_Resource resource);
52 /**
53 * Unmaps this buffer.
55 void (*Unmap)(PP_Resource resource);
58 typedef struct PPB_Buffer_Dev_0_4 PPB_Buffer_Dev;
59 /**
60 * @}
63 #endif /* PPAPI_C_DEV_PPB_BUFFER_DEV_H_ */