2015-11-09 04:51:46 +01:00
|
|
|
/* qr_code.h
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Toxic All Rights Reserved.
|
|
|
|
*
|
|
|
|
* This file is part of Toxic.
|
|
|
|
*
|
|
|
|
* Toxic 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 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Toxic 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with Toxic. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef QR_CODE
|
|
|
|
#define QR_CODE
|
|
|
|
|
2018-06-16 05:07:16 +02:00
|
|
|
#ifdef QRCODE
|
|
|
|
|
2015-11-09 04:51:46 +01:00
|
|
|
#define QRCODE_FILENAME_EXT ".QRcode"
|
|
|
|
|
2016-10-05 11:55:45 +02:00
|
|
|
/* Converts a tox ID string into a QRcode and prints it into the given filename.
|
2015-11-09 04:51:46 +01:00
|
|
|
*
|
|
|
|
* Returns 0 on success.
|
|
|
|
* Returns -1 on failure.
|
|
|
|
*/
|
2016-10-05 11:55:45 +02:00
|
|
|
int ID_to_QRcode_txt(const char *tox_id, const char *outfile);
|
|
|
|
|
|
|
|
#ifdef QRPNG
|
|
|
|
#define QRCODE_FILENAME_EXT_PNG ".QRcode.png"
|
|
|
|
/* Converts a tox ID string into a QRcode and prints it into the given filename as png.
|
|
|
|
*
|
|
|
|
* Returns 0 on success.
|
|
|
|
* Returns -1 on failure.
|
|
|
|
*/
|
|
|
|
int ID_to_QRcode_png(const char *tox_id, const char *outfile);
|
|
|
|
#endif /* QRPNG */
|
2015-11-09 04:51:46 +01:00
|
|
|
|
2018-06-16 05:07:16 +02:00
|
|
|
#endif /* QRCODE */
|
|
|
|
|
2015-11-09 04:51:46 +01:00
|
|
|
#endif /* QR_CODE */
|