summaryrefslogtreecommitdiffstats
path: root/kbarcode/gnubarkodeengine.h
blob: 323553ceb22d1d1f4ef03475224085194dbb33b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/***************************************************************************
                          gnubarkodeengine.h  -  description
                             -------------------
    begin                : Fri Nov 05 2004
    copyright            : (C) 2002 by Dominik Seichter
    email                : domseichter@web.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef GNUBARKODEENGINE_H
#define GNUBARKODEENGINE_H

#include <barkodeengine.h>

struct Barcode_Item;

/**
  * Loads GNU Barcode lib dynamically when needed, 
  * so that KBarcode does not have to link against 
  * it and works even without lib gnu barcode.
  * @author Dominik Seichter
  */
class GnuBarkodeEngine : public BarkodeEngine
{
    public:
        GnuBarkodeEngine();

        struct Barcode_Item* (*Barcode_Create)(char* text);
        int (*Barcode_Delete)(struct Barcode_Item* bc);
        int (*Barcode_Encode)(struct Barcode_Item *bc, int flags);
        
    
    protected:
        void init();
};

extern GnuBarkodeEngine gnuBarkodeEngine;
#endif