diff options
| author | J M Rossy <[email protected]> | 2015-07-29 15:40:09 -0700 |
|---|---|---|
| committer | J M Rossy <[email protected]> | 2015-07-29 16:34:40 -0700 |
| commit | 5d61a4a79a1e96dc5d9af1e5e712c84507307544 (patch) | |
| tree | 49ed270893578cd18758b74ffcca16dc7ab948d6 /nfc/Simulator/Src/SecureElement.cpp | |
| parent | 5d41613e26e147d2300c786bb2b34cb4b4067a25 (diff) | |
Samples update for public Windows 10 release
Fix #2 Enabling WPP Recorder in Sensors Samples causes errors
Fix #4 Add back fixed KMDOD sample
Add new BarcodeScanner sample in pos folder
Add new MagneticStripeReader sample in pos folder
Add new SynpaticsTouch sample in input folder
Add new Power Engine Plugin sample in pofx folder
Add new DeviceMft sample in avstream folder
Add new AvsCamera sample in root
Add new SimBatt sample in root
Add other pre-existing samples not yet released for Win10
Diffstat (limited to 'nfc/Simulator/Src/SecureElement.cpp')
| -rw-r--r-- | nfc/Simulator/Src/SecureElement.cpp | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/nfc/Simulator/Src/SecureElement.cpp b/nfc/Simulator/Src/SecureElement.cpp new file mode 100644 index 00000000..9273c948 --- /dev/null +++ b/nfc/Simulator/Src/SecureElement.cpp @@ -0,0 +1,52 @@ +/*++ + +Copyright (c) Microsoft Corporation. All rights reserved. + +Module Name: + + secureelement.cpp + +Abstract: + + Implements the secure element class + +Environment: + + User-mode only. + +--*/ + +#include "Internal.h" +#include "SecureElement.tmh" + +CSecureElement::CSecureElement( + const GUID& SecureElementId, + SECURE_ELEMENT_TYPE SecureElementType + ) + : m_SecureElementId(SecureElementId), + m_SecureElementType(SecureElementType), + m_EmulationMode(EmulationOff) +{ + InitializeListHead(&m_ListEntry); +} + +CSecureElement::~CSecureElement() +{ +} + +NTSTATUS CSecureElement::SetEmulationMode(SECURE_ELEMENT_CARD_EMULATION_MODE EmulationMode) +{ + MethodEntry("..."); + + NTSTATUS Status = STATUS_SUCCESS; + + if (m_EmulationMode == EmulationMode) { + Status = STATUS_INVALID_DEVICE_STATE; + goto Exit; + } + + m_EmulationMode = EmulationMode; + +Exit: + MethodReturn(Status, "Status = %!STATUS!", Status); +}
\ No newline at end of file |
