home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / sviluppo / ahisrc / device / database.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-04-22  |  1.8 KB  |  59 lines

  1. /* $Id: database.h,v 4.4 1999/04/22 19:41:47 lcs Exp $ */
  2.  
  3. /*
  4.      AHI - Hardware independent audio subsystem
  5.      Copyright (C) 1996-1999 Martin Blom <martin@blom.org>
  6.      
  7.      This library is free software; you can redistribute it and/or
  8.      modify it under the terms of the GNU Library General Public
  9.      License as published by the Free Software Foundation; either
  10.      version 2 of the License, or (at your option) any later version.
  11.      
  12.      This library is distributed in the hope that it will be useful,
  13.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.      Library General Public License for more details.
  16.      
  17.      You should have received a copy of the GNU Library General Public
  18.      License along with this library; if not, write to the
  19.      Free Software Foundation, Inc., 59 Temple Place - Suite 330, Cambridge,
  20.      MA 02139, USA.
  21. */
  22.  
  23. #ifndef _DATABASE_H_
  24. #define _DATABASE_H_
  25.  
  26. #include <exec/types.h>
  27. #include <exec/semaphores.h>
  28. #include <exec/lists.h>
  29.  
  30. /* Current implementation of the database (Version 0):
  31.    Use FreeVec() to free the structure. */
  32.  
  33. #define ADB_NAME  "Audio Mode Database"
  34.  
  35. struct AHI_AudioDatabase
  36. {
  37.   struct SignalSemaphore  ahidb_Semaphore;      /* The Semaphore */
  38.   struct MinList          ahidb_AudioModes;     /* The Audio Database */
  39.   UBYTE                   ahidb_Version;        /* Version number (0) */
  40.   UBYTE                   ahidb_Name[sizeof(ADB_NAME)]; /* Name */
  41.  
  42. };
  43.  
  44.  
  45. struct AHI_AudioDatabase*
  46. LockDatabase( void );
  47.  
  48. struct AHI_AudioDatabase*
  49. LockDatabaseWrite( void );
  50.  
  51. void
  52. UnlockDatabase( struct AHI_AudioDatabase* audiodb );
  53.  
  54. struct TagItem*
  55. GetDBTagList( struct AHI_AudioDatabase* audiodb,
  56.               ULONG id );
  57.  
  58. #endif /* _DATABASE_H_ */
  59.