connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IStatusDisplay.java
author dadubrow
Fri, 26 Feb 2010 11:30:21 -0600
branchRCL_2_4
changeset 1034 42eaaa076776
permissions -rw-r--r--
Add support for status notification popups
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1034
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     1
/**
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     3
* All rights reserved.
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     4
* This component and the accompanying materials are made available
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     6
* which accompanies this distribution, and is available
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     8
*
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
     9
* Initial Contributors:
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    11
*
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    12
* Contributors:
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    13
*
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    14
* Description: 
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    15
*
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    16
*/
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    17
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    18
package com.nokia.carbide.remoteconnections.internal.api;
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    19
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    20
import org.eclipse.core.runtime.IStatus;
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    21
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    22
public interface IStatusDisplay {
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    23
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    24
	/**
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    25
	 * Asynchronously displays status with notification UI
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    26
	 * @param status IStatus
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    27
	 */
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    28
	void displayStatus(IStatus status);
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    29
	
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    30
	/**
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    31
	 * Synchronously displays status with notification UI
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    32
	 * Displays a prompt and runs action if user accepts.
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    33
	 * Calling thread will block until notification is closed (either by timer or by user)
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    34
	 * and if action will be called on the calling thread.
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    35
	 * NOTE: This cannot be called on display thread!<br>
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    36
	 * <code>assert Display.getCurrent() == null;</code>
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    37
	 * @param status IStatus
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    38
	 * @param prompt String
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    39
	 * @param action Runnable
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    40
	 */
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    41
	void displayStatusWithAction(IStatus status, String prompt, Runnable action);
42eaaa076776 Add support for status notification popups
dadubrow
parents:
diff changeset
    42
}