public abstract class Rasapi32Util
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Rasapi32Util.Ras32Exception
Exceptions
|
Modifier and Type | Field and Description |
---|---|
static java.util.Map |
CONNECTION_STATE_TEXT |
Constructor and Description |
---|
Rasapi32Util() |
Modifier and Type | Method and Description |
---|---|
static WinNT.HANDLE |
dialEntry(java.lang.String entryName)
Dial a phone book entry by name (Synchronously)
|
static WinNT.HANDLE |
dialEntry(java.lang.String entryName,
WinRas.RasDialFunc2 func2)
Dial a phone book entry by name (Asynchronously - callback type 2)
|
static WinRas.RASPPPIP |
getIPProjection(WinNT.HANDLE hrasConn)
Get the connection's IP projection
|
static WinRas.RASDIALPARAMS |
getPhoneBookDialingParams(java.lang.String entryName)
get a phone book entry's dialing parameters
|
static WinRas.RASENTRY.ByReference |
getPhoneBookEntry(java.lang.String entryName)
Return the phone book entry.
|
static WinNT.HANDLE |
getRasConnection(java.lang.String connName)
Return a RAS connection by name
|
static java.lang.String |
getRasConnectionStatusText(int connStatus)
Translate the connection status value to text
|
static java.lang.String |
getRasErrorString(int code)
Get the RAS error description
|
static void |
hangupRasConnection(java.lang.String connName)
Hangup a connection by name
|
static void |
hangupRasConnection(WinNT.HANDLE hrasConn)
Hangup a connection
|
static void |
setPhoneBookEntry(java.lang.String entryName,
WinRas.RASENTRY.ByReference rasEntry)
Set a phone book entry
|
public static java.lang.String getRasErrorString(int code)
code
- the error codepublic static java.lang.String getRasConnectionStatusText(int connStatus)
connStatus
- the connection statuspublic static WinNT.HANDLE getRasConnection(java.lang.String connName) throws Rasapi32Util.Ras32Exception
connName
- the connection nameRasapi32Util.Ras32Exception
- errorspublic static void hangupRasConnection(java.lang.String connName) throws Rasapi32Util.Ras32Exception
connName
- the connection nameRasapi32Util.Ras32Exception
- errorspublic static void hangupRasConnection(WinNT.HANDLE hrasConn) throws Rasapi32Util.Ras32Exception
hrasConn
- the connectionRasapi32Util.Ras32Exception
- errorspublic static WinRas.RASPPPIP getIPProjection(WinNT.HANDLE hrasConn) throws Rasapi32Util.Ras32Exception
hrasConn
- the RAS connection handleRasapi32Util.Ras32Exception
- errorspublic static WinRas.RASENTRY.ByReference getPhoneBookEntry(java.lang.String entryName) throws Rasapi32Util.Ras32Exception
entryName
- the entry nameRasapi32Util.Ras32Exception
- any errorspublic static void setPhoneBookEntry(java.lang.String entryName, WinRas.RASENTRY.ByReference rasEntry) throws Rasapi32Util.Ras32Exception
entryName
- the phone book entry namerasEntry
- the entry parametersRasapi32Util.Ras32Exception
- errorspublic static WinRas.RASDIALPARAMS getPhoneBookDialingParams(java.lang.String entryName) throws Rasapi32Util.Ras32Exception
entryName
- the phone book entry nameRasapi32Util.Ras32Exception
- errorspublic static WinNT.HANDLE dialEntry(java.lang.String entryName) throws Rasapi32Util.Ras32Exception
entryName
- The phone book entry nameRasapi32Util.Ras32Exception
- errorspublic static WinNT.HANDLE dialEntry(java.lang.String entryName, WinRas.RasDialFunc2 func2) throws Rasapi32Util.Ras32Exception
entryName
- The phone book entry namefunc2
- Rasapi32Util.Ras32Exception
- errors