1 /* |
|
2 * Copyright (c) 2008-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: Base classes for multi-purpose tasks. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 * @internal reviewed 30/07/2007 by Simon Brooks |
|
22 */ |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // SetPriority |
|
26 // Gets the current task specific state |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 inline CGlxtnTask::TState CGlxtnTask::State() const |
|
30 { |
|
31 return iState; |
|
32 } |
|
33 |
|
34 // ----------------------------------------------------------------------------- |
|
35 // SetPriority |
|
36 // Gets the type of task this is. |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 inline TGlxtnTaskId CGlxtnTask::Id() const |
|
40 { |
|
41 return iId; |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // SetPriority |
|
46 // Gets the media ID of the item to which this task relates. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 inline TGlxMediaId CGlxtnTask::ItemId() const |
|
50 { |
|
51 return iItemId; |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // SetPriority |
|
56 // Sets the priority of the task. By default it is set to EPriorityStandard. |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 inline void CGlxtnTask::SetPriority(TInt aPriority) |
|
60 { |
|
61 iPriority = aPriority; |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // Priority |
|
66 // Gets the task priority. |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 inline TInt CGlxtnTask::Priority() const |
|
70 { |
|
71 return iPriority; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // Storage |
|
76 // Get the thumbnail storage for this task to use, if any. |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 inline MGlxtnThumbnailStorage* CGlxtnTask::Storage() const |
|
80 { |
|
81 return iStorage; |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // Client |
|
86 // Get the client for this task. |
|
87 // ----------------------------------------------------------------------------- |
|
88 // |
|
89 inline MGlxtnThumbnailCreatorClient& CGlxtnClientTask::Client() |
|
90 { |
|
91 return iClient; |
|
92 } |
|