author | Pat Downey <patd@symbian.org> |
Wed, 01 Sep 2010 12:31:01 +0100 | |
branch | RCL_3 |
changeset 23 | bc78a40cd63c |
parent 22 | 73a1feb507fb |
permissions | -rw-r--r-- |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
#ifndef MUSHENGMCEOUTSESSION_H |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#define MUSHENGMCEOUTSESSION_H |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
// USER |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include "musengmcesession.h" |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
23 | 26 |
// FORWARD DECLARATIONS |
27 |
class CSIPProfile; |
|
28 |
class CMusSipProfileHandler; |
|
29 |
class MMusEngOutSessionObserver; |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
// CLASS DECLARATION |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
* Class for handling MCE out sessions. Direct inherit classes are |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
* CMusEngLiveSession and CMusEngClipSession. |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
* |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
* @lib musengine.lib |
23 | 37 |
* @since S60 v3.2 |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
class CMusEngMceOutSession : public CMusEngMceSession |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
{ |
23 | 41 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
public: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
* Destructor |
23 | 46 |
* |
47 |
* @since S60 v3.2 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
~CMusEngMceOutSession(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
|
23 | 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 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
protected: |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
* Constructor |
23 | 112 |
* |
113 |
* @since S60 v3.2 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
*/ |
23 | 115 |
CMusEngMceOutSession( const TRect& aRect, TUint aSipProfileId = 0 ); |
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
|
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
/** |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
* Second-phase constructor |
23 | 119 |
* |
120 |
* @since S60 v3.2 |
|
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
*/ |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
void ConstructL(); |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
|
23 | 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 |
||
0
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
}; |
f0cf47e981f9
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
#endif //MUSHENGMCESESSION_H |