00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CSMPEXAMPLE_H_
00019 #define CSMPEXAMPLE_H_
00020
00021 #include <e32cons.h>
00022 #include <e32base.h>
00023 #include <s32file.h>
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
00048 RThread iReadThread;
00049
00050 RThread iWriteThread1;
00051 RThread iWriteThread2;
00052 CConsoleBase* iConsole;
00053 };
00054
00055 #endif