[MediaController] Add new APIs for sending command and its callback (#396)
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Remoting / MediaController / CommandCompletedEventArgs.cs
1 /*
2  * Copyright (c) 2018 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 Tizen.Applications;
19
20 namespace Tizen.Multimedia.Remoting
21 {
22     /// <summary>
23     /// Provides data for the <see cref="MediaController.CommandCompleted"/> event.
24     /// </summary>
25     /// <since_tizen> 5 </since_tizen>
26     internal class CommandCompletedEventArgs : EventArgs
27     {
28         /// <summary>
29         /// Initializes a new instance of the <see cref="CommandCompletedEventArgs"/> class.
30         /// </summary>
31         /// <param name="requestId">The request id for each command.</param>
32         /// <param name="result">The result of commands.</param>
33         /// <since_tizen> 5 </since_tizen>
34         internal CommandCompletedEventArgs(string requestId, MediaControllerError result)
35         {
36             RequestId = requestId;
37             Result = result;
38         }
39
40         /// <summary>
41         /// Initializes a new instance of the <see cref="CommandCompletedEventArgs"/> class with extra data.
42         /// </summary>
43         /// <param name="requestId">The request id for each command.</param>
44         /// <param name="result">The result of commands.</param>
45         /// <param name="bundle">The extra data.</param>
46         /// <since_tizen> 5 </since_tizen>
47         internal CommandCompletedEventArgs(string requestId, MediaControllerError result, Bundle bundle)
48             : this(requestId, result)
49         {
50             Bundle = bundle;
51         }
52
53         /// <summary>
54         /// Gets the request Id.
55         /// </summary>
56         /// <since_tizen> 5 </since_tizen>
57         internal string RequestId { get; }
58
59         /// <summary>
60         /// Gets the result code for matched commands.
61         /// </summary>
62         /// <since_tizen> 5 </since_tizen>
63         internal MediaControllerError Result { get; }
64
65         /// <summary>
66         /// Gets the extra data.
67         /// </summary>
68         /// <since_tizen> 5 </since_tizen>
69         internal Bundle Bundle { get; }
70     }
71 }