|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include "statedes.h" |
|
25 |
|
26 _LIT(KStateLoaded, "LOADED"); |
|
27 _LIT(KStateIdle, "IDLE"); |
|
28 _LIT(KStateExecuting, "EXECUTING"); |
|
29 _LIT(KStatePause, "PAUSE"); |
|
30 _LIT(KStateWaitForResources, "WAIT_FOR_RESOURCES"); |
|
31 _LIT(KStateStateInvalid, "STATEINVALID"); |
|
32 _LIT(KBadState, "?"); |
|
33 |
|
34 _LIT(KClockStateRunning, "CLOCKSTATE_RUNNING"); |
|
35 _LIT(KClockStateWaitingForStartTime, "CLOCKSTATE_WAITINGFORSTARTTIME"); |
|
36 _LIT(KClockStateStopped, "CLOCKSTATE_STOPPED"); |
|
37 _LIT(KClockStateUnknown, "CLOCKSTATE_UNKNOWN"); |
|
38 |
|
39 const TDesC* StateDes(OMX_STATETYPE aState) |
|
40 { |
|
41 switch(aState) |
|
42 { |
|
43 case OMX_StateLoaded: |
|
44 return &KStateLoaded; |
|
45 case OMX_StateIdle: |
|
46 return &KStateIdle; |
|
47 case OMX_StateExecuting: |
|
48 return &KStateExecuting; |
|
49 case OMX_StatePause: |
|
50 return &KStatePause; |
|
51 case OMX_StateWaitForResources: |
|
52 return &KStateWaitForResources; |
|
53 case OMX_StateInvalid: |
|
54 return &KStateStateInvalid; |
|
55 default: |
|
56 return &KBadState; |
|
57 } |
|
58 } |
|
59 |
|
60 const TDesC* ClockStateDes(OMX_TIME_CLOCKSTATE aClockState) |
|
61 { |
|
62 switch(aClockState) |
|
63 { |
|
64 case OMX_TIME_ClockStateRunning: |
|
65 return &KClockStateRunning; |
|
66 case OMX_TIME_ClockStateWaitingForStartTime: |
|
67 return &KClockStateWaitingForStartTime; |
|
68 case OMX_TIME_ClockStateStopped: |
|
69 return &KClockStateStopped; |
|
70 default: |
|
71 return &KClockStateUnknown; |
|
72 } |
|
73 } |