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.
7 * This file defines the <code>PPB_ResourceArray_Dev</code> interface.
17 * A resource array holds a list of resources and retains a reference to each of
20 interface PPB_ResourceArray_Dev
{
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
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
,
37 * Determines if the provided resource is a resource array.
39 * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
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
);
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
);
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.
66 [in] PP_Resource resource_array
,