1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 11:56:35 +01:00

Add ability to print your Tox ID's QR code to a file

This commit is contained in:
Jfreegman
2015-11-08 22:51:46 -05:00
parent c5d9aca3e1
commit 39c4b7ecdd
14 changed files with 259 additions and 26 deletions

35
src/qr_code.h Normal file
View File

@@ -0,0 +1,35 @@
/* 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
#define QRCODE_FILENAME_EXT ".QRcode"
/* Converts a tox ID string into a QRcode and prints it to the given file stream.
*
* Returns 0 on success.
* Returns -1 on failure.
*/
int ID_to_QRcode(const char *tox_id, FILE *fp);
#endif /* QR_CODE */