summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eina_mono/eina_binbuf.cs
diff options
context:
space:
mode:
authorBruno da Silva Belo <brunodasilvabelo@gmail.com>2019-10-08 22:05:34 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-08 22:06:20 -0300
commit85c57500ea8cbbea1ecb7b489060df8855ed1387 (patch)
tree20673d15e20b765a2512ffd7ee56f20ac3f0477c /src/bindings/mono/eina_mono/eina_binbuf.cs
parent3f4c7637dbee7d7ab0eac8aff5b21bb1ab2cf225 (diff)
csharp: updating eina_binbuf docs and hide api.
Reviewers: felipealmeida, lauromoura, segfaultxavi, woohyun Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8293 Differential Revision: https://phab.enlightenment.org/D10310
Diffstat (limited to 'src/bindings/mono/eina_mono/eina_binbuf.cs')
-rw-r--r--src/bindings/mono/eina_mono/eina_binbuf.cs64
1 files changed, 52 insertions, 12 deletions
diff --git a/src/bindings/mono/eina_mono/eina_binbuf.cs b/src/bindings/mono/eina_mono/eina_binbuf.cs
index e2c2d84..63b42e2 100644
--- a/src/bindings/mono/eina_mono/eina_binbuf.cs
+++ b/src/bindings/mono/eina_mono/eina_binbuf.cs
@@ -2,14 +2,14 @@
2 2
3using System; 3using System;
4using System.Runtime.InteropServices; 4using System.Runtime.InteropServices;
5using System.ComponentModel;
5 6
6namespace Eina 7namespace Eina
7{ 8{
8 9
9/// <summary> 10/// <summary>
10/// A Generic buffer designed to be a mutable string. 11/// A Generic buffer designed to be a mutable string.
11/// 12/// <para>Since EFL 1.23.</para>
12/// Since EFL 1.23.
13/// </summary> 13/// </summary>
14public class Binbuf : IDisposable 14public class Binbuf : IDisposable
15{ 15{
@@ -45,11 +45,16 @@ public class Binbuf : IDisposable
45 eina_binbuf_slice_get(IntPtr buf); 45 eina_binbuf_slice_get(IntPtr buf);
46 46
47 /// <summary>Pointer to the native buffer.</summary> 47 /// <summary>Pointer to the native buffer.</summary>
48 [EditorBrowsable(EditorBrowsableState.Never)]
48 public IntPtr Handle {get;set;} = IntPtr.Zero; 49 public IntPtr Handle {get;set;} = IntPtr.Zero;
49 ///<summary>Whether this wrapper owns the native buffer.</summary> 50 /// <summary>Whether this wrapper owns the native buffer.
51 /// <para>Since EFL 1.23.</para>
52 /// </summary>
50 public bool Own {get;set;} 53 public bool Own {get;set;}
51 54
52 /// <summary> Length of the buffer.</summary> 55 /// <summary> Length of the buffer.
56 /// <para>Since EFL 1.23.</para>
57 /// </summary>
53 public int Length 58 public int Length
54 { 59 {
55 get { return (int)GetLength(); } 60 get { return (int)GetLength(); }
@@ -67,12 +72,17 @@ public class Binbuf : IDisposable
67 72
68 /// <summary> 73 /// <summary>
69 /// Create a new buffer. 74 /// Create a new buffer.
75 /// <para>Since EFL 1.23.</para>
70 /// </summary> 76 /// </summary>
71 public Binbuf() 77 public Binbuf()
72 { 78 {
73 InitNew(); 79 InitNew();
74 } 80 }
75 81
82 /// <summary>
83 /// Create a new buffer.
84 /// <para>Since EFL 1.23.</para>
85 /// </summary>
76 public Binbuf(byte[] str, uint? length = null) 86 public Binbuf(byte[] str, uint? length = null)
77 { 87 {
78 InitNew(); 88 InitNew();
@@ -90,6 +100,7 @@ public class Binbuf : IDisposable
90 /// <summary> 100 /// <summary>
91 /// Create a new buffer with elements. 101 /// Create a new buffer with elements.
92 /// </summary> 102 /// </summary>
103 /// <para>Since EFL 1.23.</para>
93 /// <param name="bb">Elements to initialize the new buffer.</param> 104 /// <param name="bb">Elements to initialize the new buffer.</param>
94 public Binbuf(Binbuf bb) 105 public Binbuf(Binbuf bb)
95 { 106 {
@@ -106,6 +117,7 @@ public class Binbuf : IDisposable
106 /// </summary> 117 /// </summary>
107 /// <param name="handle">The native handle to be wrapped.</param> 118 /// <param name="handle">The native handle to be wrapped.</param>
108 /// <param name="own">Whether this wrapper owns the native handle.</param> 119 /// <param name="own">Whether this wrapper owns the native handle.</param>
120 [EditorBrowsable(EditorBrowsableState.Never)]
109 public Binbuf(IntPtr handle, bool own) 121 public Binbuf(IntPtr handle, bool own)
110 { 122 {
111 Handle = handle; 123 Handle = handle;
@@ -117,8 +129,11 @@ public class Binbuf : IDisposable
117 Dispose(false); 129 Dispose(false);
118 } 130 }
119 131
120 /// <summary>Disposes of this wrapper, releasing the native buffer if owned.</summary> 132 /// <summary>Disposes of this wrapper, releasing the native buffer if owned.
121 /// <param name="disposing">True if this was called from <see cref="Dispose()"/> public method. False if 133 /// <para>Since EFL 1.23.</para>
134 /// </summary>
135 /// <param name="disposing">True if this was called from
136 /// <see cref="Dispose()"/> public method. False if
122 /// called from the C# finalizer.</param> 137 /// called from the C# finalizer.</param>
123 protected virtual void Dispose(bool disposing) 138 protected virtual void Dispose(bool disposing)
124 { 139 {
@@ -137,14 +152,18 @@ public class Binbuf : IDisposable
137 } 152 }
138 } 153 }
139 154
140 /// <summary>Releases the native resources held by this instance.</summary> 155 /// <summary>Releases the native resources held by this instance.
156 /// <para>Since EFL 1.23.</para>
157 /// </summary>
141 public void Dispose() 158 public void Dispose()
142 { 159 {
143 Dispose(true); 160 Dispose(true);
144 GC.SuppressFinalize(this); 161 GC.SuppressFinalize(this);
145 } 162 }
146 163
147 /// <summary>Releases the native resources held by this instance.</summary> 164 /// <summary>Releases the native resources held by this instance.
165 /// <para>Since EFL 1.23.</para>
166 /// </summary>
148 public void Free() 167 public void Free()
149 { 168 {
150 Dispose(); 169 Dispose();
@@ -152,6 +171,7 @@ public class Binbuf : IDisposable
152 171
153 /// <summary> 172 /// <summary>
154 /// Releases the native buffer. 173 /// Releases the native buffer.
174 /// <para>Since EFL 1.23.</para>
155 /// </summary> 175 /// </summary>
156 /// <returns>The native buffer.</returns> 176 /// <returns>The native buffer.</returns>
157 public IntPtr Release() 177 public IntPtr Release()
@@ -163,6 +183,7 @@ public class Binbuf : IDisposable
163 183
164 /// <summary> 184 /// <summary>
165 /// Resets the buffer. 185 /// Resets the buffer.
186 /// <para>Since EFL 1.23.</para>
166 /// </summary> 187 /// </summary>
167 public void Reset() 188 public void Reset()
168 { 189 {
@@ -170,7 +191,9 @@ public class Binbuf : IDisposable
170 } 191 }
171 192
172 /// <summary> 193 /// <summary>
173 /// Appends a string of inputed buffer's length to the buffer, reallocating as necessary. 194 /// Appends a string of inputed buffer's length to the buffer,
195 /// reallocating as necessary.
196 /// <para>Since EFL 1.23.</para>
174 /// </summary> 197 /// </summary>
175 /// <param name="str">The string buffer.</param> 198 /// <param name="str">The string buffer.</param>
176 /// <returns>true on success, false if data could not be appended.</returns> 199 /// <returns>true on success, false if data could not be appended.</returns>
@@ -180,7 +203,9 @@ public class Binbuf : IDisposable
180 } 203 }
181 204
182 /// <summary> 205 /// <summary>
183 /// Appends a string of exact length to the buffer, reallocating as necessary. 206 /// Appends a string of exact length to the buffer, reallocating
207 /// as necessary.
208 /// <para>Since EFL 1.23.</para>
184 /// </summary> 209 /// </summary>
185 /// <param name="str">The string buffer.</param> 210 /// <param name="str">The string buffer.</param>
186 /// <param name="length">The exact length to use.</param> 211 /// <param name="length">The exact length to use.</param>
@@ -192,6 +217,7 @@ public class Binbuf : IDisposable
192 217
193 /// <summary> 218 /// <summary>
194 /// Appends a Binbuf to the buffer. 219 /// Appends a Binbuf to the buffer.
220 /// <para>Since EFL 1.23.</para>
195 /// </summary> 221 /// </summary>
196 /// <param name="bb">The buffer to be appended.</param> 222 /// <param name="bb">The buffer to be appended.</param>
197 /// <returns>true on success, false if data could not be appended.</returns> 223 /// <returns>true on success, false if data could not be appended.</returns>
@@ -202,6 +228,7 @@ public class Binbuf : IDisposable
202 228
203 /// <summary> 229 /// <summary>
204 /// Appends a character to the buffer, reallocating as necessary. 230 /// Appends a character to the buffer, reallocating as necessary.
231 /// <para>Since EFL 1.23.</para>
205 /// </summary> 232 /// </summary>
206 /// <param name="c">The char to appended.</param> 233 /// <param name="c">The char to appended.</param>
207 /// <returns>true on success, false if data could not be appended.</returns> 234 /// <returns>true on success, false if data could not be appended.</returns>
@@ -212,6 +239,7 @@ public class Binbuf : IDisposable
212 239
213 /// <summary> 240 /// <summary>
214 /// Appends a slice to the buffer, reallocating as necessary. 241 /// Appends a slice to the buffer, reallocating as necessary.
242 /// <para>Since EFL 1.23.</para>
215 /// </summary> 243 /// </summary>
216 /// <param name="slice">The slice to appended.</param> 244 /// <param name="slice">The slice to appended.</param>
217 /// <returns>true on success, false if data could not be appended.</returns> 245 /// <returns>true on success, false if data could not be appended.</returns>
@@ -221,7 +249,9 @@ public class Binbuf : IDisposable
221 } 249 }
222 250
223 /// <summary> 251 /// <summary>
224 /// Inserts a string of inputed buffer's length into the buffer, reallocating as necessary. 252 /// Inserts a string of inputed buffer's length into the buffer,
253 /// reallocating as necessary.
254 /// <para>Since EFL 1.23.</para>
225 /// </summary> 255 /// </summary>
226 /// <param name="str">The string buffer.</param> 256 /// <param name="str">The string buffer.</param>
227 /// <param name="pos">The position to insert the string.</param> 257 /// <param name="pos">The position to insert the string.</param>
@@ -232,7 +262,9 @@ public class Binbuf : IDisposable
232 } 262 }
233 263
234 /// <summary> 264 /// <summary>
235 /// Inserts a string of exact length into the buffer, reallocating as necessary. 265 /// Inserts a string of exact length into the buffer,
266 /// reallocating as necessary.
267 /// <para>Since EFL 1.23.</para>
236 /// </summary> 268 /// </summary>
237 /// <param name="str">The string buffer.</param> 269 /// <param name="str">The string buffer.</param>
238 /// <param name="length">The exact length to use.</param> 270 /// <param name="length">The exact length to use.</param>
@@ -245,6 +277,7 @@ public class Binbuf : IDisposable
245 277
246 /// <summary> 278 /// <summary>
247 /// Inserts a character into the buffer, reallocating as necessary. 279 /// Inserts a character into the buffer, reallocating as necessary.
280 /// <para>Since EFL 1.23.</para>
248 /// </summary> 281 /// </summary>
249 /// <param name="c">The char to appended.</param> 282 /// <param name="c">The char to appended.</param>
250 /// <param name="pos">The position to insert the string.</param> 283 /// <param name="pos">The position to insert the string.</param>
@@ -256,6 +289,7 @@ public class Binbuf : IDisposable
256 289
257 /// <summary> 290 /// <summary>
258 /// Inserts a slice into the buffer, reallocating as necessary. 291 /// Inserts a slice into the buffer, reallocating as necessary.
292 /// <para>Since EFL 1.23.</para>
259 /// </summary> 293 /// </summary>
260 /// <param name="slice">The slice to appended.</param> 294 /// <param name="slice">The slice to appended.</param>
261 /// <param name="pos">The position to insert the string.</param> 295 /// <param name="pos">The position to insert the string.</param>
@@ -267,6 +301,7 @@ public class Binbuf : IDisposable
267 301
268 /// <summary> 302 /// <summary>
269 /// Removes a slice of the buffer. 303 /// Removes a slice of the buffer.
304 /// <para>Since EFL 1.23.</para>
270 /// </summary> 305 /// </summary>
271 /// <param name="start">The initial (inclusive) slice position to start 306 /// <param name="start">The initial (inclusive) slice position to start
272 /// removing, in bytes.</param> 307 /// removing, in bytes.</param>
@@ -280,6 +315,7 @@ public class Binbuf : IDisposable
280 315
281 /// <summary> 316 /// <summary>
282 /// Retrieves a string to the contents of the buffer. 317 /// Retrieves a string to the contents of the buffer.
318 /// <para>Since EFL 1.23.</para>
283 /// </summary> 319 /// </summary>
284 /// <returns>The string that is contained in buffer.</returns> 320 /// <returns>The string that is contained in buffer.</returns>
285 public byte[] GetBytes() 321 public byte[] GetBytes()
@@ -300,6 +336,7 @@ public class Binbuf : IDisposable
300 /// Retrieves a string to the contents of the buffer. 336 /// Retrieves a string to the contents of the buffer.
301 /// </summary> 337 /// </summary>
302 /// <returns>The string that is contained in buffer.</returns> 338 /// <returns>The string that is contained in buffer.</returns>
339 [EditorBrowsable(EditorBrowsableState.Never)]
303 public IntPtr GetStringNative() 340 public IntPtr GetStringNative()
304 { 341 {
305 return eina_binbuf_string_get(Handle); 342 return eina_binbuf_string_get(Handle);
@@ -307,6 +344,7 @@ public class Binbuf : IDisposable
307 344
308 /// <summary> 345 /// <summary>
309 /// Frees the buffer. 346 /// Frees the buffer.
347 /// <para>Since EFL 1.23.</para>
310 /// </summary> 348 /// </summary>
311 public void FreeString() 349 public void FreeString()
312 { 350 {
@@ -315,6 +353,7 @@ public class Binbuf : IDisposable
315 353
316 /// <summary> 354 /// <summary>
317 /// Retrieves the length of the buffer's contents. 355 /// Retrieves the length of the buffer's contents.
356 /// <para>Since EFL 1.23.</para>
318 /// </summary> 357 /// </summary>
319 public UIntPtr GetLength() 358 public UIntPtr GetLength()
320 { 359 {
@@ -323,6 +362,7 @@ public class Binbuf : IDisposable
323 362
324 /// <summary> 363 /// <summary>
325 /// Gets a slice of the buffer's contents. 364 /// Gets a slice of the buffer's contents.
365 /// <para>Since EFL 1.23.</para>
326 /// </summary> 366 /// </summary>
327 Eina.Slice GetSlice() 367 Eina.Slice GetSlice()
328 { 368 {