symhelp/helpmodel/tsrc/tstore.h
changeset 0 1f04cf54edd8
equal deleted inserted replaced
-1:000000000000 0:1f04cf54edd8
       
     1 // Copyright (c) 2001-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __TSTORE_H__
       
    17 #define __TSTORE_H__
       
    18 
       
    19 // System includes
       
    20 #include <e32base.h>
       
    21 #include <e32test.h>
       
    22 #include <f32file.h>
       
    23 
       
    24 // Literal constants
       
    25 _LIT(KContextText, "Context");
       
    26 _LIT(KTopicTitle, "Topic Title %d File %d");
       
    27 _LIT(KCategory, "Category %d");
       
    28 _LIT(KIndexPhrase, "Index Phrase %d File %d");
       
    29 _LIT(KSynonymText, "SynonymA SynonymB SynonymC");
       
    30 _LIT(KBodyText,	"When a program requests a service, this service can be performed either synchronously or asynchronously. A synchronous service is the “usual” pattern for function calls: when the function returns, the service requested has been performed or an error code returned. An asynchronous service is requested by a function call, but completion occurs later, and is indicated by a signal. Between the issue of the request and the signal, the request is said to be pending. The requesting program may do other processing while the request is pending, else it issues a wait. The operating system will wake up the program when completion of any of its pending requests is signalled.");
       
    31 
       
    32 // Classes referenced
       
    33 class CRichText;
       
    34 class CTestWriter;
       
    35 class CHlpDbWriter;
       
    36 class CCharFormatLayer;
       
    37 class CParaFormatLayer;
       
    38 
       
    39 // Globals
       
    40 static RTest TheTest(_L("TStore"));
       
    41 static RFs TheFsSession;
       
    42 static CTestWriter* TheWriter;
       
    43 
       
    44 // Classes
       
    45 class CTestWriter : public CBase
       
    46 	{
       
    47 public:
       
    48 	static CTestWriter* NewL(RFs& aFs);
       
    49 	~CTestWriter();
       
    50 
       
    51 private:
       
    52 	CTestWriter(RFs& aFs);
       
    53 	void ConstructL();
       
    54 
       
    55 public:
       
    56 	void BuildFilesL();
       
    57 	void DeleteFilesL();
       
    58 	TUint CategoryUID(){return iCategoryUID;}
       
    59 
       
    60 private:
       
    61 	void BuildFileL(const TDesC& aFileName, TUid aUid, TUint aNumberCategoryUID);
       
    62 	void WriteTopicTableL(TUint aNumberCategoryUID);
       
    63 	void WriteIndexTableL();
       
    64 	void WriteTopicIndexTableL();
       
    65 	void WriteContextTableL();
       
    66 	void WriteUidTableL(TUint aNumberCategoryUID);
       
    67 	void WriteTopicsL(TUint aTopicIDMultiplier);
       
    68 
       
    69 private:
       
    70 	RFs& iFs;
       
    71 	TInt iFileCount;
       
    72 	TUint32 iCategoryUID; 
       
    73 	//
       
    74 	CRichText* iRichText;
       
    75 	CHlpDbWriter* iWriter;
       
    76 	CCharFormatLayer* iCharFormatLayer;
       
    77 	CParaFormatLayer* iParaFormatLayer;
       
    78 	};
       
    79 
       
    80 /*
       
    81 LOCAL_C void WriteToTablesL();
       
    82 LOCAL_C void WriteContextTableL();
       
    83 LOCAL_C void WriteIndexTableL();
       
    84 LOCAL_C void WriteTopicTableL();
       
    85 LOCAL_C void WriteTopicIndexTableL();
       
    86 LOCAL_C void WriteUidTableL();
       
    87 LOCAL_C void CreateFilesL();
       
    88 LOCAL_C void BuildFileL(const TDesC& aFileName);
       
    89 
       
    90 _LIT(KTestDbName, "c:\\testdb.dat");
       
    91 */
       
    92 
       
    93 #endif