This commit is contained in:
dougt%netscape.com 2001-02-10 00:46:19 +00:00
Родитель 8325fd72aa
Коммит c6692de055
2 изменённых файлов: 14 добавлений и 19 удалений

Просмотреть файл

@ -107,13 +107,14 @@ function (iid) {
}
IRCContentHandler.prototype.handleContent =
function (aContentType, aCommand, aWindowTarget, aSourceContext, aChannel)
function (aContentType, aCommand, aWindowTarget, aSourceContext, aRequest)
{
var e;
var channel = aRequest.QueryInterface(nsIChannel);
dump ("ircLoader.handleContent (" + aContentType + ", " +
aCommand + ", " + aWindowTarget + ", " + aSourceContext + ", " +
aChannel.URI.spec + ")\n");
channel.URI.spec + ")\n");
var windowManager =
Components.classes[MEDIATOR_CONTRACTID].getService(nsIWindowMediator);
@ -123,13 +124,13 @@ function (aContentType, aCommand, aWindowTarget, aSourceContext, aChannel)
if (w)
{
w.focus();
w.gotoIRCURL(aChannel.URI.spec);
w.gotoIRCURL(channel.URI.spec);
}
else
{
var ass = Components.classes[ASS_CONTRACTID].getService(nsIAppShellService);
w = ass.getHiddenDOMWindow();
w.open("chrome://chatzilla/content/chatzilla.xul?" + aChannel.URI.spec,
w.open("chrome://chatzilla/content/chatzilla.xul?" + channel.URI.spec,
"_blank", "chrome,menubar,toolbar,resizable");
}
@ -210,8 +211,6 @@ function (iid) {
}
/* nsIChannel */
BogusChannel.prototype.transferOffset = 0;
BogusChannel.prototype.transferCount = 0;
BogusChannel.prototype.loadAttributes = null;
BogusChannel.prototype.contentType = "x-application-irc";
BogusChannel.prototype.contentLength = 0;
@ -219,10 +218,6 @@ BogusChannel.prototype.owner = null;
BogusChannel.prototype.loadGroup = null;
BogusChannel.prototype.notificationCallbacks = null;
BogusChannel.prototype.securityInfo = null;
BogusChannel.prototype.bufferSegmentSize = 0;
BogusChannel.prototype.bufferMaxSize = 0;
BogusChannel.prototype.shouldCache = false;
BogusChannel.prototype.pipeliningAllowed = false;
BogusChannel.prototype.open =
BogusChannel.prototype.asyncOpen =

Просмотреть файл

@ -79,7 +79,7 @@ CBSConnection.prototype.connect = function(host, port, bind, tcp_flag)
if (!this._channel)
throw ("Error opening channel.");
this._outputStream = this._channel.open(0);
this._outputStream = this._channel.openOutputStream(0, -1, 0);
if (!this._outputStream)
throw ("Error getting output stream.");
@ -134,7 +134,7 @@ CBSConnection.prototype.readData = function(timeout)
if (!this._inputStream)
{
this._inputStream =
toScriptableInputStream(this._channel.openInputStream (0, 0));
toScriptableInputStream(this._channel.openInputStream (0, -1, 0));
if (!this._inputStream)
throw ("Error getting input stream.");
}
@ -168,7 +168,7 @@ if (jsenv.HAS_DOCUMENT)
CBSConnection.prototype.startAsyncRead =
function (server)
{
this._channel.asyncRead (new StreamListener (server), this);
this._channel.asyncRead (new StreamListener (server), this, 0, -1, 0);
}
}
@ -179,20 +179,20 @@ function StreamListener(server)
}
StreamListener.prototype.onStartRequest =
function (channel, ctxt)
function (request, ctxt)
{
dd ("onStartRequest: " + channel + ", " + ctxt);
dd ("onStartRequest: " + request + ", " + ctxt);
}
StreamListener.prototype.onStopRequest =
function (channel, ctxt, status, errorMsg)
function (request, ctxt, status, errorMsg)
{
dd ("onStopRequest: " + channel + ", " + ctxt + ", " + status + ", " +
dd ("onStopRequest: " + request + ", " + ctxt + ", " + status + ", " +
errorMsg);
}
StreamListener.prototype.onDataAvailable =
function (channel, ctxt, inStr, sourceOffset, count)
function (request, ctxt, inStr, sourceOffset, count)
{
ctxt = ctxt.wrappedJSObject;
if (!ctxt)