| Index: ppapi/api/dev/ppb_device_enumerator_dev.idl
|
| diff --git a/ppapi/api/dev/ppb_device_enumerator_dev.idl b/ppapi/api/dev/ppb_device_enumerator_dev.idl
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..f5d4ca7b1a28629f05c46db29f5b91fa66bf650d
|
| --- /dev/null
|
| +++ b/ppapi/api/dev/ppb_device_enumerator_dev.idl
|
| @@ -0,0 +1,78 @@
|
| +/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +/**
|
| + * This file defines the <code>PPB_DeviceEnumerator_Dev</code> interface.
|
| + */
|
| +label Chrome {
|
| + M18 = 0.1
|
| +};
|
| +
|
| +interface PPB_DeviceEnumerator_Dev {
|
| + /**
|
| + * This function creates a device enumerator resource.
|
| + *
|
| + * @param[in] instance A <code>PP_Instance</code> identifying one instance
|
| + * of a module.
|
| + *
|
| + * @return A <code>PP_Resource</code> containing the enumerator if successful
|
| + * or 0 if it could not be created.
|
| + */
|
| + PP_Resource Create([in] PP_Instance instance);
|
| +
|
| + /**
|
| + * Determines if the provided resource is a device enumerator.
|
| + *
|
| + * @param[in] resource A <code>PP_Resource</code> corresponding to a generic
|
| + * resource.
|
| + *
|
| + * @return A <code>PP_Bool</code> that is <code>PP_TRUE</code> if the given
|
| + * resource is a device enumerator resource, otherwise <code>PP_FALSE</code>.
|
| + */
|
| + PP_Bool IsDeviceEnumerator([in] PP_Resource resource);
|
| +
|
| + /**
|
| + * Enumerates devices of the speicified type.
|
| + *
|
| + * @param[in] enumerator The device enumerator resource.
|
| + * @param[in] device_type A <code>PP_DeviceType_Dev</code> value describing
|
| + * what kind of devices is queried.
|
| + * @param[in] callback A <code>CompletionCallback</code> to be called when
|
| + * the operation is finished.
|
| + */
|
| + int32_t Enumerate(
|
| + [in] PP_Resource enumerator,
|
| + [in] PP_DeviceType_Dev device_type,
|
| + [in] PP_CompletionCallback callback);
|
| +
|
| + /**
|
| + * Gets the number of devices found. It should be called after
|
| + * <code>Enumerate</code> completes successfully.
|
| + *
|
| + * @param[in] enumerator The device enumerator resource.
|
| + *
|
| + * @return The number of devices. If it is called before
|
| + * <code>Enumerate</code> is called or while it is being processed, it returns
|
| + * 0.
|
| + */
|
| + uint32_t GetDeviceNumber([in] PP_Resource enumerator);
|
| +
|
| + /**
|
| + * Gets a reference to a device. It should be called after
|
| + * <code>Enumerate</code> completes successfully.
|
| + *
|
| + * @param[in] enumerator The device enumerator resource.
|
| + * @param[in] index An integer indicating the position in the list of devices
|
| + * found.
|
| + *
|
| + * @return A <code>PP_Resource</code> indentifying the device.
|
| + * <code>PPB_AudioInput_Dev</code> and <code>PPB_VideoCapture_Dev</code> can
|
| + * use this reference to open the device. Returns 0 if the index is out of
|
| + * range.
|
| + */
|
| + PP_Resource GetDevice(
|
| + [in] PP_Resource enumerator,
|
| + [in] uint32_t index);
|
| +};
|
|
|