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


C++ NM_AP_GET_PRIVATE函数代码示例

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


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


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