connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IDeviceDiscoveryAgent.java
changeset 849 d8886f16bea3
parent 700 9441b6037cb6
child 899 b5675f3e69ad
equal deleted inserted replaced
847:6f65d25899ca 849:d8886f16bea3
    26  * @since 3.0
    26  * @since 3.0
    27  */
    27  */
    28 public interface IDeviceDiscoveryAgent {
    28 public interface IDeviceDiscoveryAgent {
    29 
    29 
    30 	/**
    30 	/**
       
    31 	 * An interface for discovery agents to implement that the manager uses
       
    32 	 * before loading the agent to get errors about required components.
       
    33 	 * <p>
       
    34 	 * Every discovery agent must implement this interface.
       
    35 	 */
       
    36 	public interface IPrerequisiteStatus {
       
    37 		/**
       
    38 		 * Is the status OK?
       
    39 		 * @return boolean 
       
    40 		 */
       
    41 		boolean isOK();
       
    42 		/**
       
    43 		 * If status is not OK, return error message text.
       
    44 		 * @return String
       
    45 		 */
       
    46 		String getErrorText();
       
    47 		/**
       
    48 		 * Optionally return a URL for user to browse to for more information on error.
       
    49 		 * @return URL
       
    50 		 */
       
    51 		URL getURL();
       
    52 		
       
    53 	}
       
    54 
       
    55 	/**
    31 	 * Starts agent. Once started, runs until stopped.
    56 	 * Starts agent. Once started, runs until stopped.
    32 	 * @throws CoreException
    57 	 * @throws CoreException
    33 	 */
    58 	 */
    34 	void start() throws CoreException;
    59 	void start() throws CoreException;
    35 	
    60 	
    44 	 * troubleshooting, etc.
    69 	 * troubleshooting, etc.
    45 	 * @return URL
    70 	 * @return URL
    46 	 */
    71 	 */
    47 	URL getInformation();
    72 	URL getInformation();
    48 	
    73 	
       
    74 	/**
       
    75 	 * Returns a display name for the particular discovery agent in case we need to
       
    76 	 * let the user know errors from the agents.
       
    77 	 * @return String
       
    78 	 */
       
    79 	String getDisplayName();
       
    80 	
       
    81 	/**
       
    82 	 * Manager will call this to get any status of prerequisites not satisfied before
       
    83 	 * the manager calls start(). The agent should check its prerequisites at this time.
       
    84 	 * <p>
       
    85 	 * If the agent has no prerequisites return a status of OK.
       
    86 	 * @return IPrerequisiteStatus
       
    87 	 */
       
    88 	IPrerequisiteStatus getPrerequisiteStatus();
       
    89 	
    49 	// In addition, there may need to be an additional API to do a deeper form of discovery for
    90 	// In addition, there may need to be an additional API to do a deeper form of discovery for
    50 	// connection mechanisms that require pairing (like BT or Wifi). In these cases, normal discovery
    91 	// connection mechanisms that require pairing (like BT or Wifi). In these cases, normal discovery
    51 	// will probably be for already paired devices, however, the user will want to discover all 
    92 	// will probably be for already paired devices, however, the user will want to discover all 
    52 	// potential devices from some UI in order to set up a paired device.
    93 	// potential devices from some UI in order to set up a paired device.
    53 	// A method for doing this will need to be added.
    94 	// A method for doing this will need to be added.