/*
 * Purple - Internet Messaging Library
 * Copyright (C) Pidgin Developers <devel@pidgin.im>
 *
 * Purple is the legal property of its developers, whose names are too numerous
 * to list here. Please refer to the COPYRIGHT file distributed with this
 * source distribution.
 *
 * This library 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 2 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 General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this library; if not, see <https://www.gnu.org/licenses/>.
 */

#if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
# error "only <purple.h> may be included directly"
#endif

#ifndef PURPLE_QR_CODE_H
#define PURPLE_QR_CODE_H

#include <glib.h>
#include <glib-object.h>

#include "purpleversion.h"

G_BEGIN_DECLS

#define PURPLE_TYPE_QR_CODE (purple_qr_code_get_type())

/**
 * PurpleQrCode:
 *
 * An object containing information about a QR Code.
 *
 * This does not encode a QR Code in any way, it just holds the information
 * about the QR Code and leaves decoding and rendering up to the user
 * interface.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
G_DECLARE_FINAL_TYPE(PurpleQrCode, purple_qr_code, PURPLE, QR_CODE, GObject)

/**
 * purple_qr_code_get_alt_text:
 *
 * Gets the alternative text.
 *
 * Returns: (nullable): The alternative text.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
const char *purple_qr_code_get_alt_text(PurpleQrCode *qr_code);

/**
 * purple_qr_code_get_description:
 *
 * Gets the description.
 *
 * Returns: (nullable): The description.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
const char *purple_qr_code_get_description(PurpleQrCode *qr_code);

/**
 * purple_qr_code_get_text:
 *
 * Gets the text which is being encoded.
 *
 * Returns: The text.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
const char *purple_qr_code_get_text(PurpleQrCode *qr_code);

/**
 * purple_qr_code_get_title:
 *
 * Gets the title.
 *
 * Returns: The title.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
const char *purple_qr_code_get_title(PurpleQrCode *qr_code);

/**
 * purple_qr_code_new:
 * @title: the title
 * @description: (nullable): the description
 * @text: the text to be encoded
 * @alt_text: (nullable): the alt text
 *
 * Creates a new QR Code.
 *
 * Returns: (transfer full): The new instance.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
PurpleQrCode *purple_qr_code_new(const char *title, const char *description, const char *text, const char *alt_text);

/**
 * purple_qr_code_set_alt_text:
 * @alt_text: (nullable): the new alternative text
 *
 * Sets the alternative text.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
void purple_qr_code_set_alt_text(PurpleQrCode *qr_code, const char *alt_text);

/**
 * purple_qr_code_set_description:
 * @description: (nullable): the new description
 *
 * Sets the description.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
void purple_qr_code_set_description(PurpleQrCode *qr_code, const char *description);

/**
 * purple_qr_code_set_text:
 * @text: the new text
 *
 * Sets the text to be encoded.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
void purple_qr_code_set_text(PurpleQrCode *qr_code, const char *text);

/**
 * purple_qr_code_set_title:
 * @title: the new title
 *
 * Sets the title.
 *
 * Since: 3.0
 */
PURPLE_AVAILABLE_IN_3_0
void purple_qr_code_set_title(PurpleQrCode *qr_code, const char *title);

G_END_DECLS

#endif /* PURPLE_QR_CODE_H */
