PAPPostScriptStuff.h

/*
    File:       PAPPostScriptStuff.h
 
    Contains:   Header file for the PAPPostScriptStuff.c code file
 
    Written by:     
 
    Copyright:  Copyright © 1999 by Apple Computer, Inc., All Rights Reserved.
 
                You may incorporate this Apple sample source code into your program(s) without
                restriction. This Apple sample source code has been provided "AS IS" and the
                responsibility for its operation is yours. You are not permitted to redistribute
                this Apple sample source code as "Apple sample source code" after having made
                changes. If you're going to re-distribute the source, we require that you make
                it clear in the source that the code was descended from Apple sample source
                code, but that you've made changes.
 
    Change History (most recent first):
                7/22/1999   Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
                
 
*/
 
 
#ifndef __PAPPOSTSCRIPTSTUFF__
#define __PAPPOSTSCRIPTSTUFF__
 
 
#ifdef __cplusplus
extern "C" {
#endif
 
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
 
#if PRAGMA_IMPORT_SUPPORTED
#pragma import on
#endif
 
#define kQueryPrefix    0x0D25253F
#define kBeginQueryStr  "Query\015"
#define kQueryStr       "Query: "
#define kBeginStr       "Begin"
#define kEndStr         "\015\045\045\077End"
#define kEOFStr         "\015\045\045EOF\015"
#define kReturnChar     0x0D
#define kLineFeedChar   0x0A
#define kSpaceChar      0x20
 
enum {
    kCaseMustMatch = 0,
    kCaseMatchAll
};
 
enum {
    kNoMatch = 0,
    kPartialMatch       = 0x0001,
    kQueryPrefixFound   = 0x0002,
    kBeginEndStrFound   = 0x0004,
    kQueryStrFound      = 0x0008,
    kMatch              = 0x000E
};
 
enum {
    kFindBeginStr = 0,
    kFindEndStr
};
 
// prototypes
extern Boolean      TestDataIsPSQuery(PacketPtr packetPtr);
extern OSStatus     ProcessPSQuery(PacketPtr packetPtr);
extern Boolean      DoProcessPSQuery(PacketPtr  packetPtr);
extern Boolean      IsPacketAPSQuery(PacketPtr packetPtr);
extern UInt16       FindQueryString(PacketPtr packetPtr, SInt16 whichStr);
extern UInt16       ProcessDefaultResponse(PacketPtr packetPtr);
extern void         SendEmptyPacket(PacketPtr packetPtr);
 
#if PRAGMA_IMPORT_SUPPORTED
#pragma import off
#endif
 
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
 
#ifdef __cplusplus
}
#endif
 
#endif /* __PAPPOSTSCRIPTSTUFF__ */