Skip to content

Commit 789b4f6

Browse files
authored
Applying comments from Azure Board. (Azure#33159)
* to receive a list of participants for Mute/Unmute operations. * removes MuteAll and UnmuteAll. * Rename ACSCallParticipantInternal for CallParticipantInternal.
1 parent b15b537 commit 789b4f6

21 files changed

+436
-1468
lines changed

sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java

Lines changed: 19 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@
1010
import com.azure.communication.callautomation.models.CallingServerErrorException;
1111
import com.azure.communication.callautomation.models.HangUpOptions;
1212
import com.azure.communication.callautomation.models.ListParticipantsResult;
13-
import com.azure.communication.callautomation.models.MuteAllParticipantsOptions;
14-
import com.azure.communication.callautomation.models.MuteParticipantOptions;
13+
import com.azure.communication.callautomation.models.MuteParticipantsOptions;
1514
import com.azure.communication.callautomation.models.MuteParticipantsResult;
1615
import com.azure.communication.callautomation.models.RemoveParticipantsOptions;
1716
import com.azure.communication.callautomation.models.RemoveParticipantsResult;
1817
import com.azure.communication.callautomation.models.TransferCallResult;
1918
import com.azure.communication.callautomation.models.TransferToParticipantCallOptions;
20-
import com.azure.communication.callautomation.models.UnmuteAllParticipantsOptions;
21-
import com.azure.communication.callautomation.models.UnmuteParticipantOptions;
19+
import com.azure.communication.callautomation.models.UnmuteParticipantsOptions;
2220
import com.azure.communication.callautomation.models.UnmuteParticipantsResult;
2321
import com.azure.communication.common.CommunicationIdentifier;
2422
import com.azure.core.annotation.ReturnType;
@@ -226,89 +224,46 @@ public Response<RemoveParticipantsResult> removeParticipantsWithResponse(RemoveP
226224
}
227225

228226
/**
229-
* Mutes a single participant in the call.
230-
* @param targetParticipant - Participant to be muted.
227+
* Mutes participants in the call.
228+
*
229+
* @param targetParticipant - Participant to be muted. Only ACS Users are currently supported.
231230
* @return A MuteParticipantsResult object.
232231
*/
233232
@ServiceMethod(returns = ReturnType.SINGLE)
234-
public MuteParticipantsResult muteParticipant(CommunicationIdentifier targetParticipant) {
235-
return callConnectionAsync.muteParticipantAsync(targetParticipant).block();
233+
public MuteParticipantsResult muteParticipants(CommunicationIdentifier targetParticipant) {
234+
return callConnectionAsync.muteParticipantsAsync(targetParticipant).block();
236235
}
237236

238237
/**
239-
* Mute a single participant in the call.
240-
* @param muteParticipantOptions - Options for the request.
238+
* Mute participants in the call.
239+
* @param muteParticipantsOptions - Options for the request.
241240
* @param context A {@link Context} representing the request context.
242241
* @return a Response containing the MuteParticipantsResult object.
243242
*/
244243
@ServiceMethod(returns = ReturnType.SINGLE)
245-
public Response<MuteParticipantsResult> muteParticipantWithResponse(MuteParticipantOptions muteParticipantOptions, Context context) {
246-
return callConnectionAsync.muteParticipantWithResponseInternal(muteParticipantOptions, context).block();
247-
}
248-
249-
/**
250-
* Mute all participants in the call, except for the initiator.
251-
* @param requestInitiator Optional - if passed, this participant won't be muted. If not passed,
252-
* the server won't be muted.
253-
* @return a MuteParticipantsResult object.
254-
*/
255-
@ServiceMethod(returns = ReturnType.SINGLE)
256-
public MuteParticipantsResult muteAllParticipants(CommunicationIdentifier requestInitiator) {
257-
return callConnectionAsync.muteAllParticipantsAsync(requestInitiator).block();
258-
}
259-
260-
261-
/**
262-
* Mute all participants in the call, except for the initiator.
263-
* @param options - Options for the operation.
264-
* @param context A {@link Context} representing the request context.
265-
* @return a Response containing a MuteParticipantsResult object.
266-
*/
267-
@ServiceMethod(returns = ReturnType.SINGLE)
268-
public Response<MuteParticipantsResult> muteAllParticipantsWithResponse(MuteAllParticipantsOptions options, Context context) {
269-
return callConnectionAsync.muteAllParticipantsWithResponseInternal(options, context).block();
244+
public Response<MuteParticipantsResult> muteParticipantsWithResponse(MuteParticipantsOptions muteParticipantsOptions, Context context) {
245+
return callConnectionAsync.muteParticipantWithResponseInternal(muteParticipantsOptions, context).block();
270246
}
271247

272248
/**
273-
* Unmutes a single participant in the call.
274-
* @param targetParticipant - Participant to be muted.
249+
* Unmutes participants in the call.
250+
* @param targetParticipant - Participant to be unmuted. Only ACS Users are currently supported.
275251
* @return An UnmuteParticipantsResult object.
276252
*/
277253
@ServiceMethod(returns = ReturnType.SINGLE)
278-
public UnmuteParticipantsResult unmuteParticipant(CommunicationIdentifier targetParticipant) {
279-
return callConnectionAsync.unmuteParticipantAsync(targetParticipant).block();
254+
public UnmuteParticipantsResult unmuteParticipants(CommunicationIdentifier targetParticipant) {
255+
return callConnectionAsync.unmuteParticipantsAsync(targetParticipant).block();
280256
}
281257

282258
/**
283-
* Mute a single participant in the call.
284-
* @param unmuteParticipantOptions - Options for the request.
259+
* Unmutes participants in the call.
260+
* @param unmuteParticipantsOptions - Options for the request.
285261
* @param context A {@link Context} representing the request context.
286262
* @return a Response containing the UnmuteParticipantsResult object.
287263
*/
288264
@ServiceMethod(returns = ReturnType.SINGLE)
289-
public Response<UnmuteParticipantsResult> unmuteParticipantWithResponse(UnmuteParticipantOptions unmuteParticipantOptions, Context context) {
290-
return callConnectionAsync.unmuteParticipantWithResponseInternal(unmuteParticipantOptions, context).block();
291-
}
292-
293-
/**
294-
* Unmute all participants in the call.
295-
* @return an UnmuteParticipantsResult object.
296-
*/
297-
@ServiceMethod(returns = ReturnType.SINGLE)
298-
public UnmuteParticipantsResult unmuteAllParticipants() {
299-
return callConnectionAsync.unmuteAllParticipantsAsync().block();
300-
}
301-
302-
303-
/**
304-
* Unmute all participants in the call, except for the initiator.
305-
* @param options - Options for the operation.
306-
* @param context A {@link Context} representing the request context.
307-
* @return a Response containing an UnmuteParticipantsResult object.
308-
*/
309-
@ServiceMethod(returns = ReturnType.SINGLE)
310-
public Response<UnmuteParticipantsResult> unmuteAllParticipantsWithResponse(UnmuteAllParticipantsOptions options, Context context) {
311-
return callConnectionAsync.unmuteAllParticipantsWithResponseInternal(options, context).block();
265+
public Response<UnmuteParticipantsResult> unmuteParticipantsWithResponse(UnmuteParticipantsOptions unmuteParticipantsOptions, Context context) {
266+
return callConnectionAsync.unmuteParticipantWithResponseInternal(unmuteParticipantsOptions, context).block();
312267
}
313268

314269
//region Content management Actions

0 commit comments

Comments
 (0)