|
1 /* |
|
2 * Copyright (c) 2004 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: Advanced Presence Attribute interface. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MPENGPRESENCEADVANCEDATTRMODEL2_H |
|
19 #define __MPENGPRESENCEADVANCEDATTRMODEL2_H |
|
20 |
|
21 // INCLUDES |
|
22 #include "MPEngPresenceAttrModel2.h" |
|
23 #include <E32Std.h> |
|
24 |
|
25 |
|
26 //FORWARD DECLARATIONS |
|
27 class MPEngXMLParser; |
|
28 class MPEngXMLSerializer; |
|
29 class RWriteStream; |
|
30 class RReadStream; |
|
31 class CPEngPresenceAttrModelStorageProxy; |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * Advanced attribute model interface for Presence Engine |
|
41 * internal use. |
|
42 * |
|
43 * This class defines the internal advanced interface |
|
44 * for concrete Presence Attribute Models. This interface is |
|
45 * used inside of the Presence Engine and this allows variety |
|
46 * of extended operations to be performed for attribute models. |
|
47 * |
|
48 * @since 3.0 |
|
49 */ |
|
50 class MPEngPresenceAdvancedAttrModel2 : public MPEngPresenceAttrModel2 |
|
51 { |
|
52 public: //XML handling |
|
53 |
|
54 /** |
|
55 * Encodes attribute value to XML. |
|
56 * |
|
57 * @since 3.0 |
|
58 * @param aSerializer The serializer where to write the XML. |
|
59 */ |
|
60 virtual void EncodeToXmlL( MPEngXMLSerializer& aSerializer ) const = 0; |
|
61 |
|
62 |
|
63 /** |
|
64 * Decodes attribute value from XML. |
|
65 * |
|
66 * @since 3.0 |
|
67 * @param aParser The parser to use in parsing. |
|
68 * @param aDataBlock The XML block containing attribute data. |
|
69 */ |
|
70 virtual void DecodeFromXmlL( MPEngXMLParser& aParser, |
|
71 const TDesC8& aDataBlock ) = 0; |
|
72 |
|
73 |
|
74 public: //Storage support |
|
75 |
|
76 /** |
|
77 * Access to attribute model storage proxy. |
|
78 * @since 3.0 |
|
79 * @return Attribute model storage proxy. |
|
80 */ |
|
81 virtual const CPEngPresenceAttrModelStorageProxy& Storage() const = 0; |
|
82 virtual CPEngPresenceAttrModelStorageProxy& Storage() = 0; |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 public: //Serialization |
|
88 |
|
89 /** |
|
90 * Gets the byte size needed to to externalize attribute model. |
|
91 * @since 3.0 |
|
92 * @return Byte size needed to externalize the attribute model. |
|
93 */ |
|
94 virtual TInt ExternalizeSize() const = 0; |
|
95 |
|
96 |
|
97 /** |
|
98 * Externalizes attribute model data. |
|
99 * |
|
100 * @since 3.0 |
|
101 * @param aStream The stream to write. |
|
102 */ |
|
103 virtual void ExternalizeL( RWriteStream& aStream ) const = 0; |
|
104 |
|
105 |
|
106 |
|
107 /** |
|
108 * Internalizes attribute model data. |
|
109 * |
|
110 * @since 3.0 |
|
111 * @param aStream The stream read from. |
|
112 */ |
|
113 virtual void InternalizeL( RReadStream& aStream ) = 0; |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 public: //Network commits and session state handling |
|
119 |
|
120 |
|
121 /** |
|
122 * Sets attribute data source as network. |
|
123 * @since 3.0 |
|
124 */ |
|
125 virtual void HandleAttributeUpdatedToNetwork() = 0; |
|
126 |
|
127 |
|
128 /** |
|
129 * Handles network session status change. |
|
130 * @since 3.0 |
|
131 * @param aSessionOpen If ETrue, network presence session |
|
132 * was opened. If EFalse, network presence session was closed. |
|
133 */ |
|
134 virtual void HandleNetworkSessionStateChangeL( TBool aSessionOpen ) = 0; |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 public: //destructor |
|
140 |
|
141 /** |
|
142 * Inline virtual destructor. |
|
143 * Concrete objects can be deleted through |
|
144 * this interface. |
|
145 */ |
|
146 virtual ~MPEngPresenceAdvancedAttrModel2() {}; |
|
147 |
|
148 }; |
|
149 |
|
150 #endif //__MPENGPRESENCEADVANCEDATTRMODEL2_H |
|
151 |
|
152 |
|
153 // End of File |
|
154 |
|
155 |