home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / Programming Contest / Problems Folder / Problem 05 - Database / Solution.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-25  |  895 b   |  27 lines  |  [TEXT/CWIE]

  1. #ifndef __SOLUTION_H__
  2. #define __SOLUTION_H__
  3.  
  4. // Do not modify this file
  5.  
  6. #include <MacTypes.h>
  7. #include <Files.h>
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif // __cplusplus
  12.  
  13. typedef Handle StringsHandle; // Sequence of Pascal Strings packed together
  14. typedef Handle DatabaseHandle; // Must be a real handle
  15.     
  16. pascal void DatabaseInit( DatabaseHandle *database, UInt32 field_count );
  17. pascal void DatabaseAddEntry( DatabaseHandle database, StringsHandle entry );
  18. pascal void DatabaseFindEntry( DatabaseHandle database, UInt32 field, ConstStr255Param match, StringsHandle *entry );
  19. pascal void DatabaseDeleteEntry( DatabaseHandle database, UInt32 field, ConstStr255Param match );
  20. pascal UInt32 DatabaseCount( DatabaseHandle database );
  21. pascal void DatabaseGetIndEntry( DatabaseHandle database, UInt32 index, StringsHandle *entry );
  22.  
  23. #ifdef __cplusplus
  24. }
  25. #endif // __cplusplus
  26.  
  27. #endif // __SOLUTION_H__