|
1 /* |
|
2 * Copyright (c) 2005 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 #ifndef MUSHENGMCEOUTSESSION_H |
|
20 #define MUSHENGMCEOUTSESSION_H |
|
21 |
|
22 // USER |
|
23 #include "musengmcesession.h" |
|
24 |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CSIPProfile; |
|
28 class CMusSipProfileHandler; |
|
29 class MMusEngOutSessionObserver; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * Class for handling MCE out sessions. Direct inherit classes are |
|
34 * CMusEngLiveSession and CMusEngClipSession. |
|
35 * |
|
36 * @lib musengine.lib |
|
37 * @since S60 v3.2 |
|
38 */ |
|
39 class CMusEngMceOutSession : public CMusEngMceSession |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Destructor |
|
46 * |
|
47 * @since S60 v3.2 |
|
48 */ |
|
49 ~CMusEngMceOutSession(); |
|
50 |
|
51 |
|
52 public: // NEW API FUNCTIONS |
|
53 |
|
54 /** |
|
55 * Sends invite to specified address |
|
56 * @leave KErrAlreadyExists if session establishment is already |
|
57 * in progress |
|
58 * |
|
59 * @since S60 v3.2 |
|
60 */ |
|
61 IMPORT_C void InviteL( const TDesC& aRecipient ); |
|
62 |
|
63 /** |
|
64 * Cancels Invite. |
|
65 * @pre Invite is sent. |
|
66 * @since S60 v3.2 |
|
67 */ |
|
68 IMPORT_C void CancelInviteL( ); |
|
69 |
|
70 |
|
71 public: // VIRTUAL API |
|
72 |
|
73 /** |
|
74 * Resumes previously paused session. Exact behavior depends on |
|
75 * exact session type. |
|
76 * |
|
77 * @since S60 v3.2 |
|
78 */ |
|
79 IMPORT_C virtual void PlayL() = 0; |
|
80 |
|
81 /** |
|
82 * Pauses session. Exact behavior depends on exact session type. |
|
83 * |
|
84 * @since S60 v3.2 |
|
85 */ |
|
86 IMPORT_C virtual void PauseL() = 0; |
|
87 |
|
88 |
|
89 protected: // Must be implemented in derived class |
|
90 |
|
91 /** |
|
92 * |
|
93 * @since S60 v3.2 |
|
94 */ |
|
95 virtual void CompleteSessionStructureL() = 0; |
|
96 |
|
97 |
|
98 protected: // helper function inherited from CMusEngMceSession |
|
99 |
|
100 /** |
|
101 * Function handling MCE session termination. |
|
102 * |
|
103 * @since S60 v3.2 |
|
104 */ |
|
105 //void HandleTermination( TMceTransactionDataContainer* aContainer ); |
|
106 |
|
107 |
|
108 protected: |
|
109 |
|
110 /** |
|
111 * Constructor |
|
112 * |
|
113 * @since S60 v3.2 |
|
114 */ |
|
115 CMusEngMceOutSession( const TRect& aRect, TUint aSipProfileId = 0 ); |
|
116 |
|
117 /** |
|
118 * Second-phase constructor |
|
119 * |
|
120 * @since S60 v3.2 |
|
121 */ |
|
122 void ConstructL(); |
|
123 |
|
124 |
|
125 protected: // HELPERS |
|
126 |
|
127 #if (defined (__WINS__) || defined(__WINSCW__)) |
|
128 /** |
|
129 * |
|
130 * @since S60 v3.2 |
|
131 */ |
|
132 void SipProfileChanged(); |
|
133 #endif |
|
134 |
|
135 |
|
136 private: |
|
137 |
|
138 /** |
|
139 * |
|
140 * @since S60 v3.2 |
|
141 */ |
|
142 void CreateMceSessionStructureL(); |
|
143 |
|
144 /** |
|
145 * |
|
146 * @since S60 v3.2 |
|
147 */ |
|
148 MMusEngOutSessionObserver* OutSessionObserver(); |
|
149 |
|
150 /** |
|
151 * Parses, validates and creates new recipient address |
|
152 * out of given address. |
|
153 * @return Parsed recipient URI. Ownership is transferred. |
|
154 * @since S60 v3.2 |
|
155 */ |
|
156 HBufC8* ParseRecipientUriL( const TDesC& aRecipient ); |
|
157 |
|
158 |
|
159 protected: // DATA |
|
160 |
|
161 /** |
|
162 * Repository id of SipProfile |
|
163 * |
|
164 * @since S60 v3.2 |
|
165 */ |
|
166 TUint iSipProfileId; |
|
167 |
|
168 /** |
|
169 * Owned by iSipProfileHandler |
|
170 * |
|
171 * @since S60 v3.2 |
|
172 */ |
|
173 //CSIPProfile* iSipProfile; |
|
174 |
|
175 /** |
|
176 * Callback pointer to interface |
|
177 * |
|
178 * @since S60 v3.2 |
|
179 */ |
|
180 //CMusSipProfileHandler* iSipProfileHandler; |
|
181 |
|
182 |
|
183 public: // DATA |
|
184 |
|
185 /** |
|
186 * |
|
187 * @since S60 v3.2 |
|
188 */ |
|
189 HBufC8* iRecipient; |
|
190 TBool iInvited; |
|
191 |
|
192 }; |
|
193 #endif //MUSHENGMCESESSION_H |