|
1 /* |
|
2 * Copyright (c) 2002-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 "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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CFACTIONSUBSCRIPTIONIMPL_H |
|
20 #define C_CFACTIONSUBSCRIPTIONIMPL_H |
|
21 |
|
22 #include <e32cmn.h> |
|
23 |
|
24 #include "cfactionsubscription.h" |
|
25 |
|
26 class MCFActionSubscriptionListener; |
|
27 class RWriteStream; |
|
28 class RReadStream; |
|
29 |
|
30 /** |
|
31 * Action subscription implementation. |
|
32 */ |
|
33 NONSHARABLE_CLASS( CCFActionSubscriptionImpl ): public CCFActionSubscription |
|
34 { |
|
35 public: // Construction & destruction |
|
36 |
|
37 // Two phased constructors |
|
38 IMPORT_C static CCFActionSubscriptionImpl* NewL(); |
|
39 IMPORT_C static CCFActionSubscriptionImpl* NewLC(); |
|
40 |
|
41 // Destructor |
|
42 ~CCFActionSubscriptionImpl(); |
|
43 |
|
44 public: // From base classes |
|
45 |
|
46 // From CCFActionSubscription |
|
47 void SetActionIdentifierL( const TDesC& aIdentifier ); |
|
48 |
|
49 // From CCFActionSubscription |
|
50 const TDesC& ActionIdentifier() const; |
|
51 |
|
52 public: // New methods |
|
53 |
|
54 /** |
|
55 * Externalizes object. |
|
56 * |
|
57 * @since S60 4.0 |
|
58 * @param aStream Stream where to write. |
|
59 * @return None |
|
60 */ |
|
61 IMPORT_C void ExternalizeL( RWriteStream& aStream ); |
|
62 |
|
63 /** |
|
64 * Internalizes object. |
|
65 * |
|
66 * @since S60 4.0 |
|
67 * @param aStream where to read. |
|
68 * @return None |
|
69 */ |
|
70 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
71 |
|
72 /** |
|
73 * Sets listener associated for the subscription. |
|
74 * |
|
75 * @since S60 4.0 |
|
76 * @param aListener Listener. |
|
77 * @return None |
|
78 */ |
|
79 IMPORT_C void SetListener( MCFActionSubscriptionListener* aListener ); |
|
80 |
|
81 /** |
|
82 * Returns listener associated with the subscription. |
|
83 * |
|
84 * @since S60 4.0 |
|
85 * @param None |
|
86 * @return MCFActionSubscriptionListener& |
|
87 */ |
|
88 IMPORT_C MCFActionSubscriptionListener& Listener() const; |
|
89 |
|
90 /** |
|
91 * Returns object size. |
|
92 * |
|
93 * @since S60 4.0 |
|
94 * @param None |
|
95 * @return TInt |
|
96 */ |
|
97 IMPORT_C TInt Size() const; |
|
98 |
|
99 private: |
|
100 |
|
101 void ConstructL(); |
|
102 CCFActionSubscriptionImpl(); |
|
103 |
|
104 private: |
|
105 |
|
106 // Own: Identifier |
|
107 HBufC* iIdentifier; |
|
108 |
|
109 // Ref: Listener |
|
110 MCFActionSubscriptionListener* iListener; |
|
111 }; |
|
112 |
|
113 // Action subscription array type definition |
|
114 typedef RPointerArray<CCFActionSubscriptionImpl> RActionSubscriptionArray; |
|
115 |
|
116 #endif // C_CFACTIONSUBSCRIPTIONIMPL_H |
|
117 |