You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1585 lines
38 KiB
1585 lines
38 KiB
<HTML XMLNS:helpcenter>
|
|
<HEAD>
|
|
#include "header.inc"
|
|
#include "debug_js.inc"
|
|
#include "common.inc"
|
|
#include "constants.inc"
|
|
|
|
<helpcenter:context id=idCtx />
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<meta http-equiv="MSThemeCompatible" content="Yes">
|
|
<TITLE>Remote Assistance</TITLE>
|
|
|
|
<LINK id="UI_StyleSheet" REL="stylesheet" TYPE="text/css" HREF="../../Css/rc.css">
|
|
<script id="Script1" name="Script1" LANGUAGE="Javascript" SRC="../../Common/Constants.js"> </script>
|
|
<script id="Script2" name="Script2" LANGUAGE="Javascript" SRC="../../Common/common.js"> </script>
|
|
<script id="Script3" name="Script3" LANGUAGE="Javascript" SRC="RAServer.js"> </script>
|
|
|
|
<!-- The SAF class factory object -->
|
|
<OBJECT classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7 height=0 id="oSAFClassFactory" name="oSAFClassFactory"
|
|
width=0></OBJECT>
|
|
|
|
</HEAD>
|
|
<frameset framespacing=0 id="idFrameSet0" name="idFrameSet0" cols="*,2px,165px" frameborder=0>
|
|
<frame id="idFrameChatTop" name="idFrameChatTop" noresize src="RAChatServer.htm">
|
|
<frame id="idFrameblank1" name="idFrameblank1" noresize src="DividerBar1.htm">
|
|
<frame id="idFrameTools" name="idFrameTools" noresize src="RAServerToolBar.htm">
|
|
</frameset>
|
|
|
|
|
|
<SCRIPT Language="JScript">
|
|
|
|
/*
|
|
* Localizable constants, text and messages
|
|
*/
|
|
var L_ERRSWITCHDESKTOPMODE_Text = "Failed to grant remote control.";
|
|
var L_ERRRCPERMDENIED_Text = "Remote control of this computer is not allowed.";
|
|
var L_TAKECONTROL1_Text = "\n\n----------\n";
|
|
var L_TAKECONTROL2_Text = " has taken control of ";
|
|
var L_TAKECONTROL3_Text = "'s computer.\n To stop control, press ESC key.\nNote that using any key sequence or combination including the ESC key such as (ESC+TAB) will also stop control\n----------";
|
|
|
|
//
|
|
// VOIP Messages
|
|
//
|
|
var L_ERRVOIP1_Text = c_szVoiceConnError;
|
|
var L_ERRVOIP2_Text = c_szVoiceError;
|
|
|
|
//
|
|
// Globals
|
|
//
|
|
var vArgs = null;
|
|
var g_numTries = 0;
|
|
var g_bChatBoxHidden = false;
|
|
var g_bNewBinaries = false;
|
|
var g_bUserDisconnect = false;
|
|
var g_bChatMode = true;
|
|
var g_bConnected = false;
|
|
var g_bRC = false;
|
|
var g_bNewLine = false;
|
|
var g_szLocalUser = null;
|
|
|
|
var g_bVoipConnected = false;
|
|
var g_bVoipOn = false;
|
|
var g_bStartEnabled = true;
|
|
|
|
var g_szVoipIPList = null;
|
|
var g_szVoipKey = null;
|
|
|
|
var g_stateVoipMe = 0; // server
|
|
var g_stateVoipYou = 0; // client
|
|
|
|
var g_VoipBandwidth = 0; // Start at Low (0 = Low, 1 = High)
|
|
//var oSAFClassFactory = parent.pchealth;
|
|
|
|
// States
|
|
//---------------
|
|
// 0 = unknown
|
|
// 1 = good
|
|
// 2 = bad
|
|
|
|
|
|
g_bDebug = false; // Enable Tracing
|
|
|
|
function document.onkeydown()
|
|
{
|
|
TraceFunctEnter("onkeydown");
|
|
|
|
try
|
|
{
|
|
if (window.event.keyCode==8)
|
|
{
|
|
window.event.returnValue=false;
|
|
}
|
|
}
|
|
catch(error)
|
|
{
|
|
// ignore
|
|
DebugTrace("Error: " + error.description + " Number: " + error.number);
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function PostInit()
|
|
{
|
|
TraceFunctEnter("PostInit");
|
|
try
|
|
{
|
|
//
|
|
// GetLocalUser
|
|
//
|
|
GetLocalUser();
|
|
|
|
//
|
|
// Initialize VoIP
|
|
//
|
|
InitVoIP();
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
}
|
|
|
|
function ResizeUI()
|
|
{
|
|
try
|
|
{
|
|
idCtx.setWindowDimensions( idCtx.x, idCtx.y, c_RCChatWidth, c_RCChatHeight);
|
|
}
|
|
catch(error)
|
|
{
|
|
// ignore
|
|
}
|
|
}
|
|
|
|
//
|
|
// InitiateRCSession: Initiates the RC Session
|
|
//
|
|
function InitiateRCSession()
|
|
{
|
|
try
|
|
{
|
|
g_bConnected = true;
|
|
|
|
//
|
|
// Initialization
|
|
//
|
|
InitTrace();
|
|
TraceFunctEnter("InitiateRCSession");
|
|
|
|
frames.idFrameTools.InitRAServerToolBar();
|
|
|
|
if( (idCtx.width != c_RCChatWidth ) || ( idCtx.height != c_RCChatHeight ))
|
|
{
|
|
ResizeUI();
|
|
}
|
|
|
|
g_Helpee_oSAFRemoteDesktopSession = parent.oRCSession;
|
|
|
|
if( parent.gFrom.length > 0 )
|
|
{
|
|
g_szLocalUser = parent.gFrom;
|
|
}
|
|
else
|
|
{
|
|
oDeskMgr = parent.pchealth.CreateObject_RemoteDesktopManager();
|
|
userHelpBlob = oDeskMgr.userHelpBlob;
|
|
obj = new ActiveXObject( "SAFRCFileDlg.RASetting" );
|
|
var sIsIM = obj.GetPropertyInBlob(userHelpBlob, "IM");
|
|
if(sIsIM == "1")
|
|
{
|
|
var oMsgr = new ActiveXObject("Messenger.UIAutomation");
|
|
g_szLocalUser = oMsgr.MyFriendlyName;
|
|
parent.gFrom = g_szLocalUser;
|
|
}
|
|
else
|
|
{
|
|
g_szLocalUser = GetLocalUser();
|
|
}
|
|
}
|
|
|
|
DebugTrace("g_szLocalUser: " + g_szLocalUser);
|
|
DebugTrace("parent.gFrom: " + parent.gFrom);
|
|
}
|
|
catch(error)
|
|
{
|
|
//
|
|
// Fatal Error: Unable to initialize
|
|
//
|
|
FatalError( L_RCCTL_Text, error );
|
|
return;
|
|
}
|
|
|
|
|
|
//
|
|
// Initialize the Helpee End SALEM Objects
|
|
//
|
|
Init_Helpee_SALEM();
|
|
|
|
try
|
|
{
|
|
setTimeout('PostInit()', 1000);
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
//
|
|
// Security Check
|
|
//
|
|
function DoLoad()
|
|
{
|
|
var L_ERRACCESSDENIED_Text = "Directly launching this page is not allowed. ";
|
|
|
|
MAC_IF_DIRECTLAUNCH_SERVER
|
|
{
|
|
idBody.style.visibility = "hidden";
|
|
alert( L_ERRACCESSDENIED_Text );
|
|
return;
|
|
}
|
|
}
|
|
|
|
//
|
|
// Control Channel Stuff
|
|
//
|
|
/*++
|
|
HELPEE End of the Control Channel
|
|
--*/
|
|
|
|
//
|
|
// Helpee_ControlChannelDataReadyEventHandler: Call back to handle control data from helper
|
|
//
|
|
function Helpee_ControlChannelDataReadyEventHandler()
|
|
{
|
|
TraceFunctEnter("Helpee_ControlChannelDataReadyEventHandler");
|
|
var ControlData = null;
|
|
|
|
try
|
|
{
|
|
//
|
|
// Data on control channel
|
|
//
|
|
ControlData = g_Helpee_oControlChannel.ReceiveChannelData();
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
}
|
|
|
|
//
|
|
// Parse the data sent on the control channel
|
|
//
|
|
Helpee_ParseControlData ( ControlData );
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
|
|
var g_oDeskMgr = null;
|
|
var nRAType = 0;
|
|
|
|
//
|
|
// Helpee_ParseControlData: Parse the data sent on the control channel at the helpee end
|
|
//
|
|
function Helpee_ParseControlData ( ControlData )
|
|
{
|
|
TraceFunctEnter("Helpee_ParseControlData");
|
|
var Doc = new ActiveXObject("microsoft.XMLDOM");
|
|
var RCCommand = null;
|
|
var szCommandName = null;
|
|
|
|
var L_ERRTAKECONTROL3_Text = "Your screen resolution has been changed, which caused ";
|
|
var L_ERRTAKECONTROL4_Text = " to lose keyboard and mouse control of your computer. ";
|
|
var L_ERRTAKECONTROL5_Text = " can request control of your computer again and resume the session. ";
|
|
|
|
|
|
try
|
|
{
|
|
if ( true == parent.gIsURA )
|
|
{
|
|
nRAType = 1;
|
|
}
|
|
else
|
|
{
|
|
nRAType = 0;
|
|
}
|
|
|
|
DebugTrace("Calling idCtx.bringToForeground");
|
|
idCtx.minimized = false;
|
|
idCtx.bringToForeground();
|
|
|
|
DebugTrace("Calling loadXML on : " + ControlData);
|
|
if( false == Doc.loadXML( ControlData ))
|
|
{
|
|
FatalError ( Doc.parseError.reason );
|
|
}
|
|
|
|
//
|
|
// Get the RCCOMMAND node
|
|
//
|
|
RCCommand = Doc.documentElement;
|
|
|
|
//
|
|
// Get the NAME of the command
|
|
//
|
|
szCommandName = RCCommand.getAttribute( c_szRCCommandName );
|
|
|
|
DebugTrace("szCommandName: " + szCommandName );
|
|
|
|
if( szCommandName == c_szFileXfer )
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
//
|
|
// File Transfer Initiation
|
|
//
|
|
var vArgs = new Array(13);
|
|
|
|
vArgs[0] = 1; // Destination Mode
|
|
vArgs[1] = g_Helpee_oControlChannel; // Control Channel
|
|
vArgs[2] = g_Helpee_oSAFRemoteDesktopChannelMgr; // Channel Manager
|
|
vArgs[3] = RCCommand.getAttribute( c_szFileName ); // FILENAME
|
|
vArgs[4] = RCCommand.getAttribute( c_szFileSize ); // FILESIZE
|
|
vArgs[5] = RCCommand.getAttribute( c_szChannelId ); // CHANNELID
|
|
vArgs[6] = new ActiveXObject("Scripting.FileSystemObject"); // File system object
|
|
vArgs[7] = new ActiveXObject("SAFRCFileDlg.FileSave"); // Save As dialog object
|
|
vArgs[8] = oSAFClassFactory; // SAF ClassFactory object
|
|
vArgs[9] = parent.gHelper; // Sender
|
|
|
|
// Logging DCR - Sending in a reference to the RAEventLog object
|
|
//
|
|
vArgs[10] = new ActiveXObject("RACplDlg.RAEventLog");
|
|
vArgs[11] = parent.gHelperIP;
|
|
vArgs[12] = g_szLocalUser;
|
|
|
|
DebugTrace("Launching c_szFileXferURL...");
|
|
var subWin = window.showModelessDialog( c_szFileXferURL, vArgs, "dialogwidth:" + c_FileXferWidth + "px;dialogHeight:" + c_FileXferHeight + "px;status:no;resizable:no;help:no");
|
|
AddOpenSubWin( subWin );
|
|
|
|
}
|
|
else if ( szCommandName == c_szExpertIP )
|
|
{
|
|
// Grab the Expert IP Address and store it in a global variable
|
|
parent.gHelperIP = RCCommand.getAttribute( c_szExpertIPDATA );
|
|
|
|
}
|
|
else if ( szCommandName == c_szRemoteCtrlStart )
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
//
|
|
// Remote Control initiation
|
|
//
|
|
DebugTrace("Reading RA settings...");
|
|
var oRARegSetting = new ActiveXObject("RACplDlg.RARegSetting");
|
|
|
|
|
|
var bAllowFullControl = 0;
|
|
|
|
if( false == parent.gIsURA )
|
|
{
|
|
bAllowFullControl = oRARegSetting.AllowFullControl;
|
|
}
|
|
else
|
|
{
|
|
bAllowFullControl = oRARegSetting.AllowUnSolicitedFullControl;
|
|
}
|
|
|
|
DebugTrace("bAllowFullControl: " + bAllowFullControl);
|
|
|
|
if( 1 == bAllowFullControl )
|
|
{
|
|
DebugTrace("Expert is allowed to take control");
|
|
var vArgs = new Array(1);
|
|
vArgs[0] = parent.gHelperName; // Helper
|
|
|
|
DebugTrace("Launching TakeControlMsgs.htm...");
|
|
#ifdef _BVT
|
|
var vRetVal = 0;
|
|
if( true == parent.gBVT )
|
|
{
|
|
vRetVal = 0;
|
|
}
|
|
else
|
|
{
|
|
vRetVal = window.showModalDialog( "TakeControlMsgs.htm", vArgs, c_szTakeControlSpecs );
|
|
}
|
|
#else
|
|
var vRetVal = window.showModalDialog( "TakeControlMsgs.htm", vArgs, c_szTakeControlSpecs );
|
|
#endif
|
|
DebugTrace("vRetVal: " + vRetVal);
|
|
if( 0 == vRetVal)
|
|
{
|
|
DebugTrace("Novice accepted request for Remote control");
|
|
//
|
|
// Helpee accepts RC request
|
|
//
|
|
try
|
|
{
|
|
if(null == g_objPanic)
|
|
{
|
|
DebugTrace("Instantiating: " + szProgIDPanic );
|
|
g_objPanic = new ActiveXObject( szProgIDPanic );
|
|
}
|
|
|
|
DebugTrace("Calling SetPanicHook");
|
|
g_objPanic.SetPanicHook(Stop_Control);
|
|
|
|
if(null != parent.oDeskMgr )
|
|
{
|
|
DebugTrace("Calling SwitchDesktopMode with argument=1");
|
|
try
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 1, nRAType );
|
|
}
|
|
catch(error)
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 1 );
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if( null == g_oDeskMgr )
|
|
{
|
|
DebugTrace("g_oDeskMgr is null. Calling CreateObject_RemoteDesktopManager...");
|
|
g_oDeskMgr = oSAFClassFactory.CreateObject_RemoteDesktopManager();
|
|
}
|
|
|
|
DebugTrace("Calling SwitchDesktopMode with argument=1");
|
|
try
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 1, nRAType );
|
|
}
|
|
catch(error)
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 1 );
|
|
}
|
|
}
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.idStopControl.disabled = false;
|
|
frames.idFrameTools.RejectId.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "idStopControl" );
|
|
#endif
|
|
g_bRC = true;
|
|
Helpee_AcceptRC();
|
|
frames.idFrameTools.UpdateStatus( L_INCONTROL_Text );
|
|
|
|
var szMsg = L_TAKECONTROL1_Text + parent.gHelper + L_TAKECONTROL2_Text + g_szLocalUser + L_TAKECONTROL3_Text;
|
|
frames.idFrameChatTop.PrintTakeControlMsg( szMsg );
|
|
DebugTrace("Remote control obtained...");
|
|
|
|
// Log to the event log (event 3)
|
|
try
|
|
{
|
|
var oLogger = new ActiveXObject("RACplDlg.RAEventLog");
|
|
|
|
var args = new Array(2);
|
|
args[0] = parent.gHelper;
|
|
args[1] = g_szLocalUser;
|
|
|
|
// Novice side
|
|
oLogger.LogRemoteAssistanceEvent(0,3,args);
|
|
}
|
|
catch(e)
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
#ifdef _BVT
|
|
if( true == parent.gBVT )
|
|
{
|
|
Helpee_SendControlCommand( c_szBVTPASS );
|
|
}
|
|
#endif
|
|
}
|
|
catch(error)
|
|
{
|
|
DebugTrace("Error: " + error.description + " Number: " + error.number);
|
|
#ifdef _BVT
|
|
if( true == parent.gBVT )
|
|
{
|
|
Helpee_SendControlCommand( c_szBVTFAIL );
|
|
}
|
|
#endif
|
|
if(error.number == -2146828218)
|
|
{
|
|
//
|
|
// send reject to helper. Access denied
|
|
//
|
|
DebugTrace("Calling Helpee_RejectRC with argument=2");
|
|
Helpee_RejectRC( 2 );
|
|
}
|
|
else
|
|
{
|
|
Helpee_RejectRC( 3 );
|
|
FatalError( L_ERRSWITCHDESKTOPMODE_Text, error);
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
DebugTrace("Novice rejected request for Remote control. Calling Helpee_RejectRC with argument=0");
|
|
//
|
|
// send reject to helper. Access denied
|
|
//
|
|
Helpee_RejectRC( 0 );
|
|
#ifdef _BVT
|
|
if( true == parent.gBVT )
|
|
{
|
|
Helpee_SendControlCommand( c_szBVTFAIL );
|
|
}
|
|
#endif
|
|
}
|
|
|
|
}
|
|
else
|
|
{
|
|
DebugTrace("Expert is NOT allowed to take control. Calling Helpee_RejectRC with argument=2");
|
|
|
|
//
|
|
// Helpee rejects RC request
|
|
//
|
|
|
|
//
|
|
// send reject to helper
|
|
//
|
|
Helpee_RejectRC( 2 );
|
|
#ifdef _BVT
|
|
if( true == parent.gBVT )
|
|
{
|
|
Helpee_SendControlCommand( c_szBVTFAIL );
|
|
}
|
|
#endif
|
|
}
|
|
|
|
}
|
|
else if ( szCommandName == c_szRemoteCtrlEnd )
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
//
|
|
// End of Remote Control
|
|
//
|
|
|
|
// Log event log (event 4)
|
|
try
|
|
{
|
|
var oLogger = new ActiveXObject("RACplDlg.RAEventLog");
|
|
|
|
var args = new Array(2);
|
|
args[0] = parent.gHelper;
|
|
args[1] = g_szLocalUser;
|
|
|
|
// novice
|
|
oLogger.LogRemoteAssistanceEvent(0,4,args);
|
|
}
|
|
catch(e)
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
try
|
|
{
|
|
if(null != parent.oDeskMgr )
|
|
{
|
|
DebugTrace("Calling SwitchDesktopMode with argument=0");
|
|
try
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0, nRAType );
|
|
}
|
|
catch(error)
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0 );
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if( null == g_oDeskMgr )
|
|
{
|
|
DebugTrace("g_oDeskMgr is null. Calling CreateObject_RemoteDesktopManager...");
|
|
g_oDeskMgr = oSAFClassFactory.CreateObject_RemoteDesktopManager();
|
|
}
|
|
|
|
DebugTrace("Calling SwitchDesktopMode with argument=0");
|
|
try
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0, nRAType );
|
|
}
|
|
catch(error)
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0 );
|
|
}
|
|
}
|
|
|
|
frames.idFrameTools.UpdateStatus( L_SCREENVIEWONLY_Text );
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.idStopControl.disabled = true;
|
|
frames.idFrameTools.RejectId.disabled = true;
|
|
#else
|
|
frames.idFrameTools.DisableButton( "idStopControl" );
|
|
#endif
|
|
g_bRC = false;
|
|
if (null != g_objPanic)
|
|
{
|
|
DebugTrace("Calling ClearPanicHook");
|
|
g_objPanic.ClearPanicHook();
|
|
}
|
|
|
|
DebugTrace("Remote control is now closed");
|
|
#ifdef _BVT
|
|
Helpee_SendControlCommand( c_szBVTPASS );
|
|
#endif
|
|
}
|
|
catch(error)
|
|
{
|
|
DebugTrace("Error: " + error.description + " Number: " + error.number);
|
|
if(error.number != -2146828218)
|
|
{
|
|
FatalError( L_ERRSWITCHDESKTOPMODE_Text + error);
|
|
}
|
|
#ifdef _BVT
|
|
if( true == parent.gBVT )
|
|
{
|
|
Helpee_SendControlCommand( c_szBVTFAIL );
|
|
}
|
|
#endif
|
|
}
|
|
}
|
|
else if( szCommandName == c_szAbortRC)
|
|
{
|
|
var szMsg = L_ERRTAKECONTROL3_Text + parent.gHelper + L_ERRTAKECONTROL4_Text + parent.gHelper + L_ERRTAKECONTROL5_Text;
|
|
DisplayMessage( szMsg );
|
|
}
|
|
else if ( szCommandName == c_szHIDECHAT )
|
|
{
|
|
//
|
|
// Forcibly hide the Chat Box
|
|
//
|
|
g_bChatBoxHidden = false;
|
|
frames.idFrameTools.Helpee_HideChat();
|
|
}
|
|
else if ( szCommandName == c_szSHOWCHAT )
|
|
{
|
|
//
|
|
// Forcibly show the Chat Box
|
|
//
|
|
g_bChatBoxHidden = true;
|
|
|
|
frames.idFrameTools.Helpee_HideChat();
|
|
}
|
|
// PreGo
|
|
else if (szCommandName == c_szVoipPreGo)
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
if (false == g_bVoIPEnabled)
|
|
return;
|
|
|
|
try
|
|
{
|
|
|
|
// This message means that the Helpee(Server) has called Start(). So we need to call start
|
|
// and send an ack back to the Helpee
|
|
|
|
// Put up a Dialog to see if the helpee wants to 'GO VOICE!'
|
|
var vArgs = new Array(1);
|
|
vArgs[0] = L_VOIPSTART_Text; // Message
|
|
|
|
var vRetVal = window.showModalDialog( c_szVOIPMsgURL, vArgs, c_szMsgSpecs );
|
|
|
|
if( 0 == vRetVal)
|
|
{
|
|
//
|
|
// Helper accepts Voice request
|
|
//
|
|
var szTemp = null;
|
|
|
|
try
|
|
{
|
|
// call Listen() and save the key
|
|
szTemp = g_Helpee_oSAFIntercomServer.Listen();
|
|
|
|
// We succeeded so send a message to the Helpee/Server
|
|
Helpee_TransmitVoipGo(c_szVoipVersion2, szTemp);
|
|
|
|
}
|
|
catch (e)
|
|
{
|
|
|
|
// Call Helpee_onVoiceDisabled() -
|
|
//
|
|
// Disabling voice in the case that Listen fails
|
|
|
|
Helpee_onVoiceDisabled(); }
|
|
|
|
}
|
|
else
|
|
{
|
|
//
|
|
// Helpee rejects Voice request
|
|
//
|
|
|
|
Helpee_SendControlCommand( c_szVoipQNo );
|
|
|
|
// ungray the voice button
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
g_bStartEnabled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
catch (error)
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
}
|
|
// QNo
|
|
else if (szCommandName == c_szVoipQNo)
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
if (false == g_bVoIPEnabled)
|
|
{
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
try
|
|
{
|
|
DisplayMessage( L_ERRVOIP1_Text );
|
|
|
|
// ungray the voice button
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
g_bStartEnabled = true;
|
|
|
|
}
|
|
catch (e)
|
|
{
|
|
FatalError(L_RCCTL_Text, e );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
}
|
|
// GoNo
|
|
else if (szCommandName == c_szVoipGoNo)
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
if (false == g_bVoIPEnabled)
|
|
{
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
try
|
|
{
|
|
DisplayMessage( L_ERRVOIP1_Text );
|
|
|
|
// ungray the voice button
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
|
|
g_bStartEnabled = true;
|
|
|
|
}
|
|
catch (e)
|
|
{
|
|
FatalError( L_RCCTL_Text, e );
|
|
return;
|
|
}
|
|
}
|
|
// GoFail
|
|
else if (szCommandName == c_szVoipGoFail)
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
if (false == g_bVoIPEnabled)
|
|
{
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
try
|
|
{
|
|
DisplayMessage( L_ERRVOIP1_Text );
|
|
|
|
// ungray the voice button
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
|
|
g_bStartEnabled = true;
|
|
|
|
}
|
|
catch (e)
|
|
{
|
|
FatalError( L_RCCTL_Text, e );
|
|
}
|
|
}
|
|
// PreGo2
|
|
else if (szCommandName == c_szVoipPreGo2)
|
|
{
|
|
if (false == g_bVoIPEnabled)
|
|
{
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
try
|
|
{
|
|
var szTemp = null;
|
|
|
|
szTemp = g_Helpee_oSAFIntercomServer.Listen();
|
|
|
|
Helpee_TransmitVoipGo(c_szVoipVersion2, szTemp);
|
|
}
|
|
catch (e)
|
|
{
|
|
// Call Helpee_onVoiceDisabled() -
|
|
//
|
|
// Disabling voice in the case that Listen fails
|
|
|
|
Helpee_onVoiceDisabled();
|
|
|
|
}
|
|
}
|
|
// PreStartYes
|
|
else if (szCommandName == c_szVoipPreStartYes)
|
|
{
|
|
if (false == g_bVoIPEnabled)
|
|
return;
|
|
|
|
if (false == g_bVoipConnected)
|
|
{
|
|
// Start Voice and send a message to the Helpee(Server) so it also starts.
|
|
//
|
|
try
|
|
{
|
|
// Send a message to 1. Ask for Voip and 2. if yes, call Listen and continue
|
|
|
|
Helpee_SendControlCommand ( c_szVoipPreGo );
|
|
|
|
}
|
|
catch (e)
|
|
{
|
|
FatalError( L_RCCTL_Text, e );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
|
|
//
|
|
// This is the case where Voice is active. Stop it.
|
|
// No message needs to be sent because the onVoiceDisconnected event will fire
|
|
try
|
|
{
|
|
|
|
g_Helpee_oSAFIntercomServer.Disconnect();
|
|
|
|
}
|
|
catch (e)
|
|
{
|
|
// Ungray the voice button
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
|
|
// start accepting StartPending messages
|
|
g_bStartEnabled = true;
|
|
|
|
}
|
|
}
|
|
}
|
|
// PreStartNo
|
|
else if (szCommandName == c_szVoipPreStartNo)
|
|
{
|
|
if (false == g_bVoIPEnabled)
|
|
{
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
// This means, that a connection transaction has already been established the opposite direction
|
|
|
|
try
|
|
{
|
|
|
|
// Enable Start
|
|
g_bStartEnabled = true;
|
|
|
|
// Ungray the voice button
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
}
|
|
catch (error)
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
}
|
|
// PreStart
|
|
else if (szCommandName == c_szVoipPreStart)
|
|
{
|
|
if (false == g_bVoIPEnabled)
|
|
return;
|
|
try
|
|
{
|
|
|
|
// This message Starts the connection transaction
|
|
|
|
// gray the voice button - so that we can't click on it also
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = true;
|
|
frames.idFrameTools.txtVoice.disabled = true;
|
|
#else
|
|
frames.idFrameTools.DisableButton( "btnVoice" );
|
|
#endif
|
|
|
|
if (false == g_bStartEnabled )
|
|
{
|
|
#ifndef _HSSTOOLBAR
|
|
// ungray the voice button
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
// Start is not enables, send PreStartNo
|
|
Helpee_SendControlCommand ( c_szVoipPreStartNo );
|
|
}
|
|
else
|
|
{
|
|
// it's ok - send PreStartYes
|
|
Helpee_SendControlCommand ( c_szVoipPreStartYes );
|
|
|
|
}
|
|
|
|
}
|
|
catch ( error )
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
}
|
|
// VoipDisable
|
|
else if (szCommandName == c_szVoipDisable)
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
try
|
|
{
|
|
if (g_bVoIPEnabled == true)
|
|
{
|
|
DisplayMessage( L_ERRVOIP2_Text );
|
|
|
|
// disable VoIP
|
|
g_bVoIPEnabled = false;
|
|
|
|
// set you to bad
|
|
g_stateVoipYou = 2;
|
|
|
|
// Gray the button
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = true;
|
|
frames.idFrameTools.txtVoice.disabled = true;
|
|
#else
|
|
frames.idFrameTools.DisableButton( "btnVoice" );
|
|
#endif
|
|
}
|
|
}
|
|
catch ( error )
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
}
|
|
// VoipWizardGood
|
|
else if (szCommandName == c_szVoipWizardGood)
|
|
{
|
|
try
|
|
{
|
|
// set you to good
|
|
g_stateVoipYou = 1;
|
|
|
|
// check to see if we can enable voice
|
|
if ( (g_stateVoipYou < 2) && (g_stateVoipMe < 2) )
|
|
{
|
|
// ungray voice button
|
|
g_bVoIPEnabled = true;
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = false;
|
|
frames.idFrameTools.txtVoice.disabled = false;
|
|
#else
|
|
frames.idFrameTools.EnableButton( "btnVoice" );
|
|
#endif
|
|
}
|
|
|
|
}
|
|
catch (error)
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
}
|
|
// VoipWizardBad
|
|
else if (szCommandName == c_szVoipWizardBad)
|
|
{
|
|
DebugTrace("Calling SoundBeep");
|
|
SoundBeep();
|
|
|
|
try
|
|
{
|
|
g_bVoIPEnabled = false;
|
|
DisplayMessage( L_ERRVOIP2_Text );
|
|
|
|
// set you to bad
|
|
g_stateVoipYou = 2;
|
|
|
|
// gray button
|
|
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.btnVoice.disabled = true;
|
|
frames.idFrameTools.txtVoice.disabled = true;
|
|
#else
|
|
frames.idFrameTools.DisableButton( "btnVoice" );
|
|
#endif
|
|
|
|
}
|
|
catch (error)
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
}
|
|
else if ( szCommandName == c_szHelperVersion )
|
|
{
|
|
if( true == g_bVersionCheckEnforced )
|
|
{
|
|
//
|
|
// VERSION Check
|
|
//
|
|
var szSchemaVersion = null;
|
|
var szControlChannelVersion = null;
|
|
try
|
|
{
|
|
szSchemaVersion = RCCommand.getAttribute( c_szSchema );
|
|
|
|
if( szSchemaVersion != c_szSchemaVersion )
|
|
{
|
|
//
|
|
// Schema Versions differ.
|
|
//
|
|
FatalError(L_ERRSCHEMAVERSION_Text);
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
}
|
|
catch(error)
|
|
{
|
|
//
|
|
// Our Helpee has an older version
|
|
//
|
|
FatalError(L_ERRSCHEMAVERSION_Text);
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
try
|
|
{
|
|
szControlChannelVersion = RCCommand.getAttribute( c_szControlChannel );
|
|
|
|
if( szControlChannelVersion != c_szControlChannelVersion )
|
|
{
|
|
//
|
|
// Control Channel Versions differ.
|
|
//
|
|
FatalError(L_ERRCHANNELVERSION_Text);
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
}
|
|
catch(error)
|
|
{
|
|
//
|
|
// Our Helpee has an older version
|
|
//
|
|
FatalError(L_ERRSCHEMAVERSION_Text);
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
// VoipBandwidthToHigh
|
|
else if (szCommandName == c_szVoipBandwidthToHigh)
|
|
{
|
|
g_VoipBandwidth = 1;
|
|
|
|
// Set the SamplingRate property
|
|
g_Helpee_oSAFIntercomServer.SamplingRate = 2;
|
|
|
|
}
|
|
// VoipBandwidthToLow
|
|
else if (szCommandName == c_szVoipBandwidthToLow)
|
|
{
|
|
g_VoipBandwidth = 0;
|
|
|
|
// Set the SamplingRate property
|
|
g_Helpee_oSAFIntercomServer.SamplingRate = 1;
|
|
|
|
}
|
|
else if( szCommandName == c_szTYPINGSTART )
|
|
{
|
|
frames.idFrameTools.UpdateChatStatus( L_EXPERTTYPING_Text );
|
|
//frames.idFrameChatTop.SetFocus();
|
|
}
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_ERRFATAL_Text, error );
|
|
#ifdef _BVT
|
|
if( true == parent.gBVT )
|
|
{
|
|
Helpee_SendControlCommand( c_szBVTFAIL );
|
|
}
|
|
#endif
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
//
|
|
// Helpee_SendControlCommand: Routine to send a control command across to the helper
|
|
//
|
|
function Helpee_SendControlCommand( szCommandName )
|
|
{
|
|
TraceFunctEnter("Helper_SendControlCommand");
|
|
var Doc = null;
|
|
var RCCommand = null;
|
|
|
|
try
|
|
{
|
|
//
|
|
// Create an XML document
|
|
//
|
|
Doc = new ActiveXObject("microsoft.XMLDOM");
|
|
|
|
//
|
|
// Create the RCCOMMAND root node
|
|
//
|
|
RCCommand = Doc.createElement( c_szRCCommand );
|
|
|
|
//
|
|
// Set the NAME attribute to szCommandName
|
|
//
|
|
RCCommand.setAttribute( c_szRCCommandName, szCommandName );
|
|
|
|
//
|
|
// Send control message to other end
|
|
//
|
|
g_Helpee_oControlChannel.SendChannelData( RCCommand.xml );
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_RCCTL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
//
|
|
// Helpee_TransmitVoipGo: Sends the Cryptographically Generated Key to the expert/client side
|
|
//
|
|
function Helpee_TransmitVoipGo(version, szTemp)
|
|
{
|
|
TraceFunctEnter("TransmitCryptKey");
|
|
var Doc = null;
|
|
var RCCommand = null;
|
|
|
|
var szVoipKey = null;
|
|
var szVoipIPList = null;
|
|
|
|
var i = 0;
|
|
|
|
try
|
|
{
|
|
|
|
// Parse out the key and the iplist
|
|
i = szTemp.indexOf(";")
|
|
if (i == -1)
|
|
{
|
|
// Somehow you are running an old version of the Intercom objects
|
|
// act like the old version of the script
|
|
szVoipKey = szTemp;
|
|
szVoipIPList = null;
|
|
|
|
}
|
|
else
|
|
{
|
|
// grab the Key part of the string
|
|
szVoipKey = szTemp.slice(0,i);
|
|
szVoipIPList = szTemp.slice(i+1);
|
|
|
|
}
|
|
|
|
//
|
|
// Create an XML document
|
|
//
|
|
Doc = new ActiveXObject("microsoft.XMLDOM");
|
|
|
|
//
|
|
// Create the RCCOMMAND root node
|
|
//
|
|
RCCommand = Doc.createElement( c_szRCCommand );
|
|
|
|
//
|
|
// Set the NAME attribute to VoipGo
|
|
//
|
|
RCCommand.setAttribute( c_szRCCommandName, c_szVoipGo );
|
|
|
|
//
|
|
// Set the VOIP Version
|
|
//
|
|
RCCommand.setAttribute( c_szVoipVer, version );
|
|
|
|
//
|
|
// Set the VOIPGOKEY Attribute
|
|
//
|
|
RCCommand.setAttribute( c_szVoipGoKey, szVoipKey );
|
|
|
|
//
|
|
// Set the c_szVoipIPList Attribute
|
|
//
|
|
RCCommand.setAttribute( c_szVoipIPList, szVoipIPList );
|
|
|
|
//
|
|
// Send the XML across
|
|
//
|
|
g_Helpee_oControlChannel.SendChannelData( RCCommand.xml );
|
|
}
|
|
catch (e)
|
|
{
|
|
FatalError( L_ERRFATAL_Text, e );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
|
|
//
|
|
// Helpee_TransmitScreenInfo: Sends the user's screen resolution to the expert
|
|
//
|
|
function Helpee_TransmitScreenInfo()
|
|
{
|
|
TraceFunctEnter("TransmitScreenInfo");
|
|
var Doc = null;
|
|
var RCCommand = null;
|
|
|
|
try
|
|
{
|
|
//
|
|
// Create an XML document
|
|
//
|
|
Doc = new ActiveXObject("microsoft.XMLDOM");
|
|
|
|
//
|
|
// Create the RCCOMMAND root node
|
|
//
|
|
RCCommand = Doc.createElement( c_szRCCommand );
|
|
|
|
//
|
|
// Set the NAME attribute to SCREENINFO
|
|
//
|
|
RCCommand.setAttribute( c_szRCCommandName, c_szScreenInfo );
|
|
|
|
//
|
|
// Set the WIDTH attribute
|
|
//
|
|
RCCommand.setAttribute( c_szWidth, screen.width );
|
|
|
|
//
|
|
// Set the HEIGHT attribute
|
|
//
|
|
RCCommand.setAttribute( c_szHeight, screen.height );
|
|
|
|
//
|
|
// Set the COLORDEPTH attribute
|
|
//
|
|
RCCommand.setAttribute( c_szColorDepth, screen.colorDepth );
|
|
|
|
//
|
|
// Set the SCHEMAVERSION attribute
|
|
//
|
|
RCCommand.setAttribute( c_szSchema, c_szSchemaVersion );
|
|
|
|
//
|
|
// Set the CONTROLCHANNELVERSION attribute
|
|
//
|
|
RCCommand.setAttribute( c_szControlChannel, c_szControlChannelVersion );
|
|
|
|
//
|
|
// Send the XML across
|
|
//
|
|
g_Helpee_oControlChannel.SendChannelData( RCCommand.xml );
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
function Stop_Control()
|
|
{
|
|
try
|
|
{
|
|
//
|
|
// Stop Control
|
|
//
|
|
|
|
// Log event log (event 4)
|
|
try
|
|
{
|
|
var oLogger = new ActiveXObject("RACplDlg.RAEventLog");
|
|
|
|
var args = new Array(2);
|
|
args[0] = parent.gHelper;
|
|
args[1] = g_szLocalUser;
|
|
|
|
// novice
|
|
oLogger.LogRemoteAssistanceEvent(0,4,args);
|
|
}
|
|
catch(e)
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
Helpee_SendControlCommand( c_szEscRC );
|
|
try
|
|
{
|
|
try
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0, nRAType );
|
|
}
|
|
catch(error)
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0 );
|
|
}
|
|
frames.idFrameTools.UpdateStatus( L_SCREENVIEWONLY_Text );
|
|
}
|
|
catch(error)
|
|
{
|
|
Helpee_RejectRC( 3 );
|
|
FatalError( L_ERRSWITCHDESKTOPMODE_Text , error);
|
|
}
|
|
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.idStopControl.disabled = true;
|
|
frames.idFrameTools.RejectId.disabled = true;
|
|
#else
|
|
frames.idFrameTools.DisableButton( "idStopControl" );
|
|
#endif
|
|
|
|
if (null != g_objPanic)
|
|
{
|
|
g_objPanic.ClearPanicHook();
|
|
}
|
|
|
|
//
|
|
// Tell User what he did !!
|
|
//
|
|
idCtx.minimized = false;
|
|
idCtx.bringToForeground();
|
|
|
|
var vArgs = new Array(1);
|
|
vArgs[0] = parent.gFrom + L_OR_Text + parent.gHelperName + L_ESCHIT_Text; // Message
|
|
var vRetVal = window.showModelessDialog( c_szMsgURL, vArgs, c_szMsgSpecs );
|
|
AddOpenSubWin( vRetVal );
|
|
}
|
|
catch(error)
|
|
{
|
|
Helpee_RejectRC( 3 );
|
|
FatalError( L_ERRFATAL_Text, error );
|
|
}
|
|
}
|
|
|
|
//
|
|
// Helpee_RejectRC: Sends a reject to the helper
|
|
//
|
|
function Helpee_RejectRC( mode )
|
|
{
|
|
TraceFunctEnter("Helpee_RejectRC");
|
|
|
|
try
|
|
{
|
|
if( false == g_bConnected )
|
|
{
|
|
//
|
|
// Not connected or Stop Control btn is disabled
|
|
//
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
switch (mode) {
|
|
case 0:
|
|
//
|
|
// Reject
|
|
//
|
|
Helpee_SendControlCommand( c_szRejectRC );
|
|
break;
|
|
|
|
case 1:
|
|
//
|
|
// Stop Control
|
|
//
|
|
|
|
// Log event log (event 4)
|
|
try
|
|
{
|
|
var oLogger = new ActiveXObject("RACplDlg.RAEventLog");
|
|
|
|
var args = new Array(2);
|
|
args[0] = parent.gHelper;
|
|
args[1] = g_szLocalUser;
|
|
|
|
// novice
|
|
oLogger.LogRemoteAssistanceEvent(0,4,args);
|
|
}
|
|
catch(e)
|
|
{
|
|
// do nothing
|
|
}
|
|
|
|
Helpee_SendControlCommand( c_szTakeControl );
|
|
try
|
|
{
|
|
try
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0, nRAType );
|
|
}
|
|
catch(error)
|
|
{
|
|
parent.oDeskMgr.SwitchDesktopMode( 0 );
|
|
}
|
|
frames.idFrameTools.UpdateStatus( L_SCREENVIEWONLY_Text );
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_ERRSWITCHDESKTOPMODE_Text , error);
|
|
}
|
|
if (null != g_objPanic)
|
|
{
|
|
g_objPanic.ClearPanicHook();
|
|
}
|
|
break;
|
|
|
|
case 2:
|
|
//
|
|
// Policy denies Remote Control
|
|
//
|
|
Helpee_SendControlCommand( c_szDeniedRC );
|
|
|
|
var vArgs = new Array(1);
|
|
vArgs[0] = L_ERRRCPERMDENIED_Text; // Message
|
|
|
|
var vRetVal = window.showModelessDialog( c_szMsgURL, vArgs, c_szMsgSpecs );
|
|
AddOpenSubWin( vRetVal );
|
|
|
|
break;
|
|
|
|
case 3:
|
|
//
|
|
// Hit a Error Switching Desktop
|
|
//
|
|
Helpee_SendControlCommand( c_szErrorRC );
|
|
break;
|
|
}
|
|
|
|
#ifndef _HSSTOOLBAR
|
|
frames.idFrameTools.idStopControl.disabled = true;
|
|
frames.idFrameTools.RejectId.disabled = true;
|
|
#else
|
|
frames.idFrameTools.DisableButton( "idStopControl" );
|
|
#endif
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
|
|
//
|
|
// Helpee_AcceptRC: Sends an accept to the helper
|
|
//
|
|
function Helpee_AcceptRC()
|
|
{
|
|
TraceFunctEnter("Helpee_AcceptRC");
|
|
|
|
try
|
|
{
|
|
Helpee_SendControlCommand( c_szAcceptRC );
|
|
}
|
|
catch(error)
|
|
{
|
|
FatalError( L_ERRFATAL_Text, error );
|
|
}
|
|
|
|
TraceFunctLeave();
|
|
return;
|
|
}
|
|
|
|
</SCRIPT>
|
|
|
|
<BODY id="idBody" name="idBody" onload='DoLoad();' bgcolor="LightGrey" scroll=no tabindex=-1>
|
|
|
|
</BODY>
|
|
</HTML>
|