source: sbliveos2/trunk/drv16/ssm.h@ 188

Last change on this file since 188 was 142, checked in by ktk, 25 years ago

Import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 40.9 KB
Line 
1/* $Id: ssm.h 142 2000-04-23 14:55:46Z ktk $ */
2
3/* NOINC */
4#ifdef __cplusplus
5extern "C" {
6#endif
7/****************************************************************************/
8/* */
9/* Module Name: SSM.H */
10/* */
11/* OS/2 Multimedia Extensions Sync/Stream Manager Definitions file */
12/* */
13/* Copyright (c) International Business Machines Corporation 1991-1994 */
14/* All Rights Reserved */
15/* */
16/****************************************************************************/
17
18#ifndef _SSM_H_
19#define _SSM_H_
20/* INC */
21
22#define MAX_SPI_NAME 9 /* Maximum ASCIIZ stream handler name/class */
23 /* and device driver name */
24
25
26/* XLATOFF */
27#pragma pack(4)
28/* XLATON */
29
30/****************************************************************************/
31/* */
32/* Global Type Declarations */
33/* */
34/****************************************************************************/
35typedef ULONG HSTREAM; /* Stream Handle */
36typedef HSTREAM FAR *PHSTREAM; /* Pointer to Stream Handle */
37
38typedef ULONG HNETWORK; /* Network Handle */
39typedef HNETWORK FAR *PHNETWORK; /* Pointer to Network Handle */
40
41typedef ULONG HEVENT; /* Event Handle */
42typedef HEVENT FAR *PHEVENT; /* Pointer to Event Handle */
43
44typedef ULONG HID; /* Stream Handler ID */
45/* The following define was deleted because it conflicts with an OS/2 PM define */
46/*typedef HID FAR *PHID; Pointer to Stream Handler ID */
47
48typedef struct _LOCKH { /* Memory locking handle (used by PDD)*/
49 BYTE lock[16];
50 } LOCKH;
51typedef LOCKH FAR *PLOCKH; /* Ptr to a LOCKH */
52
53#define RC ULONG /* Used for all return codes */
54
55typedef struct _SLAVE { /* slave */
56 HSTREAM hstreamSlave; /* Handle for this slave */
57 MMTIME mmtimeStart; /* Offset in master stream time to start */
58 } SLAVE; /* this slave. */
59typedef SLAVE FAR *PSLAVE; /* Ptr to a SLAVE */
60
61typedef struct _MASTER { /* master */
62 HSTREAM hstreamMaster; /* Handle for this master */
63 } MASTER;
64typedef MASTER FAR *PMASTER; /* Ptr to a MASTER */
65
66/* XLATOFF */
67#pragma pack(1)
68/* XLATON */
69
70typedef struct _HAND { /* hand */
71 SZ szHandlerClass[MAX_SPI_NAME]; /* Stream handler class */
72 SZ szHandlerName[MAX_SPI_NAME]; /* Stream handler name */
73 } HAND;
74typedef HAND FAR *PHAND; /* Ptr to a HAND */
75
76/* XLATOFF */
77#pragma pack()
78/* XLATON */
79
80
81#include <spcb.h>
82#include <evcb.h>
83#include <acb.h>
84#include <dcb.h>
85
86
87/* XLATOFF */
88/****************************************************************************/
89/* */
90/* Function Prototypes for Application event entry routine, SHC entry */
91/* routine, SMH entry routine. All use the Pure C calling convention */
92/* */
93/****************************************************************************/
94typedef ULONG (APIENTRY EVFN) (PEVCB pevcb);
95#define PEVFN EVFN *
96
97typedef ULONG (APIENTRY SHCFN) (PVOID pParmIn);
98#define PSHCFN SHCFN *
99
100typedef ULONG (APIENTRY SMHFN) (PVOID pParmIn);
101#define PSMHFN SMHFN *
102
103/* XLATON */
104#ifdef XXXXX
105typedef PVOID PEVFN;
106typedef PVOID PSHCFN;
107typedef PVOID PSMHFN;
108#endif
109
110
111#ifdef CONNECTION
112#include <concb.h>
113#endif
114
115
116/******************
117 * ulNetworkState:
118 ******************/
119#define NET_ACTIVE_MASK 0x00000FFFL /* Network running mask */
120#define NET_RUNNING 0x00000000L /* Network is running */
121#define NET_PAUSED 0x00000001L /* Network is paused */
122#define NET_STOPPED 0x00000002L /* Network is stopped (flush/discard) */
123#define NET_PAUSE_PENDING 0x00000004L /* Network is pending a pause stop */
124#define NET_FLUSH_PENDING 0x00000010L /* Network is pending a flush stop */
125#define NET_DISCARD_PENDING 0x00000020L /* Network is pending a discard stop */
126#define NET_CLOSE_PENDING 0x00000040L /* Network is pending a CLOSE */
127#define NET_SEEK_PENDING 0x00000040L /* Network is pending a seek operation */
128#define NET_OPEN 0x00001000L /* Network has been opened */
129#define NET_ASSEMBLED 0x00004000L /* Network has been assembled */
130
131
132/********************
133 * ulActivationState:
134 ********************/
135#define STREAM_ACTIVE 0x00000010L /* Stream is active */
136#define STREAM_NOT_ACTIVE 0x00000020L /* Stream is not active */
137
138
139
140/****************************************************************************/
141/* INI file support defines */
142/****************************************************************************/
143/* RCDATA defines: */
144#define SPI_RESOURCE 1 /* RCDATA resource number */
145#define SH_DLL_TYPE 0 /* DLL type stream handler */
146#define SH_PDD_TYPE 1 /* PDD type stream handler */
147#define SPCBSIZE 72L /* SPCB length, the Resource compiler*/
148 /* doesn't allow sizeof(SPCB). */
149
150/****************************************************************************/
151/* */
152/* Function Prototypes for SPI functions */
153/* All use Pure C calling convention */
154/* Six major categories: */
155/* - stream creation */
156/* - stream control */
157/* - event handling */
158/* - sync handling */
159/* - configuration */
160/* - stream protocol programming */
161/****************************************************************************/
162
163
164/* XLATOFF */
165
166/****************************************************************************/
167/* Stream Creation */
168/****************************************************************************/
169
170ULONG APIENTRY SpiAssociate ( HSTREAM hstream,
171 HID hid,
172 PACB pacb );
173
174
175ULONG APIENTRY SpiEnumerateHandlers ( PHAND pahand, /* ptr to array handler name/class */
176 PULONG pulNumHand );
177
178
179ULONG APIENTRY SpiGetHandler ( PSZ pszHName,
180 HID *phidSrc,
181 HID *phidTgt );
182
183ULONG APIENTRY SpiCreateStream ( HID hidSrc, /* input */
184 HID hidTgt, /* input */
185 PSPCBKEY pspcbkey, /* input */
186 PDCB pdcbSrc, /* input - Src device info */
187 PDCB pdcbTgt, /* input - Tgt device info */
188 PIMPL_EVCB pevcb, /* input */
189 PEVFN EventEntry, /* input */
190 HSTREAM hstreamBuf,/* input */
191 PHSTREAM phstream, /* output */
192 PHEVENT phevent ); /* output - implicit hevent*/
193
194ULONG APIENTRY SpiSendMsg ( HSTREAM hstream,
195 HID hid,
196 ULONG ulMsgType,
197 PVOID pMsg );
198
199/* XLATON */
200/* The first thing in the pMsg must be the length of the structure! */
201typedef struct _MSG_COMMON { /* msg */
202 ULONG ulMsgLen; /* length of structure */
203 } MSG_COMMON;
204/* XLATOFF */
205
206
207/****************************************************************************/
208/* Stream Control */
209/****************************************************************************/
210
211
212ULONG APIENTRY SpiDestroyStream ( HSTREAM hstream );
213
214
215ULONG APIENTRY SpiGetTime ( HSTREAM hstream,
216 PMMTIME pmmtime );
217
218ULONG APIENTRY SpiSeekStream ( HSTREAM hstream,
219 ULONG ulFlags,
220 LONG lSeekPoint ); /*mmtime or other */
221
222/* SpiSeekStream() ulFlags defines: */
223#define SPI_SEEK_ABSOLUTE 0x0000L /* Seek from beginning of stream*/
224#define SPI_SEEK_RELATIVE 0x0001L /* Seek from current location */
225#define SPI_SEEK_FROMEND 0x0002L /* TEMP */
226#define SPI_SEEK_SLAVES 0x0010L /* Seek all slave streams */
227
228#define SPI_SEEK_MMTIME 0x0000L /* lSeekPoint == mmtime (default)*/
229#define SPI_SEEK_BYTES 0x0100L /* lSeekPoint == bytes */
230
231#define SPI_SEEK_IFRAME 0x1000L /* Seek to nearest IFRAME */
232
233#define VALIDSEEKFLAGS ( SPI_SEEK_RELATIVE | \
234 SPI_SEEK_ABSOLUTE | \
235 SPI_SEEK_FROMEND | \
236 SPI_SEEK_MMTIME | \
237 SPI_SEEK_SLAVES | \
238 SPI_SEEK_IFRAME | \
239 SPI_SEEK_BYTES )
240
241
242ULONG APIENTRY SpiStartStream ( HSTREAM hstream,
243 ULONG ulFlags );
244
245/* SpiStartStream() ulFlags defines: */
246#define SPI_START_STREAM 0x0000L /* Only start this one stream */
247#define SPI_START_SLAVES 0x0001L /* Start this master and any slaves */
248#define SPI_START_PREROLL 0x0002L /* Start the stream, but do preroll */
249
250#define VALIDSTARTFLAGS ( SPI_START_STREAM | \
251 SPI_START_SLAVES | \
252 SPI_START_PREROLL )
253
254
255ULONG APIENTRY SpiStopStream ( HSTREAM hstream,
256 ULONG ulFlags );
257
258/* XLATON */
259/* SpiStopStream() ulFlags defines: */
260#define SPI_STOP_STREAM 0x0000L /* Only stop this one stream */
261 /* The default is to pause the data */
262 /* stream. No change to data buffers. */
263 /* synchronous call (no event notification) */
264#define SPI_STOP_SLAVES 0x0001L /* Stop this master and any slaves */
265#define SPI_STOP_FLUSH 0x0002L /* Stop and flush all filled buffers. */
266 /* Stops the Src & Tgt SH, lets the */
267 /* Tgt SH run until out of buffers */
268 /* thereby, "flushing" all buffers. */
269 /* Tgt SH stops when out of buffers */
270 /* (This is a ASYNCHRONOUS call, event */
271 /* notification sent to appl when done.) */
272#define SPI_STOP_DISCARD 0x0004L /* Stop and discard all filled buffers. */
273 /* Stops the Src & Tgt SH */
274 /* then discards all buffers current for */
275 /* this stream. */
276 /* (This is a ASYNCHRONOUS call, event */
277 /* notification sent to appl when done.) */
278
279#define SPI_STOP_PAUSE (SPI_STOP_STREAM)
280
281/* XLATOFF */
282#define VALIDSTOPFLAGS ( SPI_STOP_STREAM | \
283 SPI_STOP_SLAVES | \
284 SPI_STOP_FLUSH | \
285 SPI_STOP_DISCARD )
286
287
288/****************************************************************************/
289/* Event Handling */
290/****************************************************************************/
291
292
293ULONG APIENTRY SpiDisableEvent ( HEVENT hevent );
294
295
296ULONG APIENTRY SpiEnableEvent ( PEVCB pevcb,
297 PHEVENT phevent );
298
299
300/****************************************************************************/
301/* Sync Handling */
302/****************************************************************************/
303
304
305ULONG APIENTRY SpiDisableSync ( HSTREAM hstreamMaster );
306
307
308ULONG APIENTRY SpiEnableSync ( HSTREAM hstreamMaster,
309 PSLAVE paslaveList,
310 ULONG ulNumSlaves,
311 MMTIME mmtimeSync );
312
313
314ULONG APIENTRY SpiDetermineSyncMaster ( PHSTREAM phstreamMaster,
315 PMASTER paMasterList,
316 ULONG ulNumMasters );
317
318
319/****************************************************************************/
320/* Protocol manipulation */
321/****************************************************************************/
322
323ULONG APIENTRY SpiGetProtocol ( HID hid,
324 PSPCBKEY pspcbkey, /* input key */
325 PSPCB pspcb ); /* output SPCB */
326
327
328ULONG APIENTRY SpiInstallProtocol ( HID hid,
329 PSPCBKEY pspcbkey, /* input key */
330 PSPCB pspcb , /* input SPCB */
331 ULONG ulFlags ); /* install flags */
332
333/* SpiInstallProtocol() ulFlags defines: */
334#define SPI_INSTALL_PROTOCOL 0x0000L /* Install this protocol */
335#define SPI_DEINSTALL_PROTOCOL 0x0001L /* DeInstall this protocol */
336
337#define VALIDINSTALLFLAGS (SPI_INSTALL_PROTOCOL | SPI_DEINSTALL_PROTOCOL)
338
339ULONG APIENTRY SpiEnumerateProtocols ( HID hid,
340 PVOID paSPCBKeys, /* ptr to buffer to fill with SPCB keys */
341 PULONG pulNumSPCBKeys ); /* # of entries buffer on input, */
342 /* # of SPCB key on output. */
343
344
345/* XLATON */
346/****************************************************************************/
347/* */
348/* Function Prototypes for SMH functions */
349/* All use Pure C calling convention */
350/* NOTE ABOUT POINTERS: */
351/* 0:32 linear addresses for ring 3 (DLL) stream handlers */
352/* 16:16 selector/offset addresses for ring 0 (PDD) stream handlers */
353/****************************************************************************/
354
355ULONG APIENTRY SMHEntryPoint ( PVOID pParmIn );
356
357typedef struct _SMH_COMMON { /* smhfunc */
358 ULONG ulFunction; /* SMH command function */
359 HID hid; /* handler ID */
360 } SMH_COMMON;
361typedef SMH_COMMON FAR *PSMH_COMMON; /* Ptr to common part */
362
363
364/****************************************************************************/
365#define SMH_REGISTER 0L /* (Valid only from ring 3 stream */
366 /* handler) */
367 typedef struct _PARM_REG { /* smhreg */
368 ULONG ulFunction; /* SMH command function */
369 PSZ pszSHName; /* Max size = 8 characters */
370 HID FAR *phidSrc; /* (9 including null) */
371 HID FAR *phidTgt;
372 PSHCFN pshcfnEntry; /* Handler entry point for SHC's */
373 /* Only used for Ring 0 handlers.*/
374 ULONG ulFlags;
375 ULONG ulMaxNumStreams; /* Max # of streams */
376 ULONG ulMaxNumEvents; /* Max # of events/stream */
377 } PARM_REG;
378typedef PARM_REG FAR *PPARM_REG;
379
380#define REGISTER_TGT_HNDLR 0x0001L /* This handler is Target. */
381#define REGISTER_SRC_HNDLR 0x0002L /* This handler is Source. */
382 /* Handlr can be both. */
383#define REGISTER_NONSTREAMING 0x0004L /* Handler is non-streaming. */
384#define VALIDREGISTERFLAGS (REGISTER_TGT_HNDLR | REGISTER_SRC_HNDLR | REGISTER_NONSTREAMING)
385
386
387/* Notes: */
388/* - Since ring 0 (DD) stream handlers can not use the IDC interface to the */
389/* sync/stream manager during DD initialization time, it must use the IOCTL*/
390/* function to perform the SMH_REGISTER function. The addresses are 16:16 */
391/* for this IOCTl instead of 0:32, because it comes form a device driver. */
392#define SSMDD_CATEGORY 0x0081 /* Category (For ring 0 stream handler) */
393#define IOCTL_FUNC_SMH_REGISTER 0x0040 /* Function (For ring 0 stream handler) */
394
395
396/****************************************************************************/
397#define SMH_DEREGISTER 1L /* SMH_Deregister() */
398 typedef struct _PARM_DEREG { /* smhder */
399 ULONG ulFunction; /* SMH command function */
400 PSZ pszSHName; /* Max size = 8 char, 9 includes */
401 } PARM_DEREG; /* the null. */
402typedef PARM_DEREG FAR *PPARM_DEREG;
403
404
405/****************************************************************************/
406#define SMH_REPORTEVENT 2L /* SMH_ReportEvent() */
407 typedef struct _PARM_EVENT { /* smhrev */
408 ULONG ulFunction; /* SMH command function */
409 HID hid;
410 HEVENT hevent; /* Used only for explicit events */
411 /* Must be 0 for sync and implicit*/
412 /* events (i.e. error events) */
413 PEVCB pevcbEvent; /* Event status & HSTREAM */
414 } PARM_EVENT;
415typedef PARM_EVENT FAR *PPARM_EVENT;
416
417
418/****************************************************************************/
419#define SMH_NOTIFY 3L /* SMH_Notify() */
420 typedef struct _PARM_NOTIFY { /* smhnot */
421 ULONG ulFunction; /* Input - SMH command function */
422 HID hid; /* Input */
423 HSTREAM hstream; /* Input */
424 ULONG ulFlags; /* Input/Output */
425 ULONG ulGetNumEntries; /* Input/Output - # of entries in table */
426 ULONG ulRetNumEntries; /* Input/Output - # of entries in table */
427 PVOID pGetBufTab; /* Output - Ptr to buffer/record table */
428 PVOID pRetBufTab; /* Input - Ptr to buffer/record table */
429 } PARM_NOTIFY;
430typedef PARM_NOTIFY FAR *PPARM_NOTIFY;
431
432 typedef struct _SRCBUFTAB { /* srcbuftab */
433 PVOID pBuffer; /* Ptr to buffer */
434 PVOID pRecord; /* Ptr to record in buffer (split-streams only) */
435 ULONG ulLength; /* Max buf length on GetEmpty, Filled */
436 /* (actual) rec/buf length on ReturnFull. */
437 ULONG ulMessageParm; /* Message to passed to application */
438 MMTIME mmtimeOffset; /* mmtime offset from beginning of buffer */
439 } SRCBUFTAB;
440typedef SRCBUFTAB FAR *PSRCBUFTAB; /* Ptr to a buffer entry */
441
442 typedef struct _TGTBUFTAB { /* tgtbuftab */
443 PVOID pBuffer; /* Ptr to buffer */
444 ULONG ulBufId; /* Buffer ID. Passed to SH on GetFull, must */
445 /* be passed back to SSM on ReturnEmpty. */
446 ULONG ulLength; /* Filled (actual) buffer length on GetFull, */
447 /* unused on ReturnEmpty. */
448 ULONG ulMessageParm; /* Message to passed to application */
449 MMTIME mmtimeOffset; /* mmtime offset from beginning of buffer */
450 } TGTBUFTAB;
451typedef TGTBUFTAB FAR *PTGTBUFTAB; /* Ptr to a buffer entry */
452
453/* EXTENDED SMH_NOTIFY Structures */
454
455 typedef struct _PARM_ENOTIFY { /* smhenot */
456 ULONG ulFunction; /* Input - SMH command function */
457 HID hid; /* Input */
458 HSTREAM hstream; /* Input */
459 ULONG ulFlags; /* Input/Output */
460 ULONG ulGetNumEntries; /* Input/Output - # of entries in table */
461 ULONG ulRetNumEntries; /* Input/Output - # of entries in table */
462 PVOID pGetBufTab; /* Output - Ptr to buffer/record table */
463 PVOID pRetBufTab; /* Input - Ptr to buffer/record table */
464 ULONG ulParm1; /* Reserved for future use */
465 ULONG ulParm2; /* Reserved for future use */
466 } PARM_ENOTIFY;
467typedef PARM_ENOTIFY FAR *PPARM_ENOTIFY;
468
469 typedef struct _ESRCBUFTAB { /* esrcbuftab */
470 PVOID pBuffer; /* Ptr to buffer */
471 PVOID pRecord; /* Ptr to record in buffer (split-streams only) */
472 ULONG ulLength; /* Max buf length on GetEmpty, Filled */
473 /* (actual) rec/buf length on ReturnFull. */
474 ULONG ulMessageParm; /* Message to passed to application */
475 MMTIME mmtimeOffset; /* mmtime offset from beginning of buffer */
476 ULONG ulParm1; /* Record or buffer specific data */
477 ULONG ulParm2; /* Record or buffer specific data */
478 } ESRCBUFTAB;
479typedef ESRCBUFTAB FAR *PESRCBUFTAB; /* Ptr to a buffer entry */
480
481 typedef struct _ETGTBUFTAB { /* etgtbuftab */
482 PVOID pBuffer; /* Ptr to buffer */
483 ULONG ulBufId; /* Buffer ID. Passed to SH on GetFull, must */
484 /* be passed back to SSM on ReturnEmpty. */
485 ULONG ulLength; /* Filled (actual) buffer length on GetFull, */
486 /* unused on ReturnEmpty. */
487 ULONG ulMessageParm; /* Message to passed to application */
488 MMTIME mmtimeOffset; /* mmtime offset from beginning of buffer */
489 ULONG ulParm1; /* Buffer specific data */
490 ULONG ulParm2; /* Buffer specific data */
491 } ETGTBUFTAB;
492typedef ETGTBUFTAB FAR *PETGTBUFTAB; /* Ptr to a buffer entry */
493
494 typedef struct _EPSRCBUFTAB { /* epsrcbuftab */
495 PVOID pBuffer; /* Ptr to buffer */
496 PVOID pRecord; /* Ptr to record in buffer (split-streams only) */
497 ULONG ulLength; /* Max buf length on GetEmpty, Filled */
498 /* (actual) rec/buf length on ReturnFull. */
499 ULONG ulMessageParm; /* Message to passed to application */
500 MMTIME mmtimeOffset; /* mmtime offset from beginning of buffer */
501 ULONG ulParm1; /* Record or buffer specific data */
502 ULONG ulParm2; /* Record or buffer specific data */
503 PVOID pProcessLin; /* Process Linear record ptr */
504 } EPSRCBUFTAB;
505typedef EPSRCBUFTAB FAR *PEPSRCBUFTAB; /* Ptr to a buffer entry */
506
507 typedef struct _EPTGTBUFTAB { /* eptgtbuftab */
508 PVOID pBuffer; /* Ptr to buffer */
509 ULONG ulBufId; /* Buffer ID. Passed to SH on GetFull, must */
510 /* be passed back to SSM on ReturnEmpty. */
511 ULONG ulLength; /* Filled (actual) buffer length on GetFull, */
512 /* unused on ReturnEmpty. */
513 ULONG ulMessageParm; /* Message to passed to application */
514 MMTIME mmtimeOffset; /* mmtime offset from beginning of buffer */
515 ULONG ulParm1; /* Buffer specific data */
516 ULONG ulParm2; /* Buffer specific data */
517 PVOID pProcessLin; /* Process Linear buffer ptr */
518 } EPTGTBUFTAB;
519typedef EPTGTBUFTAB FAR *PEPTGTBUFTAB; /* Ptr to a buffer entry */
520
521
522/*SMH_ulFlags: */
523#define BUF_GETEMPTY 0x00000001L /* Ptr returned in SMH_pGetBuffer */
524#define BUF_RETURNFULL 0x00000002L /* Ptr passed in SMH_pRetBuffer */
525#define BUF_GETFULL 0x00000004L /* Ptr returned in SMH_pGetBuffer */
526#define BUF_RETURNEMPTY 0x00000008L /* Ptr passed in SMH_pRetBuffer */
527#define BUF_GIVEBUF 0x00000010L /* Ptr passed in SMH_pRetBuffer */
528#define BUF_EOS 0x00000100L /* End of stream. Source sets this on */
529 /* last buffer. Target sets it after */
530 /* consuming the laset buffer. */
531#define BUF_RECORDS 0x00004000L /* One or more records (Split-stream) */
532#define BUF_LASTRECORD 0x00008000L /* (BUF_RETURNFULL only) Mark */
533 /* these record(s) as being the */
534 /* last in the buffer. So the SSM */
535 /* knows the maximum # of records */
536 /* produced for this buffer. */
537 /* (Split stream only) */
538/*SMH_ulFlags: */
539#define BUF_LINEAR 0x00010000L /* Ptrs are Global linear */
540#define BUF_PHYSICAL 0x00020000L /* Ptrs are physical */
541 /* (valid only for phyically */
542 /* contiguous buffers) */
543#define BUF_RESERVED 0x00040000L /* Reserved */
544#define BUF_GDT 0x00080000L /* Ptrs are GDT sel:offset */
545#define BUF_EXTENDED 0x80000000L /* Use Extended SMH_NOTIFY structures */
546#define BUF_EXTENDEDPTR 0x40000000L /* Use Extendedptr SMH_NOTIFY structures*/
547 /* Implies BUF_EXTENDED */
548
549#define VALIDSOURCEFLAGS (BUF_RETURNFULL|BUF_GETEMPTY|BUF_EOS|BUF_LASTRECORD|BUF_PHYSICAL|BUF_LINEAR|BUF_GDT|BUF_RECORDS|BUF_GIVEBUF|BUF_EXTENDED|BUF_EXTENDEDPTR)
550#define VALIDTARGETFLAGS (BUF_RETURNEMPTY|BUF_GETFULL|BUF_PHYSICAL|BUF_LINEAR|BUF_GDT|BUF_EOS|BUF_EXTENDED|BUF_EXTENDEDPTR)
551
552
553/****************************************************************************/
554#define SMH_LOCKMEM 4L /* SMH_LockMem() */
555 typedef struct _PARM_LOCKM { /* smhloc */
556 ULONG ulFunction; /* SMH command function */
557 PVOID pBuffer;
558 ULONG ulBufSize;
559 PLOCKH plockh;
560 ULONG ulFlags;
561 } PARM_LOCKM;
562typedef PARM_LOCKM FAR *PPARM_LOCKM;
563
564/*SMH_ulFlags: */
565#define SSM_LOCKMEM 0x0000L /* Lock Memory. */
566#define SSM_UNLOCKMEM 0x0001L /* Unlock memory. */
567#define SSM_CONTIGLOCK 0x0002L /* Lock memory contiguously. */
568#define SSM_LOCKMEM_RESERVED1 0x0100L /* reserved */
569#define SSM_LOCKMEM_RESERVED2 0x0200L /* reserved */
570/****************************************************************************/
571
572
573
574/****************************************************************************/
575/* */
576/* Function Prototypes for SHC functions (Stream Handler Functions) */
577/* All use Pure C calling convention */
578/* */
579/* NOTE ABOUT POINTERS: */
580/* 0:32 linear addresses for ring 3 (DLL) stream handlers */
581/* 16:16 selector/offset addresses for ring 0 (PDD) stream handlers */
582/****************************************************************************/
583typedef struct _SHC_COMMON { /* shcfunc */
584 ULONG ulFunction; /* Handler command function */
585 HID hid; /* handler ID */
586 } SHC_COMMON;
587typedef SHC_COMMON FAR *PSHC_COMMON; /* Ptr to common part */
588
589
590/****************************************************************************/
591#define SHC_ASSOCIATE 0L
592 typedef struct _PARM_ASSOC { /* shcass */
593 ULONG ulFunction; /* Handler command function */
594 HID hid; /* handler ID */
595 HSTREAM hstream; /* handle of stream instance */
596 PACB pacb; /* pointer to associate control block */
597 } PARM_ASSOC;
598typedef PARM_ASSOC FAR *PPARM_ASSOC;
599
600
601/****************************************************************************/
602#define SHC_CLOSE 1L
603 typedef struct _PARM_CLOSE { /* shcclo */
604 ULONG ulFunction; /* Handler command function */
605 HID hid; /* handler ID */
606 } PARM_CLOSE;
607typedef PARM_CLOSE FAR *PPARM_CLOSE;
608
609
610/****************************************************************************/
611#define SHC_CREATE 2L
612 typedef struct _PARM_CREATE { /* shccrt */
613 ULONG ulFunction; /* Handler command function */
614 HID hid; /* handler ID */
615 HSTREAM hstream; /* handle of stream instance */
616 SPCBKEY spcbkey; /* type of stream to create */
617 PSPCB pspcb; /* Pointer to SPCB from handler */
618 HSTREAM hstreamBuf; /* Used for split streams or to associate*/
619 /* another stream with this stream. */
620 PDCB pdcb; /* pointer to device control block */
621 } PARM_CREATE;
622typedef PARM_CREATE FAR *PPARM_CREATE;
623
624
625/****************************************************************************/
626#define SHC_DESTROY 3L
627 typedef struct _PARM_DESTROY { /* shcdes */
628 ULONG ulFunction; /* Handler command function */
629 HID hid; /* handler ID */
630 HSTREAM hstream; /* handle of stream instance */
631 } PARM_DESTROY;
632typedef PARM_DESTROY FAR *PPARM_DESTROY;
633
634
635/****************************************************************************/
636#define SHC_START 4L
637 typedef struct _PARM_START { /* shcstr */
638 ULONG ulFunction; /* Handler command function */
639 HID hid; /* handler ID */
640 HSTREAM hstream; /* handle of stream instance */
641 ULONG ulFlags; /* Start flags */
642 } PARM_START;
643typedef PARM_START FAR *PPARM_START;
644
645/* ulFlags: */
646#define FLUSH_START 0x0001L /* This start is a result of a Flush Stop command. */
647
648
649/****************************************************************************/
650#define SHC_STOP 5L
651 typedef struct _PARM_STOP { /* shcstp */
652 ULONG ulFunction; /* Handler command function */
653 HID hid; /* handler ID */
654 HSTREAM hstream; /* handle of stream instance */
655 ULONG ulFlags; /* Stop flags (refer to ulFlags defines under */
656 /* SpiStopStream() call. */
657 } PARM_STOP;
658typedef PARM_STOP FAR *PPARM_STOP;
659
660
661/****************************************************************************/
662#define SHC_SEEK 6L
663 typedef struct _PARM_SEEK { /* shcsek */
664 ULONG ulFunction; /* Handler command function */
665 HID hid; /* handler ID */
666 HSTREAM hstream; /* handle of stream instance */
667 ULONG ulFlags; /* Seek flag (refer to ulFlags defines */
668 /* under SpiSeekStream() call). */
669 LONG lSeekPoint; /* seek to point , mmtime or other */
670 } PARM_SEEK;
671typedef PARM_SEEK FAR *PPARM_SEEK;
672
673
674/****************************************************************************/
675#define SHC_ENABLE_EVENT 7L
676 typedef struct _PARM_ENEVENT { /* shceev */
677 ULONG ulFunction; /* Handler command function */
678 HID hid; /* handler ID */
679 HEVENT hevent; /* handle of event to enable */
680 PEVCB pevcbUser; /* User event information (e.g. hstream */
681 /* EventType, EventSubType) */
682 } PARM_ENEVENT;
683typedef PARM_ENEVENT FAR *PPARM_ENEVENT;
684
685
686/****************************************************************************/
687#define SHC_DISABLE_EVENT 8L
688 typedef struct _PARM_DISEVENT { /* shcdev */
689 ULONG ulFunction; /* Handler command function */
690 HID hid; /* handler ID */
691 HSTREAM hstream; /* handle to stream for this event */
692 HEVENT hevent; /* handle of event to disable */
693 } PARM_DISEVENT;
694typedef PARM_DISEVENT FAR *PPARM_DISEVENT;
695
696
697/****************************************************************************/
698#define SHC_ENABLE_SYNC 9L
699 typedef struct _PARM_ENSYNC { /* shcesy */
700 ULONG ulFunction; /* Handler command function */
701 HID hid; /* handler ID */
702 HSTREAM hstream; /* handle of stream instance */
703 ULONG ulFlags; /* Sync flags */
704 MMTIME mmtimeSync; /* granularity of sync interval (if null, use default) */
705 PSYNC_EVCB pevcbSyncPulse; /* Sync pulse EVCB information */
706 ULONG ulSyncPulseSem; /* Optional 16 bit system */
707 /* Semaphore for handler */
708 } PARM_ENSYNC;
709typedef PARM_ENSYNC FAR *PPARM_ENSYNC;
710
711/* ulFlags: */
712#define SYNC_MASTER 0x0000L /* The handler will be a master for this sync*/
713#define SYNC_SLAVE 0x0001L /* The handler will be a slave for this sync */
714
715
716/****************************************************************************/
717#define SHC_DISABLE_SYNC 10L
718 typedef struct _PARM_DISSYNC { /* shcdsy */
719 ULONG ulFunction; /* Handler command function */
720 HID hid; /* handler ID */
721 HSTREAM hstream; /* handle of stream instance */
722 } PARM_DISSYNC;
723typedef PARM_DISSYNC FAR *PPARM_DISSYNC;
724
725
726/****************************************************************************/
727#define SHC_GET_TIME 11L
728 typedef struct _PARM_GTIME { /* shcgti */
729 ULONG ulFunction; /* Handler command function */
730 HID hid; /* handler ID */
731 HSTREAM hstream; /* handle of stream instance */
732 MMTIME mmtimeCurrent; /* Returns current stream time */
733 } PARM_GTIME;
734typedef PARM_GTIME FAR *PPARM_GTIME;
735
736
737/****************************************************************************/
738#define SHC_GET_PROTOCOL 12L
739 typedef struct _PARM_GPROT { /* shcgpt */
740 ULONG ulFunction; /* Handler command function */
741 HID hid; /* handler ID */
742 SPCBKEY spcbkey; /* key of SPCB */
743 PSPCB pspcb; /* ptr to SPCB (output) */
744 } PARM_GPROT;
745typedef PARM_GPROT FAR *PPARM_GPROT;
746
747
748/****************************************************************************/
749#define SHC_INSTALL_PROTOCOL 13L
750 typedef struct _PARM_INSTPROT { /* shcipt */
751 ULONG ulFunction; /* Handler command function */
752 HID hid; /* handler ID */
753 SPCBKEY spcbkey; /* key of SPCB */
754 PSPCB pspcb; /* ptr to SPCB to install */
755 ULONG ulFlags; /* Install / Deinstall flags */
756 } PARM_INSTPROT;
757typedef PARM_INSTPROT FAR *PPARM_INSTPROT;
758
759
760/****************************************************************************/
761#define SHC_ENUMERATE_PROTOCOLS 14L
762 typedef struct _PARM_ENUMPROT { /* shcqpi */
763 ULONG ulFunction; /* Handler command function */
764 HID hid; /* handler ID */
765 PVOID paSPCBKeys; /* ptr to buffer to fill with SPCB keys */
766 PULONG pulNumSPCBKeys; /* # of entries buffer on input, */
767 /* # of SPCB key on output. */
768 } PARM_ENUMPROT;
769typedef PARM_ENUMPROT FAR *PPARM_ENUMPROT;
770
771
772/****************************************************************************/
773#define SHC_NEGOTIATE_RESULT 15L
774 typedef struct _PARM_NEGOTIATE { /* shcneg */
775 ULONG ulFunction; /* Handler command function */
776 HID hid; /* handler ID */
777 HSTREAM hstream; /* handle of stream instance */
778 PSPCB pspcb; /* Ptr to negotiated SPCB */
779 ULONG ulErrorStatus; /* On error, indicates which field in the*/
780 } PARM_NEGOTIATE; /* SPCB failed the negotiation. */
781typedef PARM_NEGOTIATE FAR *PPARM_NEGOTIATE;
782
783
784/****************************************************************************/
785#define SHC_SENDMSG 16L
786 typedef struct _PARM_SNDMSG { /* shcsndmsg */
787 ULONG ulFunction; /* Handler command function */
788 HID hid; /* handler ID */
789 HSTREAM hstream; /* handle of stream instance */
790 ULONG ulMsgType; /* Stream handler message type */
791 PVOID pMsg; /* Pointer to Message control block */
792 } PARM_SNDMSG;
793typedef PARM_SNDMSG FAR *PPARM_SNDMSG;
794
795
796/****************************************************************************/
797
798
799
800/* XLATOFF */
801#pragma pack()
802/* XLATON */
803
804/* NOINC */
805#endif /* _SSM_H_ */
806
807#ifdef __cplusplus
808}
809#endif
810/* INC */
Note: See TracBrowser for help on using the repository browser.