|
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 MCECOMFACTORY_H |
|
22 #define MCECOMFACTORY_H |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <s32strm.h> |
|
26 #include "mcedefs.h" |
|
27 #include "mcemediastream.h" |
|
28 #include "mcemediasource.h" |
|
29 #include "mcemediasink.h" |
|
30 #include "mceclientserver.h" |
|
31 #include "mcecomserializationcontext.h" |
|
32 |
|
33 class CMceComMediaStream; |
|
34 class CMceComMediaSource; |
|
35 class CMceComMediaSink; |
|
36 class CMceComAudioCodec; |
|
37 class CMceComVideoCodec; |
|
38 class CMceComSession; |
|
39 class CMceMsgBase; |
|
40 class CMceComStreamBundle; |
|
41 class MMceComSerializable; |
|
42 |
|
43 class TMceComMediaStreamFactory |
|
44 { |
|
45 |
|
46 public: |
|
47 |
|
48 CMceComMediaStream* CreateLC( TMceMediaType aType ); |
|
49 |
|
50 CMceComMediaStream* CreateLC( MMceComSerializationContext& aSerCtx ); |
|
51 |
|
52 }; |
|
53 |
|
54 class TMceComSourceFactory |
|
55 { |
|
56 |
|
57 public: |
|
58 |
|
59 CMceComMediaSource* CreateLC( TMceSourceType aType ); |
|
60 |
|
61 CMceComMediaSource* CreateLC( MMceComSerializationContext& aSerCtx ); |
|
62 |
|
63 }; |
|
64 |
|
65 class TMceComSinkFactory |
|
66 { |
|
67 |
|
68 public: |
|
69 |
|
70 CMceComMediaSink* CreateLC( TMceSinkType aType ); |
|
71 |
|
72 CMceComMediaSink* CreateLC( MMceComSerializationContext& aSerCtx ); |
|
73 |
|
74 }; |
|
75 |
|
76 class TMceComAudioCodecFactory |
|
77 { |
|
78 |
|
79 public: |
|
80 |
|
81 //might leave KErrNotSupported |
|
82 CMceComAudioCodec* CreateLC( const TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
83 |
|
84 CMceComAudioCodec* CreateLC( MMceComSerializationContext& aSerCtx ); |
|
85 |
|
86 //return NULL, if codec cannot been created |
|
87 CMceComAudioCodec* CreateCodecLC( const TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
88 |
|
89 //return NULL, if codec cannot been created |
|
90 CMceComAudioCodec* CreateCodecLC( TUint aPayload ); |
|
91 |
|
92 TInt iDummy; |
|
93 |
|
94 }; |
|
95 |
|
96 class TMceComVideoCodecFactory |
|
97 { |
|
98 |
|
99 public: |
|
100 |
|
101 CMceComVideoCodec* CreateLC( const TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
102 |
|
103 CMceComVideoCodec* CreateLC( MMceComSerializationContext& aSerCtx ); |
|
104 |
|
105 //return NULL, if codec cannot been created |
|
106 CMceComVideoCodec* CreateCodecLC( const TBuf8<KMceMaxSdpNameLength> aSdpName ); |
|
107 |
|
108 //return NULL, if codec cannot been created |
|
109 CMceComVideoCodec* CreateCodecLC( TUint aPayload ); |
|
110 |
|
111 TInt iDummy; |
|
112 |
|
113 }; |
|
114 |
|
115 class TMceComFactory |
|
116 { |
|
117 |
|
118 public: |
|
119 |
|
120 CMceComSession* CreateLC( MMceComSerializationContext& aSerCtx ); |
|
121 |
|
122 CMceMsgBase* CreateL( TMceItcDataType aType, |
|
123 RReadStream& aReadStream ); |
|
124 |
|
125 CMceMsgBase* CreateL( TMceItcDataType aType, |
|
126 MMceComSerializationContext& aSerCtx ); |
|
127 |
|
128 |
|
129 CMceComStreamBundle* CreateBundleLC( CMceComSession& aSession, |
|
130 MMceComSerializationContext& aSerCtx ); |
|
131 |
|
132 void CreateLC( MMceComSerializable*& aObject, MMceComSerializationContext& aSerCtx ); |
|
133 |
|
134 |
|
135 inline TMceComMediaStreamFactory MediaStreamFactory() |
|
136 { |
|
137 return TMceComMediaStreamFactory(); |
|
138 } |
|
139 |
|
140 inline TMceComSourceFactory SourceFactory() |
|
141 { |
|
142 return TMceComSourceFactory(); |
|
143 } |
|
144 |
|
145 inline TMceComSinkFactory SinkFactory() |
|
146 { |
|
147 return TMceComSinkFactory(); |
|
148 } |
|
149 |
|
150 inline TMceComAudioCodecFactory AudioCodecFactory() |
|
151 { |
|
152 return TMceComAudioCodecFactory(); |
|
153 } |
|
154 |
|
155 inline TMceComVideoCodecFactory VideoCodecFactory() |
|
156 { |
|
157 return TMceComVideoCodecFactory(); |
|
158 } |
|
159 |
|
160 TInt iDummy; |
|
161 |
|
162 }; |
|
163 |
|
164 |
|
165 #endif |