author | Pat Downey <patd@symbian.org> |
Fri, 23 Jul 2010 16:58:44 +0100 | |
changeset 0 | bb31fbe78861 |
permissions | -rw-r--r-- |
0
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
1 |
/* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Aricent and/or its subsidiary(-ies). |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
3 |
* All rights reserved. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
8 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
10 |
* Aricent - initial contribution. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
11 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
12 |
* Contributors: |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
13 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
14 |
* Description: |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
15 |
* State machine for all video hwdevice plugins. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
16 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
17 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
18 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
19 |
#ifndef ARISTATEMACHINE_H |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
20 |
#define ARISTATEMACHINE_H |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
21 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
22 |
#include <e32base.h> |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
23 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
24 |
#include "ariprint.h" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
25 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
26 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
27 |
// Constants |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
28 |
const TUint KNumOfStates = 13; |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
29 |
const TUint KNumOfCommands = 8; |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
30 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
31 |
class CStateMachine : public CBase |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
32 |
{ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
33 |
public: |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
34 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
35 |
* All the states of the state machine. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
36 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
37 |
enum TState |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
38 |
{ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
39 |
EUnInitialized = 0, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
40 |
EInitializing, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
41 |
EInitialized, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
42 |
EStart, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
43 |
EPause, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
44 |
EStop, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
45 |
EInitializedInStopping, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
46 |
EStopping, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
47 |
EPauseInStopping, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
48 |
EStopInInputEnd, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
49 |
EInitializedDeadState, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
50 |
ENonInitializedDeadState, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
51 |
EInvalidState |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
52 |
}; |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
53 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
54 |
* Commands that are given to state machine |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
55 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
56 |
enum TCommand |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
57 |
{ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
58 |
EInitializeCommand = 0 , |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
59 |
EInitializingCommand, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
60 |
EStartCommand, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
61 |
EPauseCommand, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
62 |
EResumeCommand, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
63 |
EInputEndCommand, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
64 |
EStopCommand, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
65 |
EDeadStateCommand |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
66 |
}; |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
67 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
68 |
public: |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
69 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
70 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
71 |
*Constructor. State will be in EUnInitialized |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
72 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
73 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
74 |
*@leave "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
75 |
*@return "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
76 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
77 |
IMPORT_C static CStateMachine* NewL(); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
78 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
79 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
80 |
*Checks whether transition to new state is possible or not |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
81 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
82 |
*@param "aCommand" "Command for the transition" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
83 |
*@leave "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
84 |
*@return "Return ETrue if transition is valid, else EFalse |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
85 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
86 |
IMPORT_C TBool IsTransitionValid (TCommand aCommand); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
87 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
88 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
89 |
*Transits to new state. If transition cann't be done, object will |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
90 |
*remain in the previous state. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
91 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
92 |
*@param "aCommand" "Command for the transition" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
93 |
*@return "Return KErrNone if transition happens else error. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
94 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
95 |
IMPORT_C TInt Transit (TCommand aCommand); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
96 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
97 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
98 |
*Tells whether the state is initialized or not. Here initilized means |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
99 |
*if the state is in any state other than EUnInitialized |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
100 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
101 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
102 |
*@return "Return ETrue, if state is initialized else EFalse. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
103 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
104 |
IMPORT_C TBool IsInitialized (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
105 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
106 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
107 |
*Tells whether the state is exactly in EInitialized state or not. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
108 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
109 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
110 |
*@return Return ETrue, if in EInitialized state else EFalse. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
111 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
112 |
IMPORT_C TBool IsInInitializedState (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
113 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
114 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
115 |
*Tells whether the state is in initializing state or not. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
116 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
117 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
118 |
*@return "Return ETrue, if state is initializing else EFalse. |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
119 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
120 |
IMPORT_C TBool IsInitializing (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
121 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
122 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
123 |
*Tells whether the state is in any one of the input ending states i.e |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
124 |
* EInitializedInStopping, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
125 |
* EStopping, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
126 |
* EPauseInStopping, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
127 |
* EStopInInputEnd |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
128 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
129 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
130 |
*@param None |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
131 |
*@return Return ETrue, if state is in any of inputend state else EFalse |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
132 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
133 |
IMPORT_C TBool IsInputEndPending (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
134 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
135 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
136 |
*Tells whether state is in EStart state |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
137 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
138 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
139 |
*@return "Return ETrue if state is EStart, elase EFalse |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
140 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
141 |
IMPORT_C TBool IsStarted (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
142 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
143 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
144 |
*Tells whether state is in EPause state |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
145 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
146 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
147 |
*@return "Return ETrue if state is EPause, elase EFalse |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
148 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
149 |
IMPORT_C TBool IsPaused (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
150 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
151 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
152 |
*Tells whether state is in EStop state |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
153 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
154 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
155 |
*@return "Return ETrue if state is EStop, elase EFalse |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
156 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
157 |
IMPORT_C TBool IsStopped (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
158 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
159 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
160 |
*Tells whether state is in EPlaying state |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
161 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
162 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
163 |
*@return "Return ETrue if state is EPlaying, elase EFalse |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
164 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
165 |
IMPORT_C TBool IsPlaying (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
166 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
167 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
168 |
*Tells whether state is in EInitializedDeadState/ENonInitializedDeadState |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
169 |
*state |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
170 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
171 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
172 |
*@return "Return ETrue if state is |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
173 |
* Return EInitializedDeadState/ENonInitializedDeadState, |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
174 |
* elase EFalse" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
175 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
176 |
IMPORT_C TBool IsInDeadState (); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
177 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
178 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
179 |
*Resets the state machine to EUnInitialized state |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
180 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
181 |
*@param "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
182 |
*@return "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
183 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
184 |
IMPORT_C void Reset(); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
185 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
186 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
187 |
* Returns whether the current state is in initailize or not |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
188 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
189 |
*@return "ETrue if current state is in Initailize" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
190 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
191 |
IMPORT_C TBool IfIsStateInInitailize(); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
192 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
193 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
194 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
195 |
* Destructor of the statemachine |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
196 |
* |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
197 |
*@return "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
198 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
199 |
~CStateMachine(); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
200 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
201 |
private: |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
202 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
203 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
204 |
*Symbian 2nd phase constructor |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
205 |
*@return "None" |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
206 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
207 |
void ConstructL(); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
208 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
209 |
/** |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
210 |
*Default Constructor |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
211 |
*/ |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
212 |
CStateMachine(); |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
213 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
214 |
private: |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
215 |
//Stores the state of the state machine |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
216 |
TState iState; |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
217 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
218 |
TState iStateChanges[KNumOfStates][KNumOfCommands]; |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
219 |
}; |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
220 |
|
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
221 |
#endif // ARISTATEMACHINE_H |
bb31fbe78861
Initial commit of Aricent codec contribution.
Pat Downey <patd@symbian.org>
parents:
diff
changeset
|
222 |