epoc32/include/wngdoor.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 wngdoor.h
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // 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
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if !defined(__WNGDOOR_H__)
       
    17 #define __WNGDOOR_H__
       
    18 
       
    19 #if !defined(__E32STD_H__)
       
    20 #include <e32std.h>
       
    21 #endif
       
    22 
       
    23 #if !defined(__E32BASE_H__)
       
    24 #include <e32base.h>
       
    25 #endif
       
    26 
       
    27 #if !defined(__APAMDR_H__)
       
    28 #include <apamdr.h>
       
    29 #endif
       
    30 
       
    31 #if !defined(__APAID_H__)
       
    32 #include <apaid.h>
       
    33 #endif
       
    34 
       
    35 //
       
    36 // Classes defined
       
    37 class CWordModelHeader;
       
    38 class TWordModelHeaderFactory;
       
    39 class CWordModelHeaderV2;
       
    40 class TWordModelHeaderFactoryV2;
       
    41 //
       
    42 // Class referenced
       
    43 class CWordModel;
       
    44 class TWordModelStoreResolver;
       
    45 
       
    46 /** Application UID for word processor application. 
       
    47 @internalComponent
       
    48 @deprecated
       
    49 */
       
    50 const TUid KUidWordApp = {0x10003A64};
       
    51 
       
    52 
       
    53 //
       
    54 // Takes ownership of the referenced word model
       
    55 //
       
    56 class CWordModelHeaderV2 : public CApaModelHeader
       
    57 /** Wrapper for the word processor application engine.
       
    58 
       
    59 The class provides the knowledge for internalising and externalising an application 
       
    60 model's data. It enables word processor documents to be embedded within rich 
       
    61 text objects.
       
    62 
       
    63 Compared to CWordModelHeader, it also provides restoration support for objects 
       
    64 embedded within embedded word documents. 
       
    65 @publishedAll
       
    66 @deprecated
       
    67 */
       
    68 	{
       
    69 	friend class TWordModelHeaderFactoryV2;
       
    70 public:
       
    71 	IMPORT_C ~CWordModelHeaderV2();
       
    72 public:	// from CApaModelHeader
       
    73 	IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aDict)const;
       
    74 	IMPORT_C TApaAppIdentifier AppId()const;
       
    75 	IMPORT_C void DetachFromStoreL(CPicture::TDetach aDegree);
       
    76 public:
       
    77 	IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aDict);
       
    78 	IMPORT_C CWordModel* Model();
       
    79 	void SetFactory(MApaModelHeaderFactory* aFactory); // takes ownership
       
    80 private:
       
    81 	CWordModelHeaderV2(CWordModel* aModel);
       
    82 private:
       
    83 	CWordModel*	iModel;
       
    84 	TWordModelStoreResolver* iResolver; // created during restore
       
    85 	MApaModelHeaderFactory* iHeaderFactory;
       
    86 	};
       
    87 
       
    88 
       
    89 //
       
    90 //
       
    91 
       
    92 class TWordModelHeaderFactoryV2 : public MApaModelHeaderFactory
       
    93 /** Factory to construct CWordModelHeaderV2 application wrapper objects.
       
    94 @publishedAll
       
    95 @deprecated
       
    96 */
       
    97 	{
       
    98 public:
       
    99 	IMPORT_C TWordModelHeaderFactoryV2(const TFileName& aPrintDriverPath);
       
   100 	IMPORT_C CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,
       
   101 										const TApaAppIdentifier& aAppId)const;
       
   102 private:
       
   103 	TFileName iPrintDriverPath;
       
   104 	};
       
   105 
       
   106 
       
   107 
       
   108 class CWordModelHeaderV3 : public CApaModelHeader
       
   109 /** Wrapper for the word processor application engine.
       
   110 
       
   111 The class provides the knowledge for internalising and externalising an application 
       
   112 model's data. It enables word processor documents to be embedded within rich 
       
   113 text objects.
       
   114 
       
   115 Like CWordModelHeaderV2, it provides restoration support for objects embedded 
       
   116 within embedded word documents. Unlike that class, however, it does not restore 
       
   117 printer setup information, or process header and footer information. 
       
   118 @publishedAll
       
   119 @deprecated
       
   120 */
       
   121 	{
       
   122 	friend class TWordModelHeaderFactoryV3;
       
   123 public:
       
   124 	IMPORT_C ~CWordModelHeaderV3();
       
   125 public:	// from CApaModelHeader
       
   126 	IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aDict)const;
       
   127 	IMPORT_C TApaAppIdentifier AppId()const;
       
   128 	IMPORT_C void DetachFromStoreL(CPicture::TDetach aDegree);
       
   129 public:
       
   130 	IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aDict);
       
   131 	IMPORT_C CWordModel* Model();
       
   132 	void SetFactory(MApaModelHeaderFactory* aFactory); // takes ownership
       
   133 private:
       
   134 	CWordModelHeaderV3(CWordModel* aModel);
       
   135 private:
       
   136 	CWordModel*	iModel;
       
   137 	TWordModelStoreResolver* iResolver; // created during restore
       
   138 	MApaModelHeaderFactory* iHeaderFactory;
       
   139 	};
       
   140 
       
   141 
       
   142 // Mimimal header factory for efficiency
       
   143 // Does not restore header or footer information from the document
       
   144 //
       
   145 class TWordModelHeaderFactoryV3 : public MApaModelHeaderFactory
       
   146 /** Factory to construct CWordModelHeaderV3 application wrapper objects. 
       
   147 @publishedAll
       
   148 @deprecated
       
   149 */
       
   150 	{
       
   151 public:
       
   152 	IMPORT_C TWordModelHeaderFactoryV3();
       
   153 	IMPORT_C CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,
       
   154 										const TApaAppIdentifier& aAppId) const;
       
   155 	};
       
   156 
       
   157 
       
   158 #endif