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

/* -*- Mode: vala; indent-tabs-mode: nil; tab-width: 4 -*-*/
/*-
 * Copyright 2022 Ubuntu Budgie Developers
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Library General Public License as published by
 * the Free Software Foundation, either version 2.1 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 Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by: David Mohammed <fossfreedom@ubuntu.com>
 */

#include "networkapplet.h"
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <NetworkManager.h>
#include <glib/gi18n-lib.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	NETWORK_ABSTRACT_BLUETOOTH_INTERFACE_0_PROPERTY,
	NETWORK_ABSTRACT_BLUETOOTH_INTERFACE_NUM_PROPERTIES
};
static GParamSpec* network_abstract_bluetooth_interface_properties[NETWORK_ABSTRACT_BLUETOOTH_INTERFACE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

static gpointer network_abstract_bluetooth_interface_parent_class = NULL;
static GType network_abstract_bluetooth_interface_type_id = 0;

static void network_abstract_bluetooth_interface_real_update_name (NetworkWidgetNMInterface* base,
                                                            gint count);

static void
network_abstract_bluetooth_interface_real_update_name (NetworkWidgetNMInterface* base,
                                                       gint count)
{
	NetworkAbstractBluetoothInterface * self;
	gchar* name = NULL;
	NMDevice* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	self = (NetworkAbstractBluetoothInterface*) base;
	_tmp0_ = ((NetworkWidgetNMInterface*) self)->device;
	_tmp1_ = nm_device_get_description (_tmp0_);
	_tmp2_ = g_strdup (_tmp1_);
	name = _tmp2_;
	_tmp3_ = g_strdup_printf (_ ("%s Network"), name);
	_tmp4_ = _tmp3_;
	network_widget_nm_interface_set_display_title ((NetworkWidgetNMInterface*) self, _tmp4_);
	_g_free0 (_tmp4_);
	_g_free0 (name);
}

NetworkAbstractBluetoothInterface*
network_abstract_bluetooth_interface_construct (GType object_type)
{
	NetworkAbstractBluetoothInterface * self = NULL;
	self = (NetworkAbstractBluetoothInterface*) network_widget_nm_interface_construct (object_type);
	return self;
}

static void
network_abstract_bluetooth_interface_class_init (NetworkAbstractBluetoothInterfaceClass * klass,
                                                 gpointer klass_data)
{
	network_abstract_bluetooth_interface_parent_class = g_type_class_peek_parent (klass);
	((NetworkWidgetNMInterfaceClass *) klass)->update_name = (void (*) (NetworkWidgetNMInterface*, gint)) network_abstract_bluetooth_interface_real_update_name;
}

static void
network_abstract_bluetooth_interface_instance_init (NetworkAbstractBluetoothInterface * self,
                                                    gpointer klass)
{
}

GType
network_abstract_bluetooth_interface_get_type (void)
{
	return network_abstract_bluetooth_interface_type_id;
}

GType
network_abstract_bluetooth_interface_register_type (GTypeModule * module)
{
	static const GTypeInfo g_define_type_info = { sizeof (NetworkAbstractBluetoothInterfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) network_abstract_bluetooth_interface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NetworkAbstractBluetoothInterface), 0, (GInstanceInitFunc) network_abstract_bluetooth_interface_instance_init, NULL };
	network_abstract_bluetooth_interface_type_id = g_type_module_register_type (module, NETWORK_TYPE_WIDGET_NM_INTERFACE, "NetworkAbstractBluetoothInterface", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return network_abstract_bluetooth_interface_type_id;
}

