summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/palmunits/src/featuremgr.pp
blob: 327f1e8cf8590629f0fbacdcaa2c16a1fb9710e5 (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
(******************************************************************************
 *
 * Copyright (c) 1994-2000 Palm, Inc. or its subsidiaries.
 * All rights reserved.
 *
 * File: FeatureMgr.h
 *
 * Release: Palm OS SDK 4.0 (63220)
 *
 * Description:
 *    Header for the Feature Manager
 *
 * History:
 *    11/14/94  RM - Created by Ron Marianetti
 *
 *****************************************************************************)

unit featuremgr;

interface

uses palmos, coretraps, errorbase;

(************************************************************
 * Feature manager error codes
 * the constant ftrErrorClass is defined in ErrorBase.h
 *************************************************************)

const
  ftrErrInvalidParam  = ftrErrorClass or 1;
  ftrErrNoSuchFeature = ftrErrorClass or 2;
  ftrErrAlreadyExists = ftrErrorClass or 3;
  ftrErrROMBased      = ftrErrorClass or 4;
  ftrErrInternalErr   = ftrErrorClass or 5;

(************************************************************
 * Feature Manager procedures
 *************************************************************)

// Init the feature Manager
function FtrInit: Err; syscall sysTrapFtrInit;

// Get a feature
function FtrGet(creator: UInt32; featureNum: UInt16; var valueP: UInt32): Err; syscall sysTrapFtrGet;

// Set/Create a feature.
function FtrSet(creator: UInt32; featureNum: UInt16; newValue: UInt32): Err; syscall sysTrapFtrSet;

// Unregister a feature
function FtrUnregister(creator: UInt32; featureNum: UInt16): Err; syscall sysTrapFtrUnregister;

// Get a feature by index
function FtrGetByIndex(index: UInt16; romTable: Boolean; var creatorP: UInt32; var numP: UInt16; var valueP: UInt32): Err; syscall sysTrapFtrGetByIndex;

// Get temporary space from storage heap
function FtrPtrNew(creator: UInt32; featureNum: UInt16; size: UInt32; var newPtrP: Pointer): Err; syscall sysTrapFtrPtrNew;

// Release temporary space to storage heap
function FtrPtrFree(creator: UInt32; featureNum: UInt16): Err; syscall sysTrapFtrPtrFree;

// Resize block of temporary storage
function FtrPtrResize(creator: UInt32; featureNum: UInt16; newSize: UInt32; var newPtrP: Pointer): Err; syscall sysTrapFtrPtrResize;

implementation

end.