|
1 /* |
|
2 * Copyright (c) 2007 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: CCFContextDataProxy class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CFCONTEXTDATAPROXY_H |
|
20 #define C_CFCONTEXTDATAPROXY_H |
|
21 |
|
22 #include <cfcontextdataobject.h> |
|
23 |
|
24 // CONSTANTS |
|
25 const TUid KContextDataProxyUid = { 0x2000B4CF }; |
|
26 |
|
27 /** |
|
28 * This class is intended to use to transmit data object send from |
|
29 * a client process to all interested subscribers. The reason for this |
|
30 * is that a context data sent from a client process need to be internalized |
|
31 * in to object before it can be published. Since cfserver don't know and |
|
32 * does not need to know the corret object CCFContextDataProxy is used to |
|
33 * transmit the data which can be then processed and set in a context |
|
34 * indication. |
|
35 * |
|
36 * Do not use this class for any other purposes! |
|
37 * |
|
38 * @internal |
|
39 * @since S60 5.0 |
|
40 * @lib None |
|
41 */ |
|
42 NONSHARABLE_CLASS( CCFContextDataProxy ): public CCFContextDataObject |
|
43 { |
|
44 public: |
|
45 |
|
46 // Two phased constructors |
|
47 IMPORT_C static CCFContextDataProxy* NewL(); |
|
48 IMPORT_C static CCFContextDataProxy* NewLC(); |
|
49 |
|
50 // Destructor |
|
51 ~CCFContextDataProxy(); |
|
52 |
|
53 public: // New methods |
|
54 |
|
55 /** |
|
56 * Set context data uid. |
|
57 * |
|
58 * @since S60 5.0 |
|
59 * @param aUid The context data UID. |
|
60 * @return None. |
|
61 */ |
|
62 IMPORT_C void SetContextDataUid( const TUid& aUid ); |
|
63 |
|
64 /** |
|
65 * Set context data object. |
|
66 * |
|
67 * @since S60 5.0 |
|
68 * @param aData Streamed context data. |
|
69 * @return None. |
|
70 */ |
|
71 IMPORT_C void SetContextData( HBufC8* aData ); |
|
72 |
|
73 private: // From base class CCFContextDataObject |
|
74 |
|
75 // @see CCFContextDataObject |
|
76 const TUid& Uid() const; |
|
77 |
|
78 // @see CCFContextDataObject |
|
79 void ExternalizeL( RWriteStream& aStream ); |
|
80 |
|
81 // @see CCFContextDataObject |
|
82 void InternalizeL( RReadStream& aStream ); |
|
83 |
|
84 // @see CCFContextDataObject |
|
85 TInt Size() const; |
|
86 |
|
87 private: |
|
88 |
|
89 CCFContextDataProxy(); |
|
90 void ConstructL(); |
|
91 |
|
92 private: // Data |
|
93 |
|
94 /** Context data */ |
|
95 HBufC8* iData; |
|
96 |
|
97 /** Context data uid */ |
|
98 TUid iUid; |
|
99 }; |
|
100 |
|
101 #endif |