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

C++ NM_AP_GET_PRIVATE函数代码示例

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

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



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

示例1: 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


示例2: 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


示例3: 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


示例4: 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


示例5: 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


示例6: 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


示例7: 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


示例8: get_property

static void
get_property (GObject *object, guint prop_id,
			  GValue *value, GParamSpec *pspec)
{
	NMAccessPointPrivate *priv = NM_AP_GET_PRIVATE (object);
	GArray * ssid;
	int len;
	int i;

	switch (prop_id) {
	case PROP_FLAGS:
		g_value_set_uint (value, priv->flags);
		break;
	case PROP_WPA_FLAGS:
		g_value_set_uint (value, priv->wpa_flags);
		break;
	case PROP_RSN_FLAGS:
		g_value_set_uint (value, priv->rsn_flags);
		break;
	case PROP_SSID:
		len = priv->ssid ? priv->ssid->len : 0;
		ssid = g_array_sized_new (FALSE, TRUE, sizeof (unsigned char), len);
		for (i = 0; i < len; i++)
			g_array_append_val (ssid, priv->ssid->data[i]);
		g_value_set_boxed (value, ssid);
		g_array_free (ssid, TRUE);
		break;
	case PROP_FREQUENCY:
		g_value_set_uint (value, priv->freq);
		break;
	case PROP_HW_ADDRESS:
		g_value_set_string (value, priv->address);
		break;
	case PROP_MODE:
		g_value_set_uint (value, priv->mode);
		break;
	case PROP_MAX_BITRATE:
		g_value_set_uint (value, priv->max_bitrate);
		break;
	case PROP_STRENGTH:
		g_value_set_schar (value, priv->strength);
		break;
	case PROP_LAST_SEEN:
		g_value_set_int (value,
		                 priv->last_seen > 0
		                     ? (gint) nm_utils_monotonic_timestamp_as_boottime (priv->last_seen, NM_UTILS_NS_PER_SECOND)
		                     : -1);
		break;
	default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
		break;
	}
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:53,代码来源:nm-wifi-ap.c


示例9: nm_ap_init

static void
nm_ap_init (NMAccessPoint *ap)
{
	NMAccessPointPrivate *priv = NM_AP_GET_PRIVATE (ap);

	priv->dbus_path = NULL;
	priv->mode = NM_802_11_MODE_INFRA;
	priv->flags = NM_802_11_AP_FLAGS_NONE;
	priv->wpa_flags = NM_802_11_AP_SEC_NONE;
	priv->rsn_flags = NM_802_11_AP_SEC_NONE;
	priv->broadcast = TRUE;
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:12,代码来源:NetworkManagerAP.c


示例10: nm_ap_set_rsn_flags

static void
nm_ap_set_rsn_flags (NMAccessPoint *ap, NM80211ApSecurityFlags flags)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);
	if (priv->rsn_flags != flags) {
		priv->rsn_flags = flags;
		g_object_notify (G_OBJECT (ap), NM_AP_RSN_FLAGS);
	}
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:13,代码来源:nm-wifi-ap.c


示例11: nm_ap_set_strength

void nm_ap_set_strength (NMAccessPoint *ap, const gint8 strength)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	if (priv->strength != strength) {
		priv->strength = strength;
		g_object_notify (G_OBJECT (ap), NM_AP_STRENGTH);
	}
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:13,代码来源:NetworkManagerAP.c


示例12: finalize

static void
finalize (GObject *object)
{
	NMAccessPointPrivate *priv = NM_AP_GET_PRIVATE (object);

	g_free (priv->dbus_path);
	if (priv->ssid)
		g_byte_array_free (priv->ssid, TRUE);
	g_slist_foreach (priv->user_addresses, (GFunc)g_free, NULL);
	g_slist_free (priv->user_addresses);

	G_OBJECT_CLASS (nm_ap_parent_class)->finalize (object);
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:13,代码来源:NetworkManagerAP.c


示例13: mode_to_char

static char
mode_to_char (NMAccessPoint *self)
{
	NMAccessPointPrivate *priv = NM_AP_GET_PRIVATE (self);

	if (priv->mode == NM_802_11_MODE_ADHOC)
		return '*';
	if (priv->hotspot)
		return '#';
	if (priv->fake)
		return '-';
	return ' ';
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:13,代码来源:nm-wifi-ap.c


示例14: nm_ap_set_max_bitrate

void
nm_ap_set_max_bitrate (NMAccessPoint *ap, guint32 bitrate)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	if (priv->max_bitrate != bitrate) {
		priv->max_bitrate = bitrate;
		g_object_notify (G_OBJECT (ap), NM_AP_MAX_BITRATE);
	}
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:14,代码来源:NetworkManagerAP.c


示例15: nm_ap_set_last_seen

static void
nm_ap_set_last_seen (NMAccessPoint *ap, gint32 last_seen)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	if (priv->last_seen != last_seen) {
		priv->last_seen = last_seen;
		g_object_notify (G_OBJECT (ap), NM_AP_LAST_SEEN);
	}
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:14,代码来源:nm-wifi-ap.c


示例16: nm_ap_set_wpa_flags

void
nm_ap_set_wpa_flags (NMAccessPoint *ap, guint32 flags)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	if (priv->wpa_flags != flags) {
		priv->wpa_flags = flags;
		g_object_notify (G_OBJECT (ap), NM_AP_WPA_FLAGS);
	}
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:14,代码来源:NetworkManagerAP.c


示例17: nm_ap_set_freq

void
nm_ap_set_freq (NMAccessPoint *ap,
                const guint32 freq)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

	if (priv->freq != freq) {
		priv->freq = freq;
		g_object_notify (G_OBJECT (ap), NM_AP_FREQUENCY);
	}
}
开发者ID:wsowa,项目名称:NetworkManager-gsoc2009,代码行数:15,代码来源:NetworkManagerAP.c


示例18: nm_ap_set_mode

void nm_ap_set_mode (NMAccessPoint *ap, const NM80211Mode mode)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));
	g_return_if_fail (   mode == NM_802_11_MODE_ADHOC
	                  || mode == NM_802_11_MODE_INFRA);

	priv = NM_AP_GET_PRIVATE (ap);

	if (priv->mode != mode) {
		priv->mode = mode;
		g_object_notify (G_OBJECT (ap), NM_AP_MODE);
	}
}
开发者ID:T100012,项目名称:NetworkManager,代码行数:15,代码来源:nm-wifi-ap.c


示例19: nm_ap_set_address

void
nm_ap_set_address (NMAccessPoint *ap, const char *addr)
{
	NMAccessPointPrivate *priv;

	g_return_if_fail (NM_IS_AP (ap));
	g_return_if_fail (addr != NULL);
	g_return_if_fail (nm_utils_hwaddr_valid (addr, ETH_ALEN));

	priv = NM_AP_GET_PRIVATE (ap);

	if (!priv->address || !nm_utils_hwaddr_matches (addr, -1, priv->address, -1)) {
		g_free (priv->address);
		priv->address = g_strdup (addr);
		g_object_notify (G_OBJECT (ap), NM_AP_HW_ADDRESS);
	}
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:17,代码来源:nm-wifi-ap.c


示例20: nm_ap_export_to_dbus

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

	g_return_if_fail (NM_IS_AP (ap));

	priv = NM_AP_GET_PRIVATE (ap);

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

	priv->id = counter++;
	priv->dbus_path = g_strdup_printf (NM_DBUS_PATH_ACCESS_POINT "/%d", priv->id);
	nm_dbus_manager_register_object (nm_dbus_manager_get (), priv->dbus_path, ap);
}
开发者ID:sujithpshankar,项目名称:nm,代码行数:19,代码来源:nm-wifi-ap.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ NM_CONNECTION函数代码示例发布时间:2022-05-30
下一篇:
C++ NMEA_ASSERT函数代码示例发布时间: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