2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Class extends RDocument, enabling handle counting
26 #ifndef R_SEN_DOCUMENT
27 #define R_SEN_DOCUMENT
29 #include <xmlengdocument.h>
30 #include <xmlengdomimplementation.h>
34 TInt* ipOpenDocuments;
36 RXmlEngDOMImplementation iDomImpl;
39 class RSenDocument : public RXmlEngDocument
45 * Default constructor.
49 /*inline RSenDocument():RDocument()
51 ipOpenDocuments = new (ELeave) TInt(1);
55 * Create new document.
59 IMPORT_C static RSenDocument NewL();
62 * Create new document and put it on cleanup stack.
66 IMPORT_C static RSenDocument NewLC();
69 * Create new document.
72 * @param aInternal Document pointer
74 IMPORT_C static RSenDocument NewL(void* aInternal);
77 * Create new document and put it on cleanup stack.
80 * @param aInternal Document pointer
82 IMPORT_C static RSenDocument NewLC(void* aInternal);
85 * Copies a RSenDocument.
86 * Both the original and the copy must be separately closed.
89 * @return Copy of this RSenDocument
91 IMPORT_C RSenDocument Copy();
94 * Closes a RSenDocument.
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.
102 * @see RSenDocument::Destroy()
104 IMPORT_C void Close();
107 * Closes a RSenDocument.
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.
115 * @see RSenDocument::Close()
117 IMPORT_C void Destroy();
123 * KErrUnknown if the Tls is unknown
124 * KErrAlreadyExists if the Tls already exist.
126 IMPORT_C static TInt ManualXmlEngineTlsAttachL();
132 * KErrNotFound if the Tls is not found
134 IMPORT_C static TInt ManualXmlEngineTlsCleanup();
137 TSenDocumentData* ipData;
140 #endif // R_SEN_DOCUMENT