|
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: Class extends RDocument, enabling handle counting |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 #ifndef R_SEN_DOCUMENT |
|
27 #define R_SEN_DOCUMENT |
|
28 |
|
29 #include <xmlengdocument.h> |
|
30 #include <xmlengdomimplementation.h> |
|
31 |
|
32 typedef struct |
|
33 { |
|
34 TInt* ipOpenDocuments; |
|
35 void* iInternal; |
|
36 RXmlEngDOMImplementation iDomImpl; |
|
37 } TSenDocumentData; |
|
38 |
|
39 class RSenDocument : public RXmlEngDocument |
|
40 { |
|
41 public: |
|
42 |
|
43 |
|
44 /** |
|
45 * Default constructor. |
|
46 * |
|
47 * @since S60 v3.1 |
|
48 */ |
|
49 /*inline RSenDocument():RDocument() |
|
50 { |
|
51 ipOpenDocuments = new (ELeave) TInt(1); |
|
52 }*/ |
|
53 |
|
54 /** |
|
55 * Create new document. |
|
56 * |
|
57 * @since S60 v3.1 |
|
58 */ |
|
59 IMPORT_C static RSenDocument NewL(); |
|
60 |
|
61 /** |
|
62 * Create new document and put it on cleanup stack. |
|
63 * |
|
64 * @since S60 v3.1 |
|
65 */ |
|
66 IMPORT_C static RSenDocument NewLC(); |
|
67 |
|
68 /** |
|
69 * Create new document. |
|
70 * |
|
71 * @since S60 v3.1 |
|
72 * @param aInternal Document pointer |
|
73 */ |
|
74 IMPORT_C static RSenDocument NewL(void* aInternal); |
|
75 |
|
76 /** |
|
77 * Create new document and put it on cleanup stack. |
|
78 * |
|
79 * @since S60 v3.1 |
|
80 * @param aInternal Document pointer |
|
81 */ |
|
82 IMPORT_C static RSenDocument NewLC(void* aInternal); |
|
83 |
|
84 /** |
|
85 * Copies a RSenDocument. |
|
86 * Both the original and the copy must be separately closed. |
|
87 * |
|
88 * @since S60 v3.1 |
|
89 * @return Copy of this RSenDocument |
|
90 */ |
|
91 IMPORT_C RSenDocument Copy(); |
|
92 |
|
93 /** |
|
94 * Closes a RSenDocument. |
|
95 * |
|
96 * You must close (or destroy) every RSenDocument you create using NewL or NewLC. |
|
97 * In other words, every call to RSenDocument::Copy(), RSenDocument::NewL() and |
|
98 * RSenDocument::NewLC() must be matched by a close or destroy. |
|
99 * Note: Also Destroy() method can be used to close RSenDocument. |
|
100 * |
|
101 * @since S60 v3.1 |
|
102 * @see RSenDocument::Destroy() |
|
103 */ |
|
104 IMPORT_C void Close(); |
|
105 |
|
106 /** |
|
107 * Closes a RSenDocument. |
|
108 * |
|
109 * You must destroy (or close) every RSenDocument you create using NewL or NewLC. |
|
110 * In other words, every call to RSenDocument::Copy(), RSenDocument::NewL() and |
|
111 * RSenDocument::NewLC() must be matched by a close or destroy. |
|
112 * Note: Also Close() method can be used to destroy RSenDocument. |
|
113 * |
|
114 * @since S60 v3.1 |
|
115 * @see RSenDocument::Close() |
|
116 */ |
|
117 IMPORT_C void Destroy(); |
|
118 |
|
119 /** |
|
120 * Sets the Tls |
|
121 * |
|
122 * @return KErrNone |
|
123 * KErrUnknown if the Tls is unknown |
|
124 * KErrAlreadyExists if the Tls already exist. |
|
125 */ |
|
126 IMPORT_C static TInt ManualXmlEngineTlsAttachL(); |
|
127 |
|
128 /** |
|
129 * Frees the Tls |
|
130 * |
|
131 * @return KErrNone |
|
132 * KErrNotFound if the Tls is not found |
|
133 */ |
|
134 IMPORT_C static TInt ManualXmlEngineTlsCleanup(); |
|
135 |
|
136 public: |
|
137 TSenDocumentData* ipData; |
|
138 }; |
|
139 |
|
140 #endif // R_SEN_DOCUMENT |
|
141 |
|
142 // End of File |
|
143 |
|
144 |