/// <summary> /// Gets the current connected P2P target. /// </summary> /// <since_tizen> 3 </since_tizen> /// <returns>The NfcP2p object.</returns> /// <privilege>http://tizen.org/privilege/nfc</privilege> /// <exception cref="NotSupportedException">Thrown when the NFC is not supported.</exception> /// <exception cref="InvalidOperationException">Thrown when the method fails due to an invalid operation.</exception> public NfcP2p GetConnectedTarget() { IntPtr targetHandle = IntPtr.Zero; int ret = Interop.Nfc.GetConnectedTarget(out targetHandle); if (ret != (int)NfcError.None) { Log.Error(Globals.LogTag, "Failed to get connected p2p target, Error - " + (NfcError)ret); NfcErrorFactory.ThrowNfcException(ret); } _p2pTarget = new NfcP2p(targetHandle); return(_p2pTarget); }
internal P2pTargetDiscoveredEventArgs(NfcDiscoveredType _type, IntPtr p2pTargetHandle) { _p2pTarget = new NfcP2p(p2pTargetHandle); }
internal P2pDataReceivedEventArgs(IntPtr p2pHandle, IntPtr ndefHandle) { _p2pTarget = new NfcP2p(p2pHandle); _ndefMessage = new NfcNdefMessage(ndefHandle); }