1 /*****************************************************************************\
\r
2 quickconnect.h : Interface for the QuickConnect class
\r
4 Copyright (c) 2008, Hewlett-Packard Co.
\r
7 Redistribution and use in source and binary forms, with or without
\r
8 modification, are permitted provided that the following conditions
\r
10 1. Redistributions of source code must retain the above copyright
\r
11 notice, this list of conditions and the following disclaimer.
\r
12 2. Redistributions in binary form must reproduce the above copyright
\r
13 notice, this list of conditions and the following disclaimer in the
\r
14 documentation and/or other materials provided with the distribution.
\r
15 3. Neither the name of Hewlett-Packard nor the names of its
\r
16 contributors may be used to endorse or promote products derived
\r
17 from this software without specific prior written permission.
\r
19 THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
\r
20 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
21 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
\r
22 NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
\r
23 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
\r
24 TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
\r
25 OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
\r
26 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
27 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
\r
28 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
29 \*****************************************************************************/
\r
32 #ifndef APDK_QUICKCONNECT_H
\r
33 #define APDK_QUICKCONNECT_H
\r
37 #include "jpeglib.h"
\r
40 APDK_BEGIN_NAMESPACE
\r
45 class QuickConnect : public Printer
\r
48 QuickConnect (SystemServices* pSS, BOOL proto=FALSE);
\r
51 Header *SelectHeader (PrintContext* pc);
\r
52 DRIVER_ERROR VerifyPenInfo ();
\r
53 DRIVER_ERROR ParsePenInfo (PEN_TYPE& ePen, BOOL QueryPrinter=TRUE);
\r
54 inline virtual BOOL SupportSeparateBlack (PrintMode *pCurrentMode)
\r
59 virtual BOOL GetMargins (PAPER_SIZE ps, float *fMargins)
\r
61 fMargins[0] = (float) 0.0;
\r
62 fMargins[1] = (float) 0.0;
\r
63 fMargins[2] = (float) 0.0;
\r
64 fMargins[3] = (float) 0.0;
\r
67 virtual BOOL FullBleedCapable (PAPER_SIZE ps, FullbleedType *fbType,
\r
68 float *xOverSpray, float *yOverSpray,
\r
69 float *fLeftOverSpray, float *fTopOverSpray)
\r
71 *xOverSpray = (float) 0.0;
\r
72 *yOverSpray = (float) 0.0;
\r
74 *fLeftOverSpray = (float) 0.0;
\r
76 *fTopOverSpray = (float) 0.0;
\r
77 *fbType = fullbleed4EdgeAllMedia;
\r
81 virtual DRIVER_ERROR SetHint (PRINTER_HINT eHint, int iValue);
\r
82 void JpegData (BYTE *buffer, int size);
\r
83 DRIVER_ERROR Encapsulate (const RASTERDATA *InputRaster, BOOL bLastPlane);
\r
84 DRIVER_ERROR Flush (int iBufferSize);
\r
85 PAPER_SIZE MandatoryPaperSize ()
\r
93 virtual QuickConnect & operator = (Printer& rhs)
\r
100 int MapPaperSize (PAPER_SIZE ePaperSize);
\r
101 int MapMediaType (MEDIATYPE eMediaType);
\r
102 int MapQualityMode (QUALITY_MODE eQualityMode);
\r
103 DRIVER_ERROR AddExifHeader ();
\r
104 DRIVER_ERROR Compress ();
\r
105 PrintContext *m_pPC;
\r
108 int m_iRemoveRedEye;
\r
110 int m_iMaxFileSize;
\r
115 int m_iJpegBufferPos;
\r
116 int m_iJpegBufferSize;
\r
117 int m_iInputBufferSize;
\r
118 BYTE *m_pbyInputBuffer;
\r
119 BYTE *m_pbyJpegBuffer;
\r
123 class QCAutomatic : public PrintMode
\r
127 inline BOOL MediaCompatible (MEDIATYPE eMedia)
\r
134 class QCFastNormal : public PrintMode
\r
138 inline BOOL MediaCompatible (MEDIATYPE eMedia)
\r
145 class QCNormal : public PrintMode
\r
149 inline BOOL MediaCompatible (MEDIATYPE eMedia)
\r
156 class QCBest : public PrintMode
\r
160 inline BOOL MediaCompatible (MEDIATYPE eMedia)
\r
167 #ifdef APDK_QUICKCONNECT
\r
168 //! QuickConnectProxy
\r
170 ******************************************************************************/
\r
171 class QuickConnectProxy : public PrinterProxy
\r
174 QuickConnectProxy() : PrinterProxy (
\r
175 "QuickConnect", // family name
\r
176 "Photosmart A530\0"
\r
177 "Photosmart A630\0"
\r
178 "Photosmart A640\0"
\r
179 ) {m_iPrinterType = eQuickConnect;}
\r
180 inline Printer* CreatePrinter (SystemServices *pSS) const { return new QuickConnect (pSS); }
\r
181 inline PRINTER_TYPE GetPrinterType () const { return eQuickConnect;}
\r
182 inline unsigned int GetModelBit() const { return 0x10000;}
\r
188 #endif //APDK_QUICKCONNECT_H
\r