Merge remote-tracking branch 'origin/master' into tizen
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Remoting / WebRTC / WebRTCSignalingEventArgs.cs
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18 using System.ComponentModel;
19
20 namespace Tizen.Multimedia.Remoting
21 {
22     /// <summary>
23     /// Provides data for the <see cref="WebRTCSignalingClient.SignalingMessage"/> event.
24     /// </summary>
25     /// <since_tizen> 9 </since_tizen>
26     [EditorBrowsable(EditorBrowsableState.Never)]
27     public class WebRTCSignalingEventArgs : EventArgs
28     {
29         [EditorBrowsable(EditorBrowsableState.Never)]
30         internal WebRTCSignalingEventArgs(SignalingMessageType type, string message)
31         {
32             MessageType = type;
33             Message = message;
34         }
35
36         /// <summary>
37         /// Gets the signaling message type.
38         /// </summary>
39         /// <value>The signaling message type.</value>
40         /// <since_tizen> 9 </since_tizen>
41         [EditorBrowsable(EditorBrowsableState.Never)]
42         public SignalingMessageType MessageType { get; }
43
44         /// <summary>
45         /// Gets the message from remote peer.
46         /// </summary>
47         /// <value>The message.</value>
48         /// <since_tizen> 9 </since_tizen>
49         [EditorBrowsable(EditorBrowsableState.Never)]
50         public string Message { get; }
51
52         /// <summary>
53         /// Returns a string that represents the current object.
54         /// </summary>
55         /// <returns>A string that represents the current object.</returns>
56         /// <since_tizen> 9 </since_tizen>
57         [EditorBrowsable(EditorBrowsableState.Never)]
58         public override string ToString() => $"MessageType={MessageType}, Message={Message}";
59     }
60 }