Fix iOS build for XCode 4.6.
[chromium-blink-merge.git] / ppapi / api / dev / ppb_resource_array_dev.idl
blobb7497b237356df409496d2ed56aceb8ee5ce589e
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 /**
7 * This file defines the <code>PPB_ResourceArray_Dev</code> interface.
8 */
10 [generate_thunk]
12 label Chrome {
13 M18 = 0.1
16 /**
17 * A resource array holds a list of resources and retains a reference to each of
18 * them.
20 interface PPB_ResourceArray_Dev {
21 /**
22 * Creates a resource array.
23 * Note: It will add a reference to each of the elements.
25 * @param[in] elements <code>PP_Resource</code>s to be stored in the created
26 * resource array.
27 * @param[in] size The number of elements.
29 * @return A <code>PP_Resource</code> corresponding to a resource array if
30 * successful; 0 if failed.
32 PP_Resource Create([in] PP_Instance instance,
33 [in, size_as=size] PP_Resource[] elements,
34 [in] uint32_t size);
36 /**
37 * Determines if the provided resource is a resource array.
39 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
40 * resource.
42 * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given
43 * resource is a resource array, otherwise <code>PP_FALSE</code>.
45 PP_Bool IsResourceArray([in] PP_Resource resource);
47 /**
48 * Gets the array size.
50 * @param[in] resource_array The resource array.
52 * @return How many elements are there in the array.
54 uint32_t GetSize([in] PP_Resource resource_array);
56 /**
57 * Gets the element at the specified position.
58 * Note: It doesn't add a reference to the returned resource for the caller.
60 * @param[in] resource_array The resource array.
61 * @param[in] index An integer indicating a position in the array.
63 * @return A <code>PP_Resource</code>. Returns 0 if the index is out of range.
65 PP_Resource GetAt(
66 [in] PP_Resource resource_array,
67 [in] uint32_t index);