SenDomFragmentBase.h

Go to the documentation of this file.
00001 /*
00002 * ==============================================================================
00003 *  Name        : SenDomFragmentBase.h
00004 *  Part of     : Web Services Fragment Base
00005 *  Description : Class implements XML DOM fragment using libxml2 classes
00006 *  Version     : 1.0
00007 *
00008 *  Copyright © 2002-2006 Nokia. All rights reserved.
00009 *  This material, including documentation and any related 
00010 *  computer programs, is protected by copyright controlled by 
00011 *  Nokia. All rights are reserved. Copying, including 
00012 *  reproducing, storing, adapting or translating, any 
00013 *  or all of this material requires the prior written consent of 
00014 *  Nokia. This material also contains confidential 
00015 *  information which may not be disclosed to others without the 
00016 *  prior written consent of Nokia.
00017 * ==============================================================================
00018 */
00019 
00020 
00021 #ifndef SEN_DOM_FRAGMENT_BASE_H
00022 #define SEN_DOM_FRAGMENT_BASE_H
00023 
00024 //  INCLUDES
00025 #include <SenFragmentBase.h>
00026 
00027 // FORWARD DECLARATIONS
00028 class RFileLogger;
00029 
00030 // CLASS DECLARATION
00031 
00044 class CSenDomFragmentBase : public CSenFragmentBase
00045     {
00046     public:  // Constructors and destructor
00047         
00054         IMPORT_C static CSenDomFragmentBase* NewL();
00055 
00061         IMPORT_C static CSenDomFragmentBase* NewL(
00062             const TXmlEngElement& aElement);
00063 
00069         IMPORT_C static CSenDomFragmentBase* NewL(const TDesC8& aLocalName);
00070 
00077         IMPORT_C static CSenDomFragmentBase* NewL(const TDesC8& aNsUri,
00078                                               const TDesC8& aLocalName);
00079 
00087         IMPORT_C static CSenDomFragmentBase* NewL(const TDesC8& aNsUri,
00088                                               const TDesC8& aLocalName,
00089                                               const TDesC8& aPrefix);
00090 
00099         IMPORT_C static CSenDomFragmentBase* NewL(const TDesC8& aNsUri,
00100                                               const TDesC8& aLocalName,
00101                                               const TDesC8& aPrefix,
00102                                               const RAttributeArray& aAttrs);
00103 
00113         IMPORT_C static CSenDomFragmentBase* NewL(const TDesC8& aNsUri,
00114                                               const TDesC8& aLocalName,
00115                                               const TDesC8& aPrefix,
00116                                               const RAttributeArray& aAttrs,
00117                                               TXmlEngElement& aParent);
00118 
00130         IMPORT_C static CSenDomFragmentBase* NewL(const TDesC8& aNsUri,
00131                                               const TDesC8& aLocalName,
00132                                               const TDesC8& aPrefix,
00133                                               const RAttributeArray& aAttrs,
00134                                               TXmlEngElement& aParent,
00135                                               RSenDocument& aOwnerDocument);
00139         IMPORT_C virtual ~CSenDomFragmentBase();
00140 
00141         // New functions
00142     
00153         IMPORT_C virtual void ExpandL(const RTagInfo& aElement,
00154                                       const RAttributeArray& aAttributes,
00155                                       TInt aErrorCode);
00156                                       
00157         // Functions from base classes
00158 
00159         // From CSenBaseFragment
00160         
00169         IMPORT_C virtual void OnResumeParsingFromL(const RTagInfo& aElement,
00170                                            TInt aErrorCode);
00171 
00177         IMPORT_C virtual void AddAttributesL(const RAttributeArray& aAttrs);
00178         
00184         IMPORT_C virtual HBufC8* AsXmlL();
00185         
00192         IMPORT_C virtual void OnStartElementL(const RTagInfo& aElement,
00193                                               const RAttributeArray& aAttributes,
00194                                               TInt aErrorCode);
00195 
00202         IMPORT_C virtual void OnContentL(const TDesC8& aBytes,
00203                                          TInt aErrorCode);
00204         
00213         IMPORT_C void OnWriteStartElementL(const RTagInfo& aElement, 
00214                                            const RAttributeArray& aAttributes);
00215 
00223         IMPORT_C void OnWriteEndElementL(const RTagInfo& aElement);        
00230         IMPORT_C virtual void OnEndElementL(const RTagInfo& aElement, TInt aErrorCode);
00231 
00238         IMPORT_C virtual void OnStartDocumentL(const RDocumentParameters& aDocParam, TInt aErrorCode);
00239 
00246         IMPORT_C virtual void OnEndDocumentL(TInt aErrorCode);
00247 
00254         IMPORT_C virtual void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, TInt aErrorCode);
00255 
00262         IMPORT_C virtual void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode);
00263 
00270         IMPORT_C virtual void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt ErrorCode);
00271 
00278         IMPORT_C virtual void OnSkippedEntityL(const RString& aName, TInt aErrorCode);
00279 
00286         IMPORT_C virtual void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode);
00287 
00294         IMPORT_C virtual void OnError(TInt aErrorCode);
00295 
00302         IMPORT_C virtual TAny* GetExtendedInterface(const TInt32 aUid);
00303 
00304         // From CSenBaseFragment
00305         IMPORT_C virtual TPtrC8 ContentL();
00306         
00307         IMPORT_C virtual TXmlEngNamespace Namespace(const TDesC8& aPrefix);
00308         
00309 //        IMPORT_C virtual void DetachL();
00310         
00311         IMPORT_C virtual void ResetContentL();
00312 
00313         IMPORT_C virtual TPtrC8 LocalName() const;
00314         
00315         IMPORT_C virtual TPtrC8 NsUri() const;
00316 
00317         IMPORT_C virtual TPtrC8 NsPrefix() const;    
00318 
00319         IMPORT_C virtual TXmlEngElement AsElementL();
00320 
00321         IMPORT_C virtual RSenDocument& AsDocumentL();
00322 
00323         IMPORT_C virtual TXmlEngElement ExtractElement();
00324         
00325         IMPORT_C virtual void OnDelegateParsingL(CSenFragmentBase& aDelegate);
00326 
00327         IMPORT_C virtual void OnDelegateParsingL(const RTagInfo& aElement, 
00328                                                  const RAttributeArray& aAttributes, 
00329                                                  TInt aErrorCode);
00330         
00331         IMPORT_C virtual void SetOwner(CSenFragmentBase& aFragment);
00332 
00333         IMPORT_C virtual HBufC* AsXmlUnicodeL();
00334 
00335         IMPORT_C virtual void WriteAsXMLToL(RWriteStream& aWs);
00336 
00337         IMPORT_C virtual TBool ConsistsOfL(CSenFragmentBase& aCandidate);
00338         
00339         IMPORT_C void SetContentHandler(CSenFragmentBase& aContentHandler);
00340         
00341     protected: // From CSenBaseFragment
00342     
00343         void RenameL(const TDesC8& aLocalName, const TDesC8& aPrefix, const TDesC8& aNamespace);
00344 
00345         void RenameL(const TDesC8& aLocalName, const TDesC8& aNamespace);
00346 
00347         void RenameLocalNameL(const TDesC8& aLocalName);
00348 
00349         void RenameNamespaceL(const TDesC8& aNamespace);
00350 
00351         void RenamePrefixL(const TDesC8& aPrefix);
00352 
00353         void RenameNamespaceL(const TDesC8& aPrefix, const TDesC8& aNamespace);
00354          
00355         IMPORT_C TXmlEngElement SetContentOfL(const TDesC8& aLocalName,
00356                                         const TDesC8& aContent);
00357 
00358         IMPORT_C TPtrC8 ContentOf(const TDesC8& aLocalName);        
00359 
00360         IMPORT_C virtual TBool ConsistsOfL(TXmlEngElement& aElement, TXmlEngElement& aCandidate);
00361 
00362         IMPORT_C virtual void AddNamespacesL();
00363 
00364     protected:  
00365         
00369         IMPORT_C CSenDomFragmentBase();
00370 
00375         IMPORT_C void BaseConstructL();
00376 
00382         IMPORT_C void BaseConstructL(const TXmlEngElement& aElement);
00383 
00389         IMPORT_C void BaseConstructL(const TDesC8& aLocalName);
00390 
00397         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00398                                      const TDesC8& aLocalName);
00399 
00407         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00408                                      const TDesC8& aLocalName,
00409                                      const TDesC8& aPrefix);
00410 
00419         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00420                                      const TDesC8& aLocalName,
00421                                      const TDesC8& aPrefix,
00422                                      const RAttributeArray& aAttrs);
00423 
00433         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00434                                      const TDesC8& aLocalName,
00435                                      const TDesC8& aPrefix,
00436                                      const RAttributeArray& aAttrs,
00437                                      TXmlEngElement& aParent);
00438                                      
00450         IMPORT_C void BaseConstructL(const TDesC8& aNsUri,
00451                                      const TDesC8& aLocalName,
00452                                      const TDesC8& aPrefix,
00453                                      const RAttributeArray& aAttrs,
00454                                      TXmlEngElement& aParent,
00455                                      RSenDocument& aOwnerDocument);
00456 
00462         // From CSenBaseFragment 
00463                                        
00464     protected: // Data
00465         CSenDomFragmentBase* ipDomDelegate;
00466     };
00467 
00468 #endif //SEN_DOM_FRAGMENT_BASE_H
00469 
00470 // End of File
00471 
00472 
00473 

Copyright © Nokia Corporation 2001-2007
Back to top