Skip to content

Commit 42b54ef

Browse files
Adding Recording and Play Events. (Azure#30471)
* Updating Swagger * AutoResting new swagger * Adding Events for CallRecording and Play * Fixing build * Export API * Adding EventParser tests * Adapting to new Events formats * [Azure.Communication.CallingServer] Fix content routes (Azure#30542) * Fixing comments Co-authored-by: williamzhao87 <[email protected]>
1 parent 893946e commit 42b54ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1095
-360
lines changed

sdk/communication/Azure.Communication.CallingServer/api/Azure.Communication.CallingServer.netstandard2.0.cs

Lines changed: 74 additions & 24 deletions
Large diffs are not rendered by default.

sdk/communication/Azure.Communication.CallingServer/src/CallRecording.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected CallRecording()
5151
/// </summary>
5252
/// <param name="options">Options for start recording</param>
5353
/// <param name="cancellationToken">The cancellation token.</param>
54-
public virtual Response<RecordingStatusResult> StartRecording(StartRecordingOptions options, CancellationToken cancellationToken = default)
54+
public virtual Response<RecordingStateResult> StartRecording(StartRecordingOptions options, CancellationToken cancellationToken = default)
5555
{
5656
if (options == null) throw new ArgumentNullException(nameof(options));
5757

@@ -93,7 +93,7 @@ public virtual Response<RecordingStatusResult> StartRecording(StartRecordingOpti
9393
/// </summary>
9494
/// <param name="options">Options for start recording</param>
9595
/// <param name="cancellationToken">The cancellation token.</param>
96-
public virtual async Task<Response<RecordingStatusResult>> StartRecordingAsync(StartRecordingOptions options, CancellationToken cancellationToken = default)
96+
public virtual async Task<Response<RecordingStateResult>> StartRecordingAsync(StartRecordingOptions options, CancellationToken cancellationToken = default)
9797
{
9898
if (options == null) throw new ArgumentNullException(nameof(options));
9999

@@ -135,7 +135,7 @@ public virtual async Task<Response<RecordingStatusResult>> StartRecordingAsync(S
135135
/// </summary>
136136
/// <param name="recordingId">The recording id to get the state of.</param>
137137
/// <param name="cancellationToken">The cancellation token.</param>
138-
public virtual Response<RecordingStatusResult> GetRecordingState(string recordingId, CancellationToken cancellationToken = default)
138+
public virtual Response<RecordingStateResult> GetRecordingState(string recordingId, CancellationToken cancellationToken = default)
139139
{
140140
using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CallRecording)}.{nameof(GetRecordingState)}");
141141
scope.Start();
@@ -158,7 +158,7 @@ public virtual Response<RecordingStatusResult> GetRecordingState(string recordin
158158
/// </summary>
159159
/// <param name="recordingId">The recording id to get the state of.</param>
160160
/// <param name="cancellationToken">The cancellation token.</param>
161-
public virtual async Task<Response<RecordingStatusResult>> GetRecordingStateAsync(string recordingId, CancellationToken cancellationToken = default)
161+
public virtual async Task<Response<RecordingStateResult>> GetRecordingStateAsync(string recordingId, CancellationToken cancellationToken = default)
162162
{
163163
using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(CallRecording)}.{nameof(GetRecordingState)}");
164164
scope.Start();
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
using System;
5+
using System.Text.Json;
6+
using System.Text.Json.Serialization;
7+
8+
namespace Azure.Communication.CallingServer.Converters
9+
{
10+
/// <summary>
11+
/// Converts the RecordingState object into json correctly.
12+
/// </summary>
13+
internal class RecordingStateJsonConverter : JsonConverter<RecordingState>
14+
{
15+
public override RecordingState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => new RecordingState(reader.GetString());
16+
17+
public override void Write(Utf8JsonWriter writer, RecordingState value, JsonSerializerOptions options) => writer.WriteStringValue(value.ToString());
18+
}
19+
}

sdk/communication/Azure.Communication.CallingServer/src/Generated/CallAutomationModelFactory.cs

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallingServer/src/Generated/ContentRestClient.cs

Lines changed: 15 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallingServer/src/Generated/Models/AcsEventType.cs

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallingServer/src/Generated/Models/CallConnectionPropertiesDtoInternal.Serialization.cs

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallingServer/src/Generated/Models/CallConnectionPropertiesDtoInternal.cs

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallingServer/src/Generated/Models/CallRecordingStateChanged.Serialization.cs

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.CallingServer/src/Generated/Models/CallRecordingStateChanged.cs

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)