Removing uses of X11 native key events.
[chromium-blink-merge.git] / content / common / p2p_messages.h
blob8154e634c29cefb9f029e5423ae34ba7abdc6232
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.
5 // IPC messages for the P2P Transport API.
6 // Multiply-included message file, hence no include guard.
8 #include "base/time/time.h"
9 #include "content/common/content_export.h"
10 #include "content/common/p2p_socket_type.h"
11 #include "ipc/ipc_message_macros.h"
12 #include "net/base/net_util.h"
13 #include "third_party/webrtc/base/asyncpacketsocket.h"
15 #undef IPC_MESSAGE_EXPORT
16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
17 #define IPC_MESSAGE_START P2PMsgStart
19 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketType,
20 content::P2P_SOCKET_TYPE_LAST)
21 IPC_ENUM_TRAITS_MAX_VALUE(content::P2PSocketOption,
22 content::P2P_SOCKET_OPT_MAX - 1)
23 IPC_ENUM_TRAITS_MIN_MAX_VALUE(rtc::DiffServCodePoint,
24 rtc::DSCP_NO_CHANGE,
25 rtc::DSCP_CS7)
27 IPC_STRUCT_TRAITS_BEGIN(net::NetworkInterface)
28 IPC_STRUCT_TRAITS_MEMBER(name)
29 IPC_STRUCT_TRAITS_MEMBER(type)
30 IPC_STRUCT_TRAITS_MEMBER(address)
31 IPC_STRUCT_TRAITS_MEMBER(network_prefix)
32 IPC_STRUCT_TRAITS_END()
34 IPC_STRUCT_TRAITS_BEGIN(rtc::PacketTimeUpdateParams)
35 IPC_STRUCT_TRAITS_MEMBER(rtp_sendtime_extension_id)
36 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_key)
37 IPC_STRUCT_TRAITS_MEMBER(srtp_auth_tag_len)
38 IPC_STRUCT_TRAITS_MEMBER(srtp_packet_index)
39 IPC_STRUCT_TRAITS_END()
41 IPC_STRUCT_TRAITS_BEGIN(rtc::PacketOptions)
42 IPC_STRUCT_TRAITS_MEMBER(dscp)
43 IPC_STRUCT_TRAITS_MEMBER(packet_time_params)
44 IPC_STRUCT_TRAITS_END()
46 IPC_STRUCT_TRAITS_BEGIN(content::P2PHostAndIPEndPoint)
47 IPC_STRUCT_TRAITS_MEMBER(hostname)
48 IPC_STRUCT_TRAITS_MEMBER(ip_address)
49 IPC_STRUCT_TRAITS_END()
51 // P2P Socket messages sent from the browser to the renderer.
53 IPC_MESSAGE_CONTROL1(P2PMsg_NetworkListChanged,
54 net::NetworkInterfaceList /* networks */)
56 IPC_MESSAGE_CONTROL2(P2PMsg_GetHostAddressResult,
57 int32 /* request_id */,
58 net::IPAddressList /* address list*/)
60 IPC_MESSAGE_CONTROL3(P2PMsg_OnSocketCreated,
61 int /* socket_id */,
62 net::IPEndPoint /* local_address */,
63 net::IPEndPoint /* remote_address */)
65 IPC_MESSAGE_CONTROL1(P2PMsg_OnSendComplete,
66 int /* socket_id */)
68 IPC_MESSAGE_CONTROL1(P2PMsg_OnError,
69 int /* socket_id */)
71 IPC_MESSAGE_CONTROL2(P2PMsg_OnIncomingTcpConnection,
72 int /* socket_id */,
73 net::IPEndPoint /* socket_address */)
75 IPC_MESSAGE_CONTROL4(P2PMsg_OnDataReceived,
76 int /* socket_id */,
77 net::IPEndPoint /* socket_address */,
78 std::vector<char> /* data */,
79 base::TimeTicks /* timestamp */ )
81 // P2P Socket messages sent from the renderer to the browser.
83 // Start/stop sending P2PMsg_NetworkListChanged messages when network
84 // configuration changes.
85 IPC_MESSAGE_CONTROL0(P2PHostMsg_StartNetworkNotifications)
86 IPC_MESSAGE_CONTROL0(P2PHostMsg_StopNetworkNotifications)
88 IPC_MESSAGE_CONTROL2(P2PHostMsg_GetHostAddress,
89 std::string /* host_name */,
90 int32 /* request_id */)
92 IPC_MESSAGE_CONTROL4(P2PHostMsg_CreateSocket,
93 content::P2PSocketType /* type */,
94 int /* socket_id */,
95 net::IPEndPoint /* local_address */,
96 content::P2PHostAndIPEndPoint /* remote_address */)
98 IPC_MESSAGE_CONTROL3(P2PHostMsg_AcceptIncomingTcpConnection,
99 int /* listen_socket_id */,
100 net::IPEndPoint /* remote_address */,
101 int /* connected_socket_id */)
103 // TODO(sergeyu): Use shared memory to pass the data.
104 IPC_MESSAGE_CONTROL5(P2PHostMsg_Send,
105 int /* socket_id */,
106 net::IPEndPoint /* socket_address */,
107 std::vector<char> /* data */,
108 rtc::PacketOptions /* packet options */,
109 uint64 /* packet_id */)
111 IPC_MESSAGE_CONTROL1(P2PHostMsg_DestroySocket,
112 int /* socket_id */)
114 IPC_MESSAGE_CONTROL3(P2PHostMsg_SetOption,
115 int /* socket_id */,
116 content::P2PSocketOption /* socket option type */,
117 int /* value */)