├── .gitignore
├── LICENSE
├── README.md
├── docs
├── application-management.md
├── apply-all-desired-properties.md
├── azure-dm-certification.md
├── building-the-dm-binaries.md
├── certificate-management.md
├── debugging.md
├── device-factory-reset.md
├── device-health-attestation.md
├── device-info.md
├── dha-architecture-detail1.png
├── dha-architecture-detail2.png
├── dha-architecture-detail3.png
├── dha-architecture-overview.png
├── dha-architecture.md
├── dha-deploy.md
├── dha-report-sample.png
├── diagnostic-logs-management.md
├── dm-application-anatomy.png
├── dm-architecture-all.png
├── dm-architecture-application-library.png
├── dm-client-architecture.md
├── dm-hello-world-coding.md
├── dm-hello-world-deploying.md
├── dm-hello-world-managing.md
├── dm-hello-world-overview.md
├── dm-validator.png
├── exposing-new-configuration.md
├── external-storage.md
├── library-reference.md
├── oem-device-setup.md
├── reboot-management.md
├── release-notes-2017-10.md
├── release-notes-2018-06.md
├── remote-wipe.md
├── report-all-device-properties.md
├── running-e2e-tests.md
├── samples.md
├── source-policy.md
├── status-reporting.md
├── time-management.md
├── wifi-management.md
├── windows-telemetry-management.md
└── windows-update-management.md
├── external
├── WinSDKRS2
│ ├── arm
│ │ └── mdmlocalmanagement.lib
│ ├── x64
│ │ └── mdmlocalmanagement.lib
│ └── x86
│ │ └── mdmlocalmanagement.lib
└── limpet
│ ├── dll
│ ├── arm
│ │ └── LimpetLib.dll
│ ├── x64
│ │ ├── LimpetLib.dll
│ │ └── LimpetLib.pdb
│ └── x86
│ │ ├── LimpetLib.dll
│ │ └── LimpetLib.pdb
│ ├── inc
│ ├── LimpetDefs.h
│ └── LimpetLib.h
│ └── lib
│ ├── arm
│ └── LimpetLib.lib
│ ├── x64
│ └── LimpetLib.lib
│ └── x86
│ └── LimpetLib.lib
├── nuget
├── IoTDMClientLib.nuspec
├── IoTDMClientLib.targets
└── PackIoTDMClientLib.cmd
├── samples
├── DMController
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.backup.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ ├── DMController.csproj
│ ├── DeviceTwinAndMethods.cs
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── README.md
│ ├── Views
│ │ ├── ApplicationsUserControl.xaml
│ │ ├── ApplicationsUserControl.xaml.cs
│ │ ├── CertificatesUserControl.xaml
│ │ ├── CertificatesUserControl.xaml.cs
│ │ ├── DHAUserControl.xaml
│ │ ├── DHAUserControl.xaml.cs
│ │ ├── DeviceInfoUserControl.xaml
│ │ ├── DeviceInfoUserControl.xaml.cs
│ │ ├── DiagnosticLogsUserControl.xaml
│ │ ├── DiagnosticLogsUserControl.xaml.cs
│ │ ├── FactoryResetUserControl.xaml
│ │ ├── FactoryResetUserControl.xaml.cs
│ │ ├── RebootUserControl.xaml
│ │ ├── RebootUserControl.xaml.cs
│ │ ├── TimeUserControl.xaml
│ │ ├── TimeUserControl.xaml.cs
│ │ ├── WifiUserControl.xaml
│ │ ├── WifiUserControl.xaml.cs
│ │ ├── WindowsTelemetryUserControl.xaml
│ │ ├── WindowsTelemetryUserControl.xaml.cs
│ │ ├── WindowsUpdateUserControl.xaml
│ │ └── WindowsUpdateUserControl.xaml.cs
│ └── imgs
│ │ ├── deviceinfo-buttons.png
│ │ ├── settings.png
│ │ └── test-buttons.png
├── DMDashboard
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Appx
│ │ ├── AppDesiredStateControl.xaml
│ │ ├── AppDesiredStateControl.xaml.cs
│ │ ├── AppReportedStateControl.xaml
│ │ ├── AppReportedStateControl.xaml.cs
│ │ ├── AppsDesiredStateControl.xaml
│ │ ├── AppsDesiredStateControl.xaml.cs
│ │ ├── AppsReportedStateControl.xaml
│ │ └── AppsReportedStateControl.xaml.cs
│ ├── AzureBlobSelector.xaml
│ ├── AzureBlobSelector.xaml.cs
│ ├── AzureStorageHelpers.cs
│ ├── Certificates
│ │ ├── CertificateDetails.xaml
│ │ ├── CertificateDetails.xaml.cs
│ │ ├── CertificateExportDetails.xaml
│ │ ├── CertificateExportDetails.xaml.cs
│ │ ├── CertificateHelpers.cs
│ │ ├── CertificateSelector.xaml
│ │ └── CertificateSelector.xaml.cs
│ ├── Common
│ │ ├── Converters.cs
│ │ ├── DMComboBox.xaml
│ │ ├── DMComboBox.xaml.cs
│ │ ├── DMControl.cs
│ │ ├── DMControlList.cs
│ │ ├── DMSectionControl.cs
│ │ ├── DMTextBlock.xaml
│ │ ├── DMTextBlock.xaml.cs
│ │ ├── DMTextBox.xaml
│ │ └── DMTextBox.xaml.cs
│ ├── DMDashboard.csproj
│ ├── DeviceHealthAttestation
│ │ ├── DeviceHealthAttestationDesiredStateControl.xaml
│ │ ├── DeviceHealthAttestationDesiredStateControl.xaml.cs
│ │ ├── DeviceHealthAttestationReportedStateControl.xaml
│ │ └── DeviceHealthAttestationReportedStateControl.xaml.cs
│ ├── DeviceInfo
│ │ ├── DeviceInfoReportedStateControl.xaml
│ │ └── DeviceInfoReportedStateControl.xaml.cs
│ ├── DeviceTwinAndMethod.cs
│ ├── DiagnosticLogs
│ │ ├── CollectorDesiredStateControl.xaml
│ │ ├── CollectorDesiredStateControl.xaml.cs
│ │ ├── CollectorReportedStateControl.xaml
│ │ ├── CollectorReportedStateControl.xaml.cs
│ │ ├── CollectorsDesiredStateControl.xaml
│ │ ├── CollectorsDesiredStateControl.xaml.cs
│ │ ├── CollectorsReportedStateControl.xaml
│ │ ├── CollectorsReportedStateControl.xaml.cs
│ │ ├── ProviderDesiredStateControl.xaml
│ │ ├── ProviderDesiredStateControl.xaml.cs
│ │ ├── ProviderDesiredStateListControl.xaml
│ │ ├── ProviderDesiredStateListControl.xaml.cs
│ │ ├── ProviderReportedStateControl.xaml
│ │ ├── ProviderReportedStateControl.xaml.cs
│ │ ├── ProviderReportedStateListControl.xaml
│ │ └── ProviderReportedStateListControl.xaml.cs
│ ├── DmAppStoreUpdate
│ │ ├── DmAppStoreUpdateReportedStateControl.xaml
│ │ └── DmAppStoreUpdateReportedStateControl.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Models.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Reboot
│ │ ├── RebootCmdReportedStateControl.xaml
│ │ ├── RebootCmdReportedStateControl.xaml.cs
│ │ ├── RebootInfoDesiredStateControl.xaml
│ │ ├── RebootInfoDesiredStateControl.xaml.cs
│ │ ├── RebootInfoReportedStateControl.xaml
│ │ └── RebootInfoReportedStateControl.xaml.cs
│ ├── StorageManagement
│ │ ├── AzureStorageManager.xaml
│ │ ├── AzureStorageManager.xaml.cs
│ │ ├── DeviceDeleteFile.xaml
│ │ ├── DeviceDeleteFile.xaml.cs
│ │ ├── DeviceFileSelectionControl.xaml
│ │ ├── DeviceFileSelectionControl.xaml.cs
│ │ ├── DeviceUploadFile.xaml
│ │ └── DeviceUploadFile.xaml.cs
│ ├── Telemetry
│ │ ├── WindowsTelemetryDesiredStateControl.xaml
│ │ ├── WindowsTelemetryDesiredStateControl.xaml.cs
│ │ ├── WindowsTelemetryReportedStateControl.xaml
│ │ └── WindowsTelemetryReportedStateControl.xaml.cs
│ ├── TimeSettings
│ │ ├── TimeDesiredStateControl.xaml
│ │ ├── TimeDesiredStateControl.xaml.cs
│ │ ├── TimeReportedStateControl.xaml
│ │ ├── TimeReportedStateControl.xaml.cs
│ │ ├── TimeSvcDesiredStateControl.xaml
│ │ ├── TimeSvcDesiredStateControl.xaml.cs
│ │ ├── TimeSvcReportedStateControl.xaml
│ │ └── TimeSvcReportedStateControl.xaml.cs
│ ├── Utils.cs
│ ├── WPFUtils.cs
│ ├── Wifi
│ │ ├── WifiDesiredStateControl.xaml
│ │ ├── WifiDesiredStateControl.xaml.cs
│ │ ├── WifiDetails.xaml
│ │ ├── WifiDetails.xaml.cs
│ │ ├── WifiProfileConfiguration.cs
│ │ ├── WifiProfilesDesiredStateControl.xaml
│ │ ├── WifiProfilesDesiredStateControl.xaml.cs
│ │ ├── WifiProfilesReportedStateControl.xaml
│ │ ├── WifiProfilesReportedStateControl.xaml.cs
│ │ ├── WifiReportedStateControl.xaml
│ │ └── WifiReportedStateControl.xaml.cs
│ ├── WindowsUpdatePolicy
│ │ ├── WindowsUpdatePolicyDesiredStateControl.xaml
│ │ ├── WindowsUpdatePolicyDesiredStateControl.xaml.cs
│ │ ├── WindowsUpdatePolicyReportedStateControl.xaml
│ │ └── WindowsUpdatePolicyReportedStateControl.xaml.cs
│ └── packages.config
├── IoTDMBackground
│ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ ├── DMClientBackgroundApplication.cs
│ ├── IoTDMBackground.csproj
│ ├── IoTDMBackground_TemporaryKey.pfx
│ ├── Package.appxmanifest
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
├── IotDeviceManagementCapability.SCCD
└── ToasterApp
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ ├── LockScreenLogo.scale-200.png
│ ├── SplashScreen.scale-200.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── StoreLogo.png
│ ├── Wide310x150Logo.scale-200.png
│ ├── gear.png
│ ├── hot.png
│ └── toaster.png
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
│ ├── Toaster.csproj
│ ├── ToasterDeviceManagementRequestHandler.cs
│ ├── UserDialog.xaml
│ └── UserDialog.xaml.cs
├── src
├── DHA
│ ├── DHA-test
│ │ ├── AppSettings.cs
│ │ ├── DHA-test.csproj
│ │ ├── DeviceHealthAttestationServerTest.cs
│ │ ├── Extension.cs
│ │ ├── NonceTable.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── ReportTable.cs
│ │ ├── app.config
│ │ └── packages.config
│ ├── DHA.sln
│ ├── DHA
│ │ ├── DHA.funproj
│ │ ├── DHAServiceBusQueueHandler
│ │ │ ├── HealthInspector.csx
│ │ │ ├── NonceRequestHandler.csx
│ │ │ ├── NonceTable.csx
│ │ │ ├── ReportRequestHandler.csx
│ │ │ ├── Utilities.csx
│ │ │ ├── function.json
│ │ │ ├── project.json
│ │ │ └── run.csx
│ │ ├── Project_Readme.html
│ │ ├── appsettings.json
│ │ └── host.json
│ └── Deployment Scripts
│ │ ├── AzureFunctionDeploy.json
│ │ ├── AzureServiceBusDeploy.json
│ │ ├── AzureServiceBusQueueDeploy.json
│ │ ├── AzureStorageDeploy.json
│ │ └── DHA-setup.ps1
├── DMDataContract
│ └── DMDataContract
│ │ ├── AppxLifeCycle.cs
│ │ ├── AppxManagement.cs
│ │ ├── Certificates.cs
│ │ ├── ClearReportedProperties.cs
│ │ ├── Common.cs
│ │ ├── DMDataContract.csproj
│ │ ├── DMJSonConstants.cs
│ │ ├── DeviceHealthAttestation.cs
│ │ ├── DeviceInfo.cs
│ │ ├── DmAppStoreUpdate.cs
│ │ ├── ErrorCodes.cs
│ │ ├── EventTracing.cs
│ │ ├── ExternalStorage.cs
│ │ ├── FactoryReset.cs
│ │ ├── Policy.cs
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── RebootCmd.cs
│ │ ├── RebootInfo.cs
│ │ ├── RemoteWipe.cs
│ │ ├── TimeService.cs
│ │ ├── TimeSettings.cs
│ │ ├── UsoClientCmd.cs
│ │ ├── Utils.cs
│ │ ├── WindowsTelemetry.cs
│ │ ├── WindowsUpdatePolicy.cs
│ │ ├── WindowsUpdates.cs
│ │ └── packages.config
├── DMMessage
│ ├── Blob.cpp
│ ├── Blob.h
│ ├── CurrentVersion.h
│ ├── DMGarbageCollectorTempFolder.h
│ ├── DMMessage.cpp
│ ├── DMMessage.vcxproj
│ ├── DMMessage.vcxproj.filters
│ ├── DMMessageException.h
│ ├── DMMessageHelper.cpp
│ ├── DMMessageKind.h
│ ├── DMMessageSerialization.h
│ ├── IRequestIResponse.h
│ ├── Models
│ │ ├── AllModels.h
│ │ ├── AppInstall.h
│ │ ├── AppLifecycle.h
│ │ ├── AppUninstall.h
│ │ ├── CertificateConfiguration.h
│ │ ├── CertificateDetails.h
│ │ ├── CheckForUpdates.h
│ │ ├── DeviceDMStorage.h
│ │ ├── DeviceHealthAttestation.h
│ │ ├── DeviceInfo.h
│ │ ├── ErrorResponse.h
│ │ ├── EventTracingConfiguration.h
│ │ ├── ExitDM.h
│ │ ├── FactoryReset.h
│ │ ├── FileTransfer.h
│ │ ├── ListApps.h
│ │ ├── ModelHelper.h
│ │ ├── ModelsInfo.dat
│ │ ├── Policy.h
│ │ ├── Reboot.h
│ │ ├── RemoteWipe.h
│ │ ├── StartupApp.h
│ │ ├── StatusCodeResponse.h
│ │ ├── StringListResponse.h
│ │ ├── StringResponse.h
│ │ ├── TimeInfo.h
│ │ ├── TimeService.h
│ │ ├── TpmRequests.h
│ │ ├── UsoClientCmd.h
│ │ ├── WifiConfiguration.h
│ │ ├── WifiDetails.h
│ │ ├── WindowsTelemetry.h
│ │ ├── WindowsUpdatePolicy.h
│ │ ├── WindowsUpdateRebootPolicy.h
│ │ └── WindowsUpdates.h
│ ├── ResponseStatus.h
│ ├── SerializationHelper.cpp
│ ├── SerializationHelper.h
│ ├── stdafx.cpp
│ └── stdafx.h
├── DMShared
│ ├── DMShared.vcxitems
│ ├── DMShared.vcxitems.filters
│ └── ErrorCodes.h
├── DMTpm
│ ├── DMTpm.vcxitems
│ ├── TpmSupport.cpp
│ └── TpmSupport.h
├── IoTDM.sln
├── IoTDMClientLib
│ ├── AzureBlobFileTransfer.cs
│ ├── AzureIoTHubDeviceTwinProxy.cs
│ ├── CertificateManagement.cs
│ ├── DeviceManagement.cs
│ ├── DeviceManagementClient.cs
│ ├── DirectMethodGuard.cs
│ ├── Handlers
│ │ ├── AppxLifeCycleHandler.cs
│ │ ├── AppxManagement.cs
│ │ ├── CertificateHandler.cs
│ │ ├── ClearReportedPropertiesHandler.cs
│ │ ├── DeviceHealthAttestationHandler.cs
│ │ ├── DeviceInfoHandler.cs
│ │ ├── DmAppStoreUpdate.cs
│ │ ├── EventTracingHandler.cs
│ │ ├── ExternalStorageHandler.cs
│ │ ├── FactoryResetHandler.cs
│ │ ├── RebootCmdHandler.cs
│ │ ├── RebootInfoHandler.cs
│ │ ├── RemoteWipeHandler.cs
│ │ ├── StorageHandler.cs
│ │ ├── TimeServiceHandler.cs
│ │ ├── TimeSettingsHandler.cs
│ │ ├── UsoClientCmdHandler.cs
│ │ ├── WifiHandler.cs
│ │ ├── WindowsTelemetryHandler.cs
│ │ ├── WindowsUpdatePolicyHandler.cs
│ │ └── WindowsUpdatesHandler.cs
│ ├── Interfaces
│ │ ├── IDeviceManagementClientHandler.cs
│ │ ├── IDeviceManagementRequestHandler.cs
│ │ ├── IDeviceTwin.cs
│ │ └── ISystemConfiguratorProxy.cs
│ ├── IoTDMClientLib.csproj
│ ├── OnPremDeviceTwinProxy.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── IoTDMClient.rd.xml
│ ├── SystemConfiguratorProxy.cs
│ ├── TpmDevice.cs
│ ├── Utils.cs
│ └── include
│ │ └── dm_request.h
├── SharedUtilities
│ ├── AutoCloseBase.h
│ ├── AutoCloseHandle.h
│ ├── Constants.h
│ ├── DMException.cpp
│ ├── DMException.h
│ ├── DMRequest.h
│ ├── ETWLogger.cpp
│ ├── ETWLogger.h
│ ├── Impersonator.cpp
│ ├── Impersonator.h
│ ├── JsonHelpers.cpp
│ ├── JsonHelpers.h
│ ├── Logger.cpp
│ ├── Logger.h
│ ├── Permissions
│ │ ├── PermissionsManager.cpp
│ │ ├── PermissionsManager.h
│ │ ├── PermissionsSnapshot.cpp
│ │ ├── PermissionsSnapshot.h
│ │ ├── PermissionsTracer.cpp
│ │ └── PermissionsTracer.h
│ ├── PolicyHelper.cpp
│ ├── PolicyHelper.h
│ ├── SecurityAttributes.cpp
│ ├── SecurityAttributes.h
│ ├── SharedUtilities.vcxitems
│ ├── SharedUtilities.vcxitems.filters
│ ├── StringUtils.cpp
│ ├── StringUtils.h
│ ├── TimeHelpers.cpp
│ ├── TimeHelpers.h
│ ├── Utils.cpp
│ └── Utils.h
├── SystemConfigurator
│ ├── AppCfg.cpp
│ ├── AppCfg.h
│ ├── AppInfo.h
│ ├── CSPs
│ │ ├── CertificateInfo.cpp
│ │ ├── CertificateInfo.h
│ │ ├── CertificateManagement.cpp
│ │ ├── CertificateManagement.h
│ │ ├── CertificateStoreCSP.cpp
│ │ ├── CertificateStoreCSP.h
│ │ ├── ClientCertificateInstallCSP.cpp
│ │ ├── ClientCertificateInstallCSP.h
│ │ ├── CustomDeviceUiCsp.cpp
│ │ ├── CustomDeviceUiCsp.h
│ │ ├── DeviceHealthAttestationCSP.cpp
│ │ ├── DeviceHealthAttestationCSP.h
│ │ ├── DiagnosticLogCSP.cpp
│ │ ├── DiagnosticLogCSP.h
│ │ ├── EnterpriseModernAppManagementCSP.cpp
│ │ ├── EnterpriseModernAppManagementCSP.h
│ │ ├── MdmProvision.cpp
│ │ ├── MdmProvision.h
│ │ ├── PrivateAPIs
│ │ │ └── WinSDKRS2.h
│ │ ├── RebootCSP.cpp
│ │ ├── RebootCSP.h
│ │ ├── WifiCSP.cpp
│ │ ├── WifiCSP.h
│ │ ├── WindowsUpdatePolicy.cpp
│ │ └── WindowsUpdatePolicyCSP.h
│ ├── CommandProcessor.cpp
│ ├── CommandProcessor.h
│ ├── DMService.cpp
│ ├── DMService.h
│ ├── DMStorage.cpp
│ ├── DMStorage.h
│ ├── Resource.rc
│ ├── ServiceManager.cpp
│ ├── ServiceManager.h
│ ├── SystemConfigurator.cpp
│ ├── SystemConfigurator.vcxproj
│ ├── SystemConfigurator.vcxproj.filters
│ ├── SystemConfiguratorProxyServer
│ │ ├── SystemConfiguratorProxy.cpp
│ │ └── SystemConfiguratorProxy.h
│ ├── TaskQueue.cpp
│ ├── TaskQueue.h
│ ├── TimeCfg.cpp
│ ├── TimeCfg.h
│ ├── TimeService.cpp
│ ├── TimeService.h
│ ├── WindowsTelemetry.cpp
│ ├── WindowsTelemetry.h
│ ├── resource.h
│ ├── stdafx.cpp
│ ├── stdafx.h
│ └── targetver.h
└── SystemConfiguratorProxy
│ ├── Client
│ ├── SCProxyClient.cpp
│ ├── SCProxyClient.h
│ ├── ServiceConfiguratorProxyClientLib.vcxproj
│ ├── ServiceConfiguratorProxyClientLib.vcxproj.filters
│ ├── ServiceConfiguratorProxyInterface.c
│ ├── SystemConfiguratorProxyInterface.c
│ ├── pch.cpp
│ └── pch.h
│ └── Interface
│ ├── SystemConfiguratorProxy.Idl
│ ├── SystemConfiguratorProxyInterface.vcxproj
│ └── SystemConfiguratorProxyInterface.vcxproj.filters
└── tests
├── CSPTests
├── CSPTests.cpp
├── CSPTests.vcxproj
├── CSPTests.vcxproj.filters
├── CertificateManagementTest.cpp
├── CertificateManagementTest.h
├── DeviceHealthAttestationTest.cpp
├── DeviceHealthAttestationTest.h
├── ReadMe.txt
├── TestUtils.cpp
├── TestUtils.h
├── WifiManagementTest.cpp
├── WifiManagementTest.h
├── stdafx.cpp
├── stdafx.h
└── targetver.h
├── DMValidator
├── App.config
├── App.xaml
├── App.xaml.cs
├── DMValidator.csproj
├── DeviceConnectionString.cs
├── IoTHubManager.cs
├── Logger.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── TestCases
│ ├── RebootCmd
│ │ └── RebootCmd.00.json
│ ├── RebootInfo
│ │ └── RebootInfo.00.json
│ └── WindowsUpdatePolicy
│ │ └── WindowsUpdatePolicy.00.json
├── TestInfrastructure
│ ├── DeviceTwinTestCase.cs
│ ├── DirectMethodTestCase.cs
│ ├── JsonHelpers.cs
│ ├── TestCase.cs
│ ├── TestCaseHelpers.cs
│ ├── TestConstants.cs
│ ├── TestParameters.cs
│ └── TestScenario.cs
└── packages.config
├── E2ETestApp
├── App.xaml
├── App.xaml.cs
├── Assets
│ ├── LockScreenLogo.scale-200.png
│ ├── SplashScreen.scale-200.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── StoreLogo.png
│ └── Wide310x150Logo.scale-200.png
├── Constants.cs
├── E2ETestApp.csproj
├── JsonHelpers.cs
├── MainPage.xaml
├── MainPage.xaml.cs
├── MockObjects
│ ├── MockDeviceClient.cs
│ ├── MockDeviceClientApp.cs
│ ├── MockIoTHubDeviceTwinProxy.cs
│ ├── MockRegistryManager.cs
│ ├── MockTwin.cs
│ └── MockTwinCollection.cs
├── Package.appxmanifest
├── Properties
│ ├── AssemblyInfo.cs
│ └── Default.rd.xml
├── TestCaseHandlers
│ ├── DeviceTwinTestCase.cs
│ ├── DirectMethodTestCase.cs
│ ├── SetWindowsUpdateRingAsyncTestCase.cs
│ ├── TestCase.cs
│ └── TestScenario.cs
├── TestCases
│ ├── Apps
│ │ ├── Apps.00.arm.json
│ │ ├── Apps.00.x86.RS4.Core.json
│ │ ├── Apps.00.x86.RS4.Enterprise.json
│ │ ├── Apps.00.x86.json
│ │ ├── Apps.01.list.RS4.Core.json
│ │ └── Apps.01.list.json
│ ├── Certificates
│ │ └── Certificates.00.json
│ ├── DeviceInfo
│ │ ├── DeviceInfo.MBM.00.json
│ │ └── DeviceInfo.RPI2.00.json
│ ├── Diagnostic Logs
│ │ └── DiagnosticLogs.00.json
│ ├── RebootCmd
│ │ └── RebootCmd.00.json
│ ├── RebootInfo
│ │ └── RebootInfo.00.json
│ ├── TimeInfo
│ │ └── TimeInfo.00.json
│ ├── TimeService
│ │ └── TimeService.00.json
│ ├── WiFi
│ │ └── WiFi.00.json
│ ├── WindowsTelemetry
│ │ └── WindowsTelemetry.00.json
│ ├── WindowsUpdatePolicy
│ │ ├── WindowsUpdatePolicy.IoTCoreOnly.Ring.00.json
│ │ └── WindowsUpdatePolicy.NoRing.00.json
│ └── WindowsUpdates
│ │ └── WindowsUpdates.00.json
├── TestInfrastructure
│ ├── TestCaseEnumerator.cs
│ ├── TestCaseHelpers.cs
│ ├── TestNode.cs
│ └── TestParameters.cs
└── XamlConverters.cs
├── IoTDMClientLibTests
├── Assets
│ ├── LockScreenLogo.scale-200.png
│ ├── SplashScreen.scale-200.png
│ ├── Square150x150Logo.scale-200.png
│ ├── Square44x44Logo.scale-200.png
│ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ ├── StoreLogo.png
│ └── Wide310x150Logo.scale-200.png
├── DMMessageTests.cs
├── DeviceHealthAttestationTest.cs
├── DeviceManagementClientTests.cs
├── IoTDMClientLibTests.csproj
├── IoTDMClientLibTests_TemporaryKey.pfx
├── Package.appxmanifest
├── Properties
│ ├── AssemblyInfo.cs
│ └── UnitTestApp.rd.xml
├── UnitTestApp.xaml
└── UnitTestApp.xaml.cs
└── IoTHubManager
├── App.config
├── IoTHubManager.csproj
├── Program.cs
├── Properties
└── AssemblyInfo.cs
└── packages.config
/LICENSE:
--------------------------------------------------------------------------------
1 | Windows IoT Azure DM client library
2 |
3 | MIT License
4 |
5 | Copyright (c) 2017
6 |
7 | Permission is hereby granted, free of charge, to any person obtaining a copy
8 | of this software and associated documentation files (the "Software"), to deal
9 | in the Software without restriction, including without limitation the rights
10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | copies of the Software, and to permit persons to whom the Software is
12 | furnished to do so, subject to the following conditions:
13 |
14 | The above copyright notice and this permission notice shall be included in all
15 | copies or substantial portions of the Software.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | SOFTWARE.
24 |
--------------------------------------------------------------------------------
/docs/apply-all-desired-properties.md:
--------------------------------------------------------------------------------
1 | ## Apply All Desired Properties
2 |
3 | The **Apply All Desired Propeties** operation is initiated by the following .NET APIs.
4 |
5 |
6 |
7 | Namespace :
8 | Microsoft.Devices.Management
9 |
10 |
11 |
12 | Class :
13 | DeviceManagementClient
14 |
15 |
16 |
17 | Methods :
18 | public async Task ApplyDesiredStateAsync()
19 | public void ApplyDesiredStateAsync(TwinCollection desiredProperties)
20 |
21 |
22 | **public async Task ApplyDesiredStateAsync()**
23 |
24 | This tells the DM Client to get the full list of desired properties and apply them to the device. This is specially useful on application start-up since there are no guarantees about the current state of the device. Later, however, the device twin will send change notification for only the properties that have changed. In those cases, the application should call `ApplyDesiredStateAsync(TwinCollection desiredProperties)` instead - which applys only the delta specified.
25 |
26 | **public void ApplyDesiredStateAsync(TwinCollection desiredProperties)**
27 |
28 | This tells the DM Client to apply the specified desired state to the device. This should be used whenever the device twin sends a notification of a desired property change.
29 |
30 | **Example**
31 |
32 |
33 | async Task OnApplicationStartup()
34 | {
35 | await ApplyDesiredStateAsync();
36 | }
37 |
38 | void OnDesiredPropertiesChanged(TwinCollection desiredProperties)
39 | {
40 | await ApplyDesiredStateAsync(desiredProperties);
41 | }
42 |
43 |
44 | ----
45 |
46 | [Home Page](../README.md) | [Library Reference](library-reference.md)
--------------------------------------------------------------------------------
/docs/azure-dm-certification.md:
--------------------------------------------------------------------------------
1 | # Azure Device Management Certification
2 |
3 | The Azure Device Management Certification process defines a minimum set of features the device management client has to comply with in order to be certified.
4 |
5 | In order to verify those features, follow these steps:
6 |
7 | 1. Create an IoT Hub and a new device in that hub.
8 |
9 | 2. Build a device such that the Azure device management client is up and running and is connected to the IoT Hub with the identity of the device you have created.
10 | - You may choose to build your own client or use the client implemented in this repro as-is or modified (see more information [here](oem-device-setup.md)).
11 |
12 | 3. On a desktop machine, run the verification application (DMValidator) by pointing it to the IoT Hub and the device you have created in step 1.
13 | - The verification application can be downloaded from [here](https://github.com/ms-iot/iot-core-azure-dm-client/tree/master/tests/DMValidator).
14 | - Select all the test scenarios and then click 'Run Test Cases'.
15 |
16 | 4. Collect and compress the logs DMValidator generates after running the test scenarios.
17 |
18 | 5. Send the compressed logs to Microsoft Azure device management certification team.
19 |
20 | ----
21 |
22 | [Home Page](../README.md)
--------------------------------------------------------------------------------
/docs/building-the-dm-binaries.md:
--------------------------------------------------------------------------------
1 | # Building The Device Management Binaries
2 |
3 | The following binaries constitute the Device Management solution:
4 |
5 | - A UWP-compatible library to be included in the host UWP app (IoTDMClientLib).
6 | - SystemConfigurator.exe
7 |
8 | Below are the steps to build these components and have them ready for inclusion in your UWP application, and integrated into your device image.
9 |
10 | ### Enlist
11 |
12 | - Create a new folder, let's say `c:\iot-core-azure-dm-client`. and make it the current folder.
13 | - Run `git clone --recursive --branch master https://github.com/ms-iot/iot-core-azure-dm-client`
14 |
15 | ### Build The Binaries
16 |
17 | - Open `src\IoTDM.sln` in Visual Studio.
18 | - Set the configuration to *Release*.
19 | - Build the solution for each of the three architectures (ARM, x64, and x86).
20 |
21 | ### Build The Nuget Package
22 |
23 | - Open a Visual Studio command prompt and
24 | - Make sure `nuget.exe` is on the path.
25 | - `cd c:\iot-core-azure-dm-client\nuget`
26 | - Run `PackIoTDMClientLib.cmd 1.4.4 Release`
27 | - `1.4.4` is the next available version so that your application can pick it up. If your app has never consumed IoTDMClientLib, this can be set to 1.0.0.
28 | - `Release` is the flavor to be packaged. If you intend to debug the IoTDMClientLib code, it is recommended to create the package with `Debug` instead of `Release` in the command above.
29 |
30 | This will create `c:\iot-core-azure-dm-client\nuget\IoTDMClientLib.1.4.4.nupkg`.
31 |
32 | **Next Step**:
33 |
34 | - See the [DM Hello World! Application](dm-hello-world-overview.md).
35 |
36 | ----
37 |
38 | [Home Page](../README.md)
--------------------------------------------------------------------------------
/docs/debugging.md:
--------------------------------------------------------------------------------
1 | # Debugging Azure Device Management Client
2 |
3 | All the **Windows IoT Azure DM Client** components have been instrumented to log its progress using ETW. The provider guid is `D198EE7D-C5F1-4F5F-95BE-A2EE6FA45897`.
4 |
5 | The user can turn on event collection using either:
6 |
7 | - [Diagnostic Logs Management](diagnostic-logs-management.md)
8 | - xperf/tracerpt
9 |
10 | ## xperf/tracerpt
11 |
12 | Here are the steps you need to obtain detailed logs for a certain period of time:
13 |
14 | - Open an admin console to the device and start capturing logs using:
15 |
16 |
17 | xperf.exe -start MySession -f c:\Data\Users\DefaultAccount\AppData\Local\Temp\dm.etl -on D198EE7D-C5F1-4F5F-95BE-A2EE6FA45897
18 |
19 |
20 | - Run your scenarios (i.e. set the desired property in question, etc).
21 | - When done, stop capturing logs using:
22 |
23 |
24 | xperf.exe -stop MySession
25 |
26 |
27 | - To view the logs, copy the generated `c:\temp\dm.etl` to your desktop machine.
28 | - View the etl log using Windows Performance Analyzer (WPA).
29 | - If it is not installed, use `tracerpt.exe` to general an xml representation of the etl file. The xml file can then be opened as usual.
30 |
31 |
32 | tracerpt.exe c:\temp\dm.etl
33 |
34 |
35 | ##
36 |
37 | ----
38 |
39 | [Home Page](../README.md) | [Library Reference](library-reference.md)
--------------------------------------------------------------------------------
/docs/dha-architecture-detail1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-detail1.png
--------------------------------------------------------------------------------
/docs/dha-architecture-detail2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-detail2.png
--------------------------------------------------------------------------------
/docs/dha-architecture-detail3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-detail3.png
--------------------------------------------------------------------------------
/docs/dha-architecture-overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-overview.png
--------------------------------------------------------------------------------
/docs/dha-report-sample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-report-sample.png
--------------------------------------------------------------------------------
/docs/dm-application-anatomy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-application-anatomy.png
--------------------------------------------------------------------------------
/docs/dm-architecture-all.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-architecture-all.png
--------------------------------------------------------------------------------
/docs/dm-architecture-application-library.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-architecture-application-library.png
--------------------------------------------------------------------------------
/docs/dm-client-architecture.md:
--------------------------------------------------------------------------------
1 | # Device Management Client Architecture
2 |
3 | Here's a diagram of how the different pieces fit together:
4 |
5 |
6 |
7 | All device management operations are implemented via the Azure IoT Hub [direct methods]() and the [device twin]().
8 |
9 | ----
10 |
11 | [Home Page](../README.md)
--------------------------------------------------------------------------------
/docs/dm-hello-world-deploying.md:
--------------------------------------------------------------------------------
1 | # DM Hello World Application
2 | ## Deployment and Running
3 |
4 | After completing the [Coding](dm-hello-world-coding.md) section, we now can start deployment.
5 |
6 | The DM application depends on two other components that need to be on the device. Both components are built when the library is built (see [Building the Device Management Binaries](building-the-dm-binaries.md)).
7 | In a production scenario, they will be part of the OS image (see [Production Device Setup](oem-device-setup.md)). For our development scenario, however, we can install them manually as follows:
8 |
9 | - **SystemConfigurator.exe**
10 | - Copy SystemConfigurator.exe to the device system folder `c:\windows\system32`.
11 | - Register the service by running:
12 | - `c:\windows\system32\SystemConfigurator.exe -install`
13 | - Start the service:
14 | - `net start SystemConfigurator`
15 |
16 | - **DMHelloWorld**
17 | - Configure the remote machine in the application and hit F5.
18 |
19 | **Next Step**:
20 |
21 | - Managing the [DM Hello World Application](dm-hello-world-managing.md).
22 |
23 | ----
24 |
25 | [Home Page](../README.md) | [DM Hello World Application](dm-hello-world-overview.md)
26 |
--------------------------------------------------------------------------------
/docs/dm-hello-world-managing.md:
--------------------------------------------------------------------------------
1 | # DM Hello World Application
2 | ## Managing the Device
3 |
4 | Note that we have deployed the DMHelloWorld application and the service is running, we can start testing some of the DM features.
5 |
6 | In order to do that, we need to either do direct method calls or configure the Device Twin desired property. Both can be done through the [Microsoft.Azure.Devices SDK](https://www.nuget.org/packages/Microsoft.Azure.Devices/1.1.0).
7 |
8 | There are two samples that can help here:
9 |
10 | - [Device Explorer](https://github.com/Azure/azure-iot-sdk-csharp/tree/master/tools/DeviceExplorer)
11 | - This tools allows the users to experiment by constructing their own json by hand and merging it into the Device Twin. It also allows the users to type in the direct method names and json parameters and sends them to the device.
12 |
13 | - DMDashboard
14 | - This is a sample that is distributed with the Windows DM client library solution. This sample demonestrates how to construct the json that the DM client library understands. It also exposes all the supported functionality through easy-to-use UI.
15 |
16 | Once the DMHelloWorld is up and running, launch the DMDashboard, connect to your IoT Hub account and device, and start experimenting by reading the current state of the device, or configuring it.
17 |
18 | ----
19 |
20 | [Home Page](../README.md) | [DM Hello World Application](dm-hello-world-overview.md)
--------------------------------------------------------------------------------
/docs/dm-hello-world-overview.md:
--------------------------------------------------------------------------------
1 | # DM Hello World Application
2 | ## Overview
3 |
4 | - [Coding](dm-hello-world-coding.md)
5 | - [Deploying and Running](dm-hello-world-deploying.md)
6 | - [Managing the Device](dm-hello-world-managing.md)
7 |
8 | ----
9 |
10 | [Home Page](../README.md)
--------------------------------------------------------------------------------
/docs/dm-validator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-validator.png
--------------------------------------------------------------------------------
/docs/external-storage.md:
--------------------------------------------------------------------------------
1 | # Blob Storage
2 |
3 | Some device management configurations require the user to provide input files (like installing new certificates, or WiFi profiles, etc). Also, some scenarios may result in having the device generate files that need to be later transferred ourside the device (like log files, exporting WiFi profiles, certificates, etc).
4 |
5 | For these scenarios, the device twin specifies a common storage place for all configurations to use. The current implementaiton of the device management client on IoT Core assumes this is an Azure Blob Storage service.
6 |
7 | The storage is described in the desired properties section as follows:
8 |
9 | "properties": {
10 | "desired" : {
11 | "windows": {
12 | "externalStorage": {
13 | "connectionString": "connection string ",
14 | }
15 | }
16 | }
17 | }
18 |
19 |
20 | The inidividual configuration section may then refer to files in that location - either at the root or under containers. The relative location is left for the individual sections to define.
21 |
22 | ----
23 |
24 | [Home Page](../README.md) | [Library Reference](library-reference.md)
--------------------------------------------------------------------------------
/docs/report-all-device-properties.md:
--------------------------------------------------------------------------------
1 | # Report All Device Properties
2 |
3 | When a desired device management property changes in the device twin, the device management client gets notified and does two things:
4 |
5 | - Applies the new desired state.
6 | - Reads the current device state (that corresponds to the desired state) and reports it to the device twin.
7 |
8 | For example, if the operator sets the time zone to be Mountain Time , the device management client will:
9 |
10 | - Set the time zone to Mountain Time.
11 | - Read the time zone from the device, and report it to the device twin.
12 |
13 | The operator (or more specifically, the code running on in the Portal) can then compare the desired state to the reported state and decide whether the device is compliant or not.
14 |
15 | This is a conservative reporting approach and is meant to report only the properties that are configured (rather than reporting everything the device can report).
16 |
17 | Should the operator want to force the device to report all its properties, `windows.reportAllAsync` method can be invoked.
18 |
19 | ## windows.reportAllAsync
20 |
21 | Reports all properties supported by the Windows IoT Azure Device Client.
22 |
23 | #### Input Payload
24 | Input payload is empty
25 |
26 | #### Output Payload
27 |
28 | This method is asynchronous, so it returns immediately and sets the Status Object to `pending`. For more details on the Status Object , see [Status Reporting](status-reporting.md).
29 |
30 |
31 | {
32 | "status" : {
33 | <Status Object >
34 | }
35 | }
36 |
37 |
38 | ----
39 |
40 | [Home Page](../README.md) | [Library Reference](library-reference.md)
--------------------------------------------------------------------------------
/docs/source-policy.md:
--------------------------------------------------------------------------------
1 | # Source Policy
2 |
3 | For some device management areas, the desired state of a given property can be set:
4 |
5 | - *Remotely* through the Device Twin.
6 | - *Locally* through a .Net API interface. This interface can be called by the hosting UWP application.
7 |
8 | Both, the remote configuration and the local configuration, can co-exist on the same device - however, only one of them can be applied. To specify which one, a priority has to be set. The priority can be set through either interface.
9 |
10 | For example, consider the following:
11 |
12 | - The administrator wants all devices to have the Time Service running.
13 | - The administrator wants to give the option to the application user (on the device) to turn off the Time Service.
14 | - The application exposes a way to turn on and off the Time Service (through its UI, for example).
15 |
16 | For the above scenario,
17 |
18 | - The administrator will set the device twin properties to have the Time Service started and set the priority to `local`.
19 | - The application can then call the .Net API (see below), and start/stop the service.
20 |
21 | Should the administrator decide to take over, and override the application settings, the administrator can set the priority to `remote`, and then apply the desired settings.
22 |
23 | Note that both the device twin and the .Net API can control the priority property - which gives them equal rights.
24 |
25 | When reporting, it is the current state of the service that is reported - regardless of whether it is configured using the local or the remote settings.
26 |
27 | ----
28 |
29 | [Home Page](../README.md) | [Library Reference](library-reference.md)
--------------------------------------------------------------------------------
/external/WinSDKRS2/arm/mdmlocalmanagement.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/WinSDKRS2/arm/mdmlocalmanagement.lib
--------------------------------------------------------------------------------
/external/WinSDKRS2/x64/mdmlocalmanagement.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/WinSDKRS2/x64/mdmlocalmanagement.lib
--------------------------------------------------------------------------------
/external/WinSDKRS2/x86/mdmlocalmanagement.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/WinSDKRS2/x86/mdmlocalmanagement.lib
--------------------------------------------------------------------------------
/external/limpet/dll/arm/LimpetLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/arm/LimpetLib.dll
--------------------------------------------------------------------------------
/external/limpet/dll/x64/LimpetLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x64/LimpetLib.dll
--------------------------------------------------------------------------------
/external/limpet/dll/x64/LimpetLib.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x64/LimpetLib.pdb
--------------------------------------------------------------------------------
/external/limpet/dll/x86/LimpetLib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x86/LimpetLib.dll
--------------------------------------------------------------------------------
/external/limpet/dll/x86/LimpetLib.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x86/LimpetLib.pdb
--------------------------------------------------------------------------------
/external/limpet/inc/LimpetDefs.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #define LIMPET_TPM_OBJECT_NAME (sizeof(UINT16) + SHA256_DIGEST_SIZE)
18 | #define LIMPET_DEVICE_ID_STRING_LENGTH (70)
19 | #define LIMPET_STRING_SIZE (512)
20 | #define MAX_CONNECTION_STRING_LEN (1024)
21 |
22 | #define LIMPET_TPM20_SRK_HANDLE (0x81000001)
23 | #define LIMPET_TPM20_ERK_HANDLE (0x81010001)
24 | #define LIMPET_TPM20_PERSISTED_KEY_INDEX (0x81000100)
25 |
26 | #define LIMPET_TPM20_HT_NV_INDEX (0x01)
27 | #define LIMPET_TPM20_OWNER_NV_SPACE ((LIMPET_TPM20_HT_NV_INDEX << 24) | (0x01 << 22))
28 | #define LIMPET_TPM20_PERSISTED_URI_INDEX (LIMPET_TPM20_OWNER_NV_SPACE + 0x100)
29 | #define LIMPET_TPM20_MAX_LOGICAL_DEVICE (10)
30 | #define LIMPET_HARDWARE_DEVICE_ID_SIZE (0x22)
31 |
--------------------------------------------------------------------------------
/external/limpet/lib/arm/LimpetLib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/lib/arm/LimpetLib.lib
--------------------------------------------------------------------------------
/external/limpet/lib/x64/LimpetLib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/lib/x64/LimpetLib.lib
--------------------------------------------------------------------------------
/external/limpet/lib/x86/LimpetLib.lib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/lib/x86/LimpetLib.lib
--------------------------------------------------------------------------------
/nuget/IoTDMClientLib.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | $(MSBuildThisFileDirectory)$(Platform)\IoTDMClient.dll
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/nuget/PackIoTDMClientLib.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | @REM Examples:
3 | @REM PackIoTDMClientLib.cmd 1.4.4 Release
4 | @REM PackIoTDMClientLib.cmd 1.4.4 Debug
5 |
6 | @if "%1"=="" goto MissingParameters
7 | @if "%2"=="" goto MissingParameters
8 |
9 | NuGet.exe pack "IoTDMClientLib.nuspec" -Prop Version=%1 -Prop Flavor=%2
10 | goto End
11 |
12 | :MissingParameters
13 | @echo.
14 | @echo Usage:
15 | @echo PackIoTDMClientLib.cmd version flavor
16 | @echo.
17 | @echo where:
18 | @echo version: the version of the nuget package to be genered in the form: major.minor.revision.
19 | @echo flavor : Debug or Release
20 | @echo.
21 | @echo Example:
22 | @echo PackIoTDMClientLib.cmd 1.4.4 Release
23 | @echo.
24 |
25 | :End
26 |
--------------------------------------------------------------------------------
/samples/DMController/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/DMController/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/samples/DMController/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/samples/DMController/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/DMController/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/DMController/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/samples/DMController/Assets/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/StoreLogo.backup.png
--------------------------------------------------------------------------------
/samples/DMController/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/samples/DMController/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/DMController/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | DMController
7 | Sample
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/DMController/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("DMController")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("DMController")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/samples/DMController/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/DMController/README.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 | DMController is an UWP app that will be used by the operator to configure and query the devices remotely. This must be customized for devices by the device OEM or operator. As part of this solution, we also provide an open source data model and implementation for easier interaction with the IoT Hub storage and the Windows IoT client.
3 |
4 | ## System Requirements
5 | ### Developer's Box
6 |
7 | - Visual Studio 2017 ([download](https://www.visualstudio.com/downloads)) with the following:
8 | - Windows 10 SDK (10.0.16299.0) for UWP (*For DMController*)
9 |
10 | ## Getting Started
11 | ### Basic controls
12 |
13 |
14 | - When the application first launches, enter the **IoT Hub Connection String** in the Settings section to connect to the devices.
15 | - **The Storage Connection String** is required for specific features such as installing an applications, certificates, wifi profiles, etc.
16 | - Select a **Device** on the bottom left to configure and query the selected device remotely.
17 |
18 |
19 |
20 | - The **Get All Device Properties** button will reports all device properties supported by the Windows IoT Azure Device Client.
21 | - The green refresh button will get the latest Device Information of the selected device.
22 |
23 | ### Test scenarios
24 | The two buttons beside the Settings button will perform the following test scenario:
25 |
26 |
27 | - Start an UWP in the foreground on all connected devices.
28 | - Stop an UWP in the foreground on all connected devices.
29 | - Change the test UWP Package Family name in DMController/MainPage.cs:
30 |
31 | const string DemoAppPackage = "DMClientOverview_jv0mnc6v5g12j";
32 |
--------------------------------------------------------------------------------
/samples/DMController/Views/FactoryResetUserControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Devices.Management.DMDataContract;
2 | using Windows.UI.Xaml;
3 | using Windows.UI.Xaml.Controls;
4 |
5 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
6 |
7 | namespace DMController.Views
8 | {
9 | public sealed partial class FactoryResetUserControl : UserControl
10 | {
11 | public FactoryResetUserControl()
12 | {
13 | this.InitializeComponent();
14 | }
15 |
16 | private MainPage _mainPage;
17 | ///
18 | /// Saves the reference to MainPage object
19 | ///
20 | /// The MainPage object.
21 | public void SetMainPage(MainPage mainPage)
22 | {
23 | _mainPage = mainPage;
24 | }
25 |
26 | ///
27 | /// Start factory reset via direct methods.
28 | ///
29 | private void SetFactoryStatusButton_Click(object sender, RoutedEventArgs e)
30 | {
31 | var resetParam = new FactoryResetDataContract.ResetParams();
32 | if (RecoveryPartitionGUIDInput.Text.Length == 0)
33 | {
34 | _mainPage.ShowDialogAsync("Invaid Input", "Please enter all fields to start Factory Reset");
35 | return;
36 | }
37 | resetParam.recoveryPartitionGUID = RecoveryPartitionGUIDInput.Text;
38 | resetParam.clearTPM = ClearTPMChckbx.IsChecked == true;
39 |
40 | var result = _mainPage.CallDeviceMethod(FactoryResetDataContract.StartFactoryResetAsync, resetParam.ToJsonString());
41 |
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/samples/DMController/imgs/deviceinfo-buttons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/imgs/deviceinfo-buttons.png
--------------------------------------------------------------------------------
/samples/DMController/imgs/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/imgs/settings.png
--------------------------------------------------------------------------------
/samples/DMController/imgs/test-buttons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/imgs/test-buttons.png
--------------------------------------------------------------------------------
/samples/DMDashboard/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/samples/DMDashboard/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/DMDashboard/App.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Configuration;
18 | using System.Data;
19 | using System.Linq;
20 | using System.Threading.Tasks;
21 | using System.Windows;
22 |
23 | namespace DMDashboard
24 | {
25 | ///
26 | /// Interaction logic for App.xaml
27 | ///
28 | public partial class App : Application
29 | {
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Appx/AppsDesiredStateControl.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Appx/AppsReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/samples/DMDashboard/AzureBlobSelector.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Certificates/CertificateDetails.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 | using System.Threading.Tasks;
20 | using System.Windows;
21 | using System.Windows.Controls;
22 | using System.Windows.Data;
23 | using System.Windows.Documents;
24 | using System.Windows.Input;
25 | using System.Windows.Media;
26 | using System.Windows.Media.Imaging;
27 | using System.Windows.Shapes;
28 |
29 | namespace DMDashboard
30 | {
31 | ///
32 | /// Interaction logic for CertificateDetails.xaml
33 | ///
34 | public partial class CertificateDetails : Window
35 | {
36 | public CertificateDetails()
37 | {
38 | InitializeComponent();
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Certificates/CertificateHelpers.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System;
16 | using System.IO;
17 | using System.Security.Cryptography.X509Certificates;
18 |
19 | namespace DMDashboard
20 | {
21 | class CertificateHelpers
22 | {
23 | public static X509Certificate2 GetCertificateInfo(string fullFileName)
24 | {
25 | if (!File.Exists(fullFileName))
26 | {
27 | throw new Exception("Error: failed to download certificate file!");
28 | }
29 |
30 | X509Certificate certp = X509Certificate2.CreateFromSignedFile(fullFileName);
31 | return new X509Certificate2(certp.Handle);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Common/DMTextBlock.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
16 |
17 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Common/DMTextBlock.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | namespace DMDashboard
17 | {
18 | public partial class DMTextBlock : DMControl
19 | {
20 | public override string PropertyValue
21 | {
22 | get { return (string)GetValue(PropertyValueProperty); }
23 | set { SetValue(PropertyValueProperty, value); }
24 | }
25 |
26 | public DMTextBlock()
27 | {
28 | InitializeComponent();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Common/DMTextBox.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System.Windows;
16 |
17 | namespace DMDashboard
18 | {
19 | public partial class DMTextBox : DMControl
20 | {
21 | public override string PropertyValue
22 | {
23 | get { return (string)GetValue(PropertyValueProperty); }
24 | set { SetValue(PropertyValueProperty, value); }
25 | }
26 |
27 | public DMTextBox()
28 | {
29 | InitializeComponent();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DeviceHealthAttestation/DeviceHealthAttestationDesiredStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DeviceHealthAttestation/DeviceHealthAttestationReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DiagnosticLogs/CollectorsDesiredStateControl.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Detailed
20 | Minimal
21 | None
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DiagnosticLogs/CollectorsReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DiagnosticLogs/ProviderDesiredStateListControl.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DiagnosticLogs/ProviderReportedStateControl.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using System.Windows.Controls;
17 |
18 | namespace DMDashboard
19 | {
20 | public partial class ProviderReportedStateControl : DMControlList
21 | {
22 | public ProviderReportedStateControl()
23 | {
24 | InitializeComponent();
25 | }
26 |
27 | public override string PropertyName
28 | {
29 | get
30 | {
31 | return ProviderGuid.PropertyValue;
32 | }
33 | }
34 |
35 | public override UIElementCollection Controls
36 | {
37 | get
38 | {
39 | return ControlsList.Children;
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DiagnosticLogs/ProviderReportedStateListControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/DMDashboard/DmAppStoreUpdate/DmAppStoreUpdateReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Reboot/RebootCmdReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Reboot/RebootInfoDesiredStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Reboot/RebootInfoReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/samples/DMDashboard/StorageManagement/DeviceDeleteFile.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/DMDashboard/StorageManagement/DeviceFileSelectionControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Telemetry/WindowsTelemetryDesiredStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Security
21 | Basic
22 | Enhanced
23 | Full
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Telemetry/WindowsTelemetryReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Utils.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using System;
17 | using System.Threading.Tasks;
18 |
19 | namespace DMDashboard
20 | {
21 | static class AsyncHelper
22 | {
23 | public static async void FireAndForget(this Task task)
24 | {
25 | try
26 | {
27 | await task;
28 | }
29 | catch (Exception)
30 | {
31 | // log errors
32 | }
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Wifi/WifiDesiredStateControl.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Wifi/WifiDesiredStateControl.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using Microsoft.Devices.Management.DMDataContract;
17 | using Newtonsoft.Json;
18 | using System.Text;
19 | using System.Windows.Controls;
20 |
21 | namespace DMDashboard
22 | {
23 | public partial class WifiDesiredStateControl : UserControl
24 | {
25 | public WifiDesiredStateControl()
26 | {
27 | InitializeComponent();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Wifi/WifiDetails.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Wifi/WifiDetails.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 | using System.Threading.Tasks;
20 | using System.Windows;
21 | using System.Windows.Controls;
22 | using System.Windows.Data;
23 | using System.Windows.Documents;
24 | using System.Windows.Input;
25 | using System.Windows.Media;
26 | using System.Windows.Media.Imaging;
27 | using System.Windows.Shapes;
28 |
29 | namespace DMDashboard
30 | {
31 | ///
32 | /// Interaction logic for WifiDetails.xaml
33 | ///
34 | public partial class WifiDetails : Window
35 | {
36 | public WifiDetails()
37 | {
38 | InitializeComponent();
39 | }
40 |
41 | public string Xml { set { this.xml.Text = value; } }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Wifi/WifiProfilesReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/samples/DMDashboard/Wifi/WifiReportedStateControl.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/samples/DMDashboard/WindowsUpdatePolicy/WindowsUpdatePolicyReportedStateControl.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using Newtonsoft.Json.Linq;
16 | using System.Windows.Controls;
17 |
18 | namespace DMDashboard
19 | {
20 | public partial class WindowsUpdatePolicyReportedStateControl : DMSectionControl
21 | {
22 | public WindowsUpdatePolicyReportedStateControl()
23 | {
24 | InitializeComponent();
25 | }
26 |
27 | public override UIElementCollection PropertiesCollection
28 | {
29 | get
30 | {
31 | return PropertyList.Children;
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/IoTDMBackground/IoTDMBackground_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/IoTDMBackground/IoTDMBackground_TemporaryKey.pfx
--------------------------------------------------------------------------------
/samples/IoTDMBackground/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/IotDeviceManagementCapability.SCCD:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | xxxx
11 |
12 |
--------------------------------------------------------------------------------
/samples/ToasterApp/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/gear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/gear.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/hot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/hot.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Assets/toaster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/ToasterApp/Assets/toaster.png
--------------------------------------------------------------------------------
/samples/ToasterApp/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/ToasterApp/ToasterDeviceManagementRequestHandler.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System;
16 | using System.Threading.Tasks;
17 | using Windows.ApplicationModel;
18 |
19 | using Microsoft.Devices.Management;
20 |
21 | namespace Toaster
22 | {
23 | class ToasterDeviceManagementRequestHandler : IDeviceManagementRequestHandler
24 | {
25 | MainPage mainPage;
26 |
27 | public ToasterDeviceManagementRequestHandler(MainPage mainPage)
28 | {
29 | this.mainPage = mainPage;
30 | }
31 |
32 | // Answer the question "is it OK to reboot the toaster"
33 | async Task IDeviceManagementRequestHandler.IsSystemRebootAllowed()
34 | {
35 | bool answer = await this.mainPage.YesNo("Allow reboot?");
36 | return answer;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/samples/ToasterApp/UserDialog.xaml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/DHA/DHA-test/Extension.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using System.Collections.Generic;
17 | using System.Text;
18 | using System.Threading.Tasks;
19 | using Microsoft.Azure.Devices.Client;
20 |
21 | namespace DHA_test
22 | {
23 | static class Extension
24 | {
25 | public static Task SendMessageAsync(this DeviceClient deviceClient, string messageContent, IDictionary properties)
26 | {
27 | var message = new Microsoft.Azure.Devices.Client.Message(Encoding.UTF8.GetBytes(messageContent));
28 | foreach (var pair in properties)
29 | {
30 | message.Properties.Add(pair);
31 | }
32 | return deviceClient.SendEventAsync(message);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/DHA/DHA-test/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/DHA/DHA.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.25420.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{33AD0EE8-D99B-4E14-8CD9-3F56ABEF97A2}") = "DHA", "DHA\DHA.funproj", "{C1150040-E033-43B9-80FD-BE8B817567D1}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DHA-test", "DHA-test\DHA-test.csproj", "{518B8C67-1372-4040-BE37-BB975E4862E0}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {C1150040-E033-43B9-80FD-BE8B817567D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {C1150040-E033-43B9-80FD-BE8B817567D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {C1150040-E033-43B9-80FD-BE8B817567D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {C1150040-E033-43B9-80FD-BE8B817567D1}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {518B8C67-1372-4040-BE37-BB975E4862E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {518B8C67-1372-4040-BE37-BB975E4862E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {518B8C67-1372-4040-BE37-BB975E4862E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {518B8C67-1372-4040-BE37-BB975E4862E0}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/src/DHA/DHA/DHA.funproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 14.0
5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
6 |
7 |
8 |
9 |
10 |
11 | 2.0
12 | c1150040-e033-43b9-80fd-be8b817567d1
13 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
14 | Properties
15 | DHA
16 | DHA
17 | v4.5.2
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/DHA/DHA/DHAServiceBusQueueHandler/function.json:
--------------------------------------------------------------------------------
1 | {
2 | "disabled": false,
3 | "bindings": [
4 | {
5 | "name": "dhaMsg",
6 | "type": "serviceBusTrigger",
7 | "direction": "in",
8 | "queueName": "dha",
9 | "connection": "dha-servicebus",
10 | "accessRights": "Listen"
11 | },
12 | {
13 | "type": "table",
14 | "name": "nonceTable",
15 | "tableName": "nonceTable",
16 | "connection": "dha-storage",
17 | "direction": "out"
18 | },
19 | {
20 | "type": "table",
21 | "name": "dhaReportTable",
22 | "tableName": "dhaReportTable",
23 | "connection": "dha-storage",
24 | "direction": "out"
25 | }
26 | ]
27 | }
--------------------------------------------------------------------------------
/src/DHA/DHA/DHAServiceBusQueueHandler/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "frameworks": {
3 | "net46":{
4 | "dependencies": {
5 | "Microsoft.Azure.Devices": "1.2.4"
6 | }
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/DHA/DHA/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "IsEncrypted": false,
3 | "Values": {
4 | "AzureWebJobsStorage": "",
5 | "AzureWebJobsDashboard": "",
6 | "dha-servicebus": "",
7 | "dha-storage": "",
8 | "iothub-service": ""
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/DHA/DHA/host.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
--------------------------------------------------------------------------------
/src/DHA/Deployment Scripts/AzureServiceBusDeploy.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "serviceBusNamespaceName": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "Name of the Service Bus namespace"
9 | }
10 | },
11 | "serviceBusSku": {
12 | "type": "string",
13 | "allowedValues": [
14 | "Basic",
15 | "Standard",
16 | "Premium"
17 | ],
18 | "defaultValue": "Basic",
19 | "metadata": {
20 | "description": "The messaging tier for service Bus namespace"
21 | }
22 | },
23 | "serviceBusApiVersion": {
24 | "type": "string",
25 | "defaultValue": "2015-08-01",
26 | "metadata": {
27 | "description": "Service Bus ApiVersion used by the template"
28 | }
29 | }
30 | },
31 | "variables": {
32 | },
33 | "resources": [{
34 | "apiVersion": "[parameters('serviceBusApiVersion')]",
35 | "name": "[parameters('serviceBusNamespaceName')]",
36 | "type": "Microsoft.ServiceBus/Namespaces",
37 | "location": "[resourceGroup().location]",
38 | "kind": "Messaging",
39 | "sku": {
40 | "name": "[parameters('serviceBusSku')]",
41 | "tier": "[parameters('serviceBusSku')]"
42 | },
43 | "properties": {}
44 | }]
45 | }
46 |
--------------------------------------------------------------------------------
/src/DHA/Deployment Scripts/AzureServiceBusQueueDeploy.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "serviceBusNamespaceName": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "Name of the Service Bus Namespace"
9 | }
10 | },
11 | "serviceBusQueueName": {
12 | "type": "string",
13 | "metadata": {
14 | "description": "Name of the Service Bus Queue"
15 | }
16 | }
17 | },
18 | "variables": {
19 | "serviceBusQueueName": "[concat(parameters('serviceBusNamespaceName'), '/', parameters('serviceBusQueueName'))]",
20 | "serviceBusNamespaceName": "[parameters('serviceBusNamespaceName')]"
21 | },
22 | "resources": [
23 | {
24 | "type": "Microsoft.ServiceBus/namespaces/queues",
25 | "name": "[variables('serviceBusQueueName')]",
26 | "apiVersion": "2015-08-01",
27 | "location": "[resourceGroup().location]",
28 | "properties": {
29 | "path": "[parameters('serviceBusQueueName')]"
30 | }
31 | }
32 | ]
33 | }
34 |
--------------------------------------------------------------------------------
/src/DHA/Deployment Scripts/AzureStorageDeploy.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "storageAccountName": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The name of the storage account that you wish to create."
9 | }
10 | },
11 | "storageAccountType": {
12 | "type": "string",
13 | "defaultValue": "Standard_LRS",
14 | "allowedValues": [
15 | "Standard_LRS",
16 | "Standard_GRS",
17 | "Standard_ZRS",
18 | "Premium_LRS"
19 | ],
20 | "metadata": {
21 | "description": "Storage Account type"
22 | }
23 | }
24 | },
25 | "variables": {
26 | "storageAccountName": "[parameters('storageAccountName')]"
27 | },
28 | "resources": [
29 | {
30 | "type": "Microsoft.Storage/storageAccounts",
31 | "name": "[variables('storageAccountName')]",
32 | "apiVersion": "2016-01-01",
33 | "location": "[resourceGroup().location]",
34 | "sku": {
35 | "name": "[parameters('storageAccountType')]"
36 | },
37 | "kind": "Storage",
38 | "properties": {
39 | }
40 | }
41 | ]
42 | }
43 |
--------------------------------------------------------------------------------
/src/DMDataContract/DMDataContract/ClearReportedProperties.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using Newtonsoft.Json.Linq;
17 |
18 | namespace Microsoft.Devices.Management.DMDataContract
19 | {
20 | public class ClearReportedPropertiesContract
21 | {
22 | public static readonly string SectionName = "clearReportedProperties";
23 | public static readonly string clearReportedPropertiesAsync = DMJSonConstants.DTWindowsIoTNameSpace + ".clearReportedPropertiesAsync";
24 | }
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/DMDataContract/DMDataContract/FactoryReset.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using Newtonsoft.Json;
17 |
18 | namespace Microsoft.Devices.Management.DMDataContract
19 | {
20 | public class FactoryResetDataContract
21 | {
22 | public static readonly string SectionName = "factoryReset";
23 | public static readonly string StartFactoryResetAsync = DMJSonConstants.DTWindowsIoTNameSpace + ".startFactoryResetAsync";
24 |
25 | public class ResetParams
26 | {
27 | public bool clearTPM;
28 | public string recoveryPartitionGUID;
29 |
30 | public string ToJsonString()
31 | {
32 | return JsonConvert.SerializeObject(this);
33 | }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/DMDataContract/DMDataContract/Policy.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using Newtonsoft.Json.Linq;
17 | using System.Text;
18 |
19 | namespace Microsoft.Devices.Management.DMDataContract
20 | {
21 | public class PolicyDataContract
22 | {
23 | public const string JsonLocal = "local";
24 | public const string JsonRemote = "remote";
25 | public const string JsonUnknown = "unknown";
26 | }
27 | }
--------------------------------------------------------------------------------
/src/DMDataContract/DMDataContract/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/DMMessage/CurrentVersion.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 |
19 | namespace Microsoft { namespace Devices { namespace Management { namespace Message
20 | {
21 | static constexpr uint32_t CurrentVersion = 1;
22 | }}}}
23 |
--------------------------------------------------------------------------------
/src/DMMessage/DMGarbageCollectorTempFolder.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #define IOTDM_RELATIVE_PATH L"\\IotDm\\"
18 | #define LOGFILE_EXT L".etl"
19 | #define HOURS_UNTIL_GC 24
20 |
--------------------------------------------------------------------------------
/src/DMMessage/DMMessage.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #include "stdafx.h"
16 | #include "IRequestIResponse.h"
17 | #include "Models\AllModels.h"
18 |
19 | // TODO: do we need this file?
20 |
--------------------------------------------------------------------------------
/src/DMMessage/DMMessageException.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | namespace Microsoft { namespace Devices { namespace Management { namespace Message
18 | {
19 | public ref class MessageException : Platform::Exception {};
20 | }}}}
21 |
--------------------------------------------------------------------------------
/src/DMMessage/DMMessageHelper.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #include "stdafx.h"
16 | #include "CurrentVersion.h"
17 |
18 | #include "Models\AllModels.h"
19 |
20 | using namespace Microsoft::Devices::Management::Message;
21 |
22 | #define MODEL_NODEF(A, B, C, D)
23 | #define MODEL_REQDEF(A, B, C, D) DMMessageKind C##::Tag::get() { return DMMessageKind::##A; }
24 | #define MODEL_ALLDEF(A, B, C, D) MODEL_REQDEF(A, B, C, D) DMMessageKind D##::Tag::get() { return DMMessageKind::##A; }
25 | #define MODEL_TAGONLY(A, B, C, D)
26 | #include "Models\ModelsInfo.dat"
27 | #undef MODEL_NODEF
28 | #undef MODEL_REQDEF
29 | #undef MODEL_ALLDEF
30 | #undef MODEL_TAGONLY
31 |
--------------------------------------------------------------------------------
/src/DMMessage/DMMessageKind.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 |
18 | using namespace Platform;
19 | using namespace Platform::Metadata;
20 | using namespace Windows::Data::Json;
21 |
22 | namespace Microsoft { namespace Devices { namespace Management { namespace Message
23 | {
24 | [Flags]
25 | public enum class DMMessageKind : uint32_t
26 | {
27 | #define MODEL_NODEF(A, B, C, D) A = B,
28 | #define MODEL_REQDEF(A, B, C, D) MODEL_NODEF(A, B, C, D)
29 | #define MODEL_ALLDEF(A, B, C, D) MODEL_NODEF(A, B, C, D)
30 | #define MODEL_TAGONLY(A, B, C, D) MODEL_NODEF(A, B, C, D)
31 | #include "Models\ModelsInfo.dat"
32 | #undef MODEL_NODEF
33 | #undef MODEL_REQDEF
34 | #undef MODEL_ALLDEF
35 | #undef MODEL_TAGONLY
36 | };
37 | }}}}
38 |
--------------------------------------------------------------------------------
/src/DMMessage/IRequestIResponse.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include "DMMessageKind.h"
18 | #include "ResponseStatus.h"
19 |
20 | using namespace Platform;
21 | using namespace Windows::Data::Json;
22 |
23 | namespace Microsoft { namespace Devices { namespace Management { namespace Message
24 | {
25 | ref class Blob;
26 |
27 | public interface class IDataPayload
28 | {
29 | Blob^ Serialize();
30 | property DMMessageKind Tag { DMMessageKind get(); }
31 | };
32 |
33 | public interface class IRequest : public IDataPayload
34 | {
35 | };
36 |
37 | public interface class IResponse : public IDataPayload
38 | {
39 | property ResponseStatus Status { ResponseStatus get(); }
40 | };
41 |
42 | }}}}
43 |
--------------------------------------------------------------------------------
/src/DMMessage/stdafx.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #include "stdafx.h"
16 |
--------------------------------------------------------------------------------
/src/DMMessage/stdafx.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 | #include
19 | #include
20 | #include
--------------------------------------------------------------------------------
/src/DMShared/DMShared.vcxitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | {65CF34F0-6724-4C05-A90B-D0143772B0CC}
7 |
8 |
9 |
10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | /bigobj %(AdditionalOptions)
19 |
20 |
21 |
22 | /bigobj %(AdditionalOptions)
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/DMShared/DMShared.vcxitems.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {5e5067ba-c539-49d4-b283-75942f0fec92}
11 |
12 |
13 | {3b7645c8-0e97-4060-8c6c-02944b8df0d7}
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/DMShared/ErrorCodes.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | // Generic errors 0xA0008000 - 0xA00080FF
18 | #define ERROR_DM_INVALID_POLICY_SOURCE 0xA0008000
19 |
20 | // Windows Telemetry 0xA0008100 - 0xA00081FF
21 | #define ERROR_DM_WINDOWS_TELEMETRY_INVALID_LEVEL 0xA0008100
22 | #define ERROR_DM_WINDOWS_TELEMETRY_MISSING_LEVEL 0xA0008101
23 |
24 | // Windows Time Service 0xA0008200 - 0xA00082FF
25 | #define ERROR_DM_TIME_SERVICE_MISSING_POLICY 0xA000200
26 |
27 | // Windows Update Policy 0xA0008300 - 0xA00083FF
28 | #define ERROR_DM_WINDOWS_UPDATE_POLICY_MISSING_POLICY 0xA000200
29 | #define ERROR_DM_WINDOWS_UPDATE_POLICY_RING_NOT_SUPPORTED 0xA000201
30 |
--------------------------------------------------------------------------------
/src/DMTpm/DMTpm.vcxitems:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 | true
6 | {0ED4709A-5A05-4540-8E56-B63C91AABBE8}
7 |
8 |
9 |
10 | %(AdditionalIncludeDirectories);$(MSBuildThisFileDirectory)
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/DMTpm/TpmSupport.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 |
19 | class Tpm
20 | {
21 | public:
22 | static std::string GetEndorsementKey();
23 | static std::string GetSRootKey();
24 | static void DestroyServiceUrl(int logicalId);
25 | static void StoreServiceUrl(int logicalId, const std::string& url);
26 | static void ImportSymetricIdentity(int logicalId, const std::string& hostageFile);
27 | static void EvictHmacKey(int logicalId);
28 | static std::string GetServiceUrl(int logicalId);
29 | static std::string GetSASToken(int logicalId, unsigned int durationInSeconds);
30 | static void ClearTPM();
31 | private:
32 | static std::string Tpm::RunLimpet(const std::wstring& params);
33 | };
34 |
--------------------------------------------------------------------------------
/src/IoTDMClientLib/Interfaces/IDeviceManagementRequestHandler.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System.Threading.Tasks;
16 |
17 | namespace Microsoft.Devices.Management
18 | {
19 | // DM Client talks to the App via this interface. The App implements the interface
20 | public interface IDeviceManagementRequestHandler
21 | {
22 | Task IsSystemRebootAllowed();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/IoTDMClientLib/Interfaces/ISystemConfiguratorProxy.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | using System;
16 | using System.Collections.Generic;
17 | using System.Linq;
18 | using System.Text;
19 | using System.Threading.Tasks;
20 |
21 | namespace Microsoft.Devices.Management
22 | {
23 | internal interface ISystemConfiguratorProxy
24 | {
25 | Task SendCommandAsync(Message.IRequest command);
26 | Message.IResponse SendCommand(Message.IRequest command);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/IoTDMClientLib/Properties/IoTDMClient.rd.xml:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/IoTDMClientLib/include/dm_request.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 |
19 | enum class dm_command
20 | {
21 | unknown = 0,
22 | system_reset = 1,
23 | check_updates = 2,
24 | command_x,
25 | command_y,
26 | command_z
27 | };
28 |
29 | #pragma pack(push)
30 | #pragma pack(1)
31 | struct dm_request
32 | {
33 | dm_command command;
34 | char data[64];
35 | };
36 |
37 | struct dm_response
38 | {
39 | uint32_t status;
40 | char data[64];
41 | wchar_t message[256];
42 | };
43 | #pragma pack(pop)
44 |
--------------------------------------------------------------------------------
/src/SharedUtilities/AutoCloseHandle.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | #include
19 | #include
20 | #include "AutoCloseBase.h"
21 |
22 | namespace Utils
23 | {
24 | class AutoCloseHandle : public AutoCloseBase
25 | {
26 | public:
27 | AutoCloseHandle() :
28 | AutoCloseBase(NULL, [](HANDLE h) { CloseHandle(h); return TRUE; })
29 | {}
30 |
31 | AutoCloseHandle(HANDLE&& handle) :
32 | AutoCloseBase(std::move(handle), [](HANDLE h) { CloseHandle(h); return TRUE; })
33 | {}
34 |
35 | private:
36 | AutoCloseHandle(const AutoCloseHandle &); // prevent copy
37 | AutoCloseHandle& operator=(const AutoCloseHandle&); // prevent assignment
38 | };
39 | }
--------------------------------------------------------------------------------
/src/SharedUtilities/DMException.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #include "stdafx.h"
16 | #include
17 | #include "DMException.h"
18 |
19 |
--------------------------------------------------------------------------------
/src/SharedUtilities/DMRequest.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | const int PipeBufferSize = 4096;
23 | const int DataSizeInBytes = 128;
24 |
25 | __declspec(selectany) const wchar_t* PipeName = L"\\\\.\\pipe\\dm-client-pipe";
26 |
--------------------------------------------------------------------------------
/src/SharedUtilities/ETWLogger.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | #include
19 |
20 | namespace Utils
21 | {
22 | class ETWLogger
23 | {
24 | public:
25 | enum LoggingLevel
26 | {
27 | Verbose = 0,
28 | Information = 1,
29 | Warning = 2,
30 | Error = 3,
31 | Critical = 4
32 | };
33 |
34 | ETWLogger();
35 | ~ETWLogger();
36 | void Log(const std::wstring& msg, LoggingLevel level);
37 | void Log(const std::string& msg, LoggingLevel level);
38 |
39 | private:
40 | std::wstring GetExeFileName();
41 |
42 | std::wstring _exeFileName;
43 | };
44 | }
--------------------------------------------------------------------------------
/src/SharedUtilities/Impersonator.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | class Impersonator
19 | {
20 | public:
21 | Impersonator();
22 | ~Impersonator();
23 | bool ImpersonateShellHost();
24 | HANDLE SIHostToken() { return _hToken; }
25 |
26 | private:
27 | void Close();
28 |
29 | HANDLE _snapshot;
30 | HANDLE _hProcess;
31 | HANDLE _hToken;
32 | };
--------------------------------------------------------------------------------
/src/SharedUtilities/Permissions/PermissionsManager.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 | #include
17 | #include
18 | #include
19 |
20 | class PermissionsManager
21 | {
22 | public:
23 | static void ModifyProtected(const std::wstring& objectName, SE_OBJECT_TYPE objType, const std::function& Action);
24 | private:
25 | static HANDLE OpenProcessToken(DWORD desiredAccess);
26 | };
--------------------------------------------------------------------------------
/src/SharedUtilities/PolicyHelper.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | #include
19 | #include "../DMMessage/Models/Policy.h"
20 |
21 |
22 | namespace Utils
23 | {
24 | class PolicyHelper
25 | {
26 | public:
27 |
28 | static std::wstring PolicyToRegString(
29 | Microsoft::Devices::Management::Message::PolicySource source);
30 |
31 | static Microsoft::Devices::Management::Message::PolicySource RegStringToPolicy(
32 | const std::wstring& source);
33 |
34 | static void SaveToRegistry(
35 | Microsoft::Devices::Management::Message::Policy^ policy, const std::wstring& regSectionRoot);
36 |
37 | static Microsoft::Devices::Management::Message::Policy^ LoadFromRegistry(
38 | const std::wstring& regSectionRoot);
39 | };
40 | }
--------------------------------------------------------------------------------
/src/SharedUtilities/SecurityAttributes.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include "DMException.h"
18 | #include
19 |
20 | #if 0
21 | class SecurityAttributes
22 | {
23 | public:
24 | SecurityAttributes(DWORD permissions);
25 | ~SecurityAttributes();
26 | LPSECURITY_ATTRIBUTES GetSA();
27 |
28 | private:
29 | SECURITY_ATTRIBUTES _securityAttributes;
30 | PSID _everyoneSID;
31 | PACL _ACL;
32 | PSECURITY_DESCRIPTOR _SD;
33 | };
34 |
35 | #endif
--------------------------------------------------------------------------------
/src/SystemConfigurator/CSPs/CertificateManagement.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | class CertificateManagement
18 | {
19 | public:
20 | static void SyncCertificates(const std::wstring& path, const std::wstring& desiredCertificateFiles);
21 | };
22 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/CSPs/CustomDeviceUiCsp.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 | #include
19 |
20 | class CustomDeviceUiCSP
21 | {
22 | public:
23 | static bool IsCustomUISupported();
24 | static std::wstring GetStartupAppId();
25 | static std::wstring GetBackgroundTasksToLaunch();
26 | static bool IsForeground(const std::wstring& appId);
27 | static bool IsBackground(const std::wstring& appId);
28 | static void AddAsStartupApp(const std::wstring& appId, bool backgroundApplication);
29 | static void RemoveBackgroundApplicationAsStartupApp(const std::wstring& appId);
30 | };
31 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/CSPs/DeviceHealthAttestationCSP.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 | #include
17 | #include
18 |
19 | class DeviceHealthAttestationCSP
20 | {
21 |
22 | public:
23 | static void ExecVerifyHealth();
24 |
25 | static uint32_t GetStatus();
26 |
27 | static void SetForceRetrieve(bool value);
28 |
29 | static std::wstring GetCertificate();
30 |
31 | // The nonce is in hex format, with a minimum size of 8 bytes, and a maximum size of 32 bytes.
32 | static std::wstring GetNonce();
33 | static void SetNonce(const std::wstring& nonce);
34 |
35 | static std::wstring GetCorrelationId();
36 |
37 | static std::wstring GetHASEndpoint();
38 | static void SetHASEndpoint(const std::wstring&);
39 |
40 | static int GetTpmReadyStatus();
41 | };
42 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/CSPs/DiagnosticLogCSP.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | #include "Models\AllModels.h"
19 |
20 | class DiagnosticLogCSP
21 | {
22 | public:
23 | static Microsoft::Devices::Management::Message::IResponse^
24 | HandleGetEventTracingConfiguration(Microsoft::Devices::Management::Message::IRequest^ request);
25 |
26 | static Microsoft::Devices::Management::Message::IResponse^
27 | HandleSetEventTracingConfiguration(Microsoft::Devices::Management::Message::IRequest^ request);
28 | private:
29 | static std::wstring GetFormattedTime();
30 | static void CreateEtlFile(Microsoft::Devices::Management::Message::CollectorDesiredConfiguration^ collector);
31 | static void ApplyCollectorConfiguration(const std::wstring& cspRoot, Microsoft::Devices::Management::Message::CollectorDesiredConfiguration^ collector);
32 | };
--------------------------------------------------------------------------------
/src/SystemConfigurator/CSPs/PrivateAPIs/WinSDKRS2.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 |
19 | STDAPI
20 | RegisterDeviceWithLocalManagement(
21 | _Out_opt_ BOOL* alreadyRegistered);
22 |
23 | STDAPI
24 | ApplyLocalManagementSyncML(
25 | _In_ PCWSTR syncMLRequest,
26 | _Outptr_opt_result_maybenull_ PWSTR* syncMLResult
27 | );
28 |
29 | STDAPI
30 | UnregisterDeviceWithLocalManagement();
31 |
32 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/CSPs/RebootCSP.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 | #include
17 |
18 | class RebootCSP
19 | {
20 |
21 | public:
22 | RebootCSP();
23 |
24 | static void ExecRebootNow(const std::wstring& lastRebootCmdTime);
25 |
26 | static std::wstring GetSingleScheduleTime();
27 | static void SetSingleScheduleTime(const std::wstring& dailyScheduleTime);
28 |
29 | static std::wstring GetDailyScheduleTime();
30 | static void SetDailyScheduleTime(const std::wstring& dailyScheduleTime);
31 |
32 | static std::wstring GetLastRebootCmdTime();
33 | static std::wstring GetLastRebootTime();
34 |
35 | private:
36 | static std::wstring _lastRebootTime;
37 | };
38 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/CommandProcessor.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | void Listen();
18 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/DMStorage.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | #include "Models\AllModels.h"
19 |
20 | class DMStorage
21 | {
22 | public:
23 | static Microsoft::Devices::Management::Message::IResponse^
24 | HandleGetDMFolders(Microsoft::Devices::Management::Message::IRequest^ request);
25 |
26 | static Microsoft::Devices::Management::Message::IResponse^
27 | HandleGetDMFiles(Microsoft::Devices::Management::Message::IRequest^ request);
28 |
29 | static Microsoft::Devices::Management::Message::IResponse^
30 | HandleDeleteDMFile(Microsoft::Devices::Management::Message::IRequest^ request);
31 | };
--------------------------------------------------------------------------------
/src/SystemConfigurator/Resource.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/src/SystemConfigurator/Resource.rc
--------------------------------------------------------------------------------
/src/SystemConfigurator/ServiceManager.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 | #include
19 |
20 | class ServiceManager
21 | {
22 | public:
23 | static DWORD GetStatus(const std::wstring& serviceName);
24 | static DWORD GetStartType(const std::wstring& serviceName);
25 |
26 | static void Start(const std::wstring& serviceName);
27 | static void Stop(const std::wstring& serviceName);
28 | static void SetStartType(const std::wstring& serviceName, DWORD startType);
29 |
30 | static void WaitStatus(const std::wstring& serviceName, DWORD status, unsigned int maxWaitInSeconds);
31 | private:
32 | static void StartStop(const std::wstring& serviceName, bool start);
33 | };
34 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/SystemConfiguratorProxyServer/SystemConfiguratorProxy.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 |
17 | // Create a rpc server endpoint and listen to incoming rpc calls
18 | DWORD SystemConfiguratorProxyStart();
19 |
20 | // Signal the rpc server to stop listening to incoming rpc calls
21 | void SystemConfiguratorProxyDisconnect();
22 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/TaskQueue.cpp:
--------------------------------------------------------------------------------
1 | #include "stdafx.h"
2 | #include "TaskQueue.h"
3 | #include "../SharedUtilities/Logger.h"
4 | #include "../SharedUtilities/DMException.h"
5 |
6 | using namespace std;
7 |
8 | TaskQueue::TaskQueue()
9 | {
10 | }
11 |
12 | future TaskQueue::Enqueue(Task task)
13 | {
14 | TRACE(__FUNCTION__);
15 |
16 | future response = task.get_future();
17 |
18 | unique_lock l(_mutex);
19 | _queue.push(move(task));
20 | l.unlock();
21 |
22 | _cv.notify_one();
23 |
24 | return response;
25 | }
26 |
27 | TaskQueue::Task TaskQueue::Dequeue()
28 | {
29 | TRACE(__FUNCTION__);
30 |
31 | unique_lock l(_mutex);
32 | _cv.wait(l, [&] { return !_queue.empty(); });
33 |
34 | Task taskItem = move(_queue.front());
35 | _queue.pop();
36 |
37 | return taskItem;
38 | }
39 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/TaskQueue.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 |
10 | class TaskQueue
11 | {
12 | public:
13 | typedef std::packaged_task Task;
14 |
15 | TaskQueue();
16 |
17 | std::future Enqueue(Task task);
18 | Task Dequeue();
19 |
20 | private:
21 | std::queue _queue;
22 |
23 | std::mutex _mutex;
24 | std::condition_variable _cv;
25 | };
--------------------------------------------------------------------------------
/src/SystemConfigurator/TimeCfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | #include
19 | #include
20 | #include "Models\TimeInfo.h"
21 |
22 | class TimeCfg
23 | {
24 | struct TimeInfo
25 | {
26 | std::wstring localTime;
27 | std::wstring ntpServer;
28 | DYNAMIC_TIME_ZONE_INFORMATION dynamicTimeZoneInformation;
29 | };
30 |
31 | public:
32 | static Microsoft::Devices::Management::Message::GetTimeInfoResponse^ Get();
33 | static void Set(Microsoft::Devices::Management::Message::SetTimeInfoRequest^ request);
34 |
35 | private:
36 | static void Get(TimeInfo& info);
37 | static void SetNtpServer(const std::wstring& ntpServer);
38 | };
39 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/TimeService.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | #pragma once
17 |
18 | #include
19 | #include
20 | #include "Models\TimeInfo.h"
21 | #include "Models\TimeService.h"
22 |
23 | class TimeService
24 | {
25 | public:
26 | static Microsoft::Devices::Management::Message::TimeServiceData^ GetState();
27 | static void SetState(Microsoft::Devices::Management::Message::TimeServiceData^ request);
28 |
29 | private:
30 | static void SaveState(Microsoft::Devices::Management::Message::TimeServiceData^ data);
31 | static Microsoft::Devices::Management::Message::TimeServiceData^ GetActiveDesiredState();
32 | };
33 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/WindowsTelemetry.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 | #include
17 | #include "../DMMessage/Models/WindowsTelemetry.h"
18 |
19 | class WindowsTelemetry
20 | {
21 |
22 | public:
23 | static Microsoft::Devices::Management::Message::GetWindowsTelemetryResponse^ Get();
24 | static void Set(Microsoft::Devices::Management::Message::SetWindowsTelemetryRequest^ request);
25 |
26 | private:
27 | static std::wstring LevelToString(unsigned long level);
28 | static unsigned long StringToLevel(const std::wstring& levelString);
29 | };
--------------------------------------------------------------------------------
/src/SystemConfigurator/stdafx.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | // stdafx.cpp : source file that includes just the standard includes
16 | // SystemConfigurator.pch will be the pre-compiled header
17 | // stdafx.obj will contain the pre-compiled type information
18 |
19 | #include "stdafx.h"
20 |
21 | // TODO: reference any additional headers you need in STDAFX.H
22 | // and not in this file
23 |
--------------------------------------------------------------------------------
/src/SystemConfigurator/stdafx.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | // stdafx.h : include file for standard system include files,
16 | // or project specific include files that are used frequently, but
17 | // are changed infrequently
18 | //
19 |
20 | #pragma once
21 |
22 | #include "targetver.h"
23 |
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
--------------------------------------------------------------------------------
/src/SystemConfigurator/targetver.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | // Including SDKDDKVer.h defines the highest available Windows platform.
18 |
19 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
20 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
21 |
22 | #include
23 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Client/SCProxyClient.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | //
17 | // RpcClient.h
18 | //
19 |
20 | #pragma once
21 |
22 | #define RPC_STATIC_ENDPOINT L"IotDmRpcEndpoint"
23 | #define RPC_PROTOCOL L"ncalrpc"
24 |
25 | #include "SystemConfiguratorProxy_h.h"
26 |
27 | using namespace Microsoft::Devices::Management::Message;
28 |
29 | namespace SystemConfiguratorProxyClient
30 | {
31 | ///
32 | /// Client side RPC implementation
33 | ///
34 | public ref class SCProxyClient sealed
35 | {
36 | public:
37 | virtual ~SCProxyClient();
38 |
39 | Windows::Foundation::IAsyncOperation^ SendCommandAsync(IRequest^ command);
40 | IResponse^ SendCommand(IRequest^ command);
41 |
42 | __int64 Initialize();
43 |
44 | private:
45 | handle_t hRpcBinding;
46 | };
47 | }
48 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Client/ServiceConfiguratorProxyClientLib.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 81d95eea-286c-4a5e-98f1-eef612020bf0
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Client/ServiceConfiguratorProxyInterface.c:
--------------------------------------------------------------------------------
1 | // RpcInterface_c.c expects _ARM_ to be set when building for ARM.
2 | #ifdef _M_ARM
3 | #define _ARM_ 1
4 | #endif
5 |
6 | #include "SystemConfiguratorProxy_c.c"
7 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Client/SystemConfiguratorProxyInterface.c:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | // RpcInterface_c.c expects _ARM_ to be set when building for ARM.
17 | #ifdef _M_ARM
18 | #define _ARM_ 1
19 | #endif
20 |
21 | #include "SystemConfiguratorProxy_c.c"
22 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Client/pch.cpp:
--------------------------------------------------------------------------------
1 | //*********************************************************
2 | //
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // This code is licensed under the MIT License (MIT).
5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 | //
10 | //*********************************************************
11 |
12 | //
13 | // pch.cpp
14 | // Include the standard header and generate the precompiled header.
15 | //
16 |
17 | #include "pch.h"
18 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Client/pch.h:
--------------------------------------------------------------------------------
1 | //*********************************************************
2 | //
3 | // Copyright (c) Microsoft. All rights reserved.
4 | // This code is licensed under the MIT License (MIT).
5 | // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
6 | // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
7 | // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
8 | // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
9 | //
10 | //*********************************************************
11 |
12 | //
13 | // pch.h
14 | // Header for standard system include files.
15 | //
16 |
17 | #pragma once
18 |
19 | #include
20 | #include
21 |
22 | byte* GetArrayFromBuffer(Windows::Storage::Streams::IBuffer^ buffer);
23 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Interface/SystemConfiguratorProxy.Idl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | //import "inspectable.idl";
17 | //import "Windows.Foundation.idl";
18 |
19 | import "oaidl.idl";
20 | import "unknwn.idl";
21 |
22 | #define COMPONENT_VERSION 1.0
23 |
24 |
25 | [
26 | uuid (35C574E4-ACED-4ADB-A040-0BE1AF72B7B3),
27 | version(1.0),
28 | pointer_default(unique),
29 | ]
30 | interface SystemConfiguratorProxyInterface
31 | {
32 | //
33 | // Rpc method to send request to DM service
34 | //
35 | HRESULT SendRequest([in] UINT32 requestType, [in] BSTR request, [out] UINT32* responseType, [out] BSTR* response);
36 | }
37 |
--------------------------------------------------------------------------------
/src/SystemConfiguratorProxy/Interface/SystemConfiguratorProxyInterface.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Source Files
20 |
21 |
22 |
--------------------------------------------------------------------------------
/tests/CSPTests/CertificateManagementTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 | #include
19 |
20 | class CertificateManagementTest
21 | {
22 | public:
23 | static bool RunTest();
24 |
25 | private:
26 | static void AddCertificate(const std::wstring& cspPath);
27 | static void DeleteCertificate(const std::wstring& cspPath);
28 | static void ListCertificates(const std::wstring& cspPath, std::vector& hashesVector);
29 | static bool IsCertificatePresent(const std::wstring& cspPath);
30 | };
31 |
--------------------------------------------------------------------------------
/tests/CSPTests/DeviceHealthAttestationTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 |
19 | class DeviceHealthAttestationTest
20 | {
21 | public:
22 | static bool RunTest();
23 |
24 | private:
25 | static void GetSetHasEndpointTest(const std::wstring& endpointValue);
26 | static void GetSetNonceTest(const std::wstring& nonceValue);
27 | static void SetForceRetrieveTest();
28 |
29 | static void GetCorrelationIdTest();
30 | static void GetStatusTest();
31 | };
32 |
--------------------------------------------------------------------------------
/tests/CSPTests/WifiManagementTest.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | #include
18 | #include
19 |
20 | class WifiManagementTest
21 | {
22 | public:
23 | static bool RunTest();
24 |
25 | private:
26 | static void AddWifiProfile();
27 | static void DeleteWifiProfile();
28 | static std::vector GetProfiles();
29 | static std::wstring GetProfileDetails();
30 | };
31 |
--------------------------------------------------------------------------------
/tests/CSPTests/stdafx.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | // stdafx.cpp : source file that includes just the standard includes
16 | // CSPTests.pch will be the pre-compiled header
17 | // stdafx.obj will contain the pre-compiled type information
18 |
19 | #include "stdafx.h"
20 |
21 | // TODO: reference any additional headers you need in STDAFX.H
22 | // and not in this file
23 |
--------------------------------------------------------------------------------
/tests/CSPTests/stdafx.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | // stdafx.h : include file for standard system include files,
16 | // or project specific include files that are used frequently, but
17 | // are changed infrequently
18 | //
19 |
20 | #pragma once
21 |
22 | #include "targetver.h"
23 |
24 | #include
25 | #include
--------------------------------------------------------------------------------
/tests/CSPTests/targetver.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2017 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 | #pragma once
16 |
17 | // Including SDKDDKVer.h defines the highest available Windows platform.
18 |
19 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
20 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
21 |
22 | #include
23 |
--------------------------------------------------------------------------------
/tests/DMValidator/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/DMValidator/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
10 |
14 |
18 |
22 |
26 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/tests/DMValidator/App.xaml.cs:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2018 Microsoft
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
4 | and associated documentation files (the "Software"), to deal in the Software without restriction,
5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
7 | subject to the following conditions:
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 | */
15 |
16 | using System.Windows;
17 |
18 | namespace DMValidator
19 | {
20 | ///
21 | /// Interaction logic for App.xaml
22 | ///
23 | public partial class App : Application
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tests/DMValidator/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace DMValidator.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/tests/DMValidator/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/tests/DMValidator/TestCases/RebootCmd/RebootCmd.00.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenario": [
3 | {
4 | "name": "00",
5 | "type": "directMethod",
6 | "directMethodName": "windows.rebootAsync",
7 | "description": "our reboot cmd 01 test case!",
8 | "input": {},
9 | "output": {
10 | "deviceTwin": {
11 | "present": {
12 | "properties": {
13 | "reported": {
14 | "windows": {
15 | "rebootCmd": {
16 | "lastChange": {
17 | "time": "",
18 | "state": "completed"
19 | },
20 | "response": "scheduled"
21 | }
22 | }
23 | }
24 | }
25 | }
26 | },
27 | "returnJson": {
28 | "lastChange": {
29 | "time": "",
30 | "state": "pending"
31 | }
32 | },
33 | "returnCode": 0,
34 | "delay": 20
35 | }
36 | }
37 | ]
38 | }
--------------------------------------------------------------------------------
/tests/DMValidator/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/tests/E2ETestApp/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/E2ETestApp/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/E2ETestApp/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/tests/E2ETestApp/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/E2ETestApp/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/tests/E2ETestApp/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/E2ETestApp/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/tests/E2ETestApp/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/E2ETestApp/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/tests/E2ETestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/E2ETestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/tests/E2ETestApp/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/E2ETestApp/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/tests/E2ETestApp/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/E2ETestApp/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/tests/E2ETestApp/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | E2ETestApp
7 | gmileka
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/tests/E2ETestApp/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("E2ETestApp")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("E2ETestApp")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/tests/E2ETestApp/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/tests/E2ETestApp/TestCases/RebootCmd/RebootCmd.00.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenario": [
3 | {
4 | "name": "00",
5 | "type": "directMethod",
6 | "directMethodName": "windows.rebootAsync",
7 | "description": "our reboot cmd 01 test case!",
8 | "input": {},
9 | "output": {
10 | "deviceTwin": {
11 | "present": {
12 | "properties": {
13 | "reported": {
14 | "windows": {
15 | "rebootCmd": {
16 | "lastChange": {
17 | "time": "",
18 | "state": "completed"
19 | },
20 | "response": "scheduled"
21 | }
22 | }
23 | }
24 | }
25 | }
26 | },
27 | "returnJson": {
28 | "lastChange": {
29 | "time": "",
30 | "state": "pending"
31 | }
32 | },
33 | "returnCode": 0
34 | }
35 | }
36 | ]
37 | }
--------------------------------------------------------------------------------
/tests/E2ETestApp/TestCases/WiFi/WiFi.00.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenario": [
3 | {
4 | "name": "00",
5 | "type": "deviceTwin",
6 | "description": "install our first wifi profile!",
7 | "input": {
8 | "properties": {
9 | "desired": {
10 | "windows": {
11 | "externalStorage": {
12 | "connectionString": ""
13 | },
14 | "wifi": {
15 | "applyProperties": {
16 | "WPA2PersonalWifiTest": {
17 | "profile": "wifi\\WPA2PersonalWifiTest.xml"
18 | }
19 | },
20 | "reportProperties": "yes"
21 | }
22 | }
23 | }
24 | }
25 | },
26 | "output": {
27 | "present": {
28 | "properties": {
29 | "reported": {
30 | "windows": {
31 | "externalStorage": {
32 | "lastChange": {
33 | "time": "",
34 | "state": "completed"
35 | },
36 | "connectionString": ""
37 | },
38 | "wifi": {
39 | "lastChange": {
40 | "time": "",
41 | "state": "completed"
42 | },
43 | "WPA2PersonalWifiTest": ""
44 | }
45 | }
46 | }
47 | }
48 | }
49 | }
50 | }
51 | ]
52 | }
53 |
--------------------------------------------------------------------------------
/tests/E2ETestApp/TestCases/WindowsTelemetry/WindowsTelemetry.00.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenario": [
3 | {
4 | "name": "00",
5 | "type": "deviceTwin",
6 | "description": "set Windows telemetry level",
7 | "input": {
8 | "properties": {
9 | "desired": {
10 | "windows": {
11 | "windowsTelemetry": {
12 | "level": "security"
13 | }
14 | }
15 | }
16 | }
17 | },
18 | "output": {
19 | "present": {
20 | "properties": {
21 | "reported": {
22 | "windows": {
23 | "windowsTelemetry": {
24 | "lastChange": {
25 | "time": "",
26 | "state": "completed"
27 | },
28 | "level": "security"
29 | }
30 | }
31 | }
32 | }
33 | }
34 | }
35 | }
36 | ]
37 | }
38 |
--------------------------------------------------------------------------------
/tests/E2ETestApp/TestCases/WindowsUpdates/WindowsUpdates.00.json:
--------------------------------------------------------------------------------
1 | {
2 | "scenario": [
3 | {
4 | "name": "00",
5 | "type": "deviceTwin",
6 | "description": "our windows update test case!",
7 | "input": {
8 | "properties": {
9 | "desired": {
10 | "windows": {
11 | "windowsUpdates": {
12 | "approved": "C7864ECB-F0D8-4FD7-97F6-6CFF8EA27F33"
13 | }
14 | }
15 | }
16 | }
17 | },
18 | "output": {
19 | "present": {
20 | "properties": {
21 | "reported": {
22 | "windows": {
23 | "windowsUpdates": {
24 | "lastChange": {
25 | "time": "",
26 | "state": "completed"
27 | },
28 | "approved": "c7864ecb-f0d8-4fd7-97f6-6cff8ea27f33",
29 | "installed": "",
30 | "failed": "",
31 | "installable": "",
32 | "pendingReboot": "",
33 | "lastScanTime": "",
34 | "deferUpgrade": false
35 | }
36 | }
37 | }
38 | }
39 | }
40 | }
41 | }
42 | ]
43 | }
44 |
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/IoTDMClientLibTests_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/tests/IoTDMClientLibTests/IoTDMClientLibTests_TemporaryKey.pfx
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/Properties/UnitTestApp.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/tests/IoTDMClientLibTests/UnitTestApp.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/IoTHubManager/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/tests/IoTHubManager/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------