Skip to content

Commit

Permalink
Windows 10 RTM Release - October 2015 Update 3
Browse files Browse the repository at this point in the history
  • Loading branch information
oldnewthing committed Oct 22, 2015
1 parent 1f2633e commit 22bbec2
Show file tree
Hide file tree
Showing 286 changed files with 4,791 additions and 4,685 deletions.
8 changes: 4 additions & 4 deletions Samples/Accelerometer/js/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
IgnorableNamespaces="uap mp">

<Identity
Name="d2f9bcca-1673-49cf-a80b-0b5db8a03bf0"
Name="Microsoft.SDKSamples.Accelerometer.JS"
Version="1.0.0.0"
Publisher="CN=Microsoft" />

<mp:PhoneIdentity PhoneProductId="d2f9bcca-1673-49cf-a80b-0b5db8a03bf0" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>Accelerometer JS SDK Sample</DisplayName>
<DisplayName>Accelerometer JS Sample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Logo>images\storelogo-sdk.png</Logo>
</Properties>
Expand All @@ -32,8 +32,8 @@
StartPage="default.html">

<uap:VisualElements
DisplayName="Accelerometer JS SDK Sample"
Description="Accelerometer JS SDK Sample"
DisplayName="Accelerometer JS Sample"
Description="Accelerometer JS Sample"
BackgroundColor="#00b2f0"
Square150x150Logo="images\storelogo-sdk.png"
Square44x44Logo="images\smalltile-sdk.png">
Expand Down
2 changes: 1 addition & 1 deletion Samples/Accelerometer/vb/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Version="1.0.0.0" />


<mp:PhoneIdentity PhoneProductId="3df6c60c-2c0b-4061-9e7b-3108ff8067e6" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<mp:PhoneIdentity PhoneProductId="fc09ed7d-5ae7-47a5-81ff-471b9a7d48f8" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>Accelerometer VB Sample</DisplayName>
Expand Down
2 changes: 1 addition & 1 deletion Samples/ActivitySensor/vb/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="0840d61f-acb9-47b8-be10-90be343fbe4e" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<mp:PhoneIdentity PhoneProductId="43876b43-cefb-47f0-8afe-5c7b994b843f" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>Activity Sensor VB Sample</DisplayName>
Expand Down
2 changes: 1 addition & 1 deletion Samples/AdaptiveStreaming/js/package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
IgnorableNamespaces="uap mp">

<Identity
Name="Microsoft.SDKSamples.AdaptiveStreaing.JS"
Name="Microsoft.SDKSamples.AdaptiveStreaming.JS"
Version="1.0.0.0"
Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />

Expand Down
2 changes: 1 addition & 1 deletion Samples/AdaptiveStreaming/vb/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="Microsoft.SDKSamples.AdaptiveStreaming.VB" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.0.2" />
<mp:PhoneIdentity PhoneProductId="f14b66c8-a6f2-4870-87c7-5208b2679716" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<mp:PhoneIdentity PhoneProductId="e0f0107d-a13b-4b7c-9273-7e639f45aa9e" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>AdaptiveStreaming</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
Expand Down
2 changes: 1 addition & 1 deletion Samples/AdvancedCasting/vb/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="Microsoft.SDKSamples.ScreenCasting.VB" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.0.24.0" />
<mp:PhoneIdentity PhoneProductId="637456CC-56A1-4C4D-97D5-87AC05C3DFCD" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<mp:PhoneIdentity PhoneProductId="150b7cee-2ed1-4b77-9745-f18d22cf84ad" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>ScreenCasting VB Sample</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public interface class ISecureInterfaceService
{
public:
// Implement this function to handle calls to the Concatenate method.
Windows::Foundation::IAsyncOperation<SecureInterfaceConcatenateResult^>^ ConcatenateAsync(Windows::Devices::AllJoyn::AllJoynMessageInfo^ info , _In_ Platform::String^ interfaceMemberInStr1, _In_ Platform::String^ interfaceMemberInStr2);
Windows::Foundation::IAsyncOperation<SecureInterfaceConcatenateResult^>^ ConcatenateAsync(_In_ Windows::Devices::AllJoyn::AllJoynMessageInfo^ info , _In_ Platform::String^ interfaceMemberInStr1, _In_ Platform::String^ interfaceMemberInStr2);

// Implement this function to handle requests for the value of the IsUpperCaseEnabled property.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,8 @@ IAsyncOperation<SecureInterfaceJoinSessionResult^>^ SecureInterfaceConsumer::Joi
return create_async([serviceInfo, watcher]() -> SecureInterfaceJoinSessionResult^
{
auto result = ref new SecureInterfaceJoinSessionResult();
result->Status = AllJoynStatus::Ok;
result->Consumer = nullptr;

result->Consumer = ref new SecureInterfaceConsumer(watcher->BusAttachment);
result->Status = result->Consumer->JoinSession(serviceInfo);

return result;
});
}
Expand All @@ -131,18 +127,26 @@ IAsyncOperation<SecureInterfaceConcatenateResult^>^ SecureInterfaceConsumer::Con
size_t argCount = 2;
alljoyn_msgarg inputs = alljoyn_msgarg_array_create(argCount);

TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 0), "s", interfaceMemberInStr1);
TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 1), "s", interfaceMemberInStr2);

QStatus status = alljoyn_proxybusobject_methodcall(
ProxyBusObject,
"com.microsoft.Samples.SecureInterface",
"Concatenate",
inputs,
argCount,
message,
c_MessageTimeoutInMilliseconds,
0);
QStatus status = ER_OK;
status = static_cast<QStatus>(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 0), "s", interfaceMemberInStr1));

if (ER_OK == status)
{
status = static_cast<QStatus>(TypeConversionHelpers::SetAllJoynMessageArg(alljoyn_msgarg_array_element(inputs, 1), "s", interfaceMemberInStr2));
}

if (ER_OK == status)
{
status = alljoyn_proxybusobject_methodcall(
ProxyBusObject,
"com.microsoft.Samples.SecureInterface",
"Concatenate",
inputs,
argCount,
message,
c_MessageTimeoutInMilliseconds,
0);
}
result->Status = static_cast<int>(status);
if (ER_OK == status)
{
Expand All @@ -151,7 +155,7 @@ IAsyncOperation<SecureInterfaceConcatenateResult^>^ SecureInterfaceConsumer::Con
status = static_cast<QStatus>(TypeConversionHelpers::GetAllJoynMessageArg(alljoyn_message_getarg(message, 0), "s", &argument0));
result->OutStr = argument0;

if (status != ER_OK)
if (ER_OK != status)
{
result->Status = static_cast<int>(status);
}
Expand Down Expand Up @@ -185,30 +189,33 @@ IAsyncOperation<SecureInterfaceSetIsUpperCaseEnabledResult^>^ SecureInterfaceCon
PropertySetContext setContext;

alljoyn_msgarg inputArgument = alljoyn_msgarg_create();
TypeConversionHelpers::SetAllJoynMessageArg(inputArgument, "b", value);

alljoyn_proxybusobject_setpropertyasync(
ProxyBusObject,
"com.microsoft.Samples.SecureInterface",
"IsUpperCaseEnabled",
inputArgument,
[](QStatus status, alljoyn_proxybusobject obj, void* context)
{
UNREFERENCED_PARAMETER(obj);
auto propertyContext = static_cast<PropertySetContext*>(context);
propertyContext->SetStatus(status);
propertyContext->SetEvent();
},
c_MessageTimeoutInMilliseconds,
&setContext);

alljoyn_msgarg_destroy(inputArgument);
QStatus status = static_cast<QStatus>(TypeConversionHelpers::SetAllJoynMessageArg(inputArgument, "b", value));
if (ER_OK == status)
{
status = alljoyn_proxybusobject_setpropertyasync(
ProxyBusObject,
"com.microsoft.Samples.SecureInterface",
"IsUpperCaseEnabled",
inputArgument,
[](QStatus status, alljoyn_proxybusobject obj, void* context)
{
UNREFERENCED_PARAMETER(obj);
auto propertyContext = static_cast<PropertySetContext*>(context);
propertyContext->SetStatus(status);
propertyContext->SetEvent();
},
c_MessageTimeoutInMilliseconds,
&setContext);

setContext.Wait();
alljoyn_msgarg_destroy(inputArgument);

auto result = ref new SecureInterfaceSetIsUpperCaseEnabledResult();
result->Status = setContext.GetStatus();
return result;
setContext.Wait();
}
if (ER_OK == status)
{
return SecureInterfaceSetIsUpperCaseEnabledResult::CreateSuccessResult();
}
return SecureInterfaceSetIsUpperCaseEnabledResult::CreateFailureResult(static_cast<int>(status));
});
}

Expand All @@ -230,7 +237,7 @@ IAsyncOperation<SecureInterfaceGetIsUpperCaseEnabledResult^>^ SecureInterfaceCon
if (ER_OK == status)
{
bool argument;
TypeConversionHelpers::GetAllJoynMessageArg(value, "b", &argument);
status = static_cast<QStatus>(TypeConversionHelpers::GetAllJoynMessageArg(value, "b", &argument));

propertyContext->SetValue(argument);
}
Expand Down Expand Up @@ -271,9 +278,12 @@ void SecureInterfaceConsumer::OnPropertyChanged(_In_ alljoyn_proxybusobject obj,
return;
}


if (strcmp("IsUpperCaseEnabled", propertyName) == 0)
{
IsUpperCaseEnabledChanged(this, nullptr);
bool argument;
(void)TypeConversionHelpers::GetAllJoynMessageArg(propertyValue, "b", &argument);
IsUpperCaseEnabledChanged(this, (Platform::Object^)argument);
}
}
}
Expand All @@ -294,7 +304,7 @@ void SecureInterfaceConsumer::CallTextSentSignalHandler(_In_ const alljoyn_inter
eventArgs->MessageInfo = callInfo;

Platform::String^ argument0;
TypeConversionHelpers::GetAllJoynMessageArg(alljoyn_message_getarg(message, 0), "s", &argument0);
(void)TypeConversionHelpers::GetAllJoynMessageArg(alljoyn_message_getarg(message, 0), "s", &argument0);

eventArgs->Message = argument0;

Expand Down Expand Up @@ -357,6 +367,25 @@ int32 SecureInterfaceConsumer::JoinSession(_In_ AllJoynServiceInfo^ serviceInfo)
return AllJoynStatus::Fail;
}

RETURN_IF_QSTATUS_ERROR(AllJoynBusObjectManager::GetBusObject(m_nativeBusAttachment, AllJoynHelpers::PlatformToMultibyteString(ServiceObjectPath).data(), &m_busObject));

if (!AllJoynBusObjectManager::BusObjectIsRegistered(m_nativeBusAttachment, m_busObject))
{
RETURN_IF_QSTATUS_ERROR(alljoyn_busobject_addinterface(BusObject, description));
}

QStatus result = AddSignalHandler(
m_nativeBusAttachment,
description,
"TextSent",
[](const alljoyn_interfacedescription_member* member, PCSTR srcPath, alljoyn_message message) { UNREFERENCED_PARAMETER(srcPath); CallTextSentSignalHandler(member, message); });
if (ER_OK != result)
{
return static_cast<int32>(result);
}

SourceInterfaces[description] = m_weak;

unsigned int noneMechanismIndex = 0;
bool authenticationMechanismsContainsNone = m_busAttachment->AuthenticationMechanisms->IndexOf(AllJoynAuthenticationMechanism::None, &noneMechanismIndex);
QCC_BOOL interfaceIsSecure = alljoyn_interfacedescription_issecure(description);
Expand All @@ -369,7 +398,12 @@ int32 SecureInterfaceConsumer::JoinSession(_In_ AllJoynServiceInfo^ serviceInfo)
// is specified, or if None is not present in AuthenticationMechanisms.
if (!authenticationMechanismsContainsNone || interfaceIsSecure)
{
alljoyn_proxybusobject_secureconnection(ProxyBusObject, QCC_FALSE);
RETURN_IF_QSTATUS_ERROR(alljoyn_proxybusobject_secureconnection(ProxyBusObject, QCC_FALSE));
RETURN_IF_QSTATUS_ERROR(AllJoynBusObjectManager::TryRegisterBusObject(m_nativeBusAttachment, BusObject, true));
}
else
{
RETURN_IF_QSTATUS_ERROR(AllJoynBusObjectManager::TryRegisterBusObject(m_nativeBusAttachment, BusObject, false));
}
}
else
Expand All @@ -380,28 +414,14 @@ int32 SecureInterfaceConsumer::JoinSession(_In_ AllJoynServiceInfo^ serviceInfo)
{
return static_cast<int32>(ER_BUS_NO_AUTHENTICATION_MECHANISM);
}
else
{
RETURN_IF_QSTATUS_ERROR(AllJoynBusObjectManager::TryRegisterBusObject(m_nativeBusAttachment, BusObject, false));
}
}

RETURN_IF_QSTATUS_ERROR(AllJoynBusObjectManager::GetBusObject(m_nativeBusAttachment, AllJoynHelpers::PlatformToMultibyteString(ServiceObjectPath).data(), &m_busObject));
RETURN_IF_QSTATUS_ERROR(alljoyn_proxybusobject_addinterface(ProxyBusObject, description));

if (!AllJoynBusObjectManager::BusObjectIsRegistered(m_nativeBusAttachment, m_busObject))
{
RETURN_IF_QSTATUS_ERROR(alljoyn_busobject_addinterface(BusObject, description));
}

QStatus result = AddSignalHandler(
m_nativeBusAttachment,
description,
"TextSent",
[](const alljoyn_interfacedescription_member* member, PCSTR srcPath, alljoyn_message message) { UNREFERENCED_PARAMETER(srcPath); CallTextSentSignalHandler(member, message); });
if (result != ER_OK)
{
return static_cast<int32>(result);
}

SourceInterfaces[description] = m_weak;
RETURN_IF_QSTATUS_ERROR(AllJoynBusObjectManager::TryRegisterBusObject(m_nativeBusAttachment, BusObject, true));

m_signals->Initialize(BusObject, m_sessionId);

return AllJoynStatus::Ok;
Expand Down
Loading

0 comments on commit 22bbec2

Please sign in to comment.