2 * Copyright (c) 2018 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using Tizen.Applications;
20 namespace Tizen.Multimedia.Remoting
23 /// Provides data for the <see cref="MediaController.CommandCompleted"/> or
24 /// <see cref="MediaControlServer.CommandCompleted"/>event.
26 /// <since_tizen> 5 </since_tizen>
27 internal class CommandCompletedEventArgs : EventArgs
30 /// Initializes a new instance of the <see cref="CommandCompletedEventArgs"/> class.
32 /// <param name="requestId">The request id for each command.</param>
33 /// <param name="result">The result of commands.</param>
34 /// <exception cref="ArgumentException"><paramref name="result"/> is not vailid.</exception>
35 /// <exception cref="ArgumentNullException"><paramref name="requestId"/> is null.</exception>
36 /// <since_tizen> 5 </since_tizen>
37 internal CommandCompletedEventArgs(string requestId, int result)
39 RequestId = requestId ?? throw new ArgumentNullException(nameof(requestId));
44 /// Initializes a new instance of the <see cref="CommandCompletedEventArgs"/> class with extra data.
46 /// <param name="requestId">The request id for each command.</param>
47 /// <param name="result">The result of commands.</param>
48 /// <param name="bundle">The extra data.</param>
49 /// <since_tizen> 5 </since_tizen>
50 internal CommandCompletedEventArgs(string requestId, int result, Bundle bundle)
51 : this(requestId, result)
57 /// Gets the request Id.
59 /// <since_tizen> 5 </since_tizen>
60 internal string RequestId { get; }
63 /// Gets the result code for matched commands.
65 /// <since_tizen> 5 </since_tizen>
66 internal int Result { get; }
69 /// Gets the extra data.
71 /// <since_tizen> 5 </since_tizen>
72 internal Bundle Bundle { get; }