|
1 | 1 | ---
|
2 | 2 | title: Pairing a set with the DeviceInformationPairing.Custom property
|
3 | 3 | description: Windows supports pairing a collection of devices as an automatically-discovered set or as an explicit set.
|
4 |
| -ms.date: 03/25/2024 |
| 4 | +ms.date: 03/27/2024 |
5 | 5 | ms.topic: article
|
6 | 6 | ms.localizationpriority: medium
|
7 | 7 | ---
|
@@ -95,7 +95,7 @@ void PairingTests::PairingSetMembersRequestedHandler(DeviceInformationCustomPair
|
95 | 95 |
|
96 | 96 | This code example implements explicit set pairing using a custom pairing object. As with a typical implementation of custom pairing, a *pairing-requested handler* is required to handle the pairing ceremony. In this case, the code example implements only the *confirm only* pairing ceremony. As with the Bluetooth code example, the new and interesting part is adding a *pairing-set-member-requested* handler. The set member handler enables the platform to attempt pairing devices as a set.
|
97 | 97 |
|
98 |
| -As compared to the Bluetooth-style set-pairing scenario, this code example explicitly adds devices to the set. As compared to Bluetooth, the set handler implies something a bit different from the protocols related to pairing IPP printers. It implies that clients are handling device discovery over the various protocols, and the PnP state and print queues created as a result of pairing all of the set members should be synchronized. |
| 98 | +As compared to the Bluetooth-style set-pairing scenario, this code example explicitly adds devices to the set. And the set handler implies something a bit different for the protocols related to pairing IPP printers. It implies that clients are handling device discovery over the various protocols, and the PnP state and print queues created as a result of pairing all of the set members should be synchronized. |
99 | 99 |
|
100 | 100 | To keep the implementation of the code example simple, it assumes that a vector of set member endpoints were discovered beforehand, and passed in as a parameter along with the primary device. For example, in a typical IPP scenario, endpoints are discovered in arbitrary order. So the primary device could have been discovered over WSD for instance; and then the vector would contain devices representing endpoints discovered over IPP, and eSCL. But any combination is possible and valid. It adds set members to the primary device's custom pairing object on the app's main thread, and then calls [PairAsync](/uwp/api/windows.devices.enumeration.deviceinformationcustompairing.pairasync).
|
101 | 101 |
|
@@ -153,15 +153,15 @@ void PairingTests::PairingSetMembersRequestedHandler(DeviceInformationCustomPair
|
153 | 153 | switch (args.Status())
|
154 | 154 | {
|
155 | 155 | case DevicePairingAddPairingSetMemberStatus::AddedToSet:
|
156 |
| - // This is the expected result of adding a set member(s) to |
157 |
| - // a Bluetooth device. Note: there still might be no set members. |
| 156 | + // This is the expected result of adding a set member(s) |
| 157 | + // by calling the AddPairingSetMember method. |
158 | 158 | break;
|
159 | 159 | case DevicePairingAddPairingSetMemberStatus::CouldNotBeAddedToSet:
|
160 | 160 | // Means we failed to add set member(s).
|
161 | 161 | break;
|
162 | 162 | case DevicePairingAddPairingSetMemberStatus::SetDiscoveryNotAttemptedByProtocol:
|
163 | 163 | default:
|
164 |
| - // The other constants aren't expected in an auto-discovered Bluetooth set scenario. |
| 164 | + // The other constants aren't expected in an explicit set scenario. |
165 | 165 | // Error handling can go here.
|
166 | 166 | }
|
167 | 167 |
|
|
0 commit comments