feat: Add QR code generation functionality to PrivateBin API library
- Add generate_qr_code() function for creating QR codes from PrivateBin links - Implement SVG output format for scalable QR code generation - Add qr_generator.h/cpp with self-contained QR code implementation - Update CMakeLists.txt to include new QR code source files - Integrate QR code documentation into README.md - Update example program to demonstrate QR code generation - Update CHANGELOG.md with v0.1.1.6 release notes - Remove separate README_QR_CODE.md file The implementation provides simplified QR code generation with: - Position detection patterns for QR code recognition - Configurable size and border parameters - No external dependencies - Comprehensive error handling - Memory management using existing free_string() function
This commit is contained in:
@ -76,6 +76,18 @@ PRIVATEBIN_API int get_paste(const char* server_url, const char* paste_id,
|
||||
PRIVATEBIN_API int delete_paste(const char* server_url, const char* paste_id,
|
||||
const char* delete_token);
|
||||
|
||||
/**
|
||||
* Generates a QR code for a PrivateBin link
|
||||
*
|
||||
* @param url The PrivateBin URL to encode in the QR code
|
||||
* @param qr_code_data Output parameter for the QR code data (SVG format)
|
||||
* @param size The size of the QR code in pixels (default: 256)
|
||||
* @param border The border size around the QR code in modules (default: 4)
|
||||
* @return 0 on success, error code on failure
|
||||
*/
|
||||
PRIVATEBIN_API int generate_qr_code(const char* url, char** qr_code_data,
|
||||
int size, int border);
|
||||
|
||||
/**
|
||||
* Frees memory allocated by the API functions
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user