/*******************************************************************
 Copyright © 1995 - 1998, 3Com Corporation or its subsidiaries ("3Com").  
 All rights reserved.
   
 This software may be copied and used solely for developing products for 
 the Palm Computing platform and for archival and backup purposes.  Except 
 for the foregoing, no part of this software may be reproduced or transmitted 
 in any form or by any means or used to make any derivative work (such as 
 translation, transformation or adaptation) without express written consent 
 from 3Com.

 3Com reserves the right to revise this software and to make changes in content 
 from time to time without obligation on the part of 3Com to provide notification 
 of such revision or changes.  
 3COM MAKES NO REPRESENTATIONS OR WARRANTIES THAT THE SOFTWARE IS FREE OF ERRORS 
 OR THAT THE SOFTWARE IS SUITABLE FOR YOUR USE.  THE SOFTWARE IS PROVIDED ON AN 
 "AS IS" BASIS.  3COM MAKES NO WARRANTIES, TERMS OR CONDITIONS, EXPRESS OR IMPLIED, 
 EITHER IN FACT OR BY OPERATION OF LAW, STATUTORY OR OTHERWISE, INCLUDING WARRANTIES, 
 TERMS, OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND 
 SATISFACTORY QUALITY.

 TO THE FULL EXTENT ALLOWED BY LAW, 3COM ALSO EXCLUDES FOR ITSELF AND ITS SUPPLIERS 
 ANY LIABILITY, WHETHER BASED IN CONTRACT OR TORT (INCLUDING NEGLIGENCE), FOR 
 DIRECT, INCIDENTAL, CONSEQUENTIAL, INDIRECT, SPECIAL, OR PUNITIVE DAMAGES OF 
 ANY KIND, OR FOR LOSS OF REVENUE OR PROFITS, LOSS OF BUSINESS, LOSS OF INFORMATION 
 OR DATA, OR OTHER FINANCIAL LOSS ARISING OUT OF OR IN CONNECTION WITH THIS SOFTWARE, 
 EVEN IF 3COM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

 3Com, HotSync, Palm Computing, and Graffiti are registered trademarks, and 
 Palm III and Palm OS are trademarks of 3Com Corporation or its subsidiaries.

 IF THIS SOFTWARE IS PROVIDED ON A COMPACT DISK, THE OTHER SOFTWARE AND 
 DOCUMENTATION ON THE COMPACT DISK ARE SUBJECT TO THE LICENSE AGREEMENT 
 ACCOMPANYING THE COMPACT DISK.

 *-------------------------------------------------------------------
 * FileName:
 *		SystemMgr.rh
 *
 * Description:
 *		Include file for both PilotRez and the C Compiler. This file contains
 *  equates used by both tools. When compiling using the C compiler
 *  the variable RESOURCE_COMPILER must be defined.
 *  
 *
 * History:
 *   	2/27/95 Created by Ron Marianetti
 *		8/4/95	vmk	Added system resource id for Desktop Link user info
 *		2/3/98	tlw	Changed sysFileCDefaultApp from sysFileCMemory which
 *							no longer exists to sysFileCPreferences.
 *
 *******************************************************************/

#ifndef 	__SYSTEMMGR_RH__
#define	__SYSTEMMGR_RH__

//-----------------------------------------------------------
// This section is common to both the C and Resource Compiler
//-----------------------------------------------------------

//................................................................
// File types and creators
//
//	Each database shall have a creator ID and a type.
//
//	The creator ID shall establish which application, patch, or extension
//	a particular database is associated with.  The creator ID should identify
//	the application/patch/extension, NOT who created it.
//
//	The type will determine which part of an application,
//	patch, or extension a particular database is.
//
//	There can be only one database per application, patch, or extension
//	which has type 'application', 'patch', or 'extension'.
//
//	Creators:
//
//	ROM-based applications created by Palm Computing have all-lower case
//	creator ID's.  Third-party applications have creator ID's which
//	are either all caps, or mixed case.  The same requirements go for
//	system patches and extensions.
//
//	All applications, system patches and extensions shall have unique creator
//	ID's.
//
//	Types:
//
//	'Application', 'Extension', and 'Patch' file/database types for ROM-based
//	apps shall be all-lower case (they are defined below).  Other
//	file/database types must be mixed-case,
//	or all caps.  These other types are internal to the applications, and
//	therefore the system is unconcerned with their exact values.
//................................................................
#define	sysFileCSystem						'psys'	// Creator type for System files
#define  sysFileCGraffiti					'graf'	// Creator type for Graffiti databases
#define	sysFileCSystemPatch				'ptch'	// Creator for System resource file patches

#define	sysFileCCalculator				'calc'	// Creator type for Calculator App
#define	sysFileCSecurity					'secr'	// Creator type for Security App
#define	sysFileCPreferences				'pref'	// Creator type for Preferences App
#define	sysFileCAddress					'addr'	// Creator type for Address App
#define	sysFileCToDo						'todo'	// Creator type for To Do App
#define	sysFileCDatebook					'date'	// Creator type for Datebook App
#define	sysFileCMemo						'memo'	// Creator type for MemoPad App
#define	sysFileCSync						'sync'	// Creator type for HotSync App
#define	sysFileCMemory						'memr'	// Creator type for Memory App
#define	sysFileCMail						'mail'	// Creator type for Mail App
#define	sysFileCExpense					'exps'	// Creator type for Expense App
#define	sysFileCLauncher					'lnch'	// Creator type for Launcher App

// Demo Apps
#define	sysFileCGraffitiDemo				'gdem'	// Creator type for Graffiti Demo
#define	sysFileCMailDemo					'mdem'	// Creator type for Mail Demo

#define	sysFileCFirstApp					sysFileCPreferences	// Creator type for First App after reset
#define	sysFileCDefaultApp				sysFileCPreferences	// Creator type for Default app
#define	sysFileCDefaultButton1App		sysFileCDatebook		// Creator type for dflt hard button 1 app
#define	sysFileCDefaultButton2App		sysFileCAddress		// Creator type for dflt hard button 2 app
#define	sysFileCDefaultButton3App		sysFileCToDo			// Creator type for dflt hard button 3 app
#define	sysFileCDefaultButton4App		sysFileCMemo			// Creator type for dflt hard button 4 app
#define	sysFileCDefaultCalcButtonApp	sysFileCCalculator	// Creator type for dflt calc button app
#define	sysFileCDefaultCradleApp		sysFileCSync			// Creator type for dflt hot sync button app
#define	sysFileCDefaultModemApp			sysFileCSync			// Creator type for dflt modem button app
#define	sysFileCNullApp					'0000'	// Creator type for non-existing app 

#define	sysFileCDigitizer					'digi'	// Creator type for Digitizer Panel
#define	sysFileCGeneral					'gnrl'	// Creator type for General Panel
#define	sysFileCFormats					'frmt'	// Creator type for Formats Panel
#define	sysFileCShortCuts					'shct'	// Creator type for ShortCuts Panel
#define	sysFileCButtons					'bttn'	// Creator type for Buttons Panel
#define	sysFileCOwner						'ownr'	// Creator type for Owner Panel
#define	sysFileCModemPanel				'modm'	// Creator type for Modem Panel
#define	sysFileCDialPanel					'dial'	// Creator type for Dial Panel
#define	sysFileCNetworkPanel				'netw'	// Creator type for Network Panel
#define	sysFileCPADHtal					'hpad'	// Creator type for PAD HTAL lirary
#define	sysFileCTCPHtal					'htcp'	// Creator type for TCP HTAL lirary
#define	sysFileCMineHunt					'mine'	// Creator type for MineHunt App
#define	sysFileCPuzzle15					'puzl'	// Creator type for Puzzle "15" App
#define	sysFileCOpenLibInfo				'olbi'	// Creator type for Feature Manager features
																// used for saving open library info under PalmOS v1.x


// Libraries.  If the resource used by these are expected to be treated as part of
// the system's usage then the Memory app must be changed.
#define	sysFileTLibrary					'libr'	// File type of Shared Libraries

#define	sysFileCNet							'netl'	// Net Library
#define	sysFileCIrLib 						'irda'	// Creator type for Ir Library

#define	sysFileCSerialHwrMgr				'shwm'	// Creator type for SerialHWMgr
#define	sysFileCSerialWrapper			'swrp'	// Creator type for Serial Wrapper Library
#define	sysFileCIrSerialWrapper			'iwrp'	// Creator type for Ir Serial Wrapper Library

#define	sysFileTUartPlugIn				'sdrv'	// File type for SerialHWMgr UART plug-in
#define	sysFileCUart328 					'u328'	// Creator type for '328 UART plug-in
#define	sysFileCUart650 					'u650'	// Creator type for '650 UART plug-in

#define	sysFileTSystem						'rsrc'	// File type for Main System File
#define	sysFileTSystemPatch				'ptch'	// File type for System resource file patches
#define	sysFileTKernel						'krnl'	// File type for System Kernel (AMX)
#define	sysFileTUIAppShell				'uish'	// File type for UI Application Shell
#define	sysFileTExtension					'extn'	// File type for System Extensions
#define	sysFileTApplication				'appl'	// File type for applications
#define	sysFileTPanel						'panl'	// File type for preference panels
#define	sysFileTSavedPreferences		'sprf'	// File type for saved preferences
#define	sysFileTPreferences				'pref'	// File type for preferences
#define	sysFileTMidi						'smfr'	// File type for Standard MIDI File record databases

#define	sysFileTGraffitiMacros			'macr'	//  Graffiti Macros database

#define	sysFileTHtalLib					'htal'	//  HTAL library

#define  sysFileTExgLib						'exgl'	// Type of Exchange libraries

#define	sysFileTFileStream				'strm'	//  Default File Stream database type

#define	sysFileTTemp						'temp'	//  Temporary database type; in future versions
																//  of PalmOS (although likely not in 3.0), the
																//  system may automatically delete any db's of
																//  this type at reset time (however, apps are still
																//  responsible for deleting the ones they create
																//  before exiting to protect valuable storage space)


//................................................................
// Resource types and IDs
//................................................................
#define	sysResTBootCode					'boot'	// Resource type of boot resources
#define	sysResIDBootReset					10000		// Reset code 
#define	sysResIDBootInitCode				10001		// Init code 
#define	sysResIDBootSysCodeStart		10100		// System code resources start here
#define	sysResIDBootSysCodeMin			10102		// IDs 'Start' to this must exist!!
#define	sysResIDBootUICodeStart			10200		// UI code resources start here
#define	sysResIDBootUICodeMin			10203		// IDs 'Start' to this must exist!!
	
#define	sysResTAppPrefs					'pref'	// Resource type of App preferences resources

#define	sysResTAppCode						'code'	// Resource type of App code resources
#define	sysResTAppGData					'data'	// Resource type of App global data resources

#define	sysResTExtensionCode				'extn'	// Resource type of Extensions code

#define	sysResTFeatures					'feat'	// Resource type of System features table
#define	sysResIDFeatures					10000		// Resource ID of System features table

#define	sysResTCountries					'cnty'	// Resource type of System countries table
#define	sysResIDCountries					10000		// Resource ID of System countries table

#define	sysResTLibrary						'libr'	// Resource type of System Libraries
#define	sysResIDLibrarySerMgr328		10000		// Dragonball (68328) UART
#define	sysResIDLibrarySerMgr681		10001		// 68681 UART
#define	sysResIDLibraryRMPPlugIn		10002		// Reliable Message Protocol NetLib Plug-in



#define	sysResTGrfTemplate				'tmpl'	// Graffiti templates "file"
#define	sysResIDGrfTemplate				10000		// Graffiti templates "file" ID
#define	sysResTGrfDictionary				'dict'	// Graffiti dictionary "file"
#define	sysResIDGrfDictionary			10000		// Graffiti dictionary "file" ID
#define	sysResIDGrfDefaultMacros		10000		// sysResTDefaultDB resource with Graffiti Macros database

#define	sysResTDefaultDB					'dflt'	// Default database resource type
#define	sysResIDDefaultDB					1			// resource ID of sysResTDefaultDB in each app

#define	sysResTErrStrings					'tSTL'	// list of error strings
#define	sysResIDErrStrings				10000		// resource ID is (errno>>8)+sysResIDErrStrings

// System Preferences
#define	sysResTSysPref						sysFileCSystem
#define	sysResIDSysPrefMain				0			// Main preferences
#define	sysResIDSysPrefPassword			1			// Password
#define	sysResIDSysPrefFindStr			2			// Find string
#define	sysResIDSysPrefCalibration		3			// Digitizer calibration.
#define	sysResIDDlkUserInfo				4			// Desktop Link user information.
#define	sysResIDDlkLocalPC				5			// Desktop Link local PC host name
#define	sysResIDDlkCondFilterTab		6			// Desktop Link conduit filter table
#define	sysResIDModemMgrPref				7			// Modem Manager preferences
#define	sysResIDDlkLocalPCAddr			8			// Desktop Link local PC host address
#define	sysResIDDlkLocalPCMask			9			// Desktop Link local PC host subnet mask

#define	sysResTInBox						'ibox'	// Data received
#define	sysResTOutBox						'obox'	// Data sent


//-----------------------------------------------------------
// This section is only valid when running the resource compiler
//-----------------------------------------------------------
#ifdef RESOURCE_COMPILER

// Definition of the Pilot Preferences Resource. This must match
//  the definition of the structure SysAppPrefs in SystemMgr.h
resdef {
	word	priority;				// AMX task priority
	long	stackSize;				// required stack size
	long	minHeapSpace;			// min required free space in heap
	} sysResTAppPrefs;


// Definition of the ROM - Based   Feature table
resdef {
	word	featureNum;				// Feature number
	long  featureValue;			// Feature value
	} 'FITM';
	
resdef {
	long	creator;					// creator type
	word	len(featureItems);
	resource 'FITM' featureItems[];
	} 'CITM';

resdef {
	word	len(creatorItems);
	resource 'CITM' creatorItems[];
	} sysResTFeatures;


#endif


#endif //__SYSTEMMGR_RH__

