|
1 /* |
|
2 * Copyright (c) 2008 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: See class definition below. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __CSessionHelper_H__ |
|
21 #define __CSessionHelper_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 |
|
26 class CMceCodec; |
|
27 class CMceMediaStream; |
|
28 class CMceManager; |
|
29 |
|
30 // CLASS DEFINITION |
|
31 /** |
|
32 * Class providing common functionality for CreateSession and UpdateSession |
|
33 * commands |
|
34 */ |
|
35 class CSessionHelper |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Constructor. |
|
41 */ |
|
42 CSessionHelper( ) {}; |
|
43 |
|
44 public: |
|
45 enum priorities |
|
46 { |
|
47 uplink, |
|
48 downlink, |
|
49 dtmf |
|
50 }; |
|
51 /** |
|
52 Sets given predefined priorities to a given codec |
|
53 @param aCodec Codec to be modified |
|
54 @param aDownlink Direction of the stream the codec belongs to |
|
55 */ |
|
56 void SetCodecPrioritiesL(CMceCodec& aCodec, priorities aPri); |
|
57 |
|
58 /** |
|
59 Sets given priorities and preferences to a given codec |
|
60 @param aCodec Codec to be modified |
|
61 @param aPri Priority |
|
62 @param aPref Preference |
|
63 */ |
|
64 void SetCodecPriPrefL(CMceCodec& aCodec, TUint aPri, TUint aPref); |
|
65 |
|
66 /** |
|
67 Sets RTP keepalive values for a given codec |
|
68 @param |
|
69 */ |
|
70 void SetKeepaliveL(CMceCodec& aCodec, TInt aKeepaliveTimeSec); |
|
71 |
|
72 /** |
|
73 * Sets RTP InactivityTimer for given media stream |
|
74 */ |
|
75 void SetRtpInactivityTimerL(CMceMediaStream& aStream, TInt aInactivityTimer); |
|
76 |
|
77 /** |
|
78 Creates filesource from the given file and sets it to stream. |
|
79 @param aManager |
|
80 @param aStream |
|
81 @param aFilename |
|
82 */ |
|
83 void SetMediaFileSourceL(CMceManager& aManager, CMceMediaStream& aStream, TPtrC8 aFilename ); |
|
84 |
|
85 /** |
|
86 Creates filesink from the given file and sets it to instream. |
|
87 @param aStream |
|
88 @param aFilename |
|
89 */ |
|
90 void SetMediaFileSinkL(CMceMediaStream& aStream, TPtrC8 aFilename ); |
|
91 }; |
|
92 |
|
93 #endif // __CSessionHelper_H__ |