00001
00013 #ifndef OSCL_INIT_H_INCLUDED
00014 #define OSCL_INIT_H_INCLUDED
00015
00016 #ifndef OSCL_BASE_H_INCLUDED
00017 #include "oscl_base.h"
00018 #endif
00019
00020
00021 #include <stdio.h>
00022
00023 class Oscl_DefAlloc;
00024
00028 class OsclSelect
00029 {
00030 public:
00031 OsclSelect()
00032 : iOsclBase(true)
00033 , iOsclMemory(true)
00034 , iOsclErrorTrap(true)
00035 , iOsclLogger(true)
00036 , iOsclScheduler(true)
00037 , iErrAlloc(NULL)
00038 , iSchedulerAlloc(NULL)
00039 , iSchedulerName(NULL)
00040 , iSchedulerReserve(10)
00041 , iHeapCheck(false)
00042 , iOutputFile(NULL)
00043 {}
00044
00045
00046 OsclSelect(Oscl_DefAlloc* erralloc
00047 , Oscl_DefAlloc* schedalloc
00048 , const char*name
00049 , int32 reserve = 10
00050 , bool heapcheck = false
00051 , FILE* output = NULL)
00052 : iOsclBase(true)
00053 , iOsclMemory(true)
00054 , iOsclErrorTrap(true)
00055 , iOsclLogger(true)
00056 , iOsclScheduler(true)
00057 , iErrAlloc(erralloc)
00058 , iSchedulerAlloc(schedalloc)
00059 , iSchedulerName(name)
00060 , iSchedulerReserve(reserve)
00061 , iHeapCheck(heapcheck)
00062 , iOutputFile(output)
00063 {}
00064
00065 bool iOsclBase;
00066 bool iOsclMemory;
00067 bool iOsclErrorTrap;
00068 bool iOsclLogger;
00069 bool iOsclScheduler;
00070
00071 Oscl_DefAlloc *iErrAlloc;
00072 Oscl_DefAlloc *iSchedulerAlloc;
00073 const char *iSchedulerName;
00074 int32 iSchedulerReserve;
00075
00076 bool iHeapCheck;
00077
00078 FILE* iOutputFile;
00079 };
00080
00084 class OsclInit
00085 {
00086 public:
00097 OSCL_IMPORT_REF static void Init(
00098 int32& aError
00099 , const OsclSelect *aSelect = NULL
00100 );
00101
00113 OSCL_IMPORT_REF static void Cleanup(
00114 int32& aError
00115 , const OsclSelect *aSelect = NULL
00116 );
00117 };
00118
00119
00120 #endif
00121
00122