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