summaryrefslogtreecommitdiff
path: root/vapi/libqrencode.vapi
blob: 2b8f104512491f254eabb169a8c14c844c16a32b (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* qrencode.vapi
 *
 * Copyright (C) 2015 Ignacio Casal Quinteiro
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA
 *
 * As a special exception, if you use inline functions from this file,
 * this file does not by itself cause the resulting executable to be
 * covered by the GNU Lesser General Public License.
 */
namespace QRencode {
  [CCode (cheader_filename = "qrencode.h", cname = "QRcode", unref_function = "QRcode_free")]
  public class QRcode {
    [CCode (cname = "QRcode_encodeString")]
    public QRcode.encodeString(string digits, int version, EcLevel level, Mode hint, int casesensitive);

    public int version;
    public int width;
    [CCode (array_length = false)]
    public uint8[] data;
  }

  [CCode (cheader_filename = "qrencode.h", cname="QRencLevel")]
  public enum EcLevel {
    [CCode (cname="QR_ECLEVEL_L")]
    L,
    [CCode (cname="QR_ECLEVEL_M")]
    M,
    [CCode (cname="QR_ECLEVEL_Q")]
    Q,
    [CCode (cname="QR_ECLEVEL_H")]
    H
  }

  [CCode (cheader_filename = "qrencode.h", cname="QRencodeMode")]
  public enum Mode {
    [CCode (cname="QR_MODE_NUL")]
    NUL,
    [CCode (cname="QR_MODE_NUM")]
    NUM,
    [CCode (cname="QR_MODE_AN")]
    AN,
    [CCode (cname="QR_MODE_8")]
    B8,
    [CCode (cname="QR_MODE_KANJI")]
    KANJI,
    [CCode (cname="QR_MODE_STRUCTURE")]
    STRUCTURE
  }
}