|
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 CMCECOMMEDIASOURCE_H |
|
22 #define CMCECOMMEDIASOURCE_H |
|
23 |
|
24 #include "mcemediasource.h" |
|
25 #include "mcecomendpoint.h" |
|
26 |
|
27 // CONSTANTS |
|
28 const TMceSourceType KMceEmptySource = 100; |
|
29 const TMceEndpointCategory KMceCategorySource = 1; |
|
30 |
|
31 #ifdef MCE_COMMON_SERVER_SIDE |
|
32 |
|
33 class CMceMediaManager; |
|
34 |
|
35 #endif//MCE_COMMON_SERVER_SIDE |
|
36 |
|
37 class TMceComSourceFactory; |
|
38 class CMceComCodec; |
|
39 |
|
40 |
|
41 /** |
|
42 * |
|
43 * |
|
44 * @lib |
|
45 */ |
|
46 class CMceComMediaSource : public CMceComEndpoint |
|
47 { |
|
48 |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Constructor |
|
53 */ |
|
54 static CMceComMediaSource* NewL(); |
|
55 |
|
56 /** |
|
57 * Constructor |
|
58 */ |
|
59 static CMceComMediaSource* NewLC(); |
|
60 |
|
61 /** |
|
62 * Destructor |
|
63 */ |
|
64 ~CMceComMediaSource(); |
|
65 |
|
66 |
|
67 public: // from CMceComEndpoint |
|
68 |
|
69 |
|
70 /** |
|
71 * Internalizes flat data |
|
72 * @param aReadStream read stream |
|
73 */ |
|
74 void InternalizeFlatL( RReadStream& aReadStream ); |
|
75 |
|
76 /** |
|
77 * Externalizes flat data |
|
78 * @param aWriteStream write stream |
|
79 */ |
|
80 void ExternalizeFlatL( RWriteStream& aWriteStream ); |
|
81 |
|
82 /** |
|
83 * Traversal event handler |
|
84 * @param aEvent the event |
|
85 * @return status, if event was consumed or not or object needs update |
|
86 */ |
|
87 TInt EventReceivedL( TMceComEvent& aEvent ); |
|
88 |
|
89 |
|
90 public: // virtual functions |
|
91 |
|
92 /** |
|
93 * Updates this object |
|
94 * @param aUpdate object updates this |
|
95 */ |
|
96 virtual void UpdateL( CMceComMediaSource& aUpdate ); |
|
97 |
|
98 /** |
|
99 * Clones this object |
|
100 * @return the cloned object |
|
101 */ |
|
102 virtual CMceComMediaSource* CloneL(); |
|
103 |
|
104 |
|
105 public: // new functions |
|
106 |
|
107 /** |
|
108 * Factory |
|
109 * @return factory |
|
110 */ |
|
111 static TMceComSourceFactory Factory(); |
|
112 |
|
113 #ifdef MCE_COMMON_SERVER_SIDE |
|
114 |
|
115 /** |
|
116 * Returns mcc type for mcc endpoint |
|
117 * @return mcc type |
|
118 */ |
|
119 const TUid MccType(); |
|
120 |
|
121 #endif//MCE_COMMON_SERVER_SIDE |
|
122 |
|
123 |
|
124 protected: |
|
125 |
|
126 /** |
|
127 * C++ default constructor. |
|
128 * @param aType type of source |
|
129 */ |
|
130 CMceComMediaSource( TMceSourceType aType ); |
|
131 |
|
132 }; |
|
133 |
|
134 |
|
135 #endif |