1.1 --- a/epoc32/include/mw/rsendocument.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/mw/rsendocument.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,144 @@
1.4 -rsendocument.h
1.5 +/*
1.6 +* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Class extends RDocument, enabling handle counting
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +
1.27 +
1.28 +
1.29 +
1.30 +#ifndef R_SEN_DOCUMENT
1.31 +#define R_SEN_DOCUMENT
1.32 +
1.33 +#include <xmlengdocument.h>
1.34 +#include <xmlengdomimplementation.h>
1.35 +
1.36 +typedef struct
1.37 + {
1.38 + TInt* ipOpenDocuments;
1.39 + void* iInternal;
1.40 + RXmlEngDOMImplementation iDomImpl;
1.41 + } TSenDocumentData;
1.42 +
1.43 +class RSenDocument : public RXmlEngDocument
1.44 + {
1.45 + public:
1.46 +
1.47 +
1.48 + /**
1.49 + * Default constructor.
1.50 + *
1.51 + * @since S60 v3.1
1.52 + */
1.53 + /*inline RSenDocument():RDocument()
1.54 + {
1.55 + ipOpenDocuments = new (ELeave) TInt(1);
1.56 + }*/
1.57 +
1.58 + /**
1.59 + * Create new document.
1.60 + *
1.61 + * @since S60 v3.1
1.62 + */
1.63 + IMPORT_C static RSenDocument NewL();
1.64 +
1.65 + /**
1.66 + * Create new document and put it on cleanup stack.
1.67 + *
1.68 + * @since S60 v3.1
1.69 + */
1.70 + IMPORT_C static RSenDocument NewLC();
1.71 +
1.72 + /**
1.73 + * Create new document.
1.74 + *
1.75 + * @since S60 v3.1
1.76 + * @param aInternal Document pointer
1.77 + */
1.78 + IMPORT_C static RSenDocument NewL(void* aInternal);
1.79 +
1.80 + /**
1.81 + * Create new document and put it on cleanup stack.
1.82 + *
1.83 + * @since S60 v3.1
1.84 + * @param aInternal Document pointer
1.85 + */
1.86 + IMPORT_C static RSenDocument NewLC(void* aInternal);
1.87 +
1.88 + /**
1.89 + * Copies a RSenDocument.
1.90 + * Both the original and the copy must be separately closed.
1.91 + *
1.92 + * @since S60 v3.1
1.93 + * @return Copy of this RSenDocument
1.94 + */
1.95 + IMPORT_C RSenDocument Copy();
1.96 +
1.97 + /**
1.98 + * Closes a RSenDocument.
1.99 + *
1.100 + * You must close (or destroy) every RSenDocument you create using NewL or NewLC.
1.101 + * In other words, every call to RSenDocument::Copy(), RSenDocument::NewL() and
1.102 + * RSenDocument::NewLC() must be matched by a close or destroy.
1.103 + * Note: Also Destroy() method can be used to close RSenDocument.
1.104 + *
1.105 + * @since S60 v3.1
1.106 + * @see RSenDocument::Destroy()
1.107 + */
1.108 + IMPORT_C void Close();
1.109 +
1.110 + /**
1.111 + * Closes a RSenDocument.
1.112 + *
1.113 + * You must destroy (or close) every RSenDocument you create using NewL or NewLC.
1.114 + * In other words, every call to RSenDocument::Copy(), RSenDocument::NewL() and
1.115 + * RSenDocument::NewLC() must be matched by a close or destroy.
1.116 + * Note: Also Close() method can be used to destroy RSenDocument.
1.117 + *
1.118 + * @since S60 v3.1
1.119 + * @see RSenDocument::Close()
1.120 + */
1.121 + IMPORT_C void Destroy();
1.122 +
1.123 + /**
1.124 + * Sets the Tls
1.125 + *
1.126 + * @return KErrNone
1.127 + * KErrUnknown if the Tls is unknown
1.128 + * KErrAlreadyExists if the Tls already exist.
1.129 + */
1.130 + IMPORT_C static TInt ManualXmlEngineTlsAttachL();
1.131 +
1.132 + /**
1.133 + * Frees the Tls
1.134 + *
1.135 + * @return KErrNone
1.136 + * KErrNotFound if the Tls is not found
1.137 + */
1.138 + IMPORT_C static TInt ManualXmlEngineTlsCleanup();
1.139 +
1.140 + public:
1.141 + TSenDocumentData* ipData;
1.142 + };
1.143 +
1.144 +#endif // R_SEN_DOCUMENT
1.145 +
1.146 +// End of File
1.147 +
1.148 +