/*
**      $VER: spobject.h 3.3 (4.1.97)
**
**      SPObject definitions
**
**      (C) Copyright 1994-97 Andreas R. Kleinert
**      All Rights Reserved.
*/

#ifndef SPOBJECT_H
#define SPOBJECT_H

#define __USE_SYSBASE

#ifndef SUPERPLAY_SUPERPLAYBASE_H
#include <superplay/superplaybase.h>
#endif  /* SUPERPLAY_SUPERPLAYBASE_H */

#ifndef SPOBJECTS_SPOBJECTBASE_H
#include <spobjects/spobjectbase.h>
#endif  /* SPOBJECTS_SPOBJECTBASE_H

#ifndef INTUITION_INTUITIONBASE_H
#include <intuition/intuitionbase.h>
#endif /* INTUITION_INTUITIONBASE_H */

#ifndef EXEC_MEMORY_H
#include <exec/memory.h>
#endif /* EXEC_MEMORY_H */

#ifndef EXEC_LISTS_H
#include <exec/lists.h>
#endif /* EXEC_LISTS_H */

#ifndef EXEC_INTERRUPTS_H
#include <exec/interrupts.h>
#endif /* EXEC_INTERRUPTS_H */

#ifndef EXEC_TASKS_H
#include <exec/tasks.h>
#endif /* EXEC_TASKS_H */

#include <xpk/xpk.h>
#include <clib/xpkmaster_protos.h>
#include <pragma/xpkmaster_lib.h>

#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/intuition.h>
#include <proto/utility.h>

#include "SP_SampleListSubs.h"
#include "spo.h"
#include "spobject_api.h"


/* *************************************************** */
/* *                                                 * */
/* * Additional Base Declarations                    * */
/* *                                                 * */
/* *************************************************** */

extern struct SPObjectBase  *SPObjectBase;

extern struct ExecBase      *SysBase;
extern struct DosLibrary    *DOSBase;
extern struct IntuitionBase *IntuitionBase;
extern struct XpkBase       *XpkBase;


 /* structures for File-Handling */

struct SPObjectHandle                   /* STRICTLY PRIVATE */
{
 BPTR                ah_filehandle_source;
 BPTR                ah_filehandle_dest;
 BPTR                ah_filehandle_dest2;

 char               *ah_ReadName;
 char               *ah_WriteName;

 struct Window      *ah_ReqIOWindow;

 ULONG               ah_FileType;           /* SP_FILETYPE_ ... */
 ULONG               ah_Type;               /* SP_SUBTYPE_  ... */
 ULONG               ah_WriteMode;          /* SP_SUBTYPE_  ... */
 ULONG               ah_Medium;             /* SPO_MEDIUM_  ... */

 ULONG               ah_TaskRunning;  /* Bool */
 ULONG               ah_TaskStopNext; /* Bool */
 ULONG               ah_TaskRetVal;   /* May already occure after AddTask(), */
                                      /* but also while/after removing       */

 struct Task        *ah_PlayTask;
 APTR                ah_PlayTaskCode;

 /* For SPO Files */

 struct SPOHeader   *ah_SPOHeader;
 APTR                ah_XpkBuffer;
 ULONG               ah_XpkBufferSize;

 struct SPO_SampleList *ah_SampleList;
 struct SPO_SampleList *ah_SaveSampleList;
};

#endif /* SPOBJECT_H */
