NetworkInador/client-gtk/ni-interface.h

77 lines
2.3 KiB
C
Raw Normal View History

/*
* ni-interface.h
* This file is part of NetworkInador
*
* Copyright (C) 2021 - Gatuno
*
* NetworkInador 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.
*
* NetworkInador 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 NetworkInador; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
/* inclusion guard */
#ifndef __NI_INTERFACE_H__
#define __NI_INTERFACE_H__
#include <glib-object.h>
#include <sys/socket.h>
#include <netinet/in.h>
G_BEGIN_DECLS
typedef struct _NIInterfaceClass NIInterfaceClass;
typedef struct _NIInterface NIInterface;
typedef struct _NIInterfacePrivate NIInterfacePrivate;
typedef struct _NIClient NIClient;
/*
* Type declaration.
*/
#define NI_TYPE_INTERFACE (ni_interface_get_type ())
#define NI_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NI_TYPE_INTERFACE, NIInterface))
#define NI_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NI_TYPE_INTERFACE, NIInterfaceClass))
#define NI_IS_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NI_TYPE_INTERFACE))
#define NI_IS_INTERFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NI_TYPE_INTERFACE))
#define NI_INTERFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NI_TYPE_INTERFACE, NIInterfaceClass))
GType ni_interface_get_type (void);
struct _NIInterfaceClass {
GObjectClass parent_class;
};
struct _NIInterface {
GObject parent_instance;
NIInterfacePrivate *priv;
};
/*
* Method definitions.
*/
guint ni_interface_get_index (NIInterface *ni_interface);
const gchar *ni_interface_get_name (NIInterface *ni_interface);
guint ni_interface_get_iface_type (NIInterface *ni_interface);
gboolean ni_interface_is_wireless (NIInterface *ni_interface);
NIClient *ni_interface_get_client (NIInterface *ni_interface);
const GList *ni_interface_get_ip_list (NIInterface *ni_interface);
G_END_DECLS
#endif /* __NI_INTERFACE_H__ */