summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ppapi/api/dev/ppb_query_policy_dev.idl26
-rw-r--r--ppapi/api/dev/ppb_scrollbar_dev.idl82
-rw-r--r--ppapi/api/dev/ppb_transport_dev.idl183
-rw-r--r--ppapi/api/dev/ppp_policy_update_dev.idl27
-rw-r--r--ppapi/c/dev/ppb_query_policy_dev.h31
-rw-r--r--ppapi/c/dev/ppb_scrollbar_dev.h109
-rw-r--r--ppapi/c/dev/ppb_transport_dev.h194
-rw-r--r--ppapi/c/dev/ppp_policy_update_dev.h30
-rw-r--r--ppapi/tests/test_query_policy.cc4
-rw-r--r--ppapi/thunk/interfaces_ppb_public_dev.h4
-rw-r--r--ppapi/thunk/ppb_scrollbar_thunk.cc4
-rw-r--r--remoting/client/plugin/chromoting_instance.cc4
12 files changed, 569 insertions, 129 deletions
diff --git a/ppapi/api/dev/ppb_query_policy_dev.idl b/ppapi/api/dev/ppb_query_policy_dev.idl
new file mode 100644
index 0000000..5d6bdf2
--- /dev/null
+++ b/ppapi/api/dev/ppb_query_policy_dev.idl
@@ -0,0 +1,26 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPB_QueryPolicy_Dev</code> interface.
+ */
+label Chrome {
+ M14 = 0.1
+};
+
+interface PPB_QueryPolicy_Dev {
+ /**
+ * Subscribes the instance to receive updates via the
+ * <code>PPP_PolicyUpdate_Dev</code> interface.
+ *
+ * The plugin is guaranteed to get one update immediately via the
+ * <code>PP_PolicyUpdate_Dev</code> interface. This allows the plugin to
+ * retrieve the current policy when subscribing for the first time.
+ *
+ * @param[in] instance A <code>PP_Instance</code> indentifying one instance
+ * of a module.
+ */
+ void SubscribeToPolicyUpdates([in] PP_Instance instance);
+};
diff --git a/ppapi/api/dev/ppb_scrollbar_dev.idl b/ppapi/api/dev/ppb_scrollbar_dev.idl
new file mode 100644
index 0000000..5700f7d
--- /dev/null
+++ b/ppapi/api/dev/ppb_scrollbar_dev.idl
@@ -0,0 +1,82 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPB_Buffer_Dev</code> interface.
+ */
+label Chrome {
+ M14 = 0.5
+};
+
+[assert_size(4)]
+enum PP_ScrollBy_Dev {
+ PP_SCROLLBY_PIXEL = 0,
+ PP_SCROLLBY_LINE = 1,
+ PP_SCROLLBY_PAGE = 2,
+ PP_SCROLLBY_DOCUMENT = 3
+};
+
+/**
+ * The interface for a scrollbar. A scrollbar is a widget, so the functions
+ * in PPB_Widget can also be used with scrollbar objects.
+ */
+interface PPB_Scrollbar_Dev {
+ /**
+ * Create a new scrollbar. Returns 0 if the instance is invalid.
+ */
+ PP_Resource Create([in] PP_Instance instance,
+ [in] PP_Bool vertical);
+
+ /**
+ * Returns PP_TRUE if the given resource is a Scrollbar. Returns PP_FALSE if
+ * the resource is invalid or some type other than a scrollbar.
+ */
+ PP_Bool IsScrollbar([in] PP_Resource resource);
+
+ /**
+ * Gets the thickness of a scrollbar.
+ */
+ uint32_t GetThickness([in] PP_Resource resource);
+
+ /**
+ * Returns PP_TRUE if the system scrollbar style is an overlap scrollbar.
+ */
+ PP_Bool IsOverlay([in] PP_Resource scrollbar);
+
+ /**
+ * Gets the value of the scrollbar.
+ */
+ uint32_t GetValue([in] PP_Resource scrollbar);
+
+ /**
+ * Sets the value of the scrollbar.
+ */
+ void SetValue([in] PP_Resource scrollbar,
+ [in] uint32_t value);
+
+ /**
+ * Set the document size (i.e. total length of the region that's being
+ * scrolled).
+ */
+ void SetDocumentSize([in] PP_Resource scrollbar,
+ [in] uint32_t size);
+
+ /**
+ * Updates the tickmarks. Only valid for vertical scrollbars. "tick_marks"
+ * contains "count" PP_Rect objects.
+ */
+ void SetTickMarks([in] PP_Resource scrollbar,
+ [in, size_as=count] PP_Rect[] tick_marks,
+ [in] uint32_t count);
+
+ /**
+ * Scroll by "multiplier" pixels/lines/pages units. Positive values are
+ * forward and negative are backward. If "unit" is document then any positive
+ * value goes to the end while any negative value goes to the beginning.
+ */
+ void ScrollBy([in] PP_Resource scrollbar,
+ [in] PP_ScrollBy_Dev unit,
+ [in] int32_t multiplier);
+};
diff --git a/ppapi/api/dev/ppb_transport_dev.idl b/ppapi/api/dev/ppb_transport_dev.idl
new file mode 100644
index 0000000..30beb00
--- /dev/null
+++ b/ppapi/api/dev/ppb_transport_dev.idl
@@ -0,0 +1,183 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPB_Transport_Dev</code> interface.
+ */
+label Chrome {
+ M14 = 0.7
+};
+
+[assert_size(4)]
+enum PP_TransportType {
+ PP_TRANSPORTTYPE_DATAGRAM = 0,
+ PP_TRANSPORTTYPE_STREAM = 1
+};
+
+[assert_size(4)]
+enum PP_TransportProperty {
+ /**
+ * STUN server address and port, e.g "stun.example.com:19302".
+ */
+ PP_TRANSPORTPROPERTY_STUN_SERVER = 0,
+
+ /**
+ * Relay server address and port, e.g. "relay.example.com:12344".
+ */
+ PP_TRANSPORTPROPERTY_RELAY_SERVER = 1,
+
+ /**
+ * Username for the relay server.
+ */
+ PP_TRANSPORTPROPERTY_RELAY_USERNAME = 2,
+
+ /**
+ * Password for the relay server.
+ */
+ PP_TRANSPORTPROPERTY_RELAY_PASSWORD = 3,
+
+ /**
+ * Type of Relay server. Must be one of the PP_TransportRelayMode values. By
+ * default is set to PP_TRANSPORTRELAYMODE_TURN.
+ */
+ PP_TRANSPORTPROPERTY_RELAY_MODE = 4,
+
+ /**
+ * TCP receive window in bytes. Takes effect only for PseudoTCP connections.
+ */
+ PP_TRANSPORTPROPERTY_TCP_RECEIVE_WINDOW = 5,
+
+ /**
+ * TCP send window in bytes. Takes effect only for PseudoTCP connections.
+ */
+ PP_TRANSPORTPROPERTY_TCP_SEND_WINDOW = 6,
+
+ /**
+ * Boolean value that disables Neagle's algorithm when set to true. When
+ * Neagle's algorithm is disabled, all outgoing packets are sent as soon as
+ * possible. When set to false (by default) data may be buffered until there
+ * is a sufficient amount to send.
+ */
+ PP_TRANSPORTPROPERTY_TCP_NO_DELAY = 7,
+
+ /**
+ * Delay for ACK packets in milliseconds. By default set to 100ms.
+ */
+ PP_TRANSPORTPROPERTY_TCP_ACK_DELAY = 8,
+
+ /**
+ * Boolean value that disables TCP-based transports when set to true. By
+ * default set to false.
+ */
+ PP_TRANSPORTPROPERTY_DISABLE_TCP_TRANSPORT = 9
+};
+
+[assert_size(4)]
+enum PP_TransportRelayMode {
+ /**
+ * RFC5766 compliant relay server.
+ */
+ PP_TRANSPORTRELAYMODE_TURN = 0,
+
+ /**
+ * Legacy Google relay server.
+ */
+ PP_TRANSPORTRELAYMODE_GOOGLE = 1
+};
+
+/**
+ * The transport interface provides peer-to-peer communication.
+ *
+ * TODO(juberti): other getters/setters
+ * connect state
+ * connect type, protocol
+ * RTT
+ */
+interface PPB_Transport_Dev {
+ /**
+ * Creates a new transport object with the specified name using the
+ * specified protocol.
+ */
+ PP_Resource CreateTransport(
+ [in] PP_Instance instance,
+ [in] str_t name,
+ [in] PP_TransportType type);
+
+ /**
+ * Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise.
+ */
+ PP_Bool IsTransport(
+ [in] PP_Resource resource);
+
+ /**
+ * Returns PP_TRUE if the transport is currently writable (i.e. can
+ * send data to the remote peer), PP_FALSE otherwise.
+ */
+ PP_Bool IsWritable(
+ [in] PP_Resource transport);
+
+ /**
+ * Sets various configuration properties of the transport.
+ */
+ int32_t SetProperty(
+ [in] PP_Resource transport,
+ [in] PP_TransportProperty property,
+ [in] PP_Var value);
+
+ /**
+ * Establishes a connection to the remote peer. Returns
+ * PP_OK_COMPLETIONPENDING and notifies on |cb| when connectivity is
+ * established (or timeout occurs).
+ */
+ int32_t Connect(
+ [in] PP_Resource transport,
+ [in] PP_CompletionCallback cb);
+
+ /**
+ * Obtains another ICE candidate address to be provided to the
+ * remote peer. Returns PP_OK_COMPLETIONPENDING if there are no more
+ * addresses to be sent. After the callback is called
+ * GetNextAddress() must be called again to get the address.
+ */
+ int32_t GetNextAddress(
+ [in] PP_Resource transport,
+ [out] PP_Var address,
+ [in] PP_CompletionCallback cb);
+
+ /**
+ * Provides an ICE candidate address that was received from the remote peer.
+ */
+ int32_t ReceiveRemoteAddress(
+ [in] PP_Resource transport,
+ [in] PP_Var address);
+
+ /**
+ * Like recv(), receives data. Returns PP_OK_COMPLETIONPENDING if there is
+ * currently no data to receive. In that case, the |data| pointer should
+ * remain valid until the callback is called.
+ */
+ int32_t Recv(
+ [in] PP_Resource transport,
+ [out] mem_t data,
+ [in] uint32_t len,
+ [in] PP_CompletionCallback cb);
+
+ /**
+ * Like send(), sends data. Returns PP_OK_COMPLETIONPENDING if the socket is
+ * currently flow-controlled. In that case, the |data| pointer should remain
+ * valid until the callback is called.
+ */
+ int32_t Send(
+ [in] PP_Resource transport,
+ [in] mem_t data,
+ [in] uint32_t len,
+ [in] PP_CompletionCallback cb);
+
+ /**
+ * Disconnects from the remote peer.
+ */
+ int32_t Close(
+ [in] PP_Resource transport);
+};
diff --git a/ppapi/api/dev/ppp_policy_update_dev.idl b/ppapi/api/dev/ppp_policy_update_dev.idl
new file mode 100644
index 0000000..f2f7512
--- /dev/null
+++ b/ppapi/api/dev/ppp_policy_update_dev.idl
@@ -0,0 +1,27 @@
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/**
+ * This file defines the <code>PPP_PolicyUpdate_Dev</code> interface.
+ */
+
+label Chrome {
+ M14 = 0.1
+};
+
+interface PPP_PolicyUpdate_Dev {
+ /**
+ * Signals that the policy has been updated, and provides it via a JSON
+ * string.
+ *
+ * @param[in] instance A <code>PP_Instance</code> indentifying one instance
+ * of a module.
+ * @param[in] A <code>PP_Var</code> with a JSON string representing the
+ * encoded policy.
+ */
+ void PolicyUpdated(
+ [in] PP_Instance instance,
+ [in] PP_Var policy_json);
+};
diff --git a/ppapi/c/dev/ppb_query_policy_dev.h b/ppapi/c/dev/ppb_query_policy_dev.h
index 8d732a5..46394aa 100644
--- a/ppapi/c/dev/ppb_query_policy_dev.h
+++ b/ppapi/c/dev/ppb_query_policy_dev.h
@@ -2,15 +2,29 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef PPAPI_C_PPB_QUERY_POLICY_DEV_H_
-#define PPAPI_C_PPB_QUERY_POLICY_DEV_H_
+
+/* From dev/ppb_query_policy_dev.idl modified Tue Oct 4 08:47:29 2011. */
+
+#ifndef PPAPI_C_DEV_PPB_QUERY_POLICY_DEV_H_
+#define PPAPI_C_DEV_PPB_QUERY_POLICY_DEV_H_
#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_var.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_stdint.h"
+
+#define PPB_QUERYPOLICY_DEV_INTERFACE_0_1 "PPB_QueryPolicy(Dev);0.1"
+#define PPB_QUERYPOLICY_DEV_INTERFACE PPB_QUERYPOLICY_DEV_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPB_QueryPolicy_Dev</code> interface.
+ */
-#define PPB_QUERY_POLICY_DEV_INTERFACE_0_1 "PPB_QueryPolicy;0.1"
-#define PPB_QUERY_POLICY_DEV_INTERFACE PPB_QUERY_POLICY_DEV_INTERFACE_0_1
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
struct PPB_QueryPolicy_Dev {
/**
* Subscribes the instance to receive updates via the
@@ -24,7 +38,10 @@ struct PPB_QueryPolicy_Dev {
* of a module.
*/
void (*SubscribeToPolicyUpdates)(PP_Instance instance);
-
};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_DEV_PPB_QUERY_POLICY_DEV_H_ */
-#endif /* PPAPI_C_PPB_QUERY_POLICY_DEV_H_ */
diff --git a/ppapi/c/dev/ppb_scrollbar_dev.h b/ppapi/c/dev/ppb_scrollbar_dev.h
index 1da70277..4187900 100644
--- a/ppapi/c/dev/ppb_scrollbar_dev.h
+++ b/ppapi/c/dev/ppb_scrollbar_dev.h
@@ -1,18 +1,35 @@
-/* Copyright (c) 2010 The Chromium Authors. All rights reserved.
+/* Copyright (c) 2011 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
+/* From dev/ppb_scrollbar_dev.idl modified Tue Oct 4 08:53:30 2011. */
+
#ifndef PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_
#define PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_point.h"
+#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_size.h"
#include "ppapi/c/pp_stdint.h"
-struct PP_Rect;
+#define PPB_SCROLLBAR_DEV_INTERFACE_0_5 "PPB_Scrollbar(Dev);0.5"
+#define PPB_SCROLLBAR_DEV_INTERFACE PPB_SCROLLBAR_DEV_INTERFACE_0_5
+
+/**
+ * @file
+ * This file defines the <code>PPB_Buffer_Dev</code> interface.
+ */
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
typedef enum {
PP_SCROLLBY_PIXEL = 0,
PP_SCROLLBY_LINE = 1,
@@ -20,52 +37,68 @@ typedef enum {
PP_SCROLLBY_DOCUMENT = 3
} PP_ScrollBy_Dev;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_ScrollBy_Dev, 4);
+/**
+ * @}
+ */
-#define PPB_SCROLLBAR_DEV_INTERFACE_0_5 "PPB_Scrollbar(Dev);0.5"
-#define PPB_SCROLLBAR_DEV_INTERFACE PPB_SCROLLBAR_DEV_INTERFACE_0_5
-
-// The interface for a scrollbar. A scrollbar is a widget, so the functions
-// in PPB_Widget can also be used with scrollbar objects.
-struct PPB_Scrollbar_0_5_Dev {
- // Create a new scrollbar. Returns 0 if the instance is invalid.
- PP_Resource (*Create)(PP_Instance instance,
- PP_Bool vertical);
-
- // Returns PP_TRUE if the given resource is a Scrollbar. Returns PP_FALSE if
- // the resource is invalid or some type other than a scrollbar.
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * The interface for a scrollbar. A scrollbar is a widget, so the functions
+ * in PPB_Widget can also be used with scrollbar objects.
+ */
+struct PPB_Scrollbar_Dev {
+ /**
+ * Create a new scrollbar. Returns 0 if the instance is invalid.
+ */
+ PP_Resource (*Create)(PP_Instance instance, PP_Bool vertical);
+ /**
+ * Returns PP_TRUE if the given resource is a Scrollbar. Returns PP_FALSE if
+ * the resource is invalid or some type other than a scrollbar.
+ */
PP_Bool (*IsScrollbar)(PP_Resource resource);
-
- // Gets the thickness of a scrollbar.
+ /**
+ * Gets the thickness of a scrollbar.
+ */
uint32_t (*GetThickness)(PP_Resource resource);
-
- // Returns PP_TRUE if the system scrollbar style is an overlap scrollbar.
+ /**
+ * Returns PP_TRUE if the system scrollbar style is an overlap scrollbar.
+ */
PP_Bool (*IsOverlay)(PP_Resource scrollbar);
-
- // Get/set the value of the scrollbar.
+ /**
+ * Gets the value of the scrollbar.
+ */
uint32_t (*GetValue)(PP_Resource scrollbar);
-
- void (*SetValue)(PP_Resource scrollbar,
- uint32_t value);
-
- // Set the document size (i.e. total length of the region that's being
- // scrolled).
- void (*SetDocumentSize)(PP_Resource scrollbar,
- uint32_t size);
-
- // Updates the tickmarks. Only valid for vertical scrollbars. "tick_marks"
- // contains "count" PP_Rect objects.
+ /**
+ * Sets the value of the scrollbar.
+ */
+ void (*SetValue)(PP_Resource scrollbar, uint32_t value);
+ /**
+ * Set the document size (i.e. total length of the region that's being
+ * scrolled).
+ */
+ void (*SetDocumentSize)(PP_Resource scrollbar, uint32_t size);
+ /**
+ * Updates the tickmarks. Only valid for vertical scrollbars. "tick_marks"
+ * contains "count" PP_Rect objects.
+ */
void (*SetTickMarks)(PP_Resource scrollbar,
- const struct PP_Rect* tick_marks,
+ const struct PP_Rect tick_marks[],
uint32_t count);
-
- // Scroll by "multiplier" pixels/lines/pages units. Positive values are
- // forward and negative are backward. If "unit" is document then any positive
- // value goes to the end while any negative value goes to the beginning.
+ /**
+ * Scroll by "multiplier" pixels/lines/pages units. Positive values are
+ * forward and negative are backward. If "unit" is document then any positive
+ * value goes to the end while any negative value goes to the beginning.
+ */
void (*ScrollBy)(PP_Resource scrollbar,
PP_ScrollBy_Dev unit,
int32_t multiplier);
};
-
-typedef struct PPB_Scrollbar_0_5_Dev PPB_Scrollbar_Dev;
+/**
+ * @}
+ */
#endif /* PPAPI_C_DEV_PPB_SCROLLBAR_DEV_H_ */
+
diff --git a/ppapi/c/dev/ppb_transport_dev.h b/ppapi/c/dev/ppb_transport_dev.h
index 963bd17..8363f49 100644
--- a/ppapi/c/dev/ppb_transport_dev.h
+++ b/ppapi/c/dev/ppb_transport_dev.h
@@ -2,131 +2,183 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef PPAPI_C_PPB_TRANSPORT_DEV_H_
-#define PPAPI_C_PPB_TRANSPORT_DEV_H_
+
+/* From dev/ppb_transport_dev.idl modified Tue Oct 4 15:52:58 2011. */
+
+#ifndef PPAPI_C_DEV_PPB_TRANSPORT_DEV_H_
+#define PPAPI_C_DEV_PPB_TRANSPORT_DEV_H_
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_completion_callback.h"
-#include "ppapi/c/pp_module.h"
#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
-#define PPB_TRANSPORT_DEV_INTERFACE_0_7 "PPB_Transport;0.7"
+#define PPB_TRANSPORT_DEV_INTERFACE_0_7 "PPB_Transport(Dev);0.7"
#define PPB_TRANSPORT_DEV_INTERFACE PPB_TRANSPORT_DEV_INTERFACE_0_7
+/**
+ * @file
+ * This file defines the <code>PPB_Transport_Dev</code> interface.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
typedef enum {
PP_TRANSPORTTYPE_DATAGRAM = 0,
PP_TRANSPORTTYPE_STREAM = 1
} PP_TransportType;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TransportType, 4);
typedef enum {
- // STUN server address and port, e.g "stun.example.com:19302".
+ /**
+ * STUN server address and port, e.g "stun.example.com:19302".
+ */
PP_TRANSPORTPROPERTY_STUN_SERVER = 0,
-
- // Relay server address and port, e.g. "relay.example.com:12344".
+ /**
+ * Relay server address and port, e.g. "relay.example.com:12344".
+ */
PP_TRANSPORTPROPERTY_RELAY_SERVER = 1,
-
- // Username for the relay server.
+ /**
+ * Username for the relay server.
+ */
PP_TRANSPORTPROPERTY_RELAY_USERNAME = 2,
-
- // Password for the relay server.
+ /**
+ * Password for the relay server.
+ */
PP_TRANSPORTPROPERTY_RELAY_PASSWORD = 3,
-
- // Type of Relay server. Must be one of the PP_TransportRelayMode
- // values. By default is set to PP_TRANSPORTRELAYMODE_TURN.
+ /**
+ * Type of Relay server. Must be one of the PP_TransportRelayMode values. By
+ * default is set to PP_TRANSPORTRELAYMODE_TURN.
+ */
PP_TRANSPORTPROPERTY_RELAY_MODE = 4,
-
- // TCP receive window in bytes. Takes effect only for PseudoTCP
- // connections.
+ /**
+ * TCP receive window in bytes. Takes effect only for PseudoTCP connections.
+ */
PP_TRANSPORTPROPERTY_TCP_RECEIVE_WINDOW = 5,
-
- // TCP send window in bytes. Takes effect only for PseudoTCP
- // connections.
+ /**
+ * TCP send window in bytes. Takes effect only for PseudoTCP connections.
+ */
PP_TRANSPORTPROPERTY_TCP_SEND_WINDOW = 6,
-
- // Boolean value that disables Neagle's algorithm when set to
- // true. When Neagle's algorithm is disabled, all outgoing packets
- // are sent as soon as possible. When set to false (by default) data
- // may be buffered until there is a sufficient amount to send.
+ /**
+ * Boolean value that disables Neagle's algorithm when set to true. When
+ * Neagle's algorithm is disabled, all outgoing packets are sent as soon as
+ * possible. When set to false (by default) data may be buffered until there
+ * is a sufficient amount to send.
+ */
PP_TRANSPORTPROPERTY_TCP_NO_DELAY = 7,
-
- // Delay for ACK packets in milliseconds. By default set to 100ms.
+ /**
+ * Delay for ACK packets in milliseconds. By default set to 100ms.
+ */
PP_TRANSPORTPROPERTY_TCP_ACK_DELAY = 8,
-
- // Boolean value that disables TCP-based transports when set to
- // true. By default set to false.
+ /**
+ * Boolean value that disables TCP-based transports when set to true. By
+ * default set to false.
+ */
PP_TRANSPORTPROPERTY_DISABLE_TCP_TRANSPORT = 9
} PP_TransportProperty;
PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TransportProperty, 4);
typedef enum {
- // RFC5766 compliant relay server.
+ /**
+ * RFC5766 compliant relay server.
+ */
PP_TRANSPORTRELAYMODE_TURN = 0,
-
- // Legacy Google relay server.
+ /**
+ * Legacy Google relay server.
+ */
PP_TRANSPORTRELAYMODE_GOOGLE = 1
} PP_TransportRelayMode;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_TransportRelayMode, 4);
+/**
+ * @}
+ */
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+/**
+ * The transport interface provides peer-to-peer communication.
+ *
+ * TODO(juberti): other getters/setters
+ * connect state
+ * connect type, protocol
+ * RTT
+ */
struct PPB_Transport_Dev {
- // Creates a new transport object with the specified name using the
- // specified protocol.
+ /**
+ * Creates a new transport object with the specified name using the
+ * specified protocol.
+ */
PP_Resource (*CreateTransport)(PP_Instance instance,
const char* name,
PP_TransportType type);
-
- // Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise.
+ /**
+ * Returns PP_TRUE if resource is a Transport, PP_FALSE otherwise.
+ */
PP_Bool (*IsTransport)(PP_Resource resource);
-
- // Returns PP_TRUE if the transport is currently writable (i.e. can
- // send data to the remote peer), PP_FALSE otherwise.
+ /**
+ * Returns PP_TRUE if the transport is currently writable (i.e. can
+ * send data to the remote peer), PP_FALSE otherwise.
+ */
PP_Bool (*IsWritable)(PP_Resource transport);
- // TODO(juberti): other getters/setters
- // connect state
- // connect type, protocol
- // RTT
-
- // Sets various configuration properties of the transport.
+ /**
+ * Sets various configuration properties of the transport.
+ */
int32_t (*SetProperty)(PP_Resource transport,
PP_TransportProperty property,
struct PP_Var value);
-
- // Establishes a connection to the remote peer. Returns
- // PP_OK_COMPLETIONPENDING and notifies on |cb| when connectivity is
- // established (or timeout occurs).
- int32_t (*Connect)(PP_Resource transport,
- struct PP_CompletionCallback cb);
-
- // Obtains another ICE candidate address to be provided to the
- // remote peer. Returns PP_OK_COMPLETIONPENDING if there are no more
- // addresses to be sent. After the callback is called
- // GetNextAddress() must be called again to get the address.
+ /**
+ * Establishes a connection to the remote peer. Returns
+ * PP_OK_COMPLETIONPENDING and notifies on |cb| when connectivity is
+ * established (or timeout occurs).
+ */
+ int32_t (*Connect)(PP_Resource transport, struct PP_CompletionCallback cb);
+ /**
+ * Obtains another ICE candidate address to be provided to the
+ * remote peer. Returns PP_OK_COMPLETIONPENDING if there are no more
+ * addresses to be sent. After the callback is called
+ * GetNextAddress() must be called again to get the address.
+ */
int32_t (*GetNextAddress)(PP_Resource transport,
struct PP_Var* address,
struct PP_CompletionCallback cb);
- // Provides an ICE candidate address that was received
- // from the remote peer.
- int32_t (*ReceiveRemoteAddress)(PP_Resource transport,
- struct PP_Var address);
-
- // Like recv(), receives data. Returns PP_OK_COMPLETIONPENDING if there
- // is currently no data to receive. In that case, the |data| pointer
- // should remain valid until the callback is called.
+ /**
+ * Provides an ICE candidate address that was received from the remote peer.
+ */
+ int32_t (*ReceiveRemoteAddress)(PP_Resource transport, struct PP_Var address);
+ /**
+ * Like recv(), receives data. Returns PP_OK_COMPLETIONPENDING if there is
+ * currently no data to receive. In that case, the |data| pointer should
+ * remain valid until the callback is called.
+ */
int32_t (*Recv)(PP_Resource transport,
void* data,
uint32_t len,
struct PP_CompletionCallback cb);
- // Like send(), sends data. Returns PP_OK_COMPLETIONPENDING if the
- // socket is currently flow-controlled. In that case, the |data|
- // pointer should remain valid until the callback is called.
+ /**
+ * Like send(), sends data. Returns PP_OK_COMPLETIONPENDING if the socket is
+ * currently flow-controlled. In that case, the |data| pointer should remain
+ * valid until the callback is called.
+ */
int32_t (*Send)(PP_Resource transport,
const void* data,
uint32_t len,
struct PP_CompletionCallback cb);
-
- // Disconnects from the remote peer.
+ /**
+ * Disconnects from the remote peer.
+ */
int32_t (*Close)(PP_Resource transport);
};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_DEV_PPB_TRANSPORT_DEV_H_ */
-#endif /* PPAPI_C_PPB_TRANSPORT_DEV_H_ */
diff --git a/ppapi/c/dev/ppp_policy_update_dev.h b/ppapi/c/dev/ppp_policy_update_dev.h
index 69c26b6..83fa9b3 100644
--- a/ppapi/c/dev/ppp_policy_update_dev.h
+++ b/ppapi/c/dev/ppp_policy_update_dev.h
@@ -2,15 +2,31 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#ifndef PPAPI_C_PPP_POLICY_UPDATE_DEV_H_
-#define PPAPI_C_PPP_POLICY_UPDATE_DEV_H_
+/* From dev/ppp_policy_update_dev.idl modified Tue Oct 4 09:58:59 2011. */
+
+#ifndef PPAPI_C_DEV_PPP_POLICY_UPDATE_DEV_H_
+#define PPAPI_C_DEV_PPP_POLICY_UPDATE_DEV_H_
+
+#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
-#define PPP_POLICY_UPDATE_DEV_INTERFACE_0_1 "PPB_PolicyUpdate;0.1"
-#define PPP_POLICY_UPDATE_DEV_INTERFACE PPP_POLICY_UPDATE_DEV_INTERFACE_0_1
+#define PPP_POLICYUPDATE_DEV_INTERFACE_0_1 "PPP_PolicyUpdate(Dev);0.1"
+#define PPP_POLICYUPDATE_DEV_INTERFACE PPP_POLICYUPDATE_DEV_INTERFACE_0_1
+
+/**
+ * @file
+ * This file defines the <code>PPP_PolicyUpdate_Dev</code> interface.
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
struct PPP_PolicyUpdate_Dev {
/**
* Signals that the policy has been updated, and provides it via a JSON
@@ -23,5 +39,9 @@ struct PPP_PolicyUpdate_Dev {
*/
void (*PolicyUpdated)(PP_Instance instance, struct PP_Var policy_json);
};
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_DEV_PPP_POLICY_UPDATE_DEV_H_ */
-#endif /* PPAPI_C_PPP_POLICY_UPDATE_DEV_H_ */
diff --git a/ppapi/tests/test_query_policy.cc b/ppapi/tests/test_query_policy.cc
index 6e8b4cb..87fba20 100644
--- a/ppapi/tests/test_query_policy.cc
+++ b/ppapi/tests/test_query_policy.cc
@@ -32,8 +32,8 @@ static PPP_PolicyUpdate_Dev policy_updated_interface = {
bool TestQueryPolicy::Init() {
query_policy_interface_ = static_cast<PPB_QueryPolicy_Dev const*>(
- pp::Module::Get()->GetBrowserInterface(PPB_QUERY_POLICY_DEV_INTERFACE));
- pp::Module::Get()->AddPluginInterface(PPP_POLICY_UPDATE_DEV_INTERFACE,
+ pp::Module::Get()->GetBrowserInterface(PPB_QUERYPOLICY_DEV_INTERFACE));
+ pp::Module::Get()->AddPluginInterface(PPP_POLICYUPDATE_DEV_INTERFACE,
&policy_updated_interface);
return query_policy_interface_ && InitTestingInterface();
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h
index 8231027..3126248 100644
--- a/ppapi/thunk/interfaces_ppb_public_dev.h
+++ b/ppapi/thunk/interfaces_ppb_public_dev.h
@@ -44,13 +44,13 @@ PROXIED_IFACE(PPB_Instance, PPB_CONSOLE_DEV_INTERFACE, PPB_Console_Dev)
PROXIED_IFACE(PPB_Instance, PPB_FULLSCREEN_DEV_INTERFACE, PPB_Fullscreen_Dev)
PROXIED_IFACE(PPB_Instance, PPB_MOUSELOCK_DEV_INTERFACE_0_1,
PPB_MouseLock_Dev)
-UNPROXIED_IFACE(PPB_Instance, PPB_QUERY_POLICY_DEV_INTERFACE_0_1,
+UNPROXIED_IFACE(PPB_Instance, PPB_QUERYPOLICY_DEV_INTERFACE_0_1,
PPB_QueryPolicy_Dev)
UNPROXIED_IFACE(PPB_Instance, PPB_ZOOM_DEV_INTERFACE_0_2, PPB_Zoom_Dev)
UNPROXIED_IFACE(PPB_LayerCompositor, PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2,
PPB_LayerCompositor_Dev)
UNPROXIED_IFACE(PPB_Scrollbar, PPB_SCROLLBAR_DEV_INTERFACE_0_5,
- PPB_Scrollbar_0_5_Dev)
+ PPB_Scrollbar_Dev)
PROXIED_IFACE(PPB_Surface3D, PPB_SURFACE_3D_DEV_INTERFACE_0_2,
PPB_Surface3D_Dev)
PROXIED_IFACE(PPB_TextInput, PPB_TEXTINPUT_DEV_INTERFACE_0_1,
diff --git a/ppapi/thunk/ppb_scrollbar_thunk.cc b/ppapi/thunk/ppb_scrollbar_thunk.cc
index dd0a9bb..c0ab39ce 100644
--- a/ppapi/thunk/ppb_scrollbar_thunk.cc
+++ b/ppapi/thunk/ppb_scrollbar_thunk.cc
@@ -73,7 +73,7 @@ void ScrollBy(PP_Resource scrollbar, PP_ScrollBy_Dev unit, int32_t multiplier) {
enter.object()->ScrollBy(unit, multiplier);
}
-const PPB_Scrollbar_0_5_Dev g_ppb_scrollbar_thunk = {
+const PPB_Scrollbar_Dev g_ppb_scrollbar_thunk = {
&Create,
&IsScrollbar,
&GetThickness,
@@ -87,7 +87,7 @@ const PPB_Scrollbar_0_5_Dev g_ppb_scrollbar_thunk = {
} // namespace
-const PPB_Scrollbar_0_5_Dev* GetPPB_Scrollbar_0_5_Dev_Thunk() {
+const PPB_Scrollbar_Dev* GetPPB_Scrollbar_Dev_Thunk() {
return &g_ppb_scrollbar_thunk;
}
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 60bd867..44c9d18 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -462,12 +462,12 @@ void ChromotingInstance::PolicyUpdatedThunk(PP_Instance pp_instance,
}
void ChromotingInstance::SubscribeToNatTraversalPolicy() {
- pp::Module::Get()->AddPluginInterface(PPP_POLICY_UPDATE_DEV_INTERFACE,
+ pp::Module::Get()->AddPluginInterface(PPP_POLICYUPDATE_DEV_INTERFACE,
&kPolicyUpdatedInterface);
const PPB_QueryPolicy_Dev* query_policy_interface =
static_cast<PPB_QueryPolicy_Dev const*>(
pp::Module::Get()->GetBrowserInterface(
- PPB_QUERY_POLICY_DEV_INTERFACE));
+ PPB_QUERYPOLICY_DEV_INTERFACE));
query_policy_interface->SubscribeToPolicyUpdates(pp_instance());
}