Naveen Neel / shedskin
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers d4iface.h Source File

d4iface.h

00001 /*
00002  * d4iface.h
00003  *
00004  * DOT4 interface
00005  *
00006  * This file is part of the w32api package.
00007  *
00008  * Contributors:
00009  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
00010  *
00011  * THIS SOFTWARE IS NOT COPYRIGHTED
00012  *
00013  * This source code is offered for use in the public domain. You may
00014  * use, modify or distribute it freely.
00015  *
00016  * This code is distributed in the hope that it will be useful but
00017  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00018  * DISCLAIMED. This includes but is not limited to warranties of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  *
00021  */
00022 
00023 #ifndef __D4IFACE_H
00024 #define __D4IFACE_H
00025 
00026 #if __GNUC__ >=3
00027 #pragma GCC system_header
00028 #endif
00029 
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033 
00034 #include "ntddk.h"
00035 
00036 #define DOT4_MAX_CHANNELS                 128
00037 #define NO_TIMEOUT                        0
00038 
00039 #define DOT4_CHANNEL                      0
00040 #define HP_MESSAGE_PROCESSOR              1
00041 #define PRINTER_CHANNEL                   2
00042 #define SCANNER_CHANNEL                   4
00043 #define MIO_COMMAND_PROCESSOR             5
00044 #define ECHO_CHANNEL                      6
00045 #define FAX_SEND_CHANNEL                  7
00046 #define FAX_RECV_CHANNEL                  8
00047 #define DIAGNOSTIC_CHANNEL                9
00048 #define HP_RESERVED                       10
00049 #define IMAGE_DOWNLOAD                    11
00050 #define HOST_DATASTORE_UPLOAD             12
00051 #define HOST_DATASTORE_DOWNLOAD           13
00052 #define CONFIG_UPLOAD                     14
00053 #define CONFIG_DOWNLOAD                   15
00054 
00055 #define STREAM_TYPE_CHANNEL               1
00056 #define PACKET_TYPE_CHANNEL               2
00057 
00058 /* DOT4_ACTIVITY.ulMessage flags */
00059 #define DOT4_STREAM_RECEIVED              0x100
00060 #define DOT4_STREAM_CREDITS               0x101
00061 #define DOT4_MESSAGE_RECEIVED             0x102
00062 #define DOT4_DISCONNECT                   0x103
00063 #define DOT4_CHANNEL_CLOSED               0x105
00064 
00065 typedef unsigned long CHANNEL_HANDLE, *PCHANNEL_HANDLE;
00066 
00067 typedef struct _DOT4_ACTIVITY {
00068   ULONG  ulMessage;
00069   ULONG  ulByteCount;
00070   CHANNEL_HANDLE  hChannel;
00071 } DOT4_ACTIVITY, *PDOT4_ACTIVITY;
00072 
00073 typedef struct _DOT4_WMI_XFER_INFO {
00074   ULONG  ulStreamBytesWritten;
00075   ULONG  ulStreamBytesRead;
00076   ULONG  ulPacketBytesWritten;
00077   ULONG  ulPacketBytesRead;
00078 } DOT4_WMI_XFER_INFO, *PDOT4_WMI_XFER_INFO;
00079 
00080 #ifdef __cplusplus
00081 }
00082 #endif
00083 
00084 #endif /* __D4IFACE_H */