2013-05-10 16:00:28 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsINetAddr.idl"
|
|
|
|
|
|
|
|
interface nsIUDPSocketInternal;
|
2014-05-06 14:32:25 +04:00
|
|
|
interface nsIInputStream;
|
2015-04-08 22:35:00 +03:00
|
|
|
interface nsIPrincipal;
|
2017-06-12 01:24:00 +03:00
|
|
|
interface nsIEventTarget;
|
2013-05-10 16:00:28 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Internal interface for callback from chrome process
|
|
|
|
*/
|
2019-05-09 09:55:07 +03:00
|
|
|
[scriptable, builtinclass, uuid(613dd3ad-598b-4da9-ad63-bbda50c20098)]
|
2013-05-10 16:00:28 +04:00
|
|
|
interface nsIUDPSocketInternal : nsISupports
|
|
|
|
{
|
2014-05-06 14:32:25 +04:00
|
|
|
// callback while socket is opened. localPort and localAddress is ready until this time.
|
|
|
|
void callListenerOpened();
|
2016-01-22 10:47:01 +03:00
|
|
|
// callback while socket is connected.
|
|
|
|
void callListenerConnected();
|
2014-05-06 14:32:25 +04:00
|
|
|
// callback while socket is closed.
|
|
|
|
void callListenerClosed();
|
|
|
|
// callback while incoming packet is received.
|
|
|
|
void callListenerReceivedData(in AUTF8String host, in unsigned short port,
|
2019-05-09 09:55:07 +03:00
|
|
|
in Array<uint8_t> data);
|
2014-05-06 14:32:25 +04:00
|
|
|
// callback while any error happened.
|
|
|
|
void callListenerError(in AUTF8String message, in AUTF8String filename, in uint32_t lineNumber);
|
2013-05-10 16:00:28 +04:00
|
|
|
};
|