AllJoynBusAttachment.AcceptSessionJoinerRequested 事件

定义

重要

Windows.Devices.AllJoyn 命名空间中的类型已弃用,将来的 Windows 版本中可能不可用。 AllJoyn(由 AllSeen 联盟赞助)是一种开源发现和通信协议,适用于物联网 (IoT) 方案,例如打开和关闭灯以及读取温度。 有关 IoTivity LiteIoTivity 等替代项,请参阅 iotivity.org 网站。

当远程 AllJoyn 终结点请求加入总线附加的会话时发生。

// Register
event_token AcceptSessionJoinerRequested(TypedEventHandler<AllJoynBusAttachment, AllJoynAcceptSessionJoinerEventArgs const&> const& handler) const;

// Revoke with event_token
void AcceptSessionJoinerRequested(event_token const* cookie) const;

// Revoke with event_revoker
AllJoynBusAttachment::AcceptSessionJoinerRequested_revoker AcceptSessionJoinerRequested(auto_revoke_t, TypedEventHandler<AllJoynBusAttachment, AllJoynAcceptSessionJoinerEventArgs const&> const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("AllJoynBusAttachment has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("AllJoynBusAttachment has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
// Register
event_token AcceptSessionJoinerRequested(TypedEventHandler<AllJoynBusAttachment, AllJoynAcceptSessionJoinerEventArgs const&> const& handler) const;

// Revoke with event_token
void AcceptSessionJoinerRequested(event_token const* cookie) const;

// Revoke with event_revoker
AllJoynBusAttachment::AcceptSessionJoinerRequested_revoker AcceptSessionJoinerRequested(auto_revoke_t, TypedEventHandler<AllJoynBusAttachment, AllJoynAcceptSessionJoinerEventArgs const&> const& handler) const;
public event TypedEventHandler<AllJoynBusAttachment,AllJoynAcceptSessionJoinerEventArgs> AcceptSessionJoinerRequested;
[add: Windows.Foundation.Metadata.Deprecated("AllJoynBusAttachment has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("AllJoynBusAttachment has been deprecated.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 786432, "Windows.Foundation.UniversalApiContract")]
public event TypedEventHandler<AllJoynBusAttachment,AllJoynAcceptSessionJoinerEventArgs> AcceptSessionJoinerRequested;
function onAcceptSessionJoinerRequested(eventArgs) { /* Your code */ }
allJoynBusAttachment.addEventListener("acceptsessionjoinerrequested", onAcceptSessionJoinerRequested);
allJoynBusAttachment.removeEventListener("acceptsessionjoinerrequested", onAcceptSessionJoinerRequested);
- or -
allJoynBusAttachment.onacceptsessionjoinerrequested = onAcceptSessionJoinerRequested;
Public Custom Event AcceptSessionJoinerRequested As TypedEventHandler(Of AllJoynBusAttachment, AllJoynAcceptSessionJoinerEventArgs) 

事件类型

属性

Windows 要求

设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 - for Xbox, see UWP features that aren't yet supported on Xbox 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)
应用功能
allJoyn

注解

发送: 引发事件的 AllJoynBusAttachment

Args: 代表请求终结点的 AllJoynAcceptSessionJoinerEventArgs 对象。

如果应用 处理此事件,则默认接受请求。

如果应用 确实 处理了此事件,则默认情况下会拒绝该事件。 应用必须调用参数。退出句柄之前接受 () 以接受会话加入请求。

适用于