1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/network/src/PUDPSocket.ipdl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,69 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */ 1.6 + 1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.10 + 1.11 +include protocol PNecko; 1.12 + 1.13 +include "mozilla/net/NeckoMessageUtils.h"; 1.14 +include "mozilla/net/DNS.h"; 1.15 +include "prio.h"; 1.16 + 1.17 +using mozilla::net::NetAddr from "mozilla/net/DNS.h"; 1.18 +using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; 1.19 + 1.20 +struct UDPError { 1.21 + nsCString message; 1.22 + nsCString filename; 1.23 + uint32_t lineNumber; 1.24 + uint32_t columnNumber; 1.25 +}; 1.26 + 1.27 +struct UDPMessage { 1.28 + nsCString fromAddr; 1.29 + uint16_t port; 1.30 + uint8_t[] data; 1.31 +}; 1.32 + 1.33 +struct UDPAddressInfo { 1.34 + nsCString local; 1.35 + uint16_t port; 1.36 +}; 1.37 + 1.38 +struct UDPSendResult { 1.39 + nsresult value; 1.40 +}; 1.41 + 1.42 +union UDPCallbackData { 1.43 + void_t; 1.44 + UDPMessage; 1.45 + UDPAddressInfo; 1.46 + UDPSendResult; 1.47 + UDPError; 1.48 +}; 1.49 + 1.50 +namespace mozilla { 1.51 +namespace net { 1.52 + 1.53 +//------------------------------------------------------------------- 1.54 +protocol PUDPSocket 1.55 +{ 1.56 + manager PNecko; 1.57 + 1.58 +parent: 1.59 + Data(uint8_t[] data, nsCString remoteAddress, uint16_t port); 1.60 + DataWithAddress(uint8_t[] data, NetAddr addr); 1.61 + Close(); 1.62 + RequestDelete(); 1.63 + 1.64 +child: 1.65 + Callback(nsCString type, UDPCallbackData data, nsCString aState); 1.66 + __delete__(); 1.67 +}; 1.68 + 1.69 + 1.70 +} // namespace net 1.71 +} // namespace mozilla 1.72 +