htiextension/com.nokia.s60tools.hticonnection/src/com/nokia/s60tools/hticonnection/services/IScreenCaptureService.java
author dpodwall
Tue, 12 Jan 2010 13:17:53 -0600
changeset 0 61163b28edca
child 9 e67492608de0
permissions -rw-r--r--
initial EPL conversion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     1
/*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     3
* All rights reserved.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     4
* This component and the accompanying materials are made available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     6
* which accompanies this distribution, and is available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     8
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     9
* Initial Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    11
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    12
* Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    13
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    14
* Description:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    15
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    16
*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    17
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    18
package com.nokia.s60tools.hticonnection.services;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    19
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    20
import com.nokia.s60tools.hticonnection.exceptions.ConnectionException;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    21
import com.nokia.s60tools.hticonnection.exceptions.HTIException;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    22
import com.nokia.s60tools.hticonnection.exceptions.ServiceShutdownException;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    23
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    24
/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    25
 * Service that contains interface for capturing images from device.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    26
 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    27
public interface IScreenCaptureService {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    28
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    29
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    30
	 * Captures a full screen with specified type and color amount.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    31
	 * @param imgMimeType Image MIME type, e.g. "image/png", "image/gif", "image/jpeg"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    32
	 * @param colorDepth Color depth e.g. ConnectionTestService.COLOR_DEPTH_ECOLOR64K.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    33
	 * @param timeout Time in milliseconds that is waited for the operation to complete. Use 0 for infinite.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    34
	 * @return Full screen image with specified type as byte array.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    35
	 * @throws ConnectionException Connection failed
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    36
	 * @throws HTIException Thrown when there are problems with HTI
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    37
	 * @throws ServiceShutdownException Thrown after services have been shut down
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    38
	 * and new requests are not accepted.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    39
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    40
	public byte[] captureFullScreen(String imgMimeType, int colorDepth, long timeout)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    41
						throws ServiceShutdownException, HTIException, ConnectionException;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    42
	
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    43
	/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    44
	 * Gets information about the screen. This information includes width, height, rotation, and display mode
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    45
	 * of the screen. Also screen index and currently focused screen index is returned.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    46
	 * @param timeout Time in milliseconds that is waited for the operation to complete. Use 0 for infinite.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    47
	 * @return HTIScreenMode object that contains information about the screen.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    48
	 * @throws ConnectionException Connection failed
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    49
	 * @throws HTIException Thrown when there are problems with HTI
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    50
	 * @throws ServiceShutdownException Thrown after services have been shut down
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    51
	 * and new requests are not accepted.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    52
	 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    53
	public HTIScreenMode getScreenMode(long timeout)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    54
						throws ServiceShutdownException, HTIException, ConnectionException;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    55
}