internal void AcceptConnectionRequest(string remoteEndpointId, byte[] payload, NativeMessageListenerHelper listener) { NearbyConnections.NearbyConnections_AcceptConnectionRequest(base.SelfPtr(), remoteEndpointId, payload, new UIntPtr((ulong)payload.Length), listener.AsPointer()); }
protected override void CallDispose(HandleRef selfPointer) { NearbyConnections.NearbyConnections_Dispose(selfPointer); }
internal void StopAdvertising() { NearbyConnections.NearbyConnections_StopAdvertising(SelfPtr()); }
internal void SendConnectionRequest(string name, string remoteEndpointId, byte[] payload, Action <long, NativeConnectionResponse> callback, NativeMessageListenerHelper listener) { NearbyConnections.NearbyConnections_SendConnectionRequest(SelfPtr(), name, remoteEndpointId, payload, new UIntPtr((ulong)payload.Length), InternalConnectResponseCallback, Callbacks.ToIntPtr(callback, NativeConnectionResponse.FromPointer), listener.AsPointer()); }
internal void SendReliable(string remoteEndpointId, byte[] payload) { NearbyConnections.NearbyConnections_SendReliableMessage(SelfPtr(), remoteEndpointId, payload, new UIntPtr((ulong)payload.Length)); }
internal void StartAdvertising(string name, List <NativeAppIdentifier> appIds, long advertisingDuration, Action <long, NativeStartAdvertisingResult> advertisingCallback, Action <long, NativeConnectionRequest> connectionRequestCallback) { NearbyConnections.NearbyConnections_StartAdvertising(SelfPtr(), name, (from id in appIds select id.AsPointer()).ToArray(), new UIntPtr((ulong)appIds.Count), advertisingDuration, InternalStartAdvertisingCallback, Callbacks.ToIntPtr(advertisingCallback, NativeStartAdvertisingResult.FromPointer), InternalConnectionRequestCallback, Callbacks.ToIntPtr(connectionRequestCallback, NativeConnectionRequest.FromPointer)); }
internal void Shutdown() { NearbyConnections.NearbyConnections_Stop(SelfPtr()); }
internal void StartAdvertising(string name, List <NativeAppIdentifier> appIds, long advertisingDuration, Action <long, NativeStartAdvertisingResult> advertisingCallback, Action <long, NativeConnectionRequest> connectionRequestCallback) { NearbyConnections.NearbyConnections_StartAdvertising(this.SelfPtr(), name, appIds.Select <NativeAppIdentifier, IntPtr>((Func <NativeAppIdentifier, IntPtr>)(id => id.AsPointer())).ToArray <IntPtr>(), new UIntPtr((ulong)appIds.Count), advertisingDuration, new NearbyConnectionTypes.StartAdvertisingCallback(NearbyConnectionsManager.InternalStartAdvertisingCallback), Callbacks.ToIntPtr <long, NativeStartAdvertisingResult>(advertisingCallback, new Func <IntPtr, NativeStartAdvertisingResult>(NativeStartAdvertisingResult.FromPointer)), new NearbyConnectionTypes.ConnectionRequestCallback(NearbyConnectionsManager.InternalConnectionRequestCallback), Callbacks.ToIntPtr <long, NativeConnectionRequest>(connectionRequestCallback, new Func <IntPtr, NativeConnectionRequest>(NativeConnectionRequest.FromPointer))); }
internal void StartDiscovery(string serviceId, long duration, NativeEndpointDiscoveryListenerHelper listener) { NearbyConnections.NearbyConnections_StartDiscovery(SelfPtr(), serviceId, duration, listener.AsPointer()); }
internal void StopDiscovery(string serviceId) { NearbyConnections.NearbyConnections_StopDiscovery(SelfPtr(), serviceId); }
internal void StopAllConnections() { NearbyConnections.NearbyConnections_Stop(SelfPtr()); }
internal string LocalEndpointId() { return(PInvokeUtilities.OutParamsToString(delegate(StringBuilder out_arg, UIntPtr out_size) { return NearbyConnections.NearbyConnections_GetLocalEndpointId(base.SelfPtr(), out_arg, out_size); })); }
internal void SendConnectionRequest(string name, string remoteEndpointId, byte[] payload, Action <long, NativeConnectionResponse> callback, NativeMessageListenerHelper listener) { NearbyConnections.NearbyConnections_SendConnectionRequest(this.SelfPtr(), name, remoteEndpointId, payload, new UIntPtr((ulong)payload.Length), new NearbyConnectionTypes.ConnectionResponseCallback(NearbyConnectionsManager.InternalConnectResponseCallback), Callbacks.ToIntPtr <long, NativeConnectionResponse>(callback, new Func <IntPtr, NativeConnectionResponse>(NativeConnectionResponse.FromPointer)), listener.AsPointer()); }
internal void DisconnectFromEndpoint(string remoteEndpointId) { NearbyConnections.NearbyConnections_Disconnect(base.SelfPtr(), remoteEndpointId); }
internal string LocalDeviceId() { return(PInvokeUtilities.OutParamsToString((byte[] out_arg, UIntPtr out_size) => NearbyConnections.NearbyConnections_GetLocalDeviceId(SelfPtr(), out_arg, out_size))); }
internal void RejectConnectionRequest(string remoteEndpointId) { NearbyConnections.NearbyConnections_RejectConnectionRequest(base.SelfPtr(), remoteEndpointId); }
internal string LocalDeviceId() { return(PInvokeUtilities.OutParamsToString((PInvokeUtilities.OutStringMethod)((out_arg, out_size) => NearbyConnections.NearbyConnections_GetLocalDeviceId(this.SelfPtr(), out_arg, out_size)))); }