|
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: Service Manager event object* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CIPTVSMEVENT_H |
|
22 #define CIPTVSMEVENT_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "CIptvUtil.h" |
|
27 #include "MIptvStreamObject.h" |
|
28 |
|
29 #include "MIptvEvent.h" |
|
30 |
|
31 // CONSTANTS |
|
32 |
|
33 // MACROS |
|
34 |
|
35 // DATA TYPES |
|
36 |
|
37 // FUNCTION PROTOTYPES |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 |
|
41 // CLASS DECLARATION |
|
42 class RDesReadStream; |
|
43 class RDesWriteStream; |
|
44 class CIptvService; |
|
45 |
|
46 /** |
|
47 * Used for sending events from Service Manager (on server side) to client. |
|
48 */ |
|
49 class CIptvSmEvent : public CBase, public MIptvEvent |
|
50 { |
|
51 public: |
|
52 |
|
53 /** |
|
54 * Events, used in iEvent member variable. |
|
55 */ |
|
56 enum TEvent |
|
57 { |
|
58 /** |
|
59 * This is sent when a service is added to the database. |
|
60 */ |
|
61 EServiceAdded, |
|
62 |
|
63 /** |
|
64 * This is sent when the service address has been modified. |
|
65 */ |
|
66 EServiceModified, |
|
67 |
|
68 /** |
|
69 * This is sent when the scheduled download settings have been changed. |
|
70 */ |
|
71 EServiceScheduleModified, |
|
72 |
|
73 /** |
|
74 * This is sent when the service selection has been modified. |
|
75 */ |
|
76 EServiceSelectionModified, |
|
77 |
|
78 /** |
|
79 * This is sent when the service is deleted from the database. |
|
80 */ |
|
81 EServiceDeleted |
|
82 |
|
83 }; |
|
84 |
|
85 public: // Constructors and destructor |
|
86 |
|
87 /** |
|
88 * Two-phased constructor. |
|
89 */ |
|
90 IMPORT_C static CIptvSmEvent* NewL(); |
|
91 |
|
92 /** |
|
93 * Destructor. |
|
94 */ |
|
95 IMPORT_C ~CIptvSmEvent(); |
|
96 |
|
97 public: // New functions |
|
98 |
|
99 //from MIptvEvent |
|
100 IMPORT_C void InternalizeL(RReadStream& aStream); |
|
101 IMPORT_C void ExternalizeL(RWriteStream& aStream); |
|
102 IMPORT_C TUint32 CountExternalizeSize(); |
|
103 IMPORT_C MIptvEvent* GetCopyL(); |
|
104 IMPORT_C void Destruct(); |
|
105 |
|
106 private: |
|
107 |
|
108 /** |
|
109 * C++ default constructor. |
|
110 */ |
|
111 CIptvSmEvent(); |
|
112 |
|
113 /** |
|
114 * By default Symbian 2nd phase constructor is private. |
|
115 */ |
|
116 void ConstructL(); |
|
117 |
|
118 public: |
|
119 |
|
120 /** |
|
121 * Identifies the event. |
|
122 */ |
|
123 TEvent iEvent; |
|
124 |
|
125 /** |
|
126 * Identifies the service which caused the event. |
|
127 */ |
|
128 TUint32 iServiceId; |
|
129 |
|
130 /** |
|
131 * The service which was added, changed or deleted. This is never |
|
132 * serialized and is valid only when the event is being sent. Not own. |
|
133 */ |
|
134 CIptvService* iService; |
|
135 }; |
|
136 |
|
137 #endif // CIPTVSMEVENT_H |
|
138 |
|
139 // End of File |