|
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 CMCEAUDIOSTREAM_H |
|
20 #define CMCEAUDIOSTREAM_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <mcemediastream.h> |
|
25 |
|
26 // CONSTANTS |
|
27 const TMceMediaType KMceAudio = 1; |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class CMceAudioCodec; |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Class for representing unidirectional audio stream. |
|
36 * |
|
37 * It defines the used audio codecs for the stream. |
|
38 * In order to be complete structure, at least one codec is required. |
|
39 * |
|
40 * @lib mceclient.lib |
|
41 */ |
|
42 class CMceAudioStream: public CMceMediaStream |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 IMPORT_C static CMceAudioStream* NewL(); |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 IMPORT_C static CMceAudioStream* NewLC(); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 IMPORT_C ~CMceAudioStream(); |
|
60 |
|
61 public: // Functions |
|
62 |
|
63 /** |
|
64 * Returns the available codecs to the session. |
|
65 * For CMEOutSession, array contains all codecs supported by |
|
66 * terminal in default. For CMEInSession, array contains codecs |
|
67 * that were offered by remote terminal, and supported by local terminal. |
|
68 * @return codecs available for the session. |
|
69 */ |
|
70 IMPORT_C const RPointerArray<CMceAudioCodec>& Codecs(); |
|
71 |
|
72 /** |
|
73 * Adds codec to the stream, ownership is transferred. |
|
74 * @param aCodec codec added to the stream |
|
75 */ |
|
76 IMPORT_C void AddCodecL( CMceAudioCodec* aCodec ); |
|
77 |
|
78 /** |
|
79 * Removes codec from the stream |
|
80 * @param aCodec codec removed from stream |
|
81 */ |
|
82 IMPORT_C void RemoveCodecL( CMceAudioCodec& aCodec ); |
|
83 |
|
84 |
|
85 public: //from CMceMediaStream |
|
86 |
|
87 /** |
|
88 * Initializes |
|
89 * @param aParent the parent |
|
90 */ |
|
91 void InitializeL( CMceSession& aParent ); |
|
92 |
|
93 /** |
|
94 * Initializes |
|
95 * @param aManager the manager. Ownership is NOT transferred |
|
96 */ |
|
97 void InitializeL( CMceManager* aManager ); |
|
98 |
|
99 |
|
100 private: //methods |
|
101 |
|
102 /** |
|
103 * C++ default constructor. |
|
104 */ |
|
105 CMceAudioStream(); |
|
106 |
|
107 /** |
|
108 * Second-phase constructor. |
|
109 */ |
|
110 void ConstructL(); |
|
111 |
|
112 |
|
113 private: // Owned data |
|
114 |
|
115 /** |
|
116 * codecs |
|
117 */ |
|
118 RPointerArray<CMceAudioCodec> iCodecs; |
|
119 |
|
120 }; |
|
121 |
|
122 #endif |