Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

Device.h

Go to the documentation of this file.
00001 /*********************************************************************************
00002  *
00003  * Razor! Engine - A modular C++ presentation engine
00004  *
00005  * $Id$
00006  *
00007  * Copyright (c) 2000 Tilo Christ. All Rights Reserved.
00008  *
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  *
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022  *
00023  **********************************************************************************/
00024 
00025 
00026 #ifndef DEVICE_H
00027 #define DEVICE_H
00028 
00029 #include <PalmOS.h>
00030 
00031 
00032 /**
00033  * Low level device operations.
00034  */
00035 class Device
00036 {
00037     public:
00038 
00039     /**
00040      * Initialize the Device subsystem. This operation needs to be invoked
00041      * before all others.
00042      */
00043     static void init();
00044     
00045     /**
00046      * PANIC!! Display a message to the user, then exit with a soft reset.
00047      * Invoke this operation in case of an unresolvable runtime problem
00048      * that is not your fault (e.g. low memory). Use the macros from the
00049      * ErrorManager for all problems which are your fault (i.e. which
00050      * will be ironed out in the release version).
00051      */
00052     static void panic(Err error, Char* message);
00053 
00054 
00055     /**
00056      * Check that the ROM version is meeting your minimum requirements.
00057      *
00058      * @param requiredVersion minimum ROM version required (see sysFtrNumROMVersion in SystemMgr.h for format)
00059      * @param launchFlags flags that indicate if the application UI is initialized.
00060      *
00061      * @return sysErrRomIncompatible, or errNone.
00062      */
00063     static Err romVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags);
00064 
00065     /// Does the Palm device support Palm OS 3.0 Feature Set?
00066     static Boolean supports30;
00067     /// Does the Palm device support Palm OS 3.1 Feature Set?
00068     static Boolean supports31;
00069     /// Does the Palm device support Palm OS 3.5 Feature Set?
00070     static Boolean supports35;
00071 
00072 
00073 
00074     private:
00075 
00076     static UInt32 romVersion;   
00077     static const UInt32 RomVersion30 = sysMakeROMVersion(3,0,0,sysROMStageRelease,0);
00078     static const UInt32 RomVersion31 = sysMakeROMVersion(3,1,0,sysROMStageRelease,0);
00079     static const UInt32 RomVersion35 = sysMakeROMVersion(3,5,0,sysROMStageRelease,0);
00080 };
00081 
00082 
00083 #endif

Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 4 Nov 2000