|
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Not for public use |
|
15 // Provides information to the main ICL body classes about their environment, plus some env sensitive ops |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __ImagePrivSupport_h |
|
20 #define __ImagePrivSupport_h |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 // provide info to the decoder about its interface |
|
25 class MImageDecoderPrivSupport |
|
26 { |
|
27 public: |
|
28 /* |
|
29 * Must use local buffer, even when decoding from descriptor |
|
30 */ |
|
31 virtual TBool MustUseBufferWithDescriptor() const=0; |
|
32 /* |
|
33 * Copy from descriptor to indicated buffer |
|
34 */ |
|
35 virtual void CopyBufferToDescriptor(TDes8& aBuffer, const TDesC8& aSource, TInt aPosition, TInt aSize)=0; |
|
36 /** |
|
37 * Indicate if running in a separate thread |
|
38 */ |
|
39 virtual TBool AmInThread() const=0; |
|
40 /** |
|
41 * Indicate if a decode should abort early (ie. following a Cancel). Always false unless in a thread. |
|
42 */ |
|
43 virtual TBool ShouldAbort() const=0; |
|
44 /** |
|
45 * Mutual exclusion lock - use on the frame tables to avoid update problems with threaded decode |
|
46 * For non-threaded implementation will be a no-op. |
|
47 */ |
|
48 virtual void Lock()=0; |
|
49 /** |
|
50 * Mutual exclusion unlock - opposit of Lock() |
|
51 * For non-threaded implementation will be a no-op. |
|
52 */ |
|
53 virtual void Unlock()=0; |
|
54 /** |
|
55 * Save the framecount - should be called whenever the framecount is successfully incremented |
|
56 * Optionally used to avoid checking the framecount directly during threading. This call should |
|
57 * only be made when we having finished setting up the frame's details. |
|
58 * For non-threaded implementation will be a no-op. |
|
59 */ |
|
60 virtual void SaveFrameCount(TInt aFrameCount)=0; |
|
61 }; |
|
62 |
|
63 // provide info to the decoder about its interface |
|
64 class MImageEncoderPrivSupport |
|
65 { |
|
66 public: |
|
67 /** |
|
68 * Indicate if running in a separate thread |
|
69 */ |
|
70 virtual TBool AmInThread() const=0; |
|
71 /** |
|
72 * Indicate if a decode should abort early (ie. following a Cancel). Always false unless in a thread. |
|
73 */ |
|
74 virtual TBool ShouldAbort() const=0; |
|
75 }; |
|
76 |
|
77 #endif // __ImagePrivSupport_h |
|
78 |