From 1b894121e8f3fbaecb03ae025cd7d36cda3b5936 Mon Sep 17 00:00:00 2001 From: Raymond Chen Date: Wed, 24 Aug 2016 17:00:00 -0700 Subject: [PATCH] Windows 10 RTM Release - August 2016 Update 5 --- .../ISecureInterfaceService.h | 21 +++------- .../Scenario1WinRTComponent.vcxproj | 41 +++++++++++-------- .../SecureInterfaceConsumer.cpp | 27 ++++-------- .../SecureInterfaceConsumer.h | 21 +++------- .../SecureInterfaceEventArgs.h | 21 +++------- .../SecureInterfaceMethodResults.h | 21 +++------- .../SecureInterfaceProducer.cpp | 25 ++++------- .../SecureInterfaceProducer.h | 21 +++------- .../SecureInterfaceSignals.cpp | 21 +++------- .../SecureInterfaceSignals.h | 21 +++------- .../SecureInterfaceStructures.h | 37 ++++++----------- .../SecureInterfaceWatcher.cpp | 21 +++------- .../SecureInterfaceWatcher.h | 21 +++------- .../Common/Scenario1WinRTComponent/pch.cpp | 21 +++------- .../Common/Scenario1WinRTComponent/pch.h | 21 +++------- .../IOnboardingService.h | 21 +++------- .../OnboardingConsumer.cpp | 32 ++++----------- .../OnboardingConsumer.h | 21 +++------- .../OnboardingEventArgs.h | 21 +++------- .../OnboardingMethodResults.h | 21 +++------- .../OnboardingProducer.cpp | 25 ++++------- .../OnboardingProducer.h | 21 +++------- .../OnboardingSignals.cpp | 21 +++------- .../OnboardingSignals.h | 21 +++------- .../OnboardingStructures.h | 37 ++++++----------- .../OnboardingWatcher.cpp | 21 +++------- .../OnboardingWatcher.h | 21 +++------- .../Scenario2WinRTComponent.vcxproj | 41 +++++++++++-------- .../Common/Scenario2WinRTComponent/pch.cpp | 21 +++------- .../Common/Scenario2WinRTComponent/pch.h | 21 +++------- .../cs/Scenario2ViewModel.cs | 18 +++++++- .../ConsumerExperiences/js/js/scenario2.js | 11 +---- .../cs/Scenario2ViewModel.cs | 18 +++++++- .../ProducerExperiences/js/js/scenario2.js | 11 +---- .../cs/Scenario1.xaml.cs | 9 ++-- .../js/js/scenario1.js | 23 ++++------- 36 files changed, 262 insertions(+), 555 deletions(-) diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/ISecureInterfaceService.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/ISecureInterfaceService.h index 019fef7ea2..b0a805a5eb 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/ISecureInterfaceService.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/ISecureInterfaceService.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/Scenario1WinRTComponent.vcxproj b/Samples/AllJoyn/Common/Scenario1WinRTComponent/Scenario1WinRTComponent.vcxproj index 49551a4d07..07aa239bd9 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/Scenario1WinRTComponent.vcxproj +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/Scenario1WinRTComponent.vcxproj @@ -126,97 +126,97 @@ Use - _WINRT_DLL;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) @@ -257,4 +257,9 @@ + + + + + \ No newline at end of file diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.cpp b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.cpp index 1386578f91..60c5a14347 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.cpp +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe -// -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. +// +// This code was generated by a tool. // -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" @@ -128,13 +117,13 @@ IAsyncOperation^ SecureInterfaceConsumer::Con alljoyn_msgarg inputs = alljoyn_msgarg_array_create(argCount); QStatus status = ER_OK; - status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 0), "s", interfaceMemberInStr1)); - if (ER_OK == status) { - status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 1), "s", interfaceMemberInStr2)); + status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 0), "s", interfaceMemberInStr1)); } + status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 1), "s", interfaceMemberInStr2)); + if (ER_OK == status) { status = alljoyn_proxybusobject_methodcall( diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.h index f07c90fc13..a9be5118d7 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceConsumer.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceEventArgs.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceEventArgs.h index bf3f9a7268..7916683af3 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceEventArgs.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceEventArgs.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceMethodResults.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceMethodResults.h index bf5dc3c795..dd3399d5de 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceMethodResults.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceMethodResults.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.cpp b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.cpp index 1a62a25ee3..6c62846f37 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.cpp +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" @@ -79,8 +68,10 @@ void SecureInterfaceProducer::UnregisterFromBus() alljoyn_busobject_destroy(BusObject); BusObject = nullptr; } - if (nullptr != SessionListener) + if ((nullptr != m_busAttachment) && (nullptr != SessionListener)) { + alljoyn_busattachment_leavesession(AllJoynHelpers::GetInternalBusAttachment(m_busAttachment), m_sessionId); + alljoyn_busattachment_setsessionlistener(AllJoynHelpers::GetInternalBusAttachment(m_busAttachment), m_sessionId, nullptr); alljoyn_sessionlistener_destroy(SessionListener); SessionListener = nullptr; } diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.h index f654408453..6fbdda65d3 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceProducer.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.cpp b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.cpp index e7176f385e..04959ba630 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.cpp +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.h index 0348f38430..85bb579e67 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceSignals.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceStructures.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceStructures.h index d988bcbfbf..c4473060c8 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceStructures.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceStructures.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once @@ -73,19 +62,19 @@ public ref class AllJoynMessageArgStructure sealed : Windows::Foundation::Collec return m_vector->GetView(); } - virtual void SetAt(unsigned int index, Platform::Object^ item) + virtual void SetAt(unsigned int index, Platform::Object^ value) { - return m_vector->SetAt(index, item); + return m_vector->SetAt(index, value); } - virtual void InsertAt(unsigned int index, Platform::Object^ item) + virtual void InsertAt(unsigned int index, Platform::Object^ value) { - return m_vector->InsertAt(index, item); + return m_vector->InsertAt(index, value); } - virtual void Append(Platform::Object^ item) + virtual void Append(Platform::Object^ value) { - return m_vector->Append(item); + return m_vector->Append(value); } virtual void RemoveAt(unsigned int index) @@ -103,9 +92,9 @@ public ref class AllJoynMessageArgStructure sealed : Windows::Foundation::Collec return m_vector->Clear(); } - virtual void ReplaceAll(const Platform::Array^ arr) + virtual void ReplaceAll(const Platform::Array^ items) { - return m_vector->ReplaceAll(arr); + return m_vector->ReplaceAll(items); } private: diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.cpp b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.cpp index 3261adc15e..60f2763d63 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.cpp +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.h index 6b416b1cdd..97ba78d8b0 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/SecureInterfaceWatcher.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.cpp b/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.cpp index 4b23b663b1..4c5275e663 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.cpp +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" diff --git a/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.h b/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.h index 4fbebeac1d..d75dfddc21 100644 --- a/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.h +++ b/Samples/AllJoyn/Common/Scenario1WinRTComponent/pch.h @@ -10,24 +10,13 @@ //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/IOnboardingService.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/IOnboardingService.h index 02e94b81a8..ab25d032de 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/IOnboardingService.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/IOnboardingService.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.cpp b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.cpp index 70561a11c3..746bbf8a87 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.cpp +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe -// -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. +// +// This code was generated by a tool. // -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" @@ -128,17 +117,14 @@ IAsyncOperation^ OnboardingConsumer::ConfigureWi alljoyn_msgarg inputs = alljoyn_msgarg_array_create(argCount); QStatus status = ER_OK; - status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 0), "s", interfaceMemberSSID)); - if (ER_OK == status) { - status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 1), "s", interfaceMemberPassphrase)); + status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 0), "s", interfaceMemberSSID)); } - if (ER_OK == status) - { - status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 2), "n", interfaceMemberAuthType)); - } + status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 1), "s", interfaceMemberPassphrase)); + + status = static_cast(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 2), "n", interfaceMemberAuthType)); if (ER_OK == status) { diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.h index 8fd9f26d94..ff1b84da82 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingConsumer.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingEventArgs.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingEventArgs.h index 58bf609018..5b9cee1df3 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingEventArgs.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingEventArgs.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingMethodResults.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingMethodResults.h index 1ac2a3f63b..538d345cb3 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingMethodResults.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingMethodResults.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.cpp b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.cpp index 29efb5785c..053efac993 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.cpp +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" @@ -79,8 +68,10 @@ void OnboardingProducer::UnregisterFromBus() alljoyn_busobject_destroy(BusObject); BusObject = nullptr; } - if (nullptr != SessionListener) + if ((nullptr != m_busAttachment) && (nullptr != SessionListener)) { + alljoyn_busattachment_leavesession(AllJoynHelpers::GetInternalBusAttachment(m_busAttachment), m_sessionId); + alljoyn_busattachment_setsessionlistener(AllJoynHelpers::GetInternalBusAttachment(m_busAttachment), m_sessionId, nullptr); alljoyn_sessionlistener_destroy(SessionListener); SessionListener = nullptr; } diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.h index 7a3129c594..e93d5f6526 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingProducer.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.cpp b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.cpp index d4622bed19..78d54a8d2c 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.cpp +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.h index b626babea8..1453c464cc 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingSignals.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingStructures.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingStructures.h index 1a7511f4a3..b094a61dc1 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingStructures.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingStructures.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once @@ -133,19 +122,19 @@ public ref class AllJoynMessageArgStructure sealed : Windows::Foundation::Collec return m_vector->GetView(); } - virtual void SetAt(unsigned int index, Platform::Object^ item) + virtual void SetAt(unsigned int index, Platform::Object^ value) { - return m_vector->SetAt(index, item); + return m_vector->SetAt(index, value); } - virtual void InsertAt(unsigned int index, Platform::Object^ item) + virtual void InsertAt(unsigned int index, Platform::Object^ value) { - return m_vector->InsertAt(index, item); + return m_vector->InsertAt(index, value); } - virtual void Append(Platform::Object^ item) + virtual void Append(Platform::Object^ value) { - return m_vector->Append(item); + return m_vector->Append(value); } virtual void RemoveAt(unsigned int index) @@ -163,9 +152,9 @@ public ref class AllJoynMessageArgStructure sealed : Windows::Foundation::Collec return m_vector->Clear(); } - virtual void ReplaceAll(const Platform::Array^ arr) + virtual void ReplaceAll(const Platform::Array^ items) { - return m_vector->ReplaceAll(arr); + return m_vector->ReplaceAll(items); } private: diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.cpp b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.cpp index 13b2e5d251..2d284cb4d5 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.cpp +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.h index 2496773ea5..48a811a800 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/OnboardingWatcher.h @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/Scenario2WinRTComponent.vcxproj b/Samples/AllJoyn/Common/Scenario2WinRTComponent/Scenario2WinRTComponent.vcxproj index d994b5e18e..dc095fba2b 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/Scenario2WinRTComponent.vcxproj +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/Scenario2WinRTComponent.vcxproj @@ -126,97 +126,97 @@ Use - _WINRT_DLL;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions);QCC_OS_GROUP_WINDOWS + _WINRT_DLL;QCC_OS_GROUP_WINDOWS;%(PreprocessorDefinitions) pch.h $(IntDir)pch.pch $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj -Zm210 %(AdditionalOptions) + /bigobj /Zm250 28204 Console false - WindowsApp.lib;%(AdditionalDependencies);msajapi.lib + WindowsApp.lib;msajapi.lib;%(AdditionalDependencies) @@ -257,4 +257,9 @@ + + + + + \ No newline at end of file diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.cpp b/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.cpp index 4b23b663b1..4c5275e663 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.cpp +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.cpp @@ -9,24 +9,13 @@ // //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #include "pch.h" diff --git a/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.h b/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.h index 7fc73998b8..158fc61b39 100644 --- a/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.h +++ b/Samples/AllJoyn/Common/Scenario2WinRTComponent/pch.h @@ -10,24 +10,13 @@ //********************************************************* //----------------------------------------------------------------------------- -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// Tool: AllJoynCodeGenerator.exe +// +// This code was generated by a tool. // -// This tool is located in the Windows 10 SDK and the Windows 10 AllJoyn -// Visual Studio Extension in the Visual Studio Gallery. -// -// The generated code should be packaged in a Windows 10 C++/CX Runtime -// Component which can be consumed in any UWP-supported language using -// APIs that are available in Windows.Devices.AllJoyn. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // -// Using AllJoynCodeGenerator - Invoke the following command with a valid -// Introspection XML file and a writable output directory: -// AllJoynCodeGenerator -i -o +// For more information, see: http://go.microsoft.com/fwlink/?LinkID=623246 // //----------------------------------------------------------------------------- #pragma once diff --git a/Samples/AllJoyn/ConsumerExperiences/cs/Scenario2ViewModel.cs b/Samples/AllJoyn/ConsumerExperiences/cs/Scenario2ViewModel.cs index 8908dd3d4f..cce3adbbf9 100644 --- a/Samples/AllJoyn/ConsumerExperiences/cs/Scenario2ViewModel.cs +++ b/Samples/AllJoyn/ConsumerExperiences/cs/Scenario2ViewModel.cs @@ -15,7 +15,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; -using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Input; @@ -23,6 +22,7 @@ using Windows.Devices.WiFi; using Windows.Networking.Connectivity; using Windows.Security.Credentials; +using Windows.Security.Cryptography; using Windows.UI.Core; using Windows.UI.Xaml; @@ -882,7 +882,7 @@ private async void AttemptOnboardingAsync(string ssid, string password, short au { UpdateStatusAsync("Attempting to configure onboardee...", NotifyType.StatusMessage); - OnboardingConfigureWiFiResult configureWifiResult = await m_consumer.ConfigureWiFiAsync(ssid, password, authType); + OnboardingConfigureWiFiResult configureWifiResult = await m_consumer.ConfigureWiFiAsync(ssid, ConvertUtf8ToHex(password), authType); if (configureWifiResult.Status == AllJoynStatus.Ok) { UpdateStatusAsync("Onboardee sucessfully configured.", NotifyType.StatusMessage); @@ -906,6 +906,20 @@ private async void AttemptOnboardingAsync(string ssid, string password, short au ClearPasswords(); } + private static string ConvertUtf8ToHex(string inputString) + { + if (string.IsNullOrEmpty(inputString)) + { + return string.Empty; + } + else + { + var tempBuffer = CryptographicBuffer.ConvertStringToBinary(inputString, BinaryStringEncoding.Utf8); + var hexString = CryptographicBuffer.EncodeToHexString(tempBuffer); + return hexString; + } + } + private async void AttemptConnectionAsync() { OnboardingConnectResult connectResult = await m_consumer.ConnectAsync(); diff --git a/Samples/AllJoyn/ConsumerExperiences/js/js/scenario2.js b/Samples/AllJoyn/ConsumerExperiences/js/js/scenario2.js index 57008136c6..dc11602827 100644 --- a/Samples/AllJoyn/ConsumerExperiences/js/js/scenario2.js +++ b/Samples/AllJoyn/ConsumerExperiences/js/js/scenario2.js @@ -434,15 +434,8 @@ } function convertUtf8ToHex(str) { - var result = ""; - var hex; - - for (var i = 0; i < str.length; i++) { - hex = str.charCodeAt(i).toString(16); - result += hex; - } - - return result; + var tempBuffer = Windows.Security.Cryptography.CryptographicBuffer.convertStringToBinary(str, Windows.Security.Cryptography.BinaryStringEncoding.Utf8); + return Windows.Security.Cryptography.CryptographicBuffer.encodeToHexString(tempBuffer); } function disposeConsumer() { diff --git a/Samples/AllJoyn/ProducerExperiences/cs/Scenario2ViewModel.cs b/Samples/AllJoyn/ProducerExperiences/cs/Scenario2ViewModel.cs index ccc4915224..3752619ff4 100644 --- a/Samples/AllJoyn/ProducerExperiences/cs/Scenario2ViewModel.cs +++ b/Samples/AllJoyn/ProducerExperiences/cs/Scenario2ViewModel.cs @@ -14,10 +14,10 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using System.Text; using System.Threading.Tasks; using System.Windows.Input; using Windows.Devices.AllJoyn; +using Windows.Security.Cryptography; using Windows.UI.Core; using Windows.UI.Xaml; @@ -334,7 +334,7 @@ private async void OnboardingService_ConnectRequestRecieved(object sender, Event } else { - if (AppData.OnboardingConfigurePassphrase.Equals(AppData.SampleNetworkPassword, StringComparison.OrdinalIgnoreCase)) + if (AppData.OnboardingConfigurePassphrase.Equals(ConvertUtf8ToHex(AppData.SampleNetworkPassword), StringComparison.OrdinalIgnoreCase)) { returnArg.Value1 = (short)ConnectionResultCode.Validated; returnArg.Value2 = "Connected successfully"; @@ -377,6 +377,20 @@ private async void OnboardingService_ConnectRequestRecieved(object sender, Event } } + static private string ConvertUtf8ToHex(string inputString) + { + if (string.IsNullOrEmpty(inputString)) + { + return string.Empty; + } + else + { + var tempBuffer = CryptographicBuffer.ConvertStringToBinary(inputString, BinaryStringEncoding.Utf8); + var hexString = CryptographicBuffer.EncodeToHexString(tempBuffer); + return hexString; + } + } + private async void UpdateStatusAsync(string status, NotifyType statusType) { await m_dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => diff --git a/Samples/AllJoyn/ProducerExperiences/js/js/scenario2.js b/Samples/AllJoyn/ProducerExperiences/js/js/scenario2.js index 482bc78fb2..e1214d0220 100644 --- a/Samples/AllJoyn/ProducerExperiences/js/js/scenario2.js +++ b/Samples/AllJoyn/ProducerExperiences/js/js/scenario2.js @@ -261,15 +261,8 @@ } function convertUtf8ToHex(str) { - var result = ""; - var hex; - - for (var i = 0; i < str.length; i++) { - hex = str.charCodeAt(i).toString(16); - result += hex; - } - - return result; + var tempBuffer = Windows.Security.Cryptography.CryptographicBuffer.convertStringToBinary(str, Windows.Security.Cryptography.BinaryStringEncoding.Utf8); + return Windows.Security.Cryptography.CryptographicBuffer.encodeToHexString(tempBuffer); } function reportStatus(message) { diff --git a/Samples/SystemMediaTransportControls/cs/Scenario1.xaml.cs b/Samples/SystemMediaTransportControls/cs/Scenario1.xaml.cs index 71996d18e1..720b560d00 100644 --- a/Samples/SystemMediaTransportControls/cs/Scenario1.xaml.cs +++ b/Samples/SystemMediaTransportControls/cs/Scenario1.xaml.cs @@ -192,19 +192,18 @@ await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => switch (systemMediaControls.SoundLevel) { case SoundLevel.Full: + case SoundLevel.Low: + // If we had paused due to system mute, then resume on unmute. if (pausedDueToMute) { - // If we previously paused due to being muted, resume. MyMediaElement.Play(); + pausedDueToMute = false; } break; - case SoundLevel.Low: - // We're being ducked, take no action. - break; case SoundLevel.Muted: + // We've been muted by the system. Pause playback to release resources. if (MyMediaElement != null && MyMediaElement.CurrentState == MediaElementState.Playing) { - // We've been muted by the system, pause to save our playback position. MyMediaElement.Pause(); pausedDueToMute = true; } diff --git a/Samples/SystemMediaTransportControls/js/js/scenario1.js b/Samples/SystemMediaTransportControls/js/js/scenario1.js index 4ebc7880bf..72c37b5182 100644 --- a/Samples/SystemMediaTransportControls/js/js/scenario1.js +++ b/Samples/SystemMediaTransportControls/js/js/scenario1.js @@ -328,25 +328,23 @@ if (eventIn.property == Windows.Media.SystemMediaTransportControlsProperty.soundLevel) { switch (systemMediaControls.soundLevel) { case Windows.Media.SoundLevel.muted: - // We;ve been muted by the system, pause to save out state if we're currently playing. - if (player != null && player.playerState == playerState.playing) { - WinJS.log && WinJS.log("Play pressed", "sample", "status"); + // We've been muted by the system. Pause playback to release resources. + if (player != null && !player.paused && !player.ended) { + WinJS.log && WinJS.log("Paused due to system mute", "sample", "status"); player.pause(); pausedDueToMute = true; } break; case Windows.Media.SoundLevel.full: - // We've just been unmuted, if we paused when we muted resume. + case Windows.Media.SoundLevel.low: + // If we had paused due to system mute, then resume on unmute. if (pausedDueToMute) { - WinJS.log && WinJS.log("Pause pressed", "sample", "status"); + WinJS.log && WinJS.log("Unpause due to system unmute", "sample", "status"); player.play(); + pausedDueToMute = false; } break; - - case Windows.Media.SoundLevel.low: - // We're being ducked, take no action. - break; } } } @@ -555,13 +553,6 @@ var mediaFile = playlist[currentItemIndex]; player.src = URL.createObjectURL(mediaFile, { oneTimeOnly: true }); - // for sample purpose only: the setActive() as a side effect will temporarily - // fades in the build-in transport controls of the