当前位置: 首页>>代码示例>>C++>>正文


C++ NM_IS_IP4_CONFIG函数代码示例

本文整理汇总了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;
}
开发者ID:eugeni,项目名称:NetworkManager-mdv,代码行数:7,代码来源:nm-ip4-config.c

示例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;
}
开发者ID:eugeni,项目名称:NetworkManager-mdv,代码行数:7,代码来源:nm-ip4-config.c

示例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;
}
开发者ID:alfmatos,项目名称:NetworkManager,代码行数:36,代码来源:nm-ip4-config.c

示例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;
}
开发者ID:alfmatos,项目名称:NetworkManager,代码行数:35,代码来源:nm-ip4-config.c

示例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);
}
开发者ID:eugeni,项目名称:NetworkManager-mdv,代码行数:7,代码来源:nm-ip4-config.c

示例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);
}
开发者ID:alfmatos,项目名称:NetworkManager,代码行数:39,代码来源:nm-ip4-config.c

示例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;
}
开发者ID:eugeni,项目名称:NetworkManager-mdv,代码行数:7,代码来源:nm-ip4-config.c

示例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);
}
开发者ID:GalliumOS,项目名称:network-manager,代码行数:25,代码来源:nm-ip-config.c

示例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;
}
开发者ID:GalliumOS,项目名称:network-manager,代码行数:16,代码来源:nm-ip-config.c

示例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;
}
开发者ID:eugeni,项目名称:NetworkManager-mdv,代码行数:7,代码来源:nm-ip4-config.c

示例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;
}
开发者ID:heftig,项目名称:NetworkManager,代码行数:18,代码来源:nm-ip4-config.c

示例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);
}
开发者ID:heftig,项目名称:NetworkManager,代码行数:19,代码来源:nm-ip4-config.c

示例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;
}
开发者ID:heftig,项目名称:NetworkManager,代码行数:18,代码来源:nm-ip4-config.c

示例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;
}
开发者ID:heftig,项目名称:NetworkManager,代码行数:18,代码来源:nm-ip4-config.c

示例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);
}
开发者ID:eugeni,项目名称:NetworkManager-mdv,代码行数:10,代码来源:nm-ip4-config.c


注:本文中的NM_IS_IP4_CONFIG函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。