OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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, | 6 /* From trusted/ppb_audio_input_trusted_dev.idl, |
7 * modified Wed Jan 4 09:11:42 2012. | 7 * modified Wed Jan 4 11:09:00 2012. |
8 */ | 8 */ |
9 | 9 |
10 #ifndef PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ | 10 #ifndef PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ |
11 #define PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ | 11 #define PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ |
12 | 12 |
13 #include "ppapi/c/pp_completion_callback.h" | 13 #include "ppapi/c/pp_completion_callback.h" |
14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/c/pp_macros.h" | 15 #include "ppapi/c/pp_macros.h" |
16 #include "ppapi/c/pp_resource.h" | 16 #include "ppapi/c/pp_resource.h" |
17 #include "ppapi/c/pp_stdint.h" | 17 #include "ppapi/c/pp_stdint.h" |
(...skipping 12 matching lines...) Expand all Loading... |
30 /** | 30 /** |
31 * @addtogroup Interfaces | 31 * @addtogroup Interfaces |
32 * @{ | 32 * @{ |
33 */ | 33 */ |
34 /** | 34 /** |
35 * This interface is to be used by proxy implementations. All functions should | 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 | 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 | 37 * resource; most of the PPB_AudioInput interface is also usable on this |
38 * resource. | 38 * resource. |
39 */ | 39 */ |
40 struct PPB_AudioInputTrusted_Dev { | 40 struct PPB_AudioInputTrusted_Dev_0_1 { |
41 /** Returns an audio input resource. */ | 41 /** Returns an audio input resource. */ |
42 PP_Resource (*CreateTrusted)(PP_Instance instance); | 42 PP_Resource (*CreateTrusted)(PP_Instance instance); |
43 /** | 43 /** |
44 * Opens a paused audio input interface, used by trusted side of proxy. | 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| | 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 | 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. | 47 * the main thread, do not use the blocking variant of PP_CompletionCallback. |
48 */ | 48 */ |
49 int32_t (*Open)(PP_Resource audio_input, | 49 int32_t (*Open)(PP_Resource audio_input, |
50 PP_Resource config, | 50 PP_Resource config, |
51 struct PP_CompletionCallback create_callback); | 51 struct PP_CompletionCallback create_callback); |
52 /** | 52 /** |
53 * Get the sync socket. Use once Open has completed. | 53 * Get the sync socket. Use once Open has completed. |
54 * Returns PP_OK on success. | 54 * Returns PP_OK on success. |
55 */ | 55 */ |
56 int32_t (*GetSyncSocket)(PP_Resource audio_input, int* sync_socket); | 56 int32_t (*GetSyncSocket)(PP_Resource audio_input, int* sync_socket); |
57 /** | 57 /** |
58 * Get the shared memory interface. Use once Open has completed. | 58 * Get the shared memory interface. Use once Open has completed. |
59 * Returns PP_OK on success. | 59 * Returns PP_OK on success. |
60 */ | 60 */ |
61 int32_t (*GetSharedMemory)(PP_Resource audio_input, | 61 int32_t (*GetSharedMemory)(PP_Resource audio_input, |
62 int* shm_handle, | 62 int* shm_handle, |
63 uint32_t* shm_size); | 63 uint32_t* shm_size); |
64 }; | 64 }; |
| 65 |
| 66 typedef struct PPB_AudioInputTrusted_Dev_0_1 PPB_AudioInputTrusted_Dev; |
65 /** | 67 /** |
66 * @} | 68 * @} |
67 */ | 69 */ |
68 | 70 |
69 #endif /* PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ */ | 71 #endif /* PPAPI_C_TRUSTED_PPB_AUDIO_INPUT_TRUSTED_DEV_H_ */ |
70 | 72 |
OLD | NEW |