You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCCastingPlayer.h
+7-2
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,9 @@
72
72
* @brief Verifies that a connection exists with this CastingPlayer, or triggers a new
73
73
* commissioning session request. If the CastingApp does not have the nodeId and fabricIndex
74
74
* of this CastingPlayer cached on disk, this will execute the User Directed Commissioning
75
-
* (UDC) process by sending an IdentificationDeclaration message to the Commissioner. This method will run verifyOrEstablishConnection() with a default timeout of MCCastingPlayer.kMinCommissioningWindowTimeoutSec.
75
+
* (UDC) process by sending an IdentificationDeclaration message to the Commissioner. This method
76
+
* will run verifyOrEstablishConnection() with a default timeout of
* @param identificationDeclarationOptions (Optional) Parameters in the IdentificationDeclaration
77
79
* message sent by the Commissionee to the Commissioner. These parameters specify the
78
80
* information relating to the requested commissioning session.
@@ -94,7 +96,10 @@
94
96
* @brief Verifies that a connection exists with this CastingPlayer, or triggers a new
95
97
* commissioning session request. If the CastingApp does not have the nodeId and fabricIndex
96
98
* of this CastingPlayer cached on disk, this will execute the User Directed Commissioning
97
-
* (UDC) process by sending an IdentificationDeclaration message to the Commissioner. This method will run verifyOrEstablishConnection() with a default timeout of MCCastingPlayer.kMinCommissioningWindowTimeoutSec and MCIdentificationDeclarationOptions initailized with the defualt values.
99
+
* (UDC) process by sending an IdentificationDeclaration message to the Commissioner. This method
100
+
* will run verifyOrEstablishConnection() with a default timeout of
101
+
* MCCastingPlayer.kMinCommissioningWindowTimeoutSec and MCIdentificationDeclarationOptions
102
+
* initailized with the defualt values.
98
103
* @return nil if request submitted successfully, otherwise a NSError object corresponding to the error.
// Handles the connection complete event and calls the MCConnectionCallbacks connectionCompleteCallback callback provided by the Swift client. This callback is called by the cpp layer when the connection process has ended, regardless of whether it was successful or not.
81
+
// Handles the connection complete event and calls the MCConnectionCallbacks connectionCompleteCallback callback provided by
82
+
// the Swift client. This callback is called by the cpp layer when the connection process has ended, regardless of whether it
// Handles the Commissioner Declaration event and calls the MCConnectionCallbacks commissionerDeclarationCallback callback provided by the Swift client. This callback is called by the cpp layer when the Commissionee receives a CommissionerDeclaration message from the CastingPlayer/Commissioner.
ChipLogProgress(AppServer, "MCCastingPlayer.verifyOrEstablishConnectionWithCallbacks() commissionerDeclarationCallback() called with cpp CommissionerDeclaration message");
if (connectionCallbacks.commissionerDeclarationCallback) {
99
105
// convert cppCommissionerDeclaration to a shared_ptr<CommissionerDeclaration> and pass it to the client callback
100
106
auto cppCommissionerDeclarationPtr = std::make_shared<chip::Protocols::UserDirectedCommissioning::CommissionerDeclaration>(cppCommissionerDeclaration);
ChipLogError(AppServer, "MCCastingPlayer.verifyOrEstablishConnectionWithCallbacks() commissionerDeclarationCallback(), client failed to set the optional commissionerDeclarationCallback() callback");
ChipLogError(AppServer, "MCCastingPlayer.continueConnecting() call to cppCastingPlayer->ContinueConnecting() failed due to %" CHIP_ERROR_FORMAT, err.Format());
157
+
ChipLogError(AppServer, "MCCastingPlayer.continueConnecting() call to cppCastingPlayer->ContinueConnecting() failed due to %" CHIP_ERROR_FORMAT,
158
+
err.Format());
150
159
return [MCErrorUtils NSErrorFromChipError:err];
151
160
}
152
161
returnnil;
@@ -163,7 +172,8 @@ - (NSError *)stopConnecting
163
172
err = _cppCastingPlayer->StopConnecting();
164
173
});
165
174
if (err != CHIP_NO_ERROR) {
166
-
ChipLogError(AppServer, "MCCastingPlayer.continueConnecting() call to cppCastingPlayer->StopConnecting() failed due to %" CHIP_ERROR_FORMAT, err.Format());
175
+
ChipLogError(AppServer, "MCCastingPlayer.continueConnecting() call to cppCastingPlayer->StopConnecting() failed due to %" CHIP_ERROR_FORMAT,
Copy file name to clipboardexpand all lines: examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCConnectionCallbacks.h
+12-4
Original file line number
Diff line number
Diff line change
@@ -26,18 +26,26 @@
26
26
@interfaceMCConnectionCallbacks : NSObject
27
27
28
28
/**
29
-
* @param connectionCompleteCallback (Required) The callback called when the connection process has ended, regardless of whether it was successful or not.
30
-
* @param commissionerDeclarationCallback (Optional) The callback called when the Client/Commissionee receives a CommissionerDeclaration message from the CastingPlayer/Commissioner. This callback is needed to support UDC features where a reply from the Commissioner is expected. It provides information indicating the Commissioner’s pre-commissioning state.
29
+
* @param connectionCompleteCallback (Required) The callback called when the connection process
30
+
* has ended, regardless of whether it was successful or not.
31
+
* @param commissionerDeclarationCallback (Optional) The callback called when the Client/Commissionee
32
+
* receives a CommissionerDeclaration message from the CastingPlayer/Commissioner. This callback is
33
+
* needed to support UDC features where a reply from the Commissioner is expected. It provides information
34
+
* indicating the Commissioner’s pre-commissioning state.
31
35
*
32
-
* For example: During CastingPlayer/Commissioner-Generated passcode commissioning, the Commissioner replies with a CommissionerDeclaration message with PasscodeDialogDisplayed and CommissionerPasscode set to true. Given these Commissioner state details, the client is expected to perform some actions and responf accrdingly.
36
+
* For example: During CastingPlayer/Commissioner-Generated passcode commissioning, the Commissioner
37
+
* replies with a CommissionerDeclaration message with PasscodeDialogDisplayed and CommissionerPasscode
38
+
* set to true. Given these Commissioner state details, the client is expected to perform some actions
39
+
* and responf accrdingly.
33
40
*
34
41
* @return A new instance of MCConnectionCallbacks.
Copy file name to clipboardexpand all lines: examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/MCIdentificationDeclarationOptions.h
+2-2
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@
22
22
23
23
/**
24
24
* This class contains the optional parameters used in the IdentificationDeclaration Message, sent
25
-
* by the Commissionee (CastingApp) to the Commissioner (CastingPlayer). The options specify information relating to the
26
-
* requested UDC commissioning session.
25
+
* by the Commissionee (CastingApp) to the Commissioner (CastingPlayer). The options specify
26
+
* information relating to the requested UDC commissioning session.
Copy file name to clipboardexpand all lines: examples/tv-casting-app/darwin/TvCasting/TvCasting/MCConnectionExampleViewModel.swift
+5-1
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,11 @@ class MCConnectionExampleViewModel: ObservableObject {
70
70
self.displayPasscodeInputDialog(on: topViewController, continueConnecting:{ passcode in
71
71
self.Log.info("MCConnectionExampleViewModel connect() commissionerDeclarationCallback, Continuing to connect with user entered MCCastingPlayer/Commissioner-Generated passcode: \(passcode)")
72
72
73
-
// Update the CommissionableData in the client defined MCAppParametersDataSource with the user entered CastingPlayer/Commissioner-Generated setup passcode. This is mandatory for the Commissioner-Generated passcode commissioning flow since the commissioning session's PAKE verifier needs to be updated with the entered passcode. Get the singleton instane of the MCInitializationExample.
73
+
// Update the CommissionableData in the client defined MCAppParametersDataSource with the user
74
+
// entered CastingPlayer/Commissioner-Generated setup passcode. This is mandatory for the
75
+
// Commissioner-Generated passcode commissioning flow since the commissioning session's PAKE
76
+
// verifier needs to be updated with the entered passcode. Get the singleton instane of the
Copy file name to clipboardexpand all lines: examples/tv-casting-app/darwin/TvCasting/TvCasting/MCInitializationExample.swift
+3-1
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,9 @@ class MCInitializationExample {
127
127
letLog=Logger(subsystem:"com.matter.casting",
128
128
category:"MCInitializationExample")
129
129
130
-
// We store the client defined instance of the MCAppParametersDataSource passed to CastingApp.initialize(). MCAppParametersDataSource may need to be updated by the client in case of the Casting Player/Commissioner-Generated passcode commissioning flow.
130
+
// We store the client defined instance of the MCAppParametersDataSource passed to CastingApp.initialize().
131
+
// MCAppParametersDataSource may need to be updated by the client in case of the Casting
0 commit comments