/*-
 * redshift-ng - Automatically adjust display colour temperature according the Sun
 * 
 * Copyright (c) 2009-2018        Jon Lund Steffensen <jonlst@gmail.com>
 * Copyright (c) 2014-2016, 2025  Mattias Andrée <m@maandree.se>
 * 
 * redshift-ng 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.
 * 
 * redshift-ng 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 redshift-ng.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "common.h"


static int
dummy_is_available(void)
{
	return 1;
}


static int
dummy_create(struct gamma_state **state_out)
{
	*state_out = NULL;
	return 0;
}


static int
dummy_start(struct gamma_state *state)
{
	(void) state;
	weprintf(_("WARNING: Using dummy gamma method! Display will not be affected by this gamma method.\n"));
	return 0;
}


static void
dummy_restore(struct gamma_state *state)
{
	(void) state;
}


static void
dummy_free(struct gamma_state *state)
{
	(void) state;
}


static void
dummy_print_help(void)
{
	printf(_("Does not affect the display but prints the color temperature to the terminal.\n"));
	printf("\n");
}


static int
dummy_set_option(struct gamma_state *state, const char *key, const char *value)
{
	(void) state;
	(void) value;
	weprintf(_("Unknown method parameter: `%s'."), key);
	return -1;
}


static int
dummy_apply(struct gamma_state *state, const struct colour_setting *setting, int preserve)
{
	(void) state;
	(void) preserve;
	printf(_("Temperature: %lu\n"), setting->temperature);
	return 0;
}


const struct gamma_method dummy_gamma_method = GAMMA_METHOD_INIT("dummy", 0, 0, dummy);