com.jpackages.jdun
Interface DialingNotification


public interface DialingNotification

This interface defines a callback notification method used during dialing.

To get real time feedback of the dialing state, a class must be defined to implement this interface. That class must then be passed to the DialUpManager constructor.

Example:

 public class DialNotify implements DialingNotification {
   public void DialNotify() {
   }

   // callback method
   public void notifyDialingState(String name, int state, int error) {
     // output the meaning of the new dialing state
     System.out.println("notify - " + name + ": " + DialingState.getDialingStateString(state));

     // if an error, output the meaning of the error code
     if (error != 0)
       System.out.println("ERROR: " + dum.getErrorMessageForCode(error));
   }
 }

 DialNotify dialNotify = new DialNotify();
 DialUpManager dialUpManager = new DialUpManager(dialNotify);
 

Copyright (c) 2001-2007

Author:
JPackages.com

Method Summary
 void notifyDialingState(java.lang.String entryName, int dialingState, int errorCode)
          This method is called when different dialing states are reached.
 

Method Detail

notifyDialingState

void notifyDialingState(java.lang.String entryName,
                        int dialingState,
                        int errorCode)

This method is called when different dialing states are reached.

Parameters:
entryName - The entry that this dialing state change applies to.
dialingState - The DialingState of this entry.
errorCode - If an error has occurred, errorCode will not be 0. To get a string representation of this error, use the getErrorMessageForCode method in DialUpManager.