OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2011 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 */ |
| 5 |
| 6 /* From trusted/ppb_audio_input_trusted_dev.idl modified Mon Nov 14 18:13:23 201
1. */ |
| 7 |
| 8 #ifndef PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ |
| 9 #define PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ |
| 10 |
| 11 #include "ppapi/c/pp_completion_callback.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" |
| 16 |
| 17 #define PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE_0_1 \ |
| 18 "PPB_AudioInputTrusted(Dev);0.1" |
| 19 #define PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE \ |
| 20 PPB_AUDIO_INPUT_TRUSTED_DEV_INTERFACE_0_1 |
| 21 |
| 22 /** |
| 23 * @file |
| 24 * This file defines the trusted audio input interface. |
| 25 */ |
| 26 |
| 27 |
| 28 /** |
| 29 * @addtogroup Interfaces |
| 30 * @{ |
| 31 */ |
| 32 /** |
| 33 * This interface is to be used by proxy implementations. All |
| 34 * functions should be called from the main thread only. The |
| 35 * resource returned is an Audio input esource; most of the PPB_Audio |
| 36 * interface is also usable on this resource. |
| 37 */ |
| 38 struct PPB_AudioInputTrusted_Dev { |
| 39 /** Returns an audio input resource. */ |
| 40 PP_Resource (*CreateTrusted)(PP_Instance instance); |
| 41 /** |
| 42 * Opens a paused audio interface, used by trusted side of proxy. |
| 43 * Returns PP_ERROR_WOULD_BLOCK on success, and invokes |
| 44 * the |create_callback| asynchronously to complete. |
| 45 * As this function should always be invoked from the main thread, |
| 46 * do not use the blocking variant of PP_CompletionCallback. |
| 47 */ |
| 48 int32_t (*Open)(PP_Resource audio_input, |
| 49 PP_Resource config, |
| 50 struct PP_CompletionCallback create_callback); |
| 51 /** |
| 52 * Get the sync socket. Use once Open has completed. |
| 53 * Returns PP_OK on success. |
| 54 */ |
| 55 int32_t (*GetSyncSocket)(PP_Resource audio_input, int* sync_socket); |
| 56 /** |
| 57 * Get the shared memory interface. Use once Open has completed. |
| 58 * Returns PP_OK on success. |
| 59 */ |
| 60 int32_t (*GetSharedMemory)(PP_Resource audio_input, |
| 61 int* shm_handle, |
| 62 uint32_t* shm_size); |
| 63 }; |
| 64 /** |
| 65 * @} |
| 66 */ |
| 67 |
| 68 #endif /* PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ */ |
| 69 |
OLD | NEW |