|
Packit Service |
87a54e |
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
Packit |
5756e2 |
/*
|
|
Packit |
5756e2 |
* Copyright (C) 2011 Red Hat, Inc.
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#include "nm-default.h"
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#include "nm-wimax-nsp.h"
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
NM_GOBJECT_PROPERTIES_DEFINE_BASE(PROP_NAME, PROP_SIGNAL_QUALITY, PROP_NETWORK_TYPE, );
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
struct _NMWimaxNsp {
|
|
Packit Service |
a1bd4f |
NMObject parent;
|
|
Packit |
5756e2 |
};
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
struct _NMWimaxNspClass {
|
|
Packit Service |
a1bd4f |
NMObjectClass parent;
|
|
Packit |
5756e2 |
};
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
G_DEFINE_TYPE(NMWimaxNsp, nm_wimax_nsp, NM_TYPE_OBJECT)
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#define NM_WIMAX_NSP_GET_PRIVATE(self) _NM_GET_PRIVATE(self, NMWimaxNsp, NM_IS_WIMAX_NSP, NMObject)
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_wimax_nsp_get_name:
|
|
Packit |
5756e2 |
* @nsp: a #NMWimaxNsp
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Gets the name of the wimax NSP
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: the name
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
const char *
|
|
Packit Service |
a1bd4f |
nm_wimax_nsp_get_name(NMWimaxNsp *nsp)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
g_return_val_if_reached(NULL);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_wimax_nsp_get_signal_quality:
|
|
Packit |
5756e2 |
* @nsp: a #NMWimaxNsp
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Gets the WPA signal quality of the wimax NSP.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: the signal quality
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
guint32
|
|
Packit Service |
a1bd4f |
nm_wimax_nsp_get_signal_quality(NMWimaxNsp *nsp)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
g_return_val_if_reached(0);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_wimax_nsp_get_network_type:
|
|
Packit |
5756e2 |
* @nsp: a #NMWimaxNsp
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Gets the network type of the wimax NSP.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: the network type
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
NMWimaxNspNetworkType
|
|
Packit Service |
a1bd4f |
nm_wimax_nsp_get_network_type(NMWimaxNsp *nsp)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
g_return_val_if_reached(NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_wimax_nsp_connection_valid:
|
|
Packit |
5756e2 |
* @nsp: an #NMWimaxNsp to validate @connection against
|
|
Packit |
5756e2 |
* @connection: an #NMConnection to validate against @nsp
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Validates a given connection against a given WiMAX NSP to ensure that the
|
|
Packit |
5756e2 |
* connection may be activated with that NSP. The connection must match the
|
|
Packit |
5756e2 |
* @nsp's network name and other attributes.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE if the connection may be activated with this WiMAX NSP,
|
|
Packit |
5756e2 |
* %FALSE if it cannot be.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
gboolean
|
|
Packit Service |
a1bd4f |
nm_wimax_nsp_connection_valid(NMWimaxNsp *nsp, NMConnection *connection)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
g_return_val_if_reached(FALSE);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* nm_wimax_nsp_filter_connections:
|
|
Packit |
5756e2 |
* @nsp: an #NMWimaxNsp to filter connections for
|
|
Packit |
5756e2 |
* @connections: (element-type NMConnection): an array of #NMConnections to
|
|
Packit |
5756e2 |
* filter
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Filters a given array of connections for a given #NMWimaxNsp object and
|
|
Packit |
5756e2 |
* return connections which may be activated with the NSP. Any returned
|
|
Packit |
5756e2 |
* connections will match the @nsp's network name and other attributes.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: (transfer full) (element-type NMConnection): an array of
|
|
Packit |
5756e2 |
* #NMConnections that could be activated with the given @nsp. The array should
|
|
Packit |
5756e2 |
* be freed with g_ptr_array_unref() when it is no longer required.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
GPtrArray *
|
|
Packit Service |
a1bd4f |
nm_wimax_nsp_filter_connections(NMWimaxNsp *nsp, const GPtrArray *connections)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
g_return_val_if_reached(NULL);
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
g_return_if_reached();
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
nm_wimax_nsp_init(NMWimaxNsp *nsp)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
g_return_if_reached();
|
|
Packit |
5756e2 |
}
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
static void
|
|
Packit Service |
a1bd4f |
nm_wimax_nsp_class_init(NMWimaxNspClass *nsp_class)
|
|
Packit |
5756e2 |
{
|
|
Packit Service |
a1bd4f |
GObjectClass *object_class = G_OBJECT_CLASS(nsp_class);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
object_class->get_property = get_property;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/**
|
|
Packit Service |
a1bd4f |
* NMWimaxNsp:name:
|
|
Packit Service |
a1bd4f |
*
|
|
Packit Service |
a1bd4f |
* The name of the WiMAX NSP.
|
|
Packit Service |
a1bd4f |
*
|
|
Packit Service |
a1bd4f |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit Service |
a1bd4f |
**/
|
|
Packit Service |
a1bd4f |
obj_properties[PROP_NAME] = g_param_spec_string(NM_WIMAX_NSP_NAME,
|
|
Packit Service |
a1bd4f |
"",
|
|
Packit Service |
a1bd4f |
"",
|
|
Packit Service |
a1bd4f |
NULL,
|
|
Packit Service |
a1bd4f |
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/**
|
|
Packit Service |
a1bd4f |
* NMWimaxNsp:signal-quality:
|
|
Packit Service |
a1bd4f |
*
|
|
Packit Service |
a1bd4f |
* The signal quality of the WiMAX NSP.
|
|
Packit Service |
a1bd4f |
*
|
|
Packit Service |
a1bd4f |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit Service |
a1bd4f |
**/
|
|
Packit Service |
a1bd4f |
obj_properties[PROP_SIGNAL_QUALITY] =
|
|
Packit Service |
a1bd4f |
g_param_spec_uint(NM_WIMAX_NSP_SIGNAL_QUALITY,
|
|
Packit Service |
a1bd4f |
"",
|
|
Packit Service |
a1bd4f |
"",
|
|
Packit Service |
a1bd4f |
0,
|
|
Packit Service |
a1bd4f |
100,
|
|
Packit Service |
a1bd4f |
0,
|
|
Packit Service |
a1bd4f |
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/**
|
|
Packit Service |
a1bd4f |
* NMWimaxNsp:network-type:
|
|
Packit Service |
a1bd4f |
*
|
|
Packit Service |
a1bd4f |
* The network type of the WiMAX NSP.
|
|
Packit Service |
a1bd4f |
*
|
|
Packit Service |
a1bd4f |
* Deprecated: 1.22: WiMAX is no longer supported by NetworkManager since 1.2.0.
|
|
Packit Service |
a1bd4f |
**/
|
|
Packit Service |
a1bd4f |
obj_properties[PROP_NETWORK_TYPE] =
|
|
Packit Service |
a1bd4f |
g_param_spec_enum(NM_WIMAX_NSP_NETWORK_TYPE,
|
|
Packit Service |
a1bd4f |
"",
|
|
Packit Service |
a1bd4f |
"",
|
|
Packit Service |
a1bd4f |
NM_TYPE_WIMAX_NSP_NETWORK_TYPE,
|
|
Packit Service |
a1bd4f |
NM_WIMAX_NSP_NETWORK_TYPE_UNKNOWN,
|
|
Packit Service |
a1bd4f |
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
|
|
Packit |
5756e2 |
}
|