• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ NM_IS_AP函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中NM_IS_AP函数的典型用法代码示例。如果您正苦于以下问题:C++ NM_IS_AP函数的具体用法?C++ NM_IS_AP怎么用?C++ NM_IS_AP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NM_IS_AP函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: nm_ap_print_self

void
nm_ap_print_self (NMAccessPoint *ap,
                  const char * prefix)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	nm_info ("%s'%s' (%p) stamp=%ld flags=0x%X wpa-flags=0x%X rsn-flags=0x%x "
	         "bssid=" MAC_FMT " strength=%d freq=%d rate=%d mode=%d seen=%ld",
	         prefix,
	         priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)",
	         ap,
	         priv->timestamp.tv_sec,
	         priv->flags,
	         priv->wpa_flags,
	         priv->rsn_flags,
	         MAC_ARG (priv->address.ether_addr_octet),
	         priv->strength,
	         priv->freq,
	         priv->max_bitrate,
	         priv->mode,
	         priv->last_seen);
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:26,代码来源:NetworkManagerAP.c


示例2: nm_ap_get_dbus_path

const char *
nm_ap_get_dbus_path (NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), NULL);

	return NM_AP_GET_PRIVATE (ap)->dbus_path;
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:7,代码来源:NetworkManagerAP.c


示例3: nm_ap_dump

void
nm_ap_dump (NMAccessPoint *self,
            const char *prefix,
            const char *ifname)
{
	NMAccessPointPrivate *priv;
	const char *supplicant_id = "-";
	guint32 chan;

	g_return_if_fail (NM_IS_AP (self));

	priv = NM_AP_GET_PRIVATE (self);
	chan = nm_utils_wifi_freq_to_channel (priv->freq);
	if (priv->supplicant_path)
		supplicant_id = strrchr (priv->supplicant_path, '/');

	nm_log_dbg (LOGD_WIFI_SCAN, "%s[%s%c] %-32s[%s%u %s%u%% %c W:%04X R:%04X] [%3u] %s%s",
	            prefix,
	            str_if_set (priv->address, "(none)"),
	            mode_to_char (self),
	            priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)",
	            chan > 99 ? "" : (chan > 9 ? " " : "  "),
	            chan,
	            priv->strength < 100 ? " " : "",
	            priv->strength,
	            priv->flags & NM_802_11_AP_FLAGS_PRIVACY ? 'P' : ' ',
	            priv->wpa_flags & 0xFFFF,
	            priv->rsn_flags & 0xFFFF,
	            priv->last_seen > 0 ? (nm_utils_get_monotonic_timestamp_s () - priv->last_seen) : -1,
	            ifname,
	            supplicant_id);
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:32,代码来源:nm-wifi-ap.c


示例4: nm_ap_get_fake

gboolean
nm_ap_get_fake (const NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), FALSE);

	return NM_AP_GET_PRIVATE (ap)->fake;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例5: nm_ap_set_fake

void
nm_ap_set_fake (NMAccessPoint *ap, gboolean fake)
{
	g_return_if_fail (NM_IS_AP (ap));

	NM_AP_GET_PRIVATE (ap)->fake = fake;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例6: nm_ap_get_freq

guint32
nm_ap_get_freq (NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), 0);

	return NM_AP_GET_PRIVATE (ap)->freq;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例7: nm_ap_get_max_bitrate

guint32
nm_ap_get_max_bitrate (NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), 0);

	return NM_AP_GET_PRIVATE (ap)->max_bitrate;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例8: nm_ap_is_hotspot

gboolean
nm_ap_is_hotspot (NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), FALSE);

	return NM_AP_GET_PRIVATE (ap)->hotspot;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例9: nm_ap_get_strength

gint8
nm_ap_get_strength (NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), 0);

	return NM_AP_GET_PRIVATE (ap)->strength;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例10: nm_ap_get_address

const char *
nm_ap_get_address (const NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), NULL);

	return NM_AP_GET_PRIVATE (ap)->address;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例11: nm_ap_get_mode

NM80211Mode
nm_ap_get_mode (NMAccessPoint *ap)
{
	g_return_val_if_fail (NM_IS_AP (ap), NM_802_11_MODE_UNKNOWN);

	return NM_AP_GET_PRIVATE (ap)->mode;
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:7,代码来源:nm-wifi-ap.c


示例12: nm_ap_set_ssid

void
nm_ap_set_ssid (NMAccessPoint *ap, const GByteArray * ssid)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	if ((ssid == priv->ssid) && ssid == NULL)
		return;

	/* same SSID */
	if ((ssid && priv->ssid) && (ssid->len == priv->ssid->len)) {
		if (!memcmp (ssid->data, priv->ssid->data, ssid->len))
			return;
	}

	if (priv->ssid) {
		g_byte_array_free (priv->ssid, TRUE);
		priv->ssid = NULL;
	}

	if (ssid) {
		priv->ssid = g_byte_array_sized_new (ssid->len);
		priv->ssid->len = ssid->len;
		memcpy (priv->ssid->data, ssid->data, ssid->len);
	}

	g_object_notify (G_OBJECT (ap), NM_AP_SSID);
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:31,代码来源:NetworkManagerAP.c


示例13: nm_ap_set_ssid

void
nm_ap_set_ssid (NMAccessPoint *ap, const guint8 *ssid, gsize len)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));
	g_return_if_fail (ssid == NULL || len > 0);

	priv = NM_AP_GET_PRIVATE (ap);

	/* same SSID */
	if ((ssid && priv->ssid) && (len == priv->ssid->len)) {
		if (!memcmp (ssid, priv->ssid->data, len))
			return;
	}

	if (priv->ssid) {
		g_byte_array_free (priv->ssid, TRUE);
		priv->ssid = NULL;
	}

	if (ssid) {
		priv->ssid = g_byte_array_new ();
		g_byte_array_append (priv->ssid, ssid, len);
	}

	g_object_notify (G_OBJECT (ap), NM_AP_SSID);
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:28,代码来源:nm-wifi-ap.c


示例14: nm_ap_export_to_dbus

void
nm_ap_export_to_dbus (NMAccessPoint *ap)
{
	NMAccessPointPrivate *priv;
	NMDBusManager *mgr;
	DBusGConnection *g_connection;
	static guint32 counter = 0;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	if (priv->dbus_path) {
		nm_warning ("Tried to export AP %s twice.", priv->dbus_path);
		return;
	}

	mgr = nm_dbus_manager_get ();
	g_assert (mgr);

	g_connection = nm_dbus_manager_get_connection (mgr);
	g_assert (g_connection);

	priv->dbus_path = g_strdup_printf (NM_DBUS_PATH_ACCESS_POINT "/%d", counter++);
	dbus_g_connection_register_g_object (g_connection, priv->dbus_path, G_OBJECT (ap));

	g_object_unref (mgr);
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:28,代码来源:NetworkManagerAP.c


示例15: nm_ap_set_supplicant_path

void
nm_ap_set_supplicant_path (NMAccessPoint *ap, const char *path)
{
	g_return_if_fail (NM_IS_AP (ap));
	g_return_if_fail (path != NULL);

	g_free (NM_AP_GET_PRIVATE (ap)->supplicant_path);
	NM_AP_GET_PRIVATE (ap)->supplicant_path = g_strdup (path);
}
开发者ID:T100012,项目名称:NetworkManager,代码行数:9,代码来源:nm-wifi-ap.c


示例16: nm_ap_get_max_bitrate

/*
 * Get/set functions for max bitrate
 *
 */
guint32 nm_ap_get_max_bitrate (NMAccessPoint *ap)
{
	guint32 rate;

	g_return_val_if_fail (NM_IS_AP (ap), 0);

	g_object_get (ap, NM_AP_MAX_BITRATE, &rate, NULL);

	return rate;
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:14,代码来源:NetworkManagerAP.c


示例17: nm_ap_get_strength

/*
 * Get/set functions for strength
 *
 */
gint8 nm_ap_get_strength (NMAccessPoint *ap)
{
	gint8 strength;

	g_return_val_if_fail (NM_IS_AP (ap), 0);

	g_object_get (ap, NM_AP_STRENGTH, &strength, NULL);

	return strength;
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:14,代码来源:NetworkManagerAP.c


示例18: nm_ap_get_mode

/*
 * Get/set functions for mode (ie Ad-Hoc, Infrastructure, etc)
 *
 */
NM80211Mode nm_ap_get_mode (NMAccessPoint *ap)
{
	NM80211Mode mode;

	g_return_val_if_fail (NM_IS_AP (ap), -1);

	g_object_get (ap, NM_AP_MODE, &mode, NULL);

	return mode;
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:14,代码来源:NetworkManagerAP.c


示例19: nm_ap_get_freq

/*
 * Get/set functions for frequency
 *
 */
guint32
nm_ap_get_freq (NMAccessPoint *ap)
{
	guint32 freq;

	g_return_val_if_fail (NM_IS_AP (ap), 0);

	g_object_get (ap, NM_AP_FREQUENCY, &freq, NULL);

	return freq;
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:15,代码来源:NetworkManagerAP.c


示例20: nm_ap_set_timestamp

void nm_ap_set_timestamp (NMAccessPoint *ap, glong sec, glong usec)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	priv->timestamp.tv_sec = sec;
	priv->timestamp.tv_usec = usec;
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:11,代码来源:NetworkManagerAP.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NM_IS_IP4_CONFIG函数代码示例发布时间:2022-05-30
下一篇:
C++ NM_IP4_CONFIG_GET_PRIVATE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap