|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMCEMESSAGESINK_H |
|
21 #define CMCEMESSAGESINK_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <mcedatasinkobserver.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CMceManager; |
|
30 class CMceItcSender; |
|
31 class CMceDataReceiver; |
|
32 #include <MceMediaSink.h> |
|
33 |
|
34 // CONSTANTS |
|
35 const TMceSinkType KMceMessageSink = 12; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Class representing a sink for a media stream that is implemented outside MCE. |
|
41 * |
|
42 * @lib mceclient.lib |
|
43 */ |
|
44 class CMceMessageSink: public CMceMediaSink, public MMceDataSinkObserver |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 */ |
|
51 IMPORT_C static CMceMessageSink* NewL( CMceManager& aManager ); |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 * @param aManager reference to the manager |
|
56 */ |
|
57 IMPORT_C static CMceMessageSink* NewLC( CMceManager& aManager ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 IMPORT_C ~CMceMessageSink(); |
|
63 |
|
64 |
|
65 public: // From CMceMediaSink |
|
66 |
|
67 /** |
|
68 * Enables the sink explicitly. |
|
69 */ |
|
70 IMPORT_C void EnableL(); |
|
71 |
|
72 /** |
|
73 * Disables the sink explicitly. |
|
74 */ |
|
75 IMPORT_C void DisableL(); |
|
76 |
|
77 public: |
|
78 |
|
79 /** |
|
80 * Two-phased constructor. |
|
81 */ |
|
82 static CMceMessageSink* NewL(); |
|
83 |
|
84 /** |
|
85 * Two-phased constructor. |
|
86 */ |
|
87 static CMceMessageSink* NewLC(); |
|
88 |
|
89 private: |
|
90 |
|
91 void DataReceived( CMceMediaStream& aStream, |
|
92 CMceMediaSink& aSink, const TDesC8& aData ); |
|
93 |
|
94 private: |
|
95 |
|
96 /** |
|
97 * C++ constructor. |
|
98 */ |
|
99 CMceMessageSink(); |
|
100 |
|
101 /** |
|
102 * Second-phase constructor. |
|
103 */ |
|
104 void ConstructL( CMceManager* aManager ); |
|
105 |
|
106 private: // Reserved for future use |
|
107 |
|
108 CMceDataReceiver* iReceiver; |
|
109 TAny* iReserved; |
|
110 |
|
111 MCE_UNIT_TEST_DEFS |
|
112 }; |
|
113 |
|
114 #endif // CMCEMESSAGESINK_H |