examples/Base/SmpExample/inc/SmpExample.h

00001 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 // Contains the definition of the CSmpExample class.
00015 //
00016 
00017 
00018 #ifndef CSMPEXAMPLE_H_
00019 #define CSMPEXAMPLE_H_
00020 
00021 #include <e32cons.h>
00022 #include <e32base.h>  //Used for CBase.
00023 #include <s32file.h>  //Used for CFileStore class.
00028 class CSmpExample : public CBase
00029     {  
00030 public:    
00031     virtual ~CSmpExample();
00032     static CSmpExample* NewL();
00033     void CreateDatabaseL(const TDesC & aDbName);         
00034     static TInt ReadThreadFuncL(TAny* aPtr);
00035     static TInt WriteThread1FuncL(TAny* aPtr);
00036     static TInt WriteThread2FuncL(TAny* aPtr);
00037     static void ReadBothDatabasesL();    
00038     static void ReadDatabaseL(const TDesC& aDbName, CConsoleBase& console);   
00039     static void WriteDbFuncL(const TDesC& aDbName, TInt aNum);  
00040     void PrintMessage(); 
00041     void StartThreads();   
00042     
00043 protected: 
00044         void ConstructL();
00045         
00046 private: 
00047     //Thread to read data from the database.
00048     RThread iReadThread;
00049     //Threads to write data to the database.
00050     RThread iWriteThread1;
00051     RThread iWriteThread2;    
00052     CConsoleBase* iConsole; 
00053     };
00054 
00055 #endif /*CSMPEXAMPLE_H_*/

Generated by  doxygen 1.6.2