2022-12-21 23:15:56 -06:00
|
|
|
/*
|
|
|
|
* ni-add-route-dialog.h
|
|
|
|
* This file is part of Network Inador
|
|
|
|
*
|
|
|
|
* Copyright (C) 2021 - Gatuno
|
|
|
|
*
|
|
|
|
* Network Inador 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.
|
|
|
|
*
|
|
|
|
* Network Inador 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 Network Inador; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NI_ADD_ROUTE_DIALOG_H__
|
|
|
|
#define __NI_ADD_ROUTE_DIALOG_H__
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
|
|
#include "ni-route.h"
|
|
|
|
#include "ni-ip.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _NIAddRouteDialogClass NIAddRouteDialogClass;
|
|
|
|
typedef struct _NIAddRouteDialog NIAddRouteDialog;
|
|
|
|
typedef struct _NIAddRouteDialogPrivate NIAddRouteDialogPrivate;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Type declaration.
|
|
|
|
*/
|
|
|
|
#define NI_TYPE_ADD_ROUTE_DIALOG (ni_add_route_dialog_get_type ())
|
|
|
|
#define NI_ADD_ROUTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NI_TYPE_ADD_ROUTE_DIALOG, NIAddRouteDialog))
|
|
|
|
#define NI_ADD_ROUTE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NI_TYPE_ADD_ROUTE_DIALOG, NIAddRouteDialogClass))
|
|
|
|
#define NI_IS_ADD_ROUTE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NI_TYPE_ADD_ROUTE_DIALOG))
|
|
|
|
#define NI_IS_ADD_ROUTE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NI_TYPE_ADD_ROUTE_DIALOG))
|
|
|
|
#define NI_ADD_ROUTE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NI_TYPE_ADD_ROUTE_DIALOG, NIAddRouteDialogClass))
|
|
|
|
|
|
|
|
GType ni_add_route_dialog_get_type (void);
|
|
|
|
|
|
|
|
struct _NIAddRouteDialogClass {
|
|
|
|
GtkDialogClass parent_class;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _NIAddRouteDialog {
|
|
|
|
GtkDialog parent_instance;
|
|
|
|
|
|
|
|
NIAddRouteDialogPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct NIAddRouteDialogGW {
|
|
|
|
struct_addr addr;
|
|
|
|
int metric;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Method definitions.
|
|
|
|
*/
|
|
|
|
GtkWidget* ni_add_route_dialog_new (int family);
|
|
|
|
|
|
|
|
gboolean ni_add_route_dialog_get_destination (NIAddRouteDialog *dialog, struct_addr *addr, int *prefix);
|
|
|
|
GList *ni_add_route_dialog_get_gateways (NIAddRouteDialog *dialog);
|
|
|
|
int ni_add_route_dialog_get_metric (NIAddRouteDialog *dialog);
|
|
|
|
int ni_add_route_dialog_get_route_table (NIAddRouteDialog *dialog);
|
2022-12-22 02:27:06 -06:00
|
|
|
int ni_add_route_dialog_get_route_protocol (NIAddRouteDialog *dialog);
|
|
|
|
gboolean ni_add_route_dialog_has_prefsrc_address (NIAddRouteDialog *dialog);
|
|
|
|
gboolean ni_add_route_dialog_get_prefsrc_address (NIAddRouteDialog *dialog, struct_addr *addr);
|
2022-12-21 23:15:56 -06:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __NI_ADD_ROUTE_DIALOG_H__ */
|
|
|
|
|