public WindowsUpdatesHandler( IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = callback; }
public CertificateHandler( IClientHandlerCallBack deviceManagementClient, ISystemConfiguratorProxy systemConfiguratorProxy) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = deviceManagementClient; }
public RebootInfoHandler( IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy, JObject desiredCache) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = callback; _desiredCache = desiredCache; }
public DeviceHealthAttestationHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { this._systemConfiguratorProxy = systemConfiguratorProxy; this._callback = callback; this._reportInterval = TimeSpan.Zero; // Create the settings container this._container = ApplicationData.Current.LocalSettings.CreateContainer(ApplicationDataContainerName, ApplicationDataCreateDisposition.Always); }
public RebootCmdHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy, IDeviceManagementRequestHandler hostAppHandler, WindowsUpdatePolicyHandler windowsUpdatePolicyHandler) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = callback; _hostAppHandler = hostAppHandler; _windowsUpdatePolicyHandler = windowsUpdatePolicyHandler; }
public async Task <string> DownloadToTempAsync(ISystemConfiguratorProxy systemConfiguratorProxy) { var info = new AzureFileTransferInfo() { ConnectionString = ConnectionString, ContainerName = ContainerName, BlobName = BlobName, Upload = false, RelativeLocalPath = BlobName }; await AzureBlobFileTransfer.TransferFileAsync(info, systemConfiguratorProxy); return(BlobName); }
public static async Task DownloadCertificates( ISystemConfiguratorProxy systemConfiguratorProxy, string connectionString, CertificatesDataContract.DesiredProperties desiredProperties) { HashSet <string> certificateFilesSet = new HashSet <string>(); MergeCertificateFileNames(desiredProperties.rootCATrustedCertificates_Root, certificateFilesSet); MergeCertificateFileNames(desiredProperties.rootCATrustedCertificates_CA, certificateFilesSet); MergeCertificateFileNames(desiredProperties.rootCATrustedCertificates_TrustedPublisher, certificateFilesSet); MergeCertificateFileNames(desiredProperties.rootCATrustedCertificates_TrustedPeople, certificateFilesSet); MergeCertificateFileNames(desiredProperties.certificateStore_CA_System, certificateFilesSet); MergeCertificateFileNames(desiredProperties.certificateStore_Root_System, certificateFilesSet); MergeCertificateFileNames(desiredProperties.certificateStore_My_User, certificateFilesSet); MergeCertificateFileNames(desiredProperties.certificateStore_My_System, certificateFilesSet); await DownloadCertificates(systemConfiguratorProxy, connectionString, certificateFilesSet); }
private static async Task DownloadCertificates(ISystemConfiguratorProxy systemConfiguratorProxy, string connectionString, HashSet <string> certificateFilesSet) { // ToDo: since our cache is temporary, we might have to download those files everytime to verify the hashes. Debug.Assert(certificateFilesSet != null); foreach (string fileName in certificateFilesSet) { string [] fileNameParts = fileName.Split('\\'); if (fileNameParts.Length != 2) { throw new Exception("Incorrect azure storage specification! The format should be containerName\\blobName."); } IoTDMClient.BlobInfo blobInfo = new IoTDMClient.BlobInfo(); blobInfo.ConnectionString = connectionString; blobInfo.ContainerName = fileNameParts[0]; blobInfo.BlobName = fileNameParts[1]; Debug.WriteLine("Downloading " + blobInfo.BlobName); await blobInfo.DownloadToTempAsync(systemConfiguratorProxy); } }
private DeviceManagementClient(IDeviceTwin deviceTwin, IDeviceManagementRequestHandler hostAppHandler, ISystemConfiguratorProxy systemConfiguratorProxy) { Logger.Log("Entering DeviceManagementClient constructor.", LoggingLevel.Verbose); this._lastDesiredPropertyVersion = -1; this._deviceTwin = deviceTwin; this._hostAppHandler = hostAppHandler; this._systemConfiguratorProxy = systemConfiguratorProxy; this._desiredPropertyMap = new Dictionary <string, IClientPropertyHandler>(); this._desiredPropertyDependencyMap = new Dictionary <string, List <IClientPropertyDependencyHandler> >(); }
public StorageHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { this._systemConfiguratorProxy = systemConfiguratorProxy; this._callback = callback; }
internal static DeviceManagementClient Create(IDeviceTwin deviceTwin, IDeviceManagementRequestHandler requestHandler, ISystemConfiguratorProxy systemConfiguratorProxy) { return(new DeviceManagementClient(deviceTwin, requestHandler, systemConfiguratorProxy)); }
public FactoryResetHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = callback; }
public AppxLifeCycleHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = callback; }
public DmAppStoreUpdateHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = callback; }
public TimeSettingsHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { _systemConfiguratorProxy = systemConfiguratorProxy; _callback = callback; }
public static async Task TransferFileAsync(AzureFileTransferInfo transferInfo, ISystemConfiguratorProxy systemConfiguratorProxy) { // // C++ Azure Blob SDK not supported for ARM, so use Service to copy file to/from // App's LocalData and then use C# Azure Blob SDK to transfer // var appLocalDataFile = await ApplicationData.Current.TemporaryFolder.CreateFileAsync(transferInfo.BlobName, CreationCollisionOption.ReplaceExisting); transferInfo.AppLocalDataPath = appLocalDataFile.Path; if (!transferInfo.Upload) { transferInfo.AppLocalDataPath = await DownloadFile(transferInfo, appLocalDataFile); } // use C++ service to copy file to/from App LocalData var request = new AzureFileTransferRequest(transferInfo); var result = await systemConfiguratorProxy.SendCommandAsync(request); if (transferInfo.Upload) { await UploadFile(transferInfo, appLocalDataFile); } await appLocalDataFile.DeleteAsync(); }
public AppxManagement(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy, JObject desiredCache) { this._systemConfiguratorProxy = systemConfiguratorProxy; this._callback = callback; this._desiredCache = desiredCache; }
public RemoteWipeHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { _systemConfiguratorProxy = systemConfiguratorProxy; _deviceManagementClient = callback; }
private DeviceManagement(ISystemConfiguratorProxy systemConfiguratorProxy) { Logger.Log("Entering DeviceManagementClient constructor without Azure connection.", LoggingLevel.Verbose); this._systemConfiguratorProxy = systemConfiguratorProxy; }
public EventTracingHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy, JObject desiredCache) { _systemConfiguratorProxy = systemConfiguratorProxy; _callback = callback; _desiredCache = desiredCache; }
private DeviceManagementClient(IDeviceTwin deviceTwin, IDeviceManagementRequestHandler requestHandler, ISystemConfiguratorProxy systemConfiguratorProxy) { this._deviceTwin = deviceTwin; this._requestHandler = requestHandler; this._systemConfiguratorProxy = systemConfiguratorProxy; this._externalStorage = new ExternalStorage(); }
public WindowsTelemetryHandler(IClientHandlerCallBack callback, ISystemConfiguratorProxy systemConfiguratorProxy) { this._systemConfiguratorProxy = systemConfiguratorProxy; this._callback = callback; }