featuremgr.pp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. (******************************************************************************
  2. *
  3. * Copyright (c) 1994-2000 Palm, Inc. or its subsidiaries.
  4. * All rights reserved.
  5. *
  6. * File: FeatureMgr.h
  7. *
  8. * Release: Palm OS SDK 4.0 (63220)
  9. *
  10. * Description:
  11. * Header for the Feature Manager
  12. *
  13. * History:
  14. * 11/14/94 RM - Created by Ron Marianetti
  15. *
  16. *****************************************************************************)
  17. unit featuremgr;
  18. interface
  19. uses palmos, coretraps, errorbase;
  20. (************************************************************
  21. * Feature manager error codes
  22. * the constant ftrErrorClass is defined in ErrorBase.h
  23. *************************************************************)
  24. const
  25. ftrErrInvalidParam = ftrErrorClass or 1;
  26. ftrErrNoSuchFeature = ftrErrorClass or 2;
  27. ftrErrAlreadyExists = ftrErrorClass or 3;
  28. ftrErrROMBased = ftrErrorClass or 4;
  29. ftrErrInternalErr = ftrErrorClass or 5;
  30. (************************************************************
  31. * Feature Manager procedures
  32. *************************************************************)
  33. // Init the feature Manager
  34. function FtrInit: Err; syscall sysTrapFtrInit;
  35. // Get a feature
  36. function FtrGet(creator: UInt32; featureNum: UInt16; var valueP: UInt32): Err; syscall sysTrapFtrGet;
  37. // Set/Create a feature.
  38. function FtrSet(creator: UInt32; featureNum: UInt16; newValue: UInt32): Err; syscall sysTrapFtrSet;
  39. // Unregister a feature
  40. function FtrUnregister(creator: UInt32; featureNum: UInt16): Err; syscall sysTrapFtrUnregister;
  41. // Get a feature by index
  42. function FtrGetByIndex(index: UInt16; romTable: Boolean; var creatorP: UInt32; var numP: UInt16; var valueP: UInt32): Err; syscall sysTrapFtrGetByIndex;
  43. // Get temporary space from storage heap
  44. function FtrPtrNew(creator: UInt32; featureNum: UInt16; size: UInt32; var newPtrP: Pointer): Err; syscall sysTrapFtrPtrNew;
  45. // Release temporary space to storage heap
  46. function FtrPtrFree(creator: UInt32; featureNum: UInt16): Err; syscall sysTrapFtrPtrFree;
  47. // Resize block of temporary storage
  48. function FtrPtrResize(creator: UInt32; featureNum: UInt16; newSize: UInt32; var newPtrP: Pointer): Err; syscall sysTrapFtrPtrResize;
  49. implementation
  50. end.