/* src/bazaar.p/bz-search-bias.h
 *
 * Copyright 2026 AUTOGEN
 *
 * This program 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.
 *
 * This program 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 program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#pragma once

#include <glib-object.h>
#include <gtk/gtk.h>
#include "bz-linear-function.h"
#include "bz-exponential-function.h"

G_BEGIN_DECLS



#define BZ_TYPE_SEARCH_BIAS (bz_search_bias_get_type ())
G_DECLARE_FINAL_TYPE (BzSearchBias, bz_search_bias, BZ, SEARCH_BIAS, GObject)

BzSearchBias *
bz_search_bias_new (void);

const char *
bz_search_bias_get_regex (BzSearchBias *self);

const char *
bz_search_bias_get_convert_to (BzSearchBias *self);

BzLinearFunction *
bz_search_bias_get_linear_boost (BzSearchBias *self);

BzExponentialFunction *
bz_search_bias_get_exponential_boost (BzSearchBias *self);

GListModel *
bz_search_bias_get_boost_appids (BzSearchBias *self);

void
bz_search_bias_set_regex (BzSearchBias *self,
    const char *regex);

void
bz_search_bias_set_convert_to (BzSearchBias *self,
    const char *convert_to);

void
bz_search_bias_set_linear_boost (BzSearchBias *self,
    BzLinearFunction *linear_boost);

void
bz_search_bias_set_exponential_boost (BzSearchBias *self,
    BzExponentialFunction *exponential_boost);

void
bz_search_bias_set_boost_appids (BzSearchBias *self,
    GListModel *boost_appids);

void
bz_search_bias_set_regex_take (BzSearchBias *self,
    char *regex);

#define bz_search_bias_set_regex_take_printf(self, ...) bz_search_bias_set_regex_take (self, g_strdup_printf (__VA_ARGS__))

void
bz_search_bias_set_convert_to_take (BzSearchBias *self,
    char *convert_to);

#define bz_search_bias_set_convert_to_take_printf(self, ...) bz_search_bias_set_convert_to_take (self, g_strdup_printf (__VA_ARGS__))

G_END_DECLS

/* End of src/bazaar.p/bz-search-bias.h */
