/* PromptText.c generated by valac 0.56.3, the Vala compiler
 * generated from PromptText.vala, do not modify */

/*
 * Copyright 2018 elementary, Inc. (https://elementary.io)
 *
 * 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 2 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, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA.
 *
 * Authors: Corentin Noël <corentin@elementary.io>
 */

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

#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

typedef enum  {
	GREETER_PROMPT_TEXT_LOGIN,
	GREETER_PROMPT_TEXT_PASSWORD,
	GREETER_PROMPT_TEXT_OTHER
} GreeterPromptText;

#define GREETER_TYPE_PROMPT_TEXT (greeter_prompt_text_get_type ())

VALA_EXTERN GType greeter_prompt_text_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GreeterPromptText greeter_prompt_text_from_string (const gchar* text);

GreeterPromptText
greeter_prompt_text_from_string (const gchar* text)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	static GQuark _tmp1_label1 = 0;
	GreeterPromptText result;
	g_return_val_if_fail (text != NULL, 0);
	_tmp0_ = text;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("login: ")))) {
		switch (0) {
			default:
			{
				result = GREETER_PROMPT_TEXT_LOGIN;
				return result;
			}
		}
	} else if (_tmp2_ == ((0 != _tmp1_label1) ? _tmp1_label1 : (_tmp1_label1 = g_quark_from_static_string ("Password: ")))) {
		switch (0) {
			default:
			{
				result = GREETER_PROMPT_TEXT_PASSWORD;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_critical ("PromptText.vala:34: Unhandled prompt text: %s", text);
				result = GREETER_PROMPT_TEXT_OTHER;
				return result;
			}
		}
	}
}

static GType
greeter_prompt_text_get_type_once (void)
{
	static const GEnumValue values[] = {{GREETER_PROMPT_TEXT_LOGIN, "GREETER_PROMPT_TEXT_LOGIN", "login"}, {GREETER_PROMPT_TEXT_PASSWORD, "GREETER_PROMPT_TEXT_PASSWORD", "password"}, {GREETER_PROMPT_TEXT_OTHER, "GREETER_PROMPT_TEXT_OTHER", "other"}, {0, NULL, NULL}};
	GType greeter_prompt_text_type_id;
	greeter_prompt_text_type_id = g_enum_register_static ("GreeterPromptText", values);
	return greeter_prompt_text_type_id;
}

GType
greeter_prompt_text_get_type (void)
{
	static volatile gsize greeter_prompt_text_type_id__once = 0;
	if (g_once_init_enter (&greeter_prompt_text_type_id__once)) {
		GType greeter_prompt_text_type_id;
		greeter_prompt_text_type_id = greeter_prompt_text_get_type_once ();
		g_once_init_leave (&greeter_prompt_text_type_id__once, greeter_prompt_text_type_id);
	}
	return greeter_prompt_text_type_id__once;
}

