|
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 |
|
20 |
|
21 #ifndef CMCECOMRTPSINK_H |
|
22 #define CMCECOMRTPSINK_H |
|
23 |
|
24 #include <e32std.h> |
|
25 #include <badesca.h> |
|
26 #include "mcecommediasink.h" |
|
27 |
|
28 /** |
|
29 * |
|
30 * |
|
31 * @lib |
|
32 */ |
|
33 class CMceComRtpSink : public CMceComMediaSink |
|
34 { |
|
35 public: // Constructors and destructor |
|
36 |
|
37 /** |
|
38 * Constructor |
|
39 */ |
|
40 static CMceComRtpSink* NewL(); |
|
41 |
|
42 /** |
|
43 * Constructor |
|
44 */ |
|
45 static CMceComRtpSink* NewLC(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 ~CMceComRtpSink(); |
|
51 |
|
52 public: // from CMceComMediaSink |
|
53 |
|
54 /** |
|
55 * Internalizes flat data |
|
56 * @param aReadStream read stream |
|
57 */ |
|
58 void InternalizeFlatL( RReadStream& aReadStream ); |
|
59 |
|
60 /** |
|
61 * Externalizes flat data |
|
62 * @param aWriteStream write stream |
|
63 */ |
|
64 void ExternalizeFlatL( RWriteStream& aWriteStream ); |
|
65 |
|
66 /** |
|
67 * Traversal event handler |
|
68 * @param aEvent the event |
|
69 * @return status, if event was consumed or not or object needs update |
|
70 */ |
|
71 TInt EventReceivedL( TMceComEvent& aEvent ); |
|
72 |
|
73 /** |
|
74 * Clones this object |
|
75 * @return the cloned object |
|
76 */ |
|
77 CMceComMediaSink* CloneL(); |
|
78 |
|
79 /** |
|
80 * Updates this object |
|
81 * @param aUpdate object updates this |
|
82 */ |
|
83 void UpdateL( CMceComMediaSink& aUpdate ); |
|
84 |
|
85 /** |
|
86 * Should use RTCP |
|
87 * return ETrue, if uses RTCP |
|
88 */ |
|
89 TBool UseRTCP(); |
|
90 |
|
91 /** |
|
92 * Sets SSRC |
|
93 * @param aSSRC SSRC |
|
94 */ |
|
95 void SetSSRC( TUint32 aSSRC ); |
|
96 |
|
97 |
|
98 #ifdef MCE_COMMON_SERVER_SIDE |
|
99 |
|
100 public: // from CMceComEndpoint |
|
101 |
|
102 /** |
|
103 * Returns ETrue, if enabled |
|
104 * @param aLocally, if ETrue means locally enabled, |
|
105 * EFalse means that local and remote |
|
106 * endpoints are enabled. |
|
107 * @return ETrue, if enabled |
|
108 */ |
|
109 TBool IsEnabled( TBool aLocally ) const; |
|
110 |
|
111 /** |
|
112 * Returns mcc type for mcc endpoint |
|
113 * @return mcc type |
|
114 */ |
|
115 const TUid MccType(); |
|
116 |
|
117 /** |
|
118 * Prepares this endpoint |
|
119 */ |
|
120 void PrepareL(); |
|
121 |
|
122 |
|
123 #endif//MCE_COMMON_SERVER_SIDE |
|
124 |
|
125 protected: |
|
126 |
|
127 /** |
|
128 * C++ default constructor. |
|
129 * @param aType type of sink |
|
130 */ |
|
131 CMceComRtpSink(); |
|
132 |
|
133 /** |
|
134 * second-phase copy constructor |
|
135 */ |
|
136 void ConstructL( CMceComRtpSink& aSink ); |
|
137 |
|
138 |
|
139 |
|
140 public: // Data |
|
141 |
|
142 |
|
143 /** |
|
144 * suppress RTCP |
|
145 */ |
|
146 TBool iSuppressRTCP; |
|
147 |
|
148 /** |
|
149 * SSRC |
|
150 */ |
|
151 TUint32 iSSRC; |
|
152 |
|
153 /** |
|
154 * last packet |
|
155 */ |
|
156 TUint32 iLastPacket; |
|
157 |
|
158 /** |
|
159 * RTP CName |
|
160 */ |
|
161 HBufC8* iIdentity; |
|
162 |
|
163 |
|
164 }; |
|
165 |
|
166 |
|
167 #endif |