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