TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
mqrspec.h
Go to the documentation of this file.
1 /*
2  * qrencode - QR Code encoder
3  *
4  * Micro QR Code specification in convenient format.
5  * Copyright (C) 2006-2017 Kentaro Fukuchi <kentaro@fukuchi.org>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef MQRSPEC_H
23 #define MQRSPEC_H
24 
25 #include "qrencode.h"
26 
27 /******************************************************************************
28  * Version and capacity
29  *****************************************************************************/
30 
34 #define MQRSPEC_WIDTH_MAX 17
35 
42 extern int MQRspec_getDataLengthBit(int version, QRecLevel level);
43 
50 extern int MQRspec_getDataLength(int version, QRecLevel level);
51 
58 extern int MQRspec_getECCLength(int version, QRecLevel level);
59 
66 extern int MQRspec_getMinimumVersion(int size, QRecLevel level);
67 
73 extern int MQRspec_getWidth(int version);
74 
80 extern int MQRspec_getRemainder(int version);
81 
82 /******************************************************************************
83  * Length indicator
84  *****************************************************************************/
85 
92 extern int MQRspec_lengthIndicator(QRencodeMode mode, int version);
93 
100 extern int MQRspec_maximumWords(QRencodeMode mode, int version);
101 
102 /******************************************************************************
103  * Version information pattern
104  *****************************************************************************/
105 
112 extern unsigned int MQRspec_getVersionPattern(int version);
113 
114 /******************************************************************************
115  * Format information
116  *****************************************************************************/
117 
125 extern unsigned int MQRspec_getFormatInfo(int mask, int version, QRecLevel level);
126 
127 /******************************************************************************
128  * Frame
129  *****************************************************************************/
130 
136 extern unsigned char *MQRspec_newFrame(int version);
137 
138 /******************************************************************************
139  * Mode indicator
140  *****************************************************************************/
141 
145 #define MQRSPEC_MODEID_NUM 0
146 #define MQRSPEC_MODEID_AN 1
147 #define MQRSPEC_MODEID_8 2
148 #define MQRSPEC_MODEID_KANJI 3
149 
150 #endif /* MQRSPEC_H */
int MQRspec_getMinimumVersion(int size, QRecLevel level)
Return a version number that satisfies the input code length.
voidpf void uLong size
Definition: ioapi.h:136
int MQRspec_getDataLength(int version, QRecLevel level)
Return maximum data code length (bytes) for the version.
Definition: mqrspec.c:68
int MQRspec_lengthIndicator(QRencodeMode mode, int version)
Return the size of length indicator for the mode and version.
Definition: mqrspec.c:97
QRecLevel
Level of error correction.
Definition: qrencode.h:126
QRencodeMode
Encoding mode.
Definition: qrencode.h:111
unsigned int MQRspec_getFormatInfo(int mask, int version, QRecLevel level)
Return BCH encoded format information pattern.
Definition: mqrspec.c:137
unsigned char * MQRspec_newFrame(int version)
Return a copy of initialized frame.
Definition: mqrspec.c:225
int MQRspec_getDataLengthBit(int version, QRecLevel level)
Return maximum data code length (bits) for the version.
Definition: mqrspec.c:57
int MQRspec_maximumWords(QRencodeMode mode, int version)
Return the maximum length for the mode and version.
Definition: mqrspec.c:102
int MQRspec_getRemainder(int version)
Return the numer of remainder bits.
const char int mode
Definition: ioapi.h:135
unsigned int MQRspec_getVersionPattern(int version)
Return BCH encoded version information pattern that is used for the symbol of version 7 or greater...
int MQRspec_getWidth(int version)
Return the width of the symbol for the version.
Definition: mqrspec.c:78
int MQRspec_getECCLength(int version, QRecLevel level)
Return maximum error correction code length (bytes) for the version.
Definition: mqrspec.c:73