nsIUDPSocketChild.idl (1134B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #include "nsISupports.idl" 6 #include "nsINetAddr.idl" 7 8 interface nsIUDPSocketInternal; 9 interface nsIInputStream; 10 interface nsIPrincipal; 11 interface nsIEventTarget; 12 13 /* 14 * Internal interface for callback from chrome process 15 */ 16 [scriptable, builtinclass, uuid(613dd3ad-598b-4da9-ad63-bbda50c20098)] 17 interface nsIUDPSocketInternal : nsISupports 18 { 19 // callback while socket is opened. localPort and localAddress is ready until this time. 20 void callListenerOpened(); 21 // callback while socket is connected. 22 void callListenerConnected(); 23 // callback while socket is closed. 24 void callListenerClosed(); 25 // callback while incoming packet is received. 26 void callListenerReceivedData(in AUTF8String host, in unsigned short port, 27 in Array<uint8_t> data); 28 // callback while any error happened. 29 void callListenerError(in AUTF8String message, in AUTF8String filename, in uint32_t lineNumber); 30 };