Don't consider a Bluetooth adapter present until it has an address.
[chromium-blink-merge.git] / ppapi / api / trusted / ppp_broker.idl
bloba9dc4fabad3ead4b4b93655f8fbcb5f835330c7b
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 */
6 /**
7 * This file defines functions that your module must implement to support a
8 * broker.
9 */
11 #inline c
12 // {PENDING: undefine PP_EXPORT?}
14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_stdint.h"
18 #if __GNUC__ >= 4
20 #define PP_EXPORT __attribute__ ((visibility("default")))
21 #elif defined(_MSC_VER)
22 #define PP_EXPORT __declspec(dllexport)
23 #endif
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.
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 /**
35 * @addtogroup Typedefs
36 * @{
39 /**
40 * PP_ConnectInstance_Func defines the signature that you implement to
41 * receive notifications when a plugin instance connects to the broker.
42 * The broker should listen on the socket before returning.
44 * @param[in] instance The plugin instance connecting to the broker.
45 * @param[in] handle Handle to a socket the broker can use to communicate with
46 * the plugin.
47 * @return PP_OK on success. Any other value on failure.
49 typedef int32_t (*PP_ConnectInstance_Func)(PP_Instance instance,
50 int32_t handle);
51 /**
52 * @}
55 /**
56 * @addtogroup Functions
57 * @{
60 /**
61 * PPP_InitializeBroker() is the entry point for a broker and is
62 * called by the browser when your module loads. Your code must implement this
63 * function.
65 * Failure indicates to the browser that this broker can not be used. In this
66 * case, the broker will be unloaded.
68 * @param[out] connect_instance_func A pointer to a connect instance function.
69 * @return PP_OK on success. Any other value on failure.
71 PP_EXPORT int32_t PPP_InitializeBroker(
72 PP_ConnectInstance_Func* connect_instance_func);
73 /**
74 * @}
77 /**
78 * @addtogroup Functions
79 * @{
82 /** PPP_ShutdownBroker() is called before the broker is unloaded.
84 PP_EXPORT void PPP_ShutdownBroker();
85 /**
86 * @}
89 #ifdef __cplusplus
90 } /* extern "C" */
91 #endif
93 #endinl