blob: 36935af83a58f8723bb19b596568f21fe9f2dd04 [file] [log] [blame]
[email protected]6c54e7e42011-03-02 20:52:341// Copyright (c) 2011 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
5// IPC messages for the P2P Transport API.
[email protected]db803aae2011-03-05 02:00:426// Multiply-included message file, hence no include guard.
[email protected]6c54e7e42011-03-02 20:52:347
8#include "content/common/p2p_sockets.h"
9#include "ipc/ipc_message_macros.h"
[email protected]1a2123c62011-03-12 04:42:3910#include "net/base/ip_endpoint.h"
[email protected]6c54e7e42011-03-02 20:52:3411
12#define IPC_MESSAGE_START P2PMsgStart
13
[email protected]db803aae2011-03-05 02:00:4214IPC_ENUM_TRAITS(P2PSocketType)
15
[email protected]6c54e7e42011-03-02 20:52:3416// P2P Socket messages sent from the browser to the renderer.
17
18IPC_MESSAGE_ROUTED2(P2PMsg_OnSocketCreated,
19 int /* socket_id */,
[email protected]1a2123c62011-03-12 04:42:3920 net::IPEndPoint /* socket_address */)
[email protected]6c54e7e42011-03-02 20:52:3421
22IPC_MESSAGE_ROUTED1(P2PMsg_OnError,
23 int /* socket_id */)
24
25IPC_MESSAGE_ROUTED3(P2PMsg_OnDataReceived,
26 int /* socket_id */,
[email protected]1a2123c62011-03-12 04:42:3927 net::IPEndPoint /* socket_address */,
[email protected]6c54e7e42011-03-02 20:52:3428 std::vector<char> /* data */)
29
30// P2P Socket messages sent from the renderer to the browser.
31
32IPC_MESSAGE_ROUTED3(P2PHostMsg_CreateSocket,
33 P2PSocketType /* type */,
34 int /* socket_id */,
[email protected]1a2123c62011-03-12 04:42:3935 net::IPEndPoint /* remote_address */)
[email protected]6c54e7e42011-03-02 20:52:3436
37// TODO(sergeyu): Use shared memory to pass the data.
38IPC_MESSAGE_ROUTED3(P2PHostMsg_Send,
39 int /* socket_id */,
[email protected]1a2123c62011-03-12 04:42:3940 net::IPEndPoint /* socket_address */,
[email protected]6c54e7e42011-03-02 20:52:3441 std::vector<char> /* data */)
42
43IPC_MESSAGE_ROUTED1(P2PHostMsg_DestroySocket,
[email protected]1a2123c62011-03-12 04:42:3944 int /* socket_id */)