|
50 | 50 | * expected to perform some actions, detailed in the continueConnecting() API below, and then
|
51 | 51 | * call the continueConnecting() API to complete the process.
|
52 | 52 | * @param timeout time (in sec) to keep the commissioning window open, if commissioning is required.
|
53 |
| - * Needs to be >= CastingPlayer.kMinCommissioningWindowTimeoutSec. |
| 53 | + * Needs to be >= MCCastingPlayer.kMinCommissioningWindowTimeoutSec. |
54 | 54 | * @param identificationDeclarationOptions (Optional) Parameters in the IdentificationDeclaration
|
55 | 55 | * message sent by the Commissionee to the Commissioner. These parameters specify the
|
56 | 56 | * information relating to the requested commissioning session.
|
|
60 | 60 | * list of optional parameters.
|
61 | 61 | * <p>Furthermore, attributes (such as VendorId) describe the TargetApp/Endpoint that the client
|
62 | 62 | * wants to interact with after commissioning. If this value is passed in,
|
63 |
| - * verifyOrEstablishConnection() will force UDC, in case the desired TargetApp is not found in |
| 63 | + * verifyOrEstablishConnection() will force UDC, in case the desired TargetApp is not found in |
64 | 64 | * the on-device cached information/CastingStore.
|
65 | 65 | * @return nil if request submitted successfully, otherwise a NSError object corresponding to the error.
|
66 | 66 | */
|
67 |
| -- (NSError *)verifyOrEstablishConnectionWithCallbacks:(MCConnectionCallbacks * _Nonnull)connectionCallbacks |
68 |
| - timeout:(long)timeout |
69 |
| - identificationDeclarationOptions:(MCIdentificationDeclarationOptions * _Nullable)identificationDeclarationOptions; |
| 67 | +- (NSError * _Nullable)verifyOrEstablishConnectionWithCallbacks:(MCConnectionCallbacks * _Nonnull)connectionCallbacks |
| 68 | + timeout:(long)timeout |
| 69 | + identificationDeclarationOptions:(MCIdentificationDeclarationOptions * _Nullable)identificationDeclarationOptions; |
70 | 70 |
|
71 | 71 | /**
|
72 |
| - * @brief The simplified version of the verifyOrEstablishConnectionWithCallbacks() API above. |
| 72 | + * @brief Verifies that a connection exists with this CastingPlayer, or triggers a new |
| 73 | + * commissioning session request. If the CastingApp does not have the nodeId and fabricIndex |
| 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. |
| 76 | + * @param identificationDeclarationOptions (Optional) Parameters in the IdentificationDeclaration |
| 77 | + * message sent by the Commissionee to the Commissioner. These parameters specify the |
| 78 | + * information relating to the requested commissioning session. |
| 79 | + * <p>For example: To invoke the CastingPlayer/Commissioner-Generated passcode commissioning |
| 80 | + * flow, the client would call this API with IdentificationDeclarationOptions containing |
| 81 | + * CommissionerPasscode set to true. See IdentificationDeclarationOptions.java for a complete |
| 82 | + * list of optional parameters. |
| 83 | + * <p>Furthermore, attributes (such as VendorId) describe the TargetApp/Endpoint that the client |
| 84 | + * wants to interact with after commissioning. If this value is passed in, |
| 85 | + * verifyOrEstablishConnection() will force UDC, in case the desired TargetApp is not found in |
| 86 | + * the on-device cached information/CastingStore. |
73 | 87 | * @return nil if request submitted successfully, otherwise a NSError object corresponding to the error.
|
| 88 | + * @see verifyOrEstablishConnectionWithCallbacks:timeout:identificationDeclarationOptions: |
74 | 89 | */
|
75 |
| -- (NSError *)verifyOrEstablishConnectionWithCallbacks:(MCConnectionCallbacks * _Nonnull)connectionCallbacks |
76 |
| - identificationDeclarationOptions:(MCIdentificationDeclarationOptions * _Nullable)identificationDeclarationOptions; |
| 90 | +- (NSError * _Nullable)verifyOrEstablishConnectionWithCallbacks:(MCConnectionCallbacks * _Nonnull)connectionCallbacks |
| 91 | + identificationDeclarationOptions:(MCIdentificationDeclarationOptions * _Nullable)identificationDeclarationOptions; |
77 | 92 |
|
78 | 93 | /**
|
79 |
| - * @brief The simplified version of the verifyOrEstablishConnectionWithCallbacks() API above. |
| 94 | + * @brief Verifies that a connection exists with this CastingPlayer, or triggers a new |
| 95 | + * commissioning session request. If the CastingApp does not have the nodeId and fabricIndex |
| 96 | + * 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. |
80 | 98 | * @return nil if request submitted successfully, otherwise a NSError object corresponding to the error.
|
| 99 | + * @see verifyOrEstablishConnectionWithCallbacks:timeout:identificationDeclarationOptions: |
81 | 100 | */
|
82 |
| -- (NSError *)verifyOrEstablishConnectionWithCallbacks:(MCConnectionCallbacks * _Nonnull)connectionCallbacks; |
| 101 | +- (NSError * _Nullable)verifyOrEstablishConnectionWithCallbacks:(MCConnectionCallbacks * _Nonnull)connectionCallbacks; |
83 | 102 |
|
84 | 103 | /**
|
85 | 104 | * @brief This is a continuation of the CastingPlayer/Commissioner-Generated passcode
|
|
97 | 116 | * <p>5. Client prompted user to input Passcode from Commissioner.
|
98 | 117 | * <p>6. Client has updated the CastingApp's MCCommissionableDataProvider with the user entered
|
99 | 118 | * passcode via the following function call:
|
100 |
| - * MCCastingApp.updateCommissionableDataProvider(MCCommissionableData). This updates the |
| 119 | + * MCDataSource.update(MCCommissionableData). This updates the |
101 | 120 | * commissioning session's PAKE verifier with the user entered passcode.
|
102 | 121 | * <p>Note: The same connectionCallbacks and commissioningWindowTimeoutSec parameters passed
|
103 | 122 | * into verifyOrEstablishConnection() will be used.
|
104 | 123 | * @return nil if request submitted successfully, otherwise a NSError object corresponding to the error.
|
105 | 124 | */
|
106 |
| -- (NSError *)continueConnecting; |
| 125 | +- (NSError * _Nullable)continueConnecting; |
107 | 126 |
|
108 | 127 | /**
|
109 | 128 | * @brief This cancels the CastingPlayer/Commissioner-Generated passcode commissioning flow
|
|
117 | 136 | * VerifyOrEstablishConnection() API above since no connection is established.
|
118 | 137 | * @return nil if request submitted successfully, otherwise a NSError object corresponding to the error.
|
119 | 138 | */
|
120 |
| -- (NSError *)stopConnecting; |
| 139 | +- (NSError * _Nullable)stopConnecting; |
121 | 140 |
|
122 | 141 | /**
|
123 | 142 | * @brief Sets the internal connection state of this MCCastingPlayer to "disconnected"
|
|
0 commit comments