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