new checkins for free source CCK

This commit is contained in:
timm%netscape.com 1998-12-30 23:03:13 +00:00
Родитель 4f5cb9803b
Коммит 1665254dca
14 изменённых файлов: 5531 добавлений и 0 удалений

3939
cck/muc/dialshr.cpp Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

154
cck/muc/dialshr.h Normal file
Просмотреть файл

@ -0,0 +1,154 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* dialshr.h
common header file for integrated dialer
** WINVER values in this file:
** WINVER < 0x400 = Windows NT 3.5, Windows NT 3.51
** WINVER = 0x400 = Windows 95, Windows NT SUR (default)
** WINVER > 0x400 = Windows NT SUR enhancements
NB: Certain usages of WINVER would imply WIN32, our header
file assumes that WINVER >= 0x400 implies WIN32
*/
#include <ras.h>
#include "shlobj.h"
#include "winerror.h"
extern HINSTANCE gDLL; // dll instance
extern int gPlatformOS; // platform OS (95 or NT40)
// account parameter block
typedef struct ACCOUNTPARAMS
{
char ISPName[ 32 ];
char FileName[ 16 ];
char DNS[ 16 ];
char DNS2[ 16 ];
char DomainName[ 255 ];
char LoginName[ 64 ];
char Password[ 64 ];
char ScriptFileName[ 255 ];
BOOL ScriptEnabled;
BOOL NeedsTTYWindow;
char ISPPhoneNum[ 64 ];
char ISDNPhoneNum[ 64 ];
BOOL VJCompressionEnabled;
BOOL IntlMode;
BOOL DialOnDemand;
} ACCOUNTPARAMS;
// location parameter block
typedef struct LOCATIONPARAMS
{
char ModemName[ 255 ];
char ModemType[ 80 ];
BOOL DialType;
char OutsideLineAccess[ 6 ];
BOOL DisableCallWaiting;
char DisableCallWaitingCode[ 6 ];
char UserAreaCode[ 6 ];
short UserCountryCode;
BOOL DialAsLongDistance;
char LongDistanceAccess[ 6 ];
BOOL DialAreaCode;
char DialPrefix[ 32 ];
char DialSuffix[ 32 ];
BOOL UseBothISDNLines;
BOOL b56kISDN;
DWORD DisconnectTime;
} LOCATIONPARAMS;
// connection parameter block
typedef struct CONNECTIONPARAMS
{
char szEntryName[ MAX_PATH ];
LPITEMIDLIST pidl;
} CONNECTIONPARAMS;
// following API entry-points are included for all builds
typedef DWORD (WINAPI* RASDIAL)(LPRASDIALEXTENSIONS,LPTSTR,LPRASDIALPARAMS,DWORD,LPVOID,LPHRASCONN);
typedef DWORD (WINAPI* RASHANGUP)(HRASCONN);
typedef DWORD (WINAPI* RASGETERRORSTRING)(UINT, LPSTR, DWORD);
typedef DWORD (WINAPI* RASSETENTRYPROPERTIES)(LPSTR, LPSTR, LPBYTE, DWORD, LPBYTE, DWORD);
typedef DWORD (WINAPI* RASSETENTRYDIALPARAMS)(LPTSTR,LPRASDIALPARAMS,BOOL);
typedef DWORD (WINAPI* RASGETCOUNTRYINFO)(LPRASCTRYINFO, LPDWORD);
typedef DWORD (WINAPI* RASENUMCONNECTIONS)(LPRASCONN,LPDWORD,LPDWORD);
typedef DWORD (WINAPI* RASENUMENTRIES)(LPTSTR,LPTSTR,LPRASENTRYNAME,LPDWORD,LPDWORD);
typedef DWORD (WINAPI* RASENUMDEVICES)(LPRASDEVINFO, LPDWORD, LPDWORD);
typedef DWORD (WINAPI* RASGETENTRYPROPERTIES)(LPSTR, LPSTR, LPRASENTRY, LPDWORD, LPBYTE, LPDWORD);
typedef DWORD (WINAPI* RASVALIDATEENTRYNAME)(LPSTR, LPSTR);
typedef DWORD (WINAPI* RASDELETEENTRY)(LPSTR, LPSTR);
extern RASDIAL m_lpfnRasDial;
extern RASHANGUP m_lpfnRasHangUp;
extern RASGETERRORSTRING m_lpfnRasGetErrorString;
extern RASSETENTRYPROPERTIES m_lpfnRasSetEntryProperties;
extern RASSETENTRYDIALPARAMS m_lpfnRasSetEntryDialParams;
extern RASGETCOUNTRYINFO m_lpfnRasGetCountryInfo;
extern RASENUMCONNECTIONS m_lpfnRasEnumConnections;
extern RASENUMENTRIES m_lpfnRasEnumEntries;
extern RASENUMDEVICES m_lpfnRasEnumDevices;
extern RASGETENTRYPROPERTIES m_lpfnRasGetEntryProperties;
extern RASVALIDATEENTRYNAME m_lpfnRasValidateEntryName;
extern RASDELETEENTRY m_lpfnRasDeleteEntry;
extern HINSTANCE m_hRasInst;
// for NT40 only
#if ( WINVER >= 0x401 )
typedef DWORD (WINAPI* RASSETAUTODIALADDRESS)(LPSTR, DWORD, LPRASAUTODIALENTRYA, DWORD, DWORD);
typedef DWORD (WINAPI* RASGETAUTODIALADDRESS)(LPSTR, DWORD, LPRASAUTODIALENTRYA, LPDWORD, LPDWORD);
typedef DWORD (WINAPI* RASSETAUTODIALENABLE)(DWORD, BOOL);
typedef DWORD (WINAPI* RASSETAUTODIALPARAM)(DWORD, LPVOID, DWORD);
typedef DWORD (WINAPI* RASENUMAUTODIALADDRESSES)(LPTSTR *,LPDWORD,LPDWORD);
typedef DWORD (WINAPI* RASSETCREDENTIALS)(LPTSTR, LPTSTR, LPRASCREDENTIALS, BOOL);
extern RASSETAUTODIALENABLE m_lpfnRasSetAutodialEnable;
extern RASSETAUTODIALADDRESS m_lpfnRasSetAutodialAddress;
extern RASGETAUTODIALADDRESS m_lpfnRasGetAutodialAddress;
extern RASSETAUTODIALPARAM m_lpfnRasSetAutodialParam;
extern RASENUMAUTODIALADDRESSES m_lpfnRasEnumAutodialAddresses;
extern RASSETCREDENTIALS m_lpfnRasSetCredentials;
#endif
void SizeofRAS95();
void SizeofRASNT40();
BOOL LoadRasFunctionsNT( LPCSTR lpszLibrary );
BOOL GetDialUpConnection95( CONNECTIONPARAMS** connectionNames, int* numNames );
BOOL GetDialUpConnectionNT( CONNECTIONPARAMS** connectionNames, int* numNames );
void EnableDialOnDemandNT(LPSTR lpProfileName, BOOL flag);
void EnableDialOnDemand95(LPSTR lpProfileName, BOOL flag);
BOOL LoadRasFunctions( LPCSTR lpszLibrary );
void FreeRasFunctions();
BOOL GetModemList( char ***, int* );
BOOL GetModemType( char* strModemName, char* strModemType );
BOOL IsDialerConnected();
int DialerConfig( char** dialParams );
BOOL DialerConnect();
void DialerHangup();

89
cck/muc/makefile.win Normal file
Просмотреть файл

@ -0,0 +1,89 @@
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL. You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All Rights
# Reserved.
IGNORE_MANIFEST = 1
DEPTH = ..\
# Get CFLAGS, OBJDIR and such defined before using them in this makefile...
!include "$(DEPTH)\config\config.mak"
#################################################################
INCS = \
-I. \
-I$(DEPTH)\dist\public\nspr \
-I$(DEPTH)\dist\public\pref \
-I$(DEPTH)\dist\public\js \
$(INCS)
CPP_OBJS = \
.\$(OBJDIR)\dialshr.obj \
.\$(OBJDIR)\muc.obj \
.\$(OBJDIR)\rasnt40.obj \
.\$(OBJDIR)\ras95.obj \
$(NULL)
OBJS = \
.\$(OBJDIR)\muc.res
#################################################################
MAKE_OBJ_TYPE = DLL
LIBNAME = muc
PDBFILE = $(LIBNAME).pdb
MAPFILE = $(LIBNAME).map
RESFILE = $(LIBNAME).res
# not sure what of all this crap is really necessary
CFLAGS = \
$(CFLAGS) \
-MD \
-D_USRDLL \
-D_AFXDLL \
-DWINVER=0x401
RCFLAGS = \
$(RCFLAGS) \
-D_AFXDLL
# again, not sure what is necessary here, NODEFAULTLIB seems
# to be, and probably the export
LFLAGS = \
$(LFLAGS) \
-export:PEPluginFunc=_PEPluginFunc@12 \
-nodefaultlib:MSVCRT \
-machine:Ix86
DEFFILE = \
muc.def
DLL_LIBS = \
rasapi32.lib \
tapi32.lib \
ole32.lib \
$(DEPTH)\dist\$(OBJDIR)\lib\xppref32.lib \
$(DLL_LIBS)
DLL= \
$(OBJDIR)\$(LIBNAME).dll
#################################################################
libs:: $(DLL)
!include "$(DEPTH)\config\rules.mak"
install::
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBNAME).dll $(DIST)\lib

Двоичные данные
cck/muc/muc.aps Normal file

Двоичный файл не отображается.

296
cck/muc/muc.cpp Normal file
Просмотреть файл

@ -0,0 +1,296 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// muc.cpp : Defines the initialization routines for the DLL.
//
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include "muc.h"
#include "dialshr.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
enum
{
kGetPluginVersion,
kSelectAcctConfig,
kSelectModemConfig,
kSelectDialOnDemand,
kConfigureDialer,
kConnect,
kHangup,
kEditEntry,
kDeleteEntry,
kRenameEntry,
kMonitor,
};
typedef long ( STDAPICALLTYPE* FARPEFUNC )( long selectorCode, void* paramBlock, void* returnData );
// Keeps track of OS version, either win95 or winNT
int gPlatformOS;
HINSTANCE gDLL;
int GetAcctConfig( char* returnData );
int GetModemConfig( char* returnData );
/////////////////////////////////////////////////////////////////////////////
// CMucApp
BEGIN_MESSAGE_MAP(CMucApp, CWinApp)
//{{AFX_MSG_MAP(CMucApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMucApp construction
CMucApp::CMucApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// CMucApp deconstruction
CMucApp::~CMucApp()
{
}
/////////////////////////////////////////////////////////////////////////////
// CMucApp InitInstance
CMucApp::InitInstance()
{
CWinApp::InitInstance();
SetDialogBkColor(); // Set dialog background color to gray
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
gPlatformOS = 0;
OSVERSIONINFO* lpOsVersionInfo = new OSVERSIONINFO;
lpOsVersionInfo->dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
if ( GetVersionEx( lpOsVersionInfo ) )
gPlatformOS = (int)lpOsVersionInfo->dwPlatformId;
switch ( gPlatformOS )
{
case VER_PLATFORM_WIN32_WINDOWS: //win95
if( !LoadRasFunctions( "rasapi32.dll" ) )
return FALSE;
break;
case VER_PLATFORM_WIN32_NT: // win nt
if( !LoadRasFunctionsNT( "rasapi32.dll" ) )
return FALSE;
break;
default:
break;
}
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CMucApp ExitInstance
BOOL CMucApp::ExitInstance()
{
if ( lpOsVersionInfo != NULL )
{
delete lpOsVersionInfo;
lpOsVersionInfo = NULL;
}
return CWinApp::ExitInstance();
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CMucApp object
CMucApp gMUCDLL;
STDAPI_( long )
PEPluginFunc( long selectorCode, void* paramBlock, void* returnData )
{
long returnCode = 0;
BOOL flag = TRUE;
char acctStr[ MAX_PATH ];
gDLL = gMUCDLL.m_hInstance;
switch ( selectorCode )
{
// fill in the version in paramBlock
case kGetPluginVersion:
*(long*)returnData = 0x00010001;
break;
// get account list
case kSelectAcctConfig:
*(int*)paramBlock = GetAcctConfig( (char*)returnData );
break;
// get modem list
case kSelectModemConfig:
*(int*)paramBlock = GetModemConfig( (char*)returnData );
break;
case kSelectDialOnDemand:
// kludge: dealing with dogbert PR3 bug
if ( *(int*)paramBlock == 1 )
strcpy( acctStr, (char*)returnData );
else if( *(int*)returnData == 1 )
{
strcpy( acctStr, (char *)paramBlock );
if( strcmp( acctStr, "None" ) == 0 )
flag = FALSE;
}
else
{
strcpy( acctStr, "" );
flag = FALSE;
}
switch ( gPlatformOS )
{
case VER_PLATFORM_WIN32_WINDOWS: //win95
EnableDialOnDemand95( acctStr, flag );
break;
case VER_PLATFORM_WIN32_NT: // win nt
EnableDialOnDemandNT( acctStr, flag );
break;
default:
break;
}
case kConfigureDialer:
returnCode = DialerConfig( (char**)paramBlock );
break;
case kConnect:
returnCode = ( DialerConnect() == TRUE ? 0 : -1 );
break;
case kHangup:
DialerHangup();
returnCode = 0;
break;
default:
returnCode = 0;
break;
}
return returnCode;
}
/////////////////////////////////////////////////////////////////////////////
int GetAcctConfig( char* returnData )
{
CONNECTIONPARAMS* connectionNames;
int numNames = 0;
int i = 0, rtn;
CString str, tmp;
switch ( gPlatformOS )
{
case VER_PLATFORM_WIN32_WINDOWS: //win95
rtn = GetDialUpConnection95( &connectionNames, &numNames );
break;
case VER_PLATFORM_WIN32_NT: // win nt
rtn = GetDialUpConnectionNT( &connectionNames, &numNames );
break;
default:
return FALSE;
}
if ( rtn )
{
returnData[ 0 ] = 0x00;
if ( connectionNames != NULL )
{
// pile up account names in a single array, separated by a ()
for ( i = 0; i < numNames; i++ )
{
tmp = connectionNames[ i ].szEntryName;
str += tmp;
str += "()";
}
strcpy( returnData, (const char*)str );
delete []connectionNames;
}
}
return numNames;
}
/////////////////////////////////////////////////////////////////////////////
int GetModemConfig( char* returnData )
{
char** modemResults;
int numDevices;
int i;
CString str, tmp;
if ( !::GetModemList( &modemResults, &numDevices ) )
{
if ( modemResults != NULL )
{
for ( i = 0; i < numDevices; i++ )
{
if ( modemResults[ i ] != NULL )
delete []modemResults[ i ];
}
delete []modemResults;
}
return numDevices;
}
// copy all entries to the array
returnData[ 0 ] = 0x00;
// pile up account names in a single array, separated by a ()
for ( i = 0; i < numDevices; i++ )
{
tmp = modemResults[ i ];
str += tmp;
str += "()";
delete []modemResults[ i ];
}
strcpy( returnData, (const char*)str );
delete []modemResults;
return numDevices;
}

33
cck/muc/muc.def Normal file
Просмотреть файл

@ -0,0 +1,33 @@
; -*- Mode: Fundamental -*-
; The contents of this file are subject to the Netscape Public License
; Version 1.0 (the "NPL"); you may not use this file except in
; compliance with the NPL. You may obtain a copy of the NPL at
; http://www.mozilla.org/NPL/
;
; Software distributed under the NPL is distributed on an "AS IS" basis,
; WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
; for the specific language governing rights and limitations under the
; NPL.
;
; The Initial Developer of this code under the NPL is Netscape
; Communications Corporation. Portions created by Netscape are
; Copyright (C) 1998 Netscape Communications Corporation. All Rights
; Reserved.
;
LIBRARY MUC
CODE PRELOAD MOVEABLE DISCARDABLE
DATA PRELOAD MOVEABLE SINGLE
HEAPSIZE 8192
EXPORTS
PEPluginFunc @1
WEP PRIVATE
; To implement your own Windows Exit Procedure add the following
; function to your application (referring to it in the .def file is
; not required.) The extern "C" is only required if module is C++.
; extern "C" int FAR PASCAL _WEP(int)
; {
; /* Your WEP functionality goes here */
; return 1;
; }

54
cck/muc/muc.h Normal file
Просмотреть файл

@ -0,0 +1,54 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
// muc.h : main header file for the MUC DLL
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
/////////////////////////////////////////////////////////////////////////////
// CMucApp
// See muc.cpp for the implementation of this class
//
class CMucApp : public CWinApp
{
public:
CMucApp();
~CMucApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMucApp)
//}}AFX_VIRTUAL
//{{AFX_MSG(CMucApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
virtual BOOL InitInstance();
virtual BOOL ExitInstance();
DECLARE_MESSAGE_MAP()
private:
#ifdef WIN32
OSVERSIONINFO *lpOsVersionInfo;
#endif
};
/////////////////////////////////////////////////////////////////////////////

180
cck/muc/muc.rc Normal file
Просмотреть файл

@ -0,0 +1,180 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "Netscape Communication Corporation\0"
VALUE "FileDescription", "Account Setup Plugin\0"
VALUE "FileExtents", "*|*\0"
VALUE "FileOpenName", "Setup Plugin (*.*)|Setup Plugin (*.*)\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "aswplugin\0"
VALUE "LegalCopyright", "Copyright © 1997\0"
VALUE "MIMEType", "application/x-netscape-autoconfigure-dialer|application/x-netscape-autoconfigure-dialer-v2\0"
VALUE "OriginalFilename", "np32asw.dll\0"
VALUE "ProductName", "NNPE Account Setup Plugin\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif // !_MAC
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_STATUS DIALOGEX 0, 0, 170, 55
STYLE DS_SYSMODAL | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_NOPARENTNOTIFY
CAPTION "Account Setup"
FONT 8, "MS Sans Serif"
BEGIN
PUSHBUTTON "Cancel",IDCANCEL,60,34,50,14
LTEXT "Status:",IDC_STATIC,13,11,23,10
LTEXT "",IDC_DIAL_STATUS,41,11,111,18
END
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_APP_NAME "Account Setup"
IDS_NO_RAS_FUNCTIONS "Unable to dynamically load extended RAS functions!"
IDS_NO_DUN "Dial-Up Networking has not been installed on this machine; this product will not work until Dial-Up Networking is installed. Would you like to install Dial-Up Networking now?"
IDS_DNS_ALREADY "Your system is configured for another Domain Name System (DNS) server. You may need to change your Dial-Up Networking settings to connect to the Internet.\n\nPlease see the troubleshooting section of the Installation and Setup Guide for more information."
IDS_BAD_PASSWORD "Invalid pasword in Netscape registration file."
IDS_NO_RNA_REGSERVER "Unable to create RNA phone book entry!"
IDS_MISSING_AREA_CODE "The service provider's phone number is missing its area code (or is not in TAPI cannonical form in the configuration file). Account creation will fail until this is fixed."
IDS_NO_RNA "Unable to create shortcut to RNA phone book entry!"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_OUT_OF_MEMORY "The system is out of memory or resources."
IDS_INVALID_EXE "Unable to start the specified External Editor. It is not a valid executible program."
IDS_INVALID_FILE "The specified External Editor file was not found."
IDS_INVALID_PATH "The specified path for the External Editor is not valid."
IDS_NO_EDITOR "Unable to start the External Editor. Please check and make sure the file exists."
IDS_OPENING_PORT "Opening serial port..."
IDS_INIT_MODEM "Initializing modem..."
IDS_DIALING "Dialing..."
IDS_DIALING_OF "Dialing...\n%i of %i"
IDS_VERIFYING "Verifying user name and password..."
IDS_LOGGING_ON "Logging onto network..."
IDS_DISCONNECTING "Disconnecting..."
IDS_CONNECTED "Connection established."
IDS_NO_DIALTONE "No dial tone.\nMake sure your modem is connected to a phone line.."
IDS_LINE_BUSY "The phone number is busy. Please try\nagain later."
IDS_NO_ADMIN_PREMISSION "You do not have Administrator premission on this machine to intall Dial-Up Networking. Please make sure you have Administrator premission in order to install Dial-Up Networking first before running Account Setup."
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_REGGIE_PROGITEM_NAME "Registration Server"
IDS_SECURITY_RISK_WARNING
"SECURITY WARNING!\n\nAccount Setup has the ability to read and write files on your computer,\nconfigure dialing, networking and modem information.\n\nClick OK to allow Account Setup to operate in this manner.\nOtherwise, click CANCEL to exit this application."
IDS_CONNECTION_FAILED "Failed to connect due to following error:\n"
IDS_DIAL_ERR "ERROR! Connection failed."
IDS_CANCELDIAL "Cancel modem connection..."
IDS_NO_DUN_INSTALLED "Account Setup will not work without Dial-Up Networking installed. Please install Dial-Up Networking first before running Account Setup."
IDS_NO_DUN_NT "Dial-Up Networking has not been installed on this machine; this product will not work until Dial-Up Networking is installed. Pleas install Dial-Up Networking before running Accout Setup."
IDS_NO_TAPI "Unable to initialize TAPI."
IDS_ERR_EDITOR "Can't open external editor:\n%s with file\n%s"
IDS_ERR_EDITOR2 "external editor:\n%s\nerr code=%d\nlength=%d\nlength(editor)=%d last char=%d\nlength(file)=%d first char=%d"
IDS_PROTOCOL_NOT_CONFIGURED
"The protocol is not configured.\nPlease reset your modem or restart your machine and try again later."
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

44
cck/muc/ras95.cpp Normal file
Просмотреть файл

@ -0,0 +1,44 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
extern size_t stRASENTRY;
extern size_t stRASCONN;
extern size_t stRASCTRYINFO;
extern size_t stRASDIALPARAMS;
extern size_t stRASDEVINFO;
#ifdef WINVER
#undef WINVER
#endif
#define WINVER 0x0400
#include <windows.h>
#include <ras.h>
void SizeofRAS95()
{
stRASENTRY = sizeof( RASENTRY );
stRASCONN = sizeof( RASCONN );
stRASCTRYINFO = sizeof( RASCTRYINFO );
stRASDIALPARAMS = sizeof( RASDIALPARAMS );
stRASDEVINFO = sizeof( RASDEVINFO );
}

44
cck/muc/rasnt40.cpp Normal file
Просмотреть файл

@ -0,0 +1,44 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
extern size_t stRASENTRY;
extern size_t stRASCONN;
extern size_t stRASCTRYINFO;
extern size_t stRASDIALPARAMS;
extern size_t stRASDEVINFO;
#ifdef WINVER
#undef WINVER
#endif
#define WINVER 0x0401
#include <windows.h>
#include <ras.h>
void SizeofRASNT40()
{
stRASENTRY = sizeof( RASENTRY );
stRASCONN = sizeof( RASCONN );
stRASCTRYINFO = sizeof( RASCTRYINFO );
stRASDIALPARAMS = sizeof( RASDIALPARAMS );
stRASDEVINFO = sizeof( RASDEVINFO );
}

53
cck/muc/resource.h Normal file
Просмотреть файл

@ -0,0 +1,53 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by muc.rc
//
#define IDD_STATUS 101
#define IDC_DIAL_STATUS 1001
#define IDS_APP_NAME 63000
#define IDS_NO_RAS_FUNCTIONS 63001
#define IDS_NO_DUN 63002
#define IDS_DNS_ALREADY 63003
#define IDS_BAD_PASSWORD 63004
#define IDS_NO_RNA_REGSERVER 63005
#define IDS_MISSING_AREA_CODE 63006
#define IDS_NO_RNA 63007
#define IDS_TEST 63008
#define IDS_OUT_OF_MEMORY 63008
#define IDS_INVALID_EXE 63009
#define IDS_INVALID_FILE 63010
#define IDS_INVALID_PATH 63011
#define IDS_NO_EDITOR 63012
#define IDS_OPENING_PORT 63013
#define IDS_INIT_MODEM 63014
#define IDS_DIALING 63015
#define IDS_DIALING_OF 63016
#define IDS_VERIFYING 63017
#define IDS_LOGGING_ON 63018
#define IDS_DISCONNECTING 63019
#define IDS_CONNECTED 63020
#define IDS_NO_DIALTONE 63021
#define IDS_LINE_BUSY 63022
#define IDS_NO_ADMIN_PREMISSION 63023
#define IDS_REGGIE_PROGITEM_NAME 63024
#define IDS_SECURITY_RISK_WARNING 63025
#define IDS_CONNECTION_FAILED 63026
#define IDS_DIAL_ERR 63027
#define IDS_CANCELDIAL 63028
#define IDS_NO_DUN_INSTALLED 63029
#define IDS_NO_DUN_NT 63030
#define IDS_NO_TAPI 63031
#define IDS_ERR_EDITOR 63032
#define IDS_ERR_EDITOR2 63033
#define IDS_PROTOCOL_NOT_CONFIGURED 63034
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 104
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1003
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

505
cck/muc/test/sample_dial.c Normal file
Просмотреть файл

@ -0,0 +1,505 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
/* JS reflection of the dialer stack
8/24/98
*/
#include "lm.h"
#include "prmem.h"
typedef struct JSDialer
{
JSObject* obj;
void* pstub;
} JSDialer;
/* The following definitions need to be kept synchronized with the
values the MUC DLL accepts, currently, there's no universal header
containing them, but you can look in ns/cmd/dialup/win/muc for
the code that implements MUC, and you can reference also
ns/cmd/winfe/mucproc.h for front-end code that references MUC
There should probably be an xp muc(pub).h or somesuch that contains
a universal MUC API.
*/
enum
{
kGetPluginVersion,
kSelectAcctConfig,
kSelectModemConfig,
kSelectDialOnDemand,
kConfigureDialer,
kConnect,
kHangup,
kEditEntry,
kDeleteEntry,
kRenameEntry,
kMonitor,
};
#ifdef XP_WIN
typedef long (STDAPICALLTYPE *FARPEFUNC)(
long selectorCode,
void* paramBlock,
void* returnData );
jsint CallMuc( JSDialer* dialer, long selector, void* configData, void* returnData )
{
FARPEFUNC mucFunc;
jsint error = 0;
mucFunc = (FARPEFUNC)dialer->pstub;
if ( !mucFunc )
return -1;
error = (jsint)( *mucFunc )( selector, configData, NULL );
return error;
}
#else
/* provide an empty prototype until we have Unix/Mac support */
jsint CallMuc( JSDialer*, long, void*, void* ) { }
#endif
enum dialer_slot
{
PRIVATE_STUB = -1,
};
static JSPropertySpec dialer_props[] =
{
{ "privateStub", PRIVATE_STUB, JSPROP_READONLY },
{0}
};
extern JSClass lm_dialer_class;
JSBool PR_CALLBACK
dialer_getProperty( JSContext* cx, JSObject* obj, jsval id, jsval* vp)
{
JSDialer* dialer;
enum dialer_slot dialer_slot;
JSString* str = NULL;
jsint slot;
*vp = JS_GetEmptyStringValue( cx );
if ( !JSVAL_IS_INT(id) )
return JS_TRUE;
slot = JSVAL_TO_INT( id );
dialer = JS_GetInstancePrivate( cx, obj, &lm_dialer_class, NULL);
if ( !dialer )
return JS_TRUE;
dialer_slot = slot;
switch ( dialer_slot )
{
default:
return JS_TRUE;
}
if ( str )
*vp = STRING_TO_JSVAL( str );
return JS_TRUE;
}
JSBool PR_CALLBACK
dialer_enumerate( JSContext* cx, JSObject* obj )
{
return JS_TRUE;
}
void PR_CALLBACK
dialer_finalize( JSContext* cx, JSObject* obj )
{
JSDialer* dialer;
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
return;
XP_DELETE( dialer );
}
JSBool PR_CALLBACK
dialer_toString( JSContext* cx, JSObject* obj, uint argc, jsval* argv, jsval* rval )
{
JSString* str;
str = JS_NewStringCopyZ( cx, "[object Dialer]" );
if ( !str )
return JS_FALSE;
*rval = STRING_TO_JSVAL( str );
return JS_TRUE;
}
JSClass lm_dialer_class =
{
"Dialer",
JSCLASS_HAS_PRIVATE,
JS_PropertyStub,
JS_PropertyStub,
dialer_getProperty,
dialer_getProperty,
dialer_enumerate,
JS_ResolveStub,
JS_ConvertStub,
dialer_finalize
};
PR_STATIC_CALLBACK(PRBool)
dialer_config( JSContext* cx, JSObject* obj, uint argc,
jsval* argv, jsval* rval )
{
JSObject* stringArray;
jsuint count = 0;
jsval temp;
JSString* stringObject;
jsuint stringArrayLength;
PRBool result;
JSDialer* dialer;
jsint error;
char** configData;
char* buffer;
if ( !lm_CanAccessTarget( cx, JSTARGET_UNIVERSAL_DIALER_ACCESS ) )
return JS_FALSE;
if ( argc != 1 )
return JS_FALSE;
if ( !JSVAL_IS_OBJECT( argv[ 0 ] ) )
return JS_FALSE;
JS_ValueToObject( cx, argv[ 0 ], &stringArray );
if ( !JS_IsArrayObject( cx, stringArray ) )
return JS_FALSE;
JS_GetArrayLength( cx, stringArray, &stringArrayLength );
configData = JS_malloc( cx, ( ( stringArrayLength + 1 ) * sizeof( char* ) ) );
if ( !configData )
return JS_FALSE;
configData[ 0 ] = NULL;
while ( count < stringArrayLength )
{
if ( JS_GetElement( cx, stringArray, count, &temp ) != JS_TRUE )
continue;
if ( !JSVAL_IS_STRING( temp ) )
continue;
stringObject = JS_ValueToString( cx, temp );
buffer = JS_strdup( cx, JS_GetStringBytes( stringObject ) );
if ( !buffer )
{
configData[ count ] = 0;
result = JS_FALSE;
goto fail;
}
configData[ count ] = buffer;
buffer = NULL;
configData[ ++count ] = NULL;
}
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
{
result = JS_FALSE;
goto fail;
}
error = CallMuc( dialer, kConfigureDialer, (void*)configData, (void*)NULL );
if ( error )
{
result = JS_FALSE;
goto fail;
}
result = JS_TRUE;
fail:
if ( buffer )
JS_free( cx, buffer );
count = 0;
while ( configData[ count ] )
JS_free( cx, configData[ count++ ] );
return result;
}
PR_STATIC_CALLBACK(PRBool)
dialer_connect( JSContext* cx, JSObject* obj, uint argc,
jsval* argv, jsval* rval )
{
JSDialer* dialer;
jsint error;
if ( !lm_CanAccessTarget( cx, JSTARGET_UNIVERSAL_DIALER_ACCESS ) )
return JS_FALSE;
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
return JS_FALSE;
error = CallMuc( dialer, kConnect, (void*)NULL, (void*)NULL );
if ( error )
return JS_FALSE;
return JS_TRUE;
}
PR_STATIC_CALLBACK(PRBool)
dialer_hangup( JSContext* cx, JSObject* obj, uint argc,
jsval* argv, jsval* rval )
{
JSDialer* dialer;
jsint error;
if ( !lm_CanAccessTarget( cx, JSTARGET_UNIVERSAL_DIALER_ACCESS ) )
return JS_FALSE;
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
return JS_FALSE;
error = CallMuc( dialer, kHangup, (void*)NULL, (void*)NULL );
if ( error )
return JS_FALSE;
return JS_TRUE;
}
PR_STATIC_CALLBACK(PRBool)
dialer_rename( JSContext* cx, JSObject* obj, uint argc,
jsval* argv, jsval* rval )
{
JSDialer* dialer;
JSString* string = NULL;
jsint error;
struct
{
char* from;
char* to;
} b;
if ( !lm_CanAccessTarget( cx, JSTARGET_UNIVERSAL_DIALER_ACCESS ) )
return JS_FALSE;
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
return JS_FALSE;
if ( argc != 2 )
return JS_FALSE;
if ( !JSVAL_IS_STRING( argv[ 0 ] ) ||
!JSVAL_IS_STRING( argv[ 1 ] ) )
return JS_FALSE;
string = JS_ValueToString( cx, argv[ 0 ] );
b.from = JS_strdup( cx, JS_GetStringBytes( string ) );
string = JS_ValueToString( cx, argv[ 1 ] );
b.to = JS_strdup( cx, JS_GetStringBytes( string ) );
error = CallMuc( dialer, kRenameEntry, (void*)&b, (void*)NULL );
if ( error )
return JS_FALSE;
return JS_TRUE;
}
PR_STATIC_CALLBACK(PRBool)
dialer_delete( JSContext* cx, JSObject* obj, uint argc,
jsval* argv, jsval* rval )
{
JSDialer* dialer;
JSString* string = NULL;
char* name = NULL;
jsint error;
if ( !lm_CanAccessTarget( cx, JSTARGET_UNIVERSAL_DIALER_ACCESS ) )
return JS_FALSE;
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
return JS_FALSE;
if ( argc != 1 )
return JS_FALSE;
if ( !JSVAL_IS_STRING( argv[ 0 ] ) )
return JS_FALSE;
string = JS_ValueToString( cx, argv[ 0 ] );
name = JS_strdup( cx, JS_GetStringBytes( string ) );
error = CallMuc( dialer, kDeleteEntry, (void*)name, (void*)NULL );
if ( error )
return JS_FALSE;
return JS_TRUE;
}
PR_STATIC_CALLBACK(PRBool)
dialer_monitor( JSContext* cx, JSObject* obj, uint argc,
jsval* argv, jsval* rval )
{
JSDialer* dialer;
JSString* string = NULL;
char* name = NULL;
jsint error;
if ( !lm_CanAccessTarget( cx, JSTARGET_UNIVERSAL_DIALER_ACCESS ) )
return JS_FALSE;
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
return JS_FALSE;
error = CallMuc( dialer, kMonitor, (void*)NULL, (void*)NULL );
if ( error )
return JS_FALSE;
return JS_TRUE;
}
PR_STATIC_CALLBACK(PRBool)
dialer_edit( JSContext* cx, JSObject* obj, uint argc,
jsval* argv, jsval* rval )
{
JSDialer* dialer;
JSString* string = NULL;
char* name = NULL;
jsint error;
if ( !lm_CanAccessTarget( cx, JSTARGET_UNIVERSAL_DIALER_ACCESS ) )
return JS_FALSE;
dialer = JS_GetPrivate( cx, obj );
if ( !dialer )
return JS_FALSE;
if ( argc != 1 )
return JS_FALSE;
if ( !JSVAL_IS_STRING( argv[ 0 ] ) )
return JS_FALSE;
string = JS_ValueToString( cx, argv[ 0 ] );
name = JS_strdup( cx, JS_GetStringBytes( string ) );
error = CallMuc( dialer, kEditEntry, (void*)name, (void*)NULL );
if ( error )
return JS_FALSE;
return JS_TRUE;
}
static JSFunctionSpec dialer_methods[] = {
{"configure", dialer_config, 1},
{"connect", dialer_connect, 1},
{"hangup", dialer_hangup, 0},
{"rename", dialer_rename, 2},
{"delete", dialer_delete, 1},
{"monitor", dialer_monitor, 0},
{"edit", dialer_edit, 1},
{"toString", dialer_toString, 0},
{0}
};
JSBool PR_CALLBACK
Dialer( JSContext* cx, JSObject* obj, uint argc, jsval* argv, jsval* rval )
{
return JS_TRUE;
}
JSDialer* create_dialer( JSContext* cx, JSObject* parent_obj )
{
MochaDecoder* decoder;
JSObject* obj;
JSDialer* dialer = NULL;
#ifdef XP_WIN
HINSTANCE mucDll = NULL;
FARPEFUNC stub = NULL;
long version;
#endif
decoder = JS_GetPrivate( cx, JS_GetGlobalObject( cx ) );
dialer = JS_malloc( cx, sizeof *dialer );
if ( !dialer )
return NULL;
XP_BZERO( dialer, sizeof *dialer );
obj = JS_InitClass( cx, parent_obj, NULL, &lm_dialer_class,
Dialer, 0, dialer_props, dialer_methods, NULL, NULL);
if ( !obj || !JS_SetPrivate( cx, obj, dialer ) )
{
JS_free( cx, dialer );
return NULL;
}
dialer->obj = obj;
dialer->pstub = NULL;
#ifdef XP_WIN
mucDll = LoadLibrary( "muc.dll" );
/* apparently LoadLibrary can return failure codes instead of a null ptr. */
if ( !mucDll || mucDll < 0x00000030 )
goto done;
stub = (FARPEFUNC)GetProcAddress( mucDll, "PEPluginFunc" );
if ( !stub )
goto done;
( *stub )( kGetPluginVersion, NULL, &version );
if ( version >= 0x00010001 )
dialer->pstub = (void*)stub;
#endif
done:
return dialer;
}
JSObject* lm_NewDialer( JSContext* cx, JSObject* parent_obj )
{
JSDialer* dialer;
dialer = create_dialer( cx, parent_obj );
return ( dialer ? dialer->obj : NULL);
}

94
cck/muc/test/test.htm Normal file
Просмотреть файл

@ -0,0 +1,94 @@
<HTML>
<HEAD>
<TITLE>Account Setup</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
// * configure dialer for Registration Server
dialerData = new Array();
dialerData[ 0 ] = "FileName=REGSERV.IAS";
dialerData[ 1 ] = "AccountName=test";
dialerData[ 2 ] = "ISPPhoneNum=+1 (800) 638-8290";
dialerData[ 3 ] = "LoginName=mozillarama";
dialerData[ 4 ] = "Password=YWg0ZrhvamYLZix1ADRvdWpttnp3";
dialerData[ 5 ] = "DNSAddress=205.217.225.10";
dialerData[ 6 ] = "DNSAddress2=205.217.225.20";
dialerData[ 7 ] = "DomainName=netscape.com";
dialerData[ 8 ] = "IPAddress=0.0.0.0";
dialerData[ 9 ] = "IntlMode=FALSE";
dialerData[ 10 ] = "DialOnDemand=TRUE";
dialerData[ 11 ] = "ModemName=Standard Modem";
dialerData[ 12 ] = "ModemType=modem";
dialerData[ 13 ] = "DialType=1"
dialerData[ 14 ] = "OutsideLineAccess=9";
dialerData[ 15 ] = "DisableCallWaiting=FALSE";
dialerData[ 16 ] = "DisableCallWaitingCode=";
dialerData[ 17 ] = "UserAreaCode=650"; // XXX what to do if international mode?
dialerData[ 18 ] = "CountryCode=1";
dialerData[ 19 ] = "LongDistanceAccess=1"; // XXX
dialerData[ 20 ] = "DialAsLongDistance=TRUE"; // XXX
dialerData[ 21 ] = "DialAreaCode=TRUE"; // XXX
dialerData[ 22 ] = "ScriptEnabled=no";
dialerData[ 23 ] = "ScriptFileName=";
dialerData[ 24 ] = "NeedsTTYWindow=no";
dialerData[ 25 ] = "Location=Home";
dialerData[ 26 ] = "DisconnectTime=99";
dialerData[ 27 ] = "Path=Server";
if ( navigator.dialer.configure( dialerData ) == true )
{
if ( navigator.dialer.connect() == true )
{
java.system.out.println( "connected successfully" );
navigator.dialer.hangup();
}
}
// * configure dialer for Registration Server
dialerData = new Array();
dialerData[ 0 ] = "FileName=REGSERV.IAS";
dialerData[ 1 ] = "AccountName=test";
dialerData[ 2 ] = "ISPPhoneNum=+1 (800) 638-8290";
dialerData[ 3 ] = "LoginName=mozillarama";
dialerData[ 4 ] = "Password=YWg0ZrhvamYLZix1ADRvdWpttnp3";
dialerData[ 5 ] = "DNSAddress=205.217.225.10";
dialerData[ 6 ] = "DNSAddress2=205.217.225.20";
dialerData[ 7 ] = "DomainName=netscape.com";
dialerData[ 8 ] = "IPAddress=0.0.0.0";
dialerData[ 9 ] = "IntlMode=FALSE";
dialerData[ 10 ] = "DialOnDemand=TRUE";
dialerData[ 11 ] = "ModemName=Standard Modem";
dialerData[ 12 ] = "ModemType=modem";
dialerData[ 13 ] = "DialType=1"
dialerData[ 14 ] = "OutsideLineAccess=9";
dialerData[ 15 ] = "DisableCallWaiting=FALSE";
dialerData[ 16 ] = "DisableCallWaitingCode=";
dialerData[ 17 ] = "UserAreaCode=650"; // XXX what to do if international mode?
dialerData[ 18 ] = "CountryCode=1";
dialerData[ 19 ] = "LongDistanceAccess=1"; // XXX
dialerData[ 20 ] = "DialAsLongDistance=TRUE"; // XXX
dialerData[ 21 ] = "DialAreaCode=TRUE"; // XXX
dialerData[ 22 ] = "ScriptEnabled=no";
dialerData[ 23 ] = "ScriptFileName=";
dialerData[ 24 ] = "NeedsTTYWindow=no";
dialerData[ 25 ] = "Location=Home";
dialerData[ 26 ] = "DisconnectTime=99";
dialerData[ 27 ] = "Path=Server";
if ( navigator.dialer.configure( dialerData ) == true )
{
if ( navigator.dialer.connect() == true )
{
java.system.out.println( "connected successfully" );
navigator.dialer.hangup();
}
}
</HEAD>
<BODY>
test of the emergency dialing system
</BODY>
</HTML>

46
cck/muc/test/test.js Normal file
Просмотреть файл

@ -0,0 +1,46 @@
<HTML>
<HEAD>
<TITLE>Account Setup</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
// * configure dialer for Registration Server
dialerData = new Array();
dialerData[ 0 ] = "FileName=REGSERV.IAS";
dialerData[ 1 ] = "AccountName=test";
dialerData[ 2 ] = "ISPPhoneNum=+1 (800) 638-8290";
dialerData[ 3 ] = "LoginName=mozillarama";
dialerData[ 4 ] = "Password=YWg0ZrhvamYLZix1ADRvdWpttnp3";
dialerData[ 5 ] = "DNSAddress=205.217.225.10";
dialerData[ 6 ] = "DNSAddress2=205.217.225.20";
dialerData[ 7 ] = "DomainName=netscape.com";
dialerData[ 8 ] = "IPAddress=0.0.0.0";
dialerData[ 9 ] = "IntlMode=FALSE";
dialerData[ 10 ] = "DialOnDemand=TRUE";
dialerData[ 11 ] = "ModemName=dontknow";
dialerData[ 12 ] = "ModemType=dontknow";
dialerData[ 13 ] = "DialType=1"
dialerData[ 14 ] = "OutsideLineAccess=9";
dialerData[ 15 ] = "DisableCallWaiting=FALSE";
dialerData[ 16 ] = "DisableCallWaitingCode=";
dialerData[ 17 ] = "UserAreaCode=650"; // XXX what to do if international mode?
dialerData[ 18 ] = "CountryCode=1";
dialerData[ 19 ] = "LongDistanceAccess=1"; // XXX
dialerData[ 20 ] = "DialAsLongDistance=TRUE"; // XXX
dialerData[ 21 ] = "DialAreaCode=TRUE"; // XXX
dialerData[ 22 ] = "ScriptEnabled=no";
dialerData[ 23 ] = "ScriptFileName=";
dialerData[ 24 ] = "NeedsTTYWindow=no";
dialerData[ 25 ] = "Location=Home";
dialerData[ 26 ] = "DisconnectTime=99";
dialerData[ 27 ] = "Path=Server";
navigator.dialer.DialerConfig( dialerData );
</SCRIPT>
</HEAD>
<BODY>
test of the emergency dialing system
</BODY>
</HTML>