本文整理汇总了C++中NM_IS_IP4_CONFIG函数的典型用法代码示例。如果您正苦于以下问题:C++ NM_IS_IP4_CONFIG函数的具体用法?C++ NM_IS_IP4_CONFIG怎么用?C++ NM_IS_IP4_CONFIG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NM_IS_IP4_CONFIG函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: nm_ip4_config_get_dbus_path
const char *
nm_ip4_config_get_dbus_path (NMIP4Config *config)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), FALSE);
return NM_IP4_CONFIG_GET_PRIVATE (config)->path;
}
示例2: nm_ip4_config_get_nis_domain
const char *
nm_ip4_config_get_nis_domain (NMIP4Config *config)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), 0);
return NM_IP4_CONFIG_GET_PRIVATE (config)->nis_domain;
}
示例3: nm_ip4_config_get_wins_servers
/**
* nm_ip4_config_get_wins_servers:
* @config: a #NMIP4Config
*
* Gets the Windows Internet Name Service servers (WINS).
*
* Returns: (element-type guint32): the #GArray containing %guint32<!-- -->s.
* This is the internal copy used by the configuration and must not be modified.
**/
const GArray *
nm_ip4_config_get_wins_servers (NMIP4Config *config)
{
NMIP4ConfigPrivate *priv;
GArray *array = NULL;
GValue value = {0,};
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
priv = NM_IP4_CONFIG_GET_PRIVATE (config);
if (!priv->wins) {
if (_nm_object_get_property (NM_OBJECT (config),
NM_DBUS_INTERFACE_IP4_CONFIG,
"WinsServers",
&value,
NULL)) {
array = (GArray *) g_value_get_boxed (&value);
if (array && array->len) {
priv->wins = g_array_sized_new (FALSE, TRUE, sizeof (guint32), array->len);
g_array_append_vals (priv->wins, array->data, array->len);
}
g_value_unset (&value);
}
}
return priv->wins;
}
示例4: nm_ip4_config_get_routes
/**
* nm_ip4_config_get_routes:
* @config: a #NMIP4Config
*
* Gets the routes.
*
* Returns: (element-type NetworkManager.IP4Route): the #GSList containing
* #NMIP4Route<!-- -->s. This is the internal copy used by the configuration,
* and must not be modified.
**/
const GSList *
nm_ip4_config_get_routes (NMIP4Config *config)
{
NMIP4ConfigPrivate *priv;
GValue value = { 0, };
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
priv = NM_IP4_CONFIG_GET_PRIVATE (config);
if (priv->routes)
return priv->routes;
if (!_nm_object_get_property (NM_OBJECT (config),
NM_DBUS_INTERFACE_IP4_CONFIG,
"Routes",
&value,
NULL)) {
return NULL;
}
demarshal_ip4_routes_array (NM_OBJECT (config), NULL, &value, &priv->routes);
g_value_unset (&value);
return priv->routes;
}
示例5: nm_ip4_config_get_route
NMIP4Route *
nm_ip4_config_get_route (NMIP4Config *config, guint i)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
return (NMIP4Route *) g_slist_nth_data (NM_IP4_CONFIG_GET_PRIVATE (config)->routes, i);
}
示例6: nm_ip4_config_get_domains
/**
* nm_ip4_config_get_domains:
* @config: a #NMIP4Config
*
* Gets the domain names.
*
* Returns: (element-type utf8): the #GPtrArray containing domains as strings. This is the
* internal copy used by the configuration, and must not be modified.
**/
const GPtrArray *
nm_ip4_config_get_domains (NMIP4Config *config)
{
NMIP4ConfigPrivate *priv;
GValue value = {0,};
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
priv = NM_IP4_CONFIG_GET_PRIVATE (config);
if (priv->domains)
return handle_ptr_array_return (priv->domains);
if (_nm_object_get_property (NM_OBJECT (config),
NM_DBUS_INTERFACE_IP4_CONFIG,
"Domains",
&value,
NULL)) {
char **array = NULL, **p;
array = (char **) g_value_get_boxed (&value);
if (array && g_strv_length (array)) {
priv->domains = g_ptr_array_sized_new (g_strv_length (array));
for (p = array; *p; p++)
g_ptr_array_add (priv->domains, g_strdup (*p));
}
g_value_unset (&value);
}
return handle_ptr_array_return (priv->domains);
}
示例7: nm_ip4_config_set_never_default
void
nm_ip4_config_set_never_default (NMIP4Config *config, gboolean never_default)
{
g_return_if_fail (NM_IS_IP4_CONFIG (config));
NM_IP4_CONFIG_GET_PRIVATE (config)->never_default = never_default;
}
示例8: init_dbus
static void
init_dbus (NMObject *object)
{
NMIPConfigPrivate *priv = NM_IP_CONFIG_GET_PRIVATE (object);
const NMPropertiesInfo property_info[] = {
{ NM_IP_CONFIG_GATEWAY, &priv->gateway, },
{ NM_IP_CONFIG_ADDRESSES, &priv->addresses, demarshal_ip_addresses },
{ "address-data", &priv->addresses, demarshal_ip_address_data },
{ NM_IP_CONFIG_ROUTES, &priv->routes, demarshal_ip_routes },
{ "route-data", &priv->routes, demarshal_ip_route_data },
{ NM_IP_CONFIG_NAMESERVERS, &priv->nameservers, demarshal_ip_array },
{ NM_IP_CONFIG_DOMAINS, &priv->domains, },
{ NM_IP_CONFIG_SEARCHES, &priv->searches, },
{ NM_IP_CONFIG_WINS_SERVERS, &priv->wins, demarshal_ip_array },
{ NULL },
};
NM_OBJECT_CLASS (nm_ip_config_parent_class)->init_dbus (object);
_nm_object_register_properties (object,
(NM_IS_IP4_CONFIG (object) ?
NM_DBUS_INTERFACE_IP4_CONFIG :
NM_DBUS_INTERFACE_IP6_CONFIG),
property_info);
}
示例9: nm_ip_config_get_family
/**
* nm_ip_config_get_family:
* @config: a #NMIPConfig
*
* Gets the IP address family
*
* Returns: the IP address family; either <literal>AF_INET</literal> or
* <literal>AF_INET6</literal>
**/
int
nm_ip_config_get_family (NMIPConfig *config)
{
g_return_val_if_fail (NM_IS_IP_CONFIG (config), AF_UNSPEC);
return NM_IS_IP4_CONFIG (config) ? AF_INET : AF_INET6;
}
示例10: nm_ip4_config_get_never_default
gboolean
nm_ip4_config_get_never_default (NMIP4Config *config)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), FALSE);
return NM_IP4_CONFIG_GET_PRIVATE (config)->never_default;
}
示例11: nm_ip4_config_get_wins_servers
/**
* nm_ip4_config_get_wins_servers:
* @config: a #NMIP4Config
*
* Gets the Windows Internet Name Service servers (WINS).
*
* Returns: (element-type guint32): the #GArray containing #guint32s.
* This is the internal copy used by the configuration and must not be
* modified.
**/
const GArray *
nm_ip4_config_get_wins_servers (NMIP4Config *config)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
_nm_object_ensure_inited (NM_OBJECT (config));
return NM_IP4_CONFIG_GET_PRIVATE (config)->wins;
}
示例12: nm_ip4_config_get_searches
/**
* nm_ip4_config_get_searches:
* @config: a #NMIP4Config
*
* Gets the dns searches.
*
* Returns: (element-type utf8): the #GPtrArray containing dns searches as strings. This is the
* internal copy used by the configuration, and must not be modified.
*
* Since: 0.9.10
**/
const GPtrArray *
nm_ip4_config_get_searches (NMIP4Config *config)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
_nm_object_ensure_inited (NM_OBJECT (config));
return handle_ptr_array_return (NM_IP4_CONFIG_GET_PRIVATE (config)->searches);
}
示例13: nm_ip4_config_get_gateway
/**
* nm_ip4_config_get_gateway:
* @config: a #NMIP4Config
*
* Gets the IP4 gateway address.
*
* Returns: the IP4 address of the gateway.
*
* Since: 0.9.10
**/
const char *
nm_ip4_config_get_gateway (NMIP4Config *config)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
_nm_object_ensure_inited (NM_OBJECT (config));
return NM_IP4_CONFIG_GET_PRIVATE (config)->gateway;
}
示例14: nm_ip4_config_get_routes
/**
* nm_ip4_config_get_routes:
* @config: a #NMIP4Config
*
* Gets the routes.
*
* Returns: (element-type NetworkManager.IP4Route): the #GSList containing
* #NMIP4Routes. This is the internal copy used by the configuration,
* and must not be modified.
**/
const GSList *
nm_ip4_config_get_routes (NMIP4Config *config)
{
g_return_val_if_fail (NM_IS_IP4_CONFIG (config), NULL);
_nm_object_ensure_inited (NM_OBJECT (config));
return NM_IP4_CONFIG_GET_PRIVATE (config)->routes;
}
示例15: nm_ip4_config_reset_nis_servers
void nm_ip4_config_reset_nis_servers (NMIP4Config *config)
{
NMIP4ConfigPrivate *priv;
g_return_if_fail (NM_IS_IP4_CONFIG (config));
priv = NM_IP4_CONFIG_GET_PRIVATE (config);
if (priv->nis->len)
g_array_remove_range (priv->nis, 0, priv->nis->len);
}