dom/network/src/PUDPSocket.ipdl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:b70e88afda24
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
3
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7
8 include protocol PNecko;
9
10 include "mozilla/net/NeckoMessageUtils.h";
11 include "mozilla/net/DNS.h";
12 include "prio.h";
13
14 using mozilla::net::NetAddr from "mozilla/net/DNS.h";
15 using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
16
17 struct UDPError {
18 nsCString message;
19 nsCString filename;
20 uint32_t lineNumber;
21 uint32_t columnNumber;
22 };
23
24 struct UDPMessage {
25 nsCString fromAddr;
26 uint16_t port;
27 uint8_t[] data;
28 };
29
30 struct UDPAddressInfo {
31 nsCString local;
32 uint16_t port;
33 };
34
35 struct UDPSendResult {
36 nsresult value;
37 };
38
39 union UDPCallbackData {
40 void_t;
41 UDPMessage;
42 UDPAddressInfo;
43 UDPSendResult;
44 UDPError;
45 };
46
47 namespace mozilla {
48 namespace net {
49
50 //-------------------------------------------------------------------
51 protocol PUDPSocket
52 {
53 manager PNecko;
54
55 parent:
56 Data(uint8_t[] data, nsCString remoteAddress, uint16_t port);
57 DataWithAddress(uint8_t[] data, NetAddr addr);
58 Close();
59 RequestDelete();
60
61 child:
62 Callback(nsCString type, UDPCallbackData data, nsCString aState);
63 __delete__();
64 };
65
66
67 } // namespace net
68 } // namespace mozilla
69

mercurial