|
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 the License "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: Contains CIptvEvent objects* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CIPTVEVENTS_H |
|
22 #define CIPTVEVENTS_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "CIptvUtil.h" |
|
27 #include "MIptvStreamObject.h" |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 // MACROS |
|
32 |
|
33 // DATA TYPES |
|
34 |
|
35 // FUNCTION PROTOTYPES |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 |
|
39 class MIptvEvent; |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * MIptvStreamObject derived class, contains group of MIptvEvent objects. |
|
45 * This class is used to convey events over IPC. |
|
46 */ |
|
47 class CIptvEvents : public CBase, public MIptvStreamObject |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 * @param aEventProto this is used to construct new event objects. |
|
54 */ |
|
55 IMPORT_C static CIptvEvents* NewL(MIptvEvent* aEventProto); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 IMPORT_C virtual ~CIptvEvents(); |
|
61 |
|
62 public: |
|
63 |
|
64 //from MIptvStreamObject |
|
65 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
66 IMPORT_C void ExternalizeL(RWriteStream& aStream); |
|
67 IMPORT_C TUint32 CountExternalizeSize(); |
|
68 |
|
69 /** |
|
70 * Copies data from aEvents to this object. |
|
71 * |
|
72 * @param aEvents Data to be copied from. |
|
73 */ |
|
74 IMPORT_C void SetL(CIptvEvents& aEvents); |
|
75 |
|
76 /** |
|
77 * Deletes all events from this object. |
|
78 */ |
|
79 IMPORT_C void DeleteEvents(); |
|
80 |
|
81 private: |
|
82 |
|
83 /** |
|
84 * C++ default constructor. |
|
85 */ |
|
86 CIptvEvents(MIptvEvent* aEventProto); |
|
87 |
|
88 /** |
|
89 * By default Symbian 2nd phase constructor is private. |
|
90 */ |
|
91 void ConstructL(); |
|
92 |
|
93 public: |
|
94 |
|
95 /** |
|
96 * Array of pointers to events. |
|
97 */ |
|
98 RArray<MIptvEvent*> iEvents; |
|
99 |
|
100 private: |
|
101 /** |
|
102 * Pointer to event object which is used to get function implementations for |
|
103 * MIptvEvent interface methods. This defines the used event type. Owned. |
|
104 */ |
|
105 MIptvEvent* iEventProto; |
|
106 |
|
107 }; |
|
108 |
|
109 #endif // CIPTVEVENTS_H |
|
110 |
|
111 // End of File |