/*
    OS/2 Multimedia Extensions mci drivers include file.
*/

#ifndef __MMDRVOS2_H__
#define __MMDRVOS2_H__

#ifdef __cplusplus
extern "C" {
#endif

#ifndef __SSM_H__
#include <ssm.h>
#endif

#define MCIDRV_SAVE 900
#define MCIDRV_RESTORE 901
#define MCIDRV_SYNC 902
#define MCIDRV_CHANGERESOURCE 903
#define MCIDRV_CONNECT 904
#define MCIDRV_ASSOCIATE 905
#define MCIDRV_DISCONNECT 906
#define MCIDRV_TEST_CONNECTION 907
#define MCIDRV_START 908
#define MCIDRV_SEEK 909
#define MCIDRV_STOP 910
#define MCIDRV_MODIFY_CONNECTION 911
#define MCIDRV_INIT_CONNECTION 912
#define MCIDRV_DEINIT_CONNECTION 913
#define MCIDRV_ENABLE_EVENT 915
#define MCIDRV_GETTIME 917
#define MCIDRV_CONNECT_TARGET 0x00010000
#define MCIDRV_CONNECT_SOURCE 0x00020000
#define MCIDRV_SET_CONNNECTOR_TYPE 0x00040000
#define MCIDRV_CHANGE_SEM 0x00080000
#define MCIDRV_MODIFY_10 0x00100000
#define MCIDRV_MIX_STANDALONE 0x00200000
#define MCIDRV_CUE_PLAYBACK 0x00010000
#define MCIDRV_CUE_RECORD 0x00020000
#define MCIDRV_START_PLAYBACK 0x00040000
#define MCIDRV_START_RECORD 0x00080000
#define MCIDRV_START_PREROLL 0x00100000
#define MCIDRV_OUTPUT 0x00010000
#define MCIDRV_INPUT 0x00020000
#define MCIDRV_PAUSE_STREAM_NETWORK 0x00010000
#define MCIDRV_FLUSH_STREAM_NETWORK 0x00020000
#define MCIDRV_DISCARD_STREAM_NETWORK 0x00040000
#define MCIDRV_MODIFY_HANDLER 0x00010000

#define MCI_INTERNAL_MESSAGES_START 1000
#define MCI_INTERNAL_MESSAGES_END 1999

#define MCI_COMMAND_HEAD 0x00000001
#define MCI_END_COMMAND 0x00000002
#define MCI_END_COMMAND_LIST 0x00000003
#define MCI_RETURN 0x00000004
#define MCI_STRING 0x00000005
#define MCI_FLAG 0x00000006
#define MCI_INTEGER 0x00000007
#define MCI_CONSTANT 0x00000008
#define MCI_CONSTANT_INTEGER 0x00000009
#define MCI_CONSTANT_STRING 0x0000000A
#define MCI_END_CONSTANT 0x0000000B
#define MCI_DEFAULT_STRING 0x0000000C
#define MCI_DEFAULT_INTEGER 0x0000000D
#define MCI_RETURN_TYPE 0x0000000E
#define MCI_RETURN_TYPE_STRING 0x0000000F
#define MCI_END_RETURN_TYPE 0x00000010
#define MCI_CONSTANT_2 0x00000011
#define MCI_END_CONSTANT_2 0x00000012
#define MCI_CONSTANT_PAIR 0x00000013
#define MCI_END_CONSTANT_PAIR 0x00000014
#define MCI_CONSTANT_INTEGER_PAIR 0x00000015
#define MCI_CONSTANT_STRING_PAIR 0x00000016
#define MCI_RECTL 0x00000017
#define MCI_CONSTANT_4 0x00000018
#define MCI_END_CONSTANT_4 0x00000019
#define MCI_FOURCC 0x0000001A
#define MCI_OR 0x0000001B
#define MCI_END_OR 0x0000001C
#define MCI_STRING_LIST 0x0000001D

#define MCI_INTEGER_RETURNED 0x1000
#define MCI_COLONIZED2_RETURN 0x2000
#define MCI_COLONIZED3_RETURN 0x3000
#define MCI_COLONIZED4_RETURN 0x4000
#define MCI_TRUE_FALSE_RETURN 0x5000
#define MCI_ON_OFF_RETURN 0x6000
#define MCI_DEVICENAME_RETURN 0x7000
#define MCI_TIME_FORMAT_RETURN 0x8000
#define MCI_SPEED_FORMAT_RETURN 0x9000
#define MCI_MODE_RETURN 0xA000
#define MCI_MEDIA_TYPE_RETURN 0xB000
#define MCI_TRACK_TYPE_RETURN 0xC000
#define MCI_CONNECTOR_TYPE_RETURN 0xD000
#define MCI_CDXA_CHANNEL_DESTINATION_RETURN 0xE000
#define MCI_PREROLL_TYPE_RETURN 0xF000
#define MCI_FORMAT_TAG_RETURN 0xF100
#define MCI_SEQ_SYNCHRONIZATION_RETURN 0xF200
#define MCI_VIDEO_QUALITY_RETURN 0xF300
#define MCI_AUDIO_QUALITY_RETURN 0xF400
#define MCI_IMAGE_QUALITY_RETURN 0xF500
#define MCI_VIDEO_COMPRESSION_RETURN 0xF600
#define MCI_AUDIO_COMPRESSION_RETURN 0xF700
#define MCI_IMAGE_COMPRESSION_RETURN 0xF800
#define MCI_RECTL_RETURN 0xF900
#define MCI_FOURCC_RETURN 0xFA00
#define MCI_IMAGE_PELFORMAT_RETURN 0xFB00
#define MCI_DIRECTION_RETURN 0xFC00
#define MCI_SIGNED_INTEGER_RETURN 0xFD00

#define MCI_USER_RETURN 0xFF01

#define MCIERR_MSG_TABLE_END (MCIERR_BASE+7000)

#define FIXEDSINGLECONTEXT 1
#define DYNAMICSINGLECONTEXT 2
#define LIMITEDMULTIPLECONTEXT 3
#define UNLIMITEDMULTIPLECONTEXT 04

#define MCI_CLOSE_EXIT 0x10000000

#define MMERROR_TABLE_BASE 500

#define MCIDRV_SYNC_ENABLE 0x00000100
#define MCIDRV_SYNC_DISABLE 0x00000200
#define MCIDRV_SYNC_REC_PULSE 0x00000400
#define MCIDRV_SYNC_MASTER 0x00000800
#define MCIDRV_SYNC_SET_MASTER 0x00001000

#pragma pack(1)

typedef USHORT GID;

typedef struct _MCIDRV_CHANGERESOURCE_PARMS {
    PVOID  pInstance;
    USHORT usResourceUnits;
    USHORT usResourceClass;
    USHORT usResourcePriority;
} MCIDRV_CHANGERESOURCE_PARMS, *PMCIDRV_CHANGERESOURCE_PARMS;

typedef struct _MCIDRV_EVENT_PARMS {
    ULONG   ulLength;
    PEVCB   pevcb;
    PHEVENT phevent;
} MCIDRV_EVENT_PARMS, *PMCIDRV_EVENT_PARMS;

typedef struct _MCIDRV_SYNC_PARMS {
    HSTREAM   *hStreams;
    ULONG      ulNumStreams;
    MMTIME     mmTime;
    BOOL       NonStreamMaster;
    PSYNC_EVCB pevcbSyncPulse;
    HID        hidMaster;
    ULONG      ulReserved1;
    ULONG      ulReserved2;
} MCIDRV_SYNC_PARMS, *PMCIDRV_SYNC_PARMS;

typedef struct __MMDRV_OPEN_PARMS{
    HWND   hwndCallback;
    USHORT usDeviceID;
    USHORT usDeviceType;
    USHORT usDeviceOrd;
    PVOID  pInstance;
    CHAR   szDevDLLName[260];
    PSZ    pszElementName;
    USHORT usDevParmLen;
    PVOID  pDevParm;
    ULONG  ulStructLength;
    USHORT usResourceUnitsRequired;
    USHORT usResourceClass;
    USHORT usResourcePriority;
    ULONG  ulParam2;
    CHAR   szPDDName[MAX_PDD_NAME+1];
    CHAR   szProductInfo[MAX_PRODINFO+1];
    ULONG  ulPID;
} MMDRV_OPEN_PARMS, *PMMDRV_OPEN_PARMS;

typedef struct _MCIDRV_RESTORE_PARMS {
    ULONG ulLength;
    ULONG ulMasterVolume;
} MCIDRV_RESTORE_PARMS, *PMCIDRV_RESTORE_PARMS;

#pragma pack()

ULONG APIENTRY mdmDriverNotify(USHORT,HWND,USHORT,USHORT,ULONG);

#ifdef __cplusplus
}
#endif

#endif

