|
1 /* |
|
2 * Copyright (c) 2006 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: Video session interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CVTENGSESSIONHANDLER_H |
|
21 #define CVTENGSESSIONHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include "MVtEngSessionInfo.h" |
|
26 #include "MVtCtlEventObserver.h" |
|
27 #include "MVtCtlCallControl.h" |
|
28 // CONSTANTS |
|
29 |
|
30 // MACROS |
|
31 |
|
32 // DATA TYPES |
|
33 |
|
34 // FUNCTION PROTOTYPES |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CVtEngStateManager; |
|
38 class CVtCtlFactory; |
|
39 class CVtEngOperation; |
|
40 class CVtEngIncomingCallMonitor; |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * Abstraction for video telephony session with remote end. |
|
45 * |
|
46 * @lib videoteleng |
|
47 * @since 2.6 |
|
48 */ |
|
49 NONSHARABLE_CLASS( CVtEngSessionHandler ) : |
|
50 public CActive, |
|
51 public MVtEngSessionInfo, |
|
52 public MVtCtlEventObserver |
|
53 { |
|
54 public: // constructor and destructors |
|
55 |
|
56 static CVtEngSessionHandler* NewL( ); |
|
57 |
|
58 virtual ~CVtEngSessionHandler(); |
|
59 |
|
60 public: // New functions |
|
61 |
|
62 /** |
|
63 * Performs on operation in the handler. |
|
64 * @param operation to be performed on the handler |
|
65 */ |
|
66 void HandleL( CVtEngOperation& aOperation ); |
|
67 |
|
68 public: // from MVtEngSessionInfo |
|
69 |
|
70 /** |
|
71 * Gets session state. |
|
72 * @return |
|
73 */ |
|
74 virtual TSessionState State( TBool aForcedRefresh ) const; |
|
75 |
|
76 /** |
|
77 * Gets session direction. |
|
78 * @return |
|
79 */ |
|
80 virtual TInt GetDirection( TDirection& aDirection ) const; |
|
81 |
|
82 /** |
|
83 * Gets session duration. |
|
84 * @param |
|
85 * @param |
|
86 */ |
|
87 virtual TInt GetDuration( |
|
88 TDuration& aDuration, |
|
89 TBool& aEnabled ) const; |
|
90 |
|
91 /* |
|
92 * @see MVtEngSessionInfo::aCLI |
|
93 */ |
|
94 virtual TInt GetCLI( TCLI& aCLI ) const; |
|
95 |
|
96 public: // From MVtCtlEventObserver |
|
97 virtual void HandleVtSessionEventL( |
|
98 TVtCtlEvent aEvent, |
|
99 TAny* aParams ); |
|
100 |
|
101 public: // new functions |
|
102 /** |
|
103 * Initializes session handler. |
|
104 */ |
|
105 void InitializeL(); |
|
106 |
|
107 /** |
|
108 * Frees resources used by session handler. |
|
109 */ |
|
110 void Uninitialize(); |
|
111 |
|
112 MVtCtlCallControl::TVtCtlState RealState() const; |
|
113 |
|
114 /** |
|
115 * Starts Incoming call PS key monitoring |
|
116 */ |
|
117 void StartIncomingCallMonitorL(); |
|
118 |
|
119 private: // constructors |
|
120 |
|
121 void ConstructL(); |
|
122 |
|
123 CVtEngSessionHandler( ); |
|
124 |
|
125 private: // from CActive |
|
126 void RunL(); |
|
127 |
|
128 void DoCancel(); |
|
129 |
|
130 private: // Member data |
|
131 MVtCtlCallControl* iSessionControl; |
|
132 CVtCtlFactory* iFactory; |
|
133 |
|
134 RLibrary iLib; |
|
135 |
|
136 CVtEngIncomingCallMonitor* iIncomingCallMonitor; |
|
137 }; |
|
138 |
|
139 |
|
140 #endif // CVTENGSESSIONHANDLER_H |
|
141 |
|
142 // End of File |