aboutsummaryrefslogtreecommitdiff
path: root/SrcShared/Palm/Platform/Incs/Core/System/FeatureMgr.h
blob: ff9b2e573a93db38fa2158c0a391e8cb433836e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/******************************************************************************
 *
 * Copyright (c) 1994-1999 Palm Computing, Inc. or its subsidiaries.
 * All rights reserved.
 *
 * File: FeatureMgr.h
 *
 * Description:
 *		Header for the Feature Manager
 *
 * History:
 *   	11/14/94  RM - Created by Ron Marianetti
 *
 *****************************************************************************/

#ifndef __FEATUREMGR_H__
#define __FEATUREMGR_H__


#include <PalmTypes.h>
#include <CoreTraps.h>
#include <ErrorBase.h>



/************************************************************
 * Feature manager error codes
 * the constant ftrErrorClass is defined in ErrorBase.h
 *************************************************************/
#define	ftrErrInvalidParam				(ftrErrorClass | 1)
#define	ftrErrNoSuchFeature				(ftrErrorClass | 2)
#define	ftrErrAlreadyExists				(ftrErrorClass | 3)
#define	ftrErrROMBased						(ftrErrorClass | 4)
#define	ftrErrInternalErr					(ftrErrorClass | 5)


/************************************************************
 * Feature Manager procedures
 *************************************************************/
#ifdef REMOVE_FOR_EMULATOR
#ifdef __cplusplus
extern "C" {
#endif


// Init the feature Manager
Err		FtrInit(void)
							SYS_TRAP(sysTrapFtrInit);


// Get a feature
Err		FtrGet(UInt32 creator, UInt16 featureNum, UInt32 *valueP)
							SYS_TRAP(sysTrapFtrGet);

// Set/Create a feature.
Err		FtrSet(UInt32 creator, UInt16 featureNum, UInt32 newValue)
							SYS_TRAP(sysTrapFtrSet);

// Unregister a feature
Err		FtrUnregister(UInt32 creator, UInt16 featureNum)
							SYS_TRAP(sysTrapFtrUnregister);

// Get a feature by index
Err		FtrGetByIndex(UInt16 index, Boolean romTable, 
					UInt32 *creatorP, UInt16 *numP, UInt32 *valueP)
							SYS_TRAP(sysTrapFtrGetByIndex);

// Get temporary space from storage heap
Err		FtrPtrNew(UInt32 creator, UInt16 featureNum, UInt32 size,
					void **newPtrP)
							SYS_TRAP(sysTrapFtrPtrNew);

// Release temporary space to storage heap
Err		FtrPtrFree(UInt32 creator, UInt16 featureNum)
							SYS_TRAP(sysTrapFtrPtrFree);


// Resize block of temporary storage
Err		FtrPtrResize(UInt32 creator, UInt16 featureNum, UInt32 newSize,
					void **newPtrP)
							SYS_TRAP(sysTrapFtrPtrResize);


#ifdef __cplusplus
}
#endif
#endif

#endif // __FEATUREMGR_H__