blob: f541460215ffaa5a552d05631533664a26261f7e [file] [log] [blame]
/*
* PhoneGap is available under *either* the terms of the modified BSD license *or* the
* MIT License (2008). See http://opensource.org/licenses/alphabetical for full text.
*
* Copyright (c) 2010, IBM Corporation
*/
require ../common/Weinre
require ../common/Callback
require ./Console
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
class WeinreTargetEventsImpl
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
method connectionCreated(/*string*/ clientId, /*string*/ targetId)
var message = "weinre: target " + targetId + " connected to client " + clientId
console.log(message)
var oldValue = Console.useRemote(true)
if (!oldValue) {
console.log(message)
}
Weinre.target.setDocument()
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
method connectionDestroyed(/*string*/ clientId, /*string*/ targetId)
var message = "weinre: target " + targetId + " disconnected from client " + clientId
console.log(message)
var oldValue = Console.useRemote(false)
if (oldValue) {
console.log(message)
}
//-----------------------------------------------------------------------------
//
//-----------------------------------------------------------------------------
method sendCallback(/*int*/ callbackId, /*any*/ result)
Callback.invoke(callbackId, result)