OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2010 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 #ifndef PPAPI_C_PPP_H_ | 5 #ifndef PPAPI_C_PPP_H_ |
6 #define PPAPI_C_PPP_H_ | 6 #define PPAPI_C_PPP_H_ |
7 | 7 |
8 #include "ppapi/c/pp_module.h" | 8 #include "ppapi/c/pp_module.h" |
9 #include "ppapi/c/pp_stdint.h" | 9 #include "ppapi/c/pp_stdint.h" |
10 #include "ppapi/c/ppb.h" | 10 #include "ppapi/c/ppb.h" |
11 | 11 |
12 #if __GNUC__ >= 4 | 12 #if __GNUC__ >= 4 |
13 #define PP_EXPORT __attribute__ ((visibility("default"))) | 13 #define PP_EXPORT __attribute__ ((visibility("default"))) |
14 #elif defined(_MSC_VER) | 14 #elif defined(_MSC_VER) |
15 #define PP_EXPORT __declspec(dllexport) | 15 #define PP_EXPORT __declspec(dllexport) |
16 #endif | 16 #endif |
17 | 17 |
18 /** | 18 /** |
19 * @file | 19 * @file |
20 * Defines the API ... | 20 * Defines the API ... |
21 * | 21 * |
22 * {PENDING: undefine PP_EXPORT?} | 22 * {PENDING: undefine PP_EXPORT?} |
23 * @addtogroup PPP | 23 * @addtogroup PPP |
24 * @{ | 24 * @{ |
25 */ | 25 */ |
26 | 26 |
27 // We don't want name mangling for these external functions. We only need | 27 /* We don't want name mangling for these external functions. We only need |
28 // 'extern "C"' if we're compiling with a C++ compiler. | 28 * 'extern "C"' if we're compiling with a C++ compiler. |
| 29 */ |
29 #ifdef __cplusplus | 30 #ifdef __cplusplus |
30 extern "C" { | 31 extern "C" { |
31 #endif | 32 #endif |
32 | 33 |
33 /** | 34 /** |
34 * Entrypoint for the module. | 35 * Entrypoint for the module. |
35 * | 36 * |
36 * Returns PP_OK on success, any other value on failure. Failure indicates to | 37 * Returns PP_OK on success, any other value on failure. Failure indicates to |
37 * the browser that this plugin can not be used. In this case, the plugin will | 38 * the browser that this plugin can not be used. In this case, the plugin will |
38 * be unloaded and ShutdownModule will NOT be called. | 39 * be unloaded and ShutdownModule will NOT be called. |
39 */ | 40 */ |
40 PP_EXPORT int32_t PPP_InitializeModule(PP_Module module, | 41 PP_EXPORT int32_t PPP_InitializeModule(PP_Module module, |
41 PPB_GetInterface get_browser_interface); | 42 PPB_GetInterface get_browser_interface); |
42 | 43 |
43 /** Called before the plugin module is unloaded. */ | 44 /** Called before the plugin module is unloaded. */ |
44 PP_EXPORT void PPP_ShutdownModule(); | 45 PP_EXPORT void PPP_ShutdownModule(); |
45 | 46 |
46 /** | 47 /** |
47 * Returns an interface pointer for the interface of the given name, or NULL | 48 * Returns an interface pointer for the interface of the given name, or NULL |
48 * if the interface is not supported. Interface names should be ASCII. | 49 * if the interface is not supported. Interface names should be ASCII. |
49 */ | 50 */ |
50 PP_EXPORT const void* PPP_GetInterface(const char* interface_name); | 51 PP_EXPORT const void* PPP_GetInterface(const char* interface_name); |
51 | 52 |
52 #ifdef __cplusplus | 53 #ifdef __cplusplus |
53 } // extern "C" | 54 } /* extern "C" */ |
54 #endif | 55 #endif |
55 | 56 |
56 /** | 57 /** |
57 * @} | 58 * @} |
58 * End addtogroup PPP | 59 * End addtogroup PPP |
59 */ | 60 */ |
60 #endif // PPAPI_C_PPP_H_ | 61 #endif /* PPAPI_C_PPP_H_ */ |
| 62 |
OLD | NEW |