new routines for isp phone number

git-svn-id: svn://10.0.0.236/trunk@5096 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timm
1998-07-07 16:26:19 +00:00
parent d3f74f0d4c
commit d4b0d09e4a
3 changed files with 42 additions and 11 deletions

View File

@@ -242,6 +242,29 @@ public class CPGenerator
return null;
}
public static String getISPModemNumber( String ispName, int popIndex )
{
ISPDynamicData ispData = getISPDynamicData( ispName );
if ( ispData == null )
{
//Trace.TRACE( "isp not found: " + isp );
return null;
}
int size = ispData.getDynamicDataSize();
//Trace.TRACE( "size: " + size );
if ( size < popIndex )
return null;
NameValueSet nvSet = ispData.getDynamicData( popIndex );
String phoneNum = nvSet.getValue( "phone" );
return phoneNum;
}
/*
Takes the given inputFile and looks for strings in the form
"@@@string_to_replace@@@" and replaces them with the value

View File

@@ -110,7 +110,7 @@ public class ISPDynamicData
throw e;
}
}
public String getName()
{
if ( name != null )
@@ -159,16 +159,6 @@ public class ISPDynamicData
return this.getDynamicData( 0 );
}
public int getDynamicDataSize()
{
if ( dynamicData == null )
this.parseDynamicData();
if ( dynamicData == null )
return 0;
return dynamicData.size();
}
public NameValueSet getDynamicData( int index )
{
@@ -190,6 +180,16 @@ public class ISPDynamicData
}
public int getDynamicDataSize()
{
if ( dynamicData == null )
this.parseDynamicData();
if ( dynamicData == null )
return 0;
return dynamicData.size();
}
public void parseDynamicData()
{
if ( reggieData != null )

View File

@@ -330,6 +330,14 @@ public class SetupPlugin extends Plugin
return null;
}
final public String GetISPModemNumber( String isp, int popIndex )
{
if ( privilegeCheck() == true )
return CPGenerator.getISPModemNumber( isp, popIndex );
else
return null;
}
final public String GetCurrentProfileDirectory()
{
if ( privilegeCheck() == true )