Merge "[WiFi] GetConnectedAP() Returns null if there is no connected AP"
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia / Common / IMediaBuffer.cs
1 /*
2  * Copyright (c) 2016 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
19 namespace Tizen.Multimedia
20 {
21     /// <summary>
22     /// Provides functionality to read and write the media buffer.
23     /// </summary>
24     /// <since_tizen> 3 </since_tizen>
25     public interface IMediaBuffer
26     {
27         /// <summary>
28         /// Gets or sets a value at the specified index.
29         /// </summary>
30         /// <param name="index">The index of the value to get or set.</param>
31         /// <exception cref="ArgumentOutOfRangeException">
32         ///     <paramref name="index"/> is less than zero.<br/>
33         ///     -or-<br/>
34         ///     <paramref name="index"/> is equal to or greater than <see cref="Length"/>.
35         /// </exception>
36         /// <exception cref="ObjectDisposedException">The object that owns the current buffer has already been disposed of.</exception>
37         /// <exception cref="InvalidOperationException">The buffer is not available, i.e. not writable state.</exception>
38         /// <since_tizen> 4 </since_tizen>
39         byte this[int index]
40         {
41             get;
42             set;
43         }
44
45         /// <summary>
46         /// Gets the size of the buffer, in bytes.
47         /// </summary>
48         /// <since_tizen> 4 </since_tizen>
49         int Length { get; }
50
51         /// <summary>
52         /// Gets the value indicating whether the <see cref="IMediaBuffer"/> is read-only.
53         /// </summary>
54         /// <value> true if the <see cref="IMediaBuffer"/> is read-only; otherwise, false.</value>
55         /// <since_tizen> 4 </since_tizen>
56         bool IsReadOnly { get; }
57
58         /// <summary>
59         /// Copies data from the buffer to a byte array.
60         /// </summary>
61         /// <param name="dest">The array to copy to.</param>
62         /// <param name="startIndex">The zero-based index in the source array where copying should start.</param>
63         /// <param name="length">The number of array elements to copy.</param>
64         /// <exception cref="ArgumentNullException"><paramref name="dest"/> is null.</exception>
65         /// <exception cref="ArgumentOutOfRangeException"><paramref name="startIndex"/> or <paramref name="length"/> is not valid.</exception>
66         /// <exception cref="ObjectDisposedException">The object that owns the current buffer has already been disposed of.</exception>
67         /// <since_tizen> 4 </since_tizen>
68         void CopyTo(byte[] dest, int startIndex, int length);
69
70         /// <summary>
71         /// Copies data from the buffer to a byte array.
72         /// </summary>
73         /// <param name="dest">The array to copy to.</param>
74         /// <param name="startIndex">The zero-based index in the source array where copying should start.</param>
75         /// <param name="length">The number of array elements to copy.</param>
76         /// <param name="offset">The zero-based index in the buffer where copying should start.</param>
77         /// <exception cref="ArgumentNullException"><paramref name="dest"/> is null.</exception>
78         /// <exception cref="ArgumentOutOfRangeException"><paramref name="startIndex"/>, <paramref name="length"/>,
79         ///     or <paramref name="offset"/> is not valid.</exception>
80         /// <exception cref="ObjectDisposedException">The object that owns the current buffer has already been disposed of.</exception>
81         /// <since_tizen> 4 </since_tizen>
82         void CopyTo(byte[] dest, int startIndex, int length, int offset);
83
84         /// <summary>
85         /// Copies data from a byte array to the buffer.
86         /// </summary>
87         /// <param name="source">The array to copy from.</param>
88         /// <param name="startIndex">The zero-based index in the destination array where copying should start.</param>
89         /// <param name="length">The number of elements to copy.</param>
90         /// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
91         /// <exception cref="ArgumentOutOfRangeException"><paramref name="startIndex"/> or <paramref name="length"/> is not valid.</exception>
92         /// <exception cref="ObjectDisposedException">The object that owns the current buffer has already been disposed of.</exception>
93         /// <exception cref="InvalidOperationException">The buffer is not available. i.e. not writable state.</exception>
94         /// <since_tizen> 3 </since_tizen>
95         void CopyFrom(byte[] source, int startIndex, int length);
96
97         /// <summary>
98         /// Copies data from a byte array to the buffer.
99         /// </summary>
100         /// <param name="source">The array to copy from.</param>
101         /// <param name="startIndex">The zero-based index in the destination array where copying should start.</param>
102         /// <param name="length">The number of elements to copy.</param>
103         /// <param name="offset">The zero-based index in the buffer where copying should start.</param>
104         /// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
105         /// <exception cref="ArgumentOutOfRangeException"><paramref name="startIndex"/>, <paramref name="length"/>,
106         ///     or <paramref name="offset"/> is not valid.</exception>
107         /// <exception cref="ObjectDisposedException">The object that owns the current buffer has already been disposed of.</exception>
108         /// <exception cref="InvalidOperationException">The buffer is not available. i.e. not writable state.</exception>
109         /// <since_tizen> 3 </since_tizen>
110         void CopyFrom(byte[] source, int startIndex, int length, int offset);
111     }
112 }