~ubuntu-branches/ubuntu/raring/hplip/raring

« back to all changes in this revision

Viewing changes to prnt/hpijs/hpcups.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-12-14 20:08:44 UTC
  • mfrom: (2.1.118 lucid)
  • Revision ID: james.westby@ubuntu.com-20091214200844-z8qhqwgppbu3t7ze
Tags: 3.9.10-4
KBSD patch from KiBi (Closes: #560796)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************\
2
 
    hpcups.h : HP cups filter header file
3
 
 
4
 
    Copyright (c) 2009, Hewlett-Packard Co.
5
 
    All rights reserved.
6
 
 
7
 
    Redistribution and use in source and binary forms, with or without
8
 
    modification, are permitted provided that the following conditions
9
 
    are met:
10
 
    1. Redistributions of source code must retain the above copyright
11
 
       notice, this list of conditions and the following disclaimer.
12
 
    2. Redistributions in binary form must reproduce the above copyright
13
 
       notice, this list of conditions and the following disclaimer in the
14
 
       documentation and/or other materials provided with the distribution.
15
 
    3. Neither the name of the Hewlett-Packard nor the names of its
16
 
       contributors may be used to endorse or promote products derived
17
 
       from this software without specific prior written permission.
18
 
 
19
 
    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20
 
    IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21
 
    OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22
 
    IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23
 
    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24
 
    NOT LIMITED TO, PATENT INFRINGEMENT; PROCUREMENT OF SUBSTITUTE GOODS OR
25
 
    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26
 
    HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27
 
    STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28
 
    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
 
    POSSIBILITY OF SUCH DAMAGE.
30
 
\*****************************************************************************/
31
 
 
32
 
#ifndef hpcups_INCLUDED
33
 
#define hpcups_INCLUDED
34
 
 
35
 
#include "bug.h"
36
 
 
37
 
class HPCups
38
 
{
39
 
public:
40
 
    HPCups ();
41
 
    ~HPCups ();
42
 
    int     ProcessJob (int argc, char **argv);
43
 
    void    CancelJob ();
44
 
 
45
 
private:
46
 
    void                   setLogLevel ();
47
 
    int                    processRasterData (cups_raster_t *cups_raster);
48
 
    int                    initPrintJob ();
49
 
    int                    initServices (char *szJobId);
50
 
    int                    initContext (char **argv);
51
 
    void                   printcupsHeader ();
52
 
    void                   doKSeparation (BYTE *pKRGBRaster,
53
 
                                          BYTE *black_raster,
54
 
                                          BYTE *color_raster);
55
 
    BOOL                   isBlankRaster (BYTE *pRaster, int iNumBytes);
56
 
    UXServices             *m_pSys;
57
 
    cups_page_header2_t    m_cupsHeader;
58
 
    int                    m_iLogLevel;
59
 
    int                    m_fd;
60
 
};
61
 
 
62
 
#endif // hpcups_INCLUDED
63