Fix iOS build for XCode 4.6.
[chromium-blink-merge.git] / ppapi / api / trusted / ppb_audio_trusted.idl
blobc75b97b1cca873576df7f7d399b5bfdbf6a65640
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 trusted audio interface.
8 */
10 label Chrome {
11 M14 = 0.6
14 /**
15 * This interface is to be used by proxy implementations. All
16 * functions should be called from the main thread only. The
17 * resource returned is an Audio resource; most of the PPB_Audio
18 * interface is also usable on this resource.
20 [mainthread, macro="PPB_AUDIO_TRUSTED_INTERFACE"]
21 interface PPB_AudioTrusted {
22 /** Returns an audio resource. */
23 PP_Resource CreateTrusted(
24 [in] PP_Instance instance);
26 /**
27 * Opens a paused audio interface, used by trusted side of proxy.
28 * Returns PP_ERROR_WOULD_BLOCK on success, and invokes
29 * the |create_callback| asynchronously to complete.
30 * As this function should always be invoked from the main thread,
31 * do not use the blocking variant of PP_CompletionCallback.
33 int32_t Open(
34 [in] PP_Resource audio,
35 [in] PP_Resource config,
36 [in] PP_CompletionCallback create_callback);
38 /**
39 * Get the sync socket. Use once Open has completed.
40 * Returns PP_OK on success.
42 int32_t GetSyncSocket(
43 [in] PP_Resource audio,
44 [out] handle_t sync_socket);
46 /**
47 * Get the shared memory interface. Use once Open has completed.
48 * Returns PP_OK on success.
50 int32_t GetSharedMemory(
51 [in] PP_Resource audio,
52 [out] handle_t shm_handle,
53 [out] uint32_t shm_size);