vala r818 - in trunk: . vapi
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r818 - in trunk: . vapi
- Date: Wed, 9 Jan 2008 22:29:35 +0000 (GMT)
Author: juergbi
Date: Wed Jan 9 22:29:35 2008
New Revision: 818
URL: http://svn.gnome.org/viewvc/vala?rev=818&view=rev
Log:
2008-01-09 Juerg Billeter <j bitron ch>
* vapi/glib-2.0.vapi: add bindings for data checksums
Modified:
trunk/ChangeLog
trunk/vapi/glib-2.0.vapi
Modified: trunk/vapi/glib-2.0.vapi
==============================================================================
--- trunk/vapi/glib-2.0.vapi (original)
+++ trunk/vapi/glib-2.0.vapi Wed Jan 9 22:29:35 2008
@@ -1464,7 +1464,32 @@
public static size_t decode_step (string! _in, size_t len, uchar[] _out, out int state, out uint save);
public static string decode (string! text, out size_t out_len);
}
-
+
+ /* Data Checksums */
+
+ [CCode (cprefix = "G_CHECKSUM_")]
+ public enum ChecksumType {
+ MD5,
+ SHA1,
+ SHA256;
+
+ public ssize_t get_length ();
+ }
+
+ [CCode (free_function = "g_checksum_free")]
+ public class Checksum {
+ public Checksum (ChecksumType checksum_type);
+ public Checksum copy ();
+ [NoArrayLength]
+ public void update (uchar[] data, size_t length);
+ public weak string get_string ();
+ [NoArrayLength]
+ public void get_digest (uint8[] buffer, ref size_t digest_len);
+ [NoArrayLength]
+ public static string compute_for_data (ChecksumType checksum_type, uchar[] data, size_t length);
+ public static string compute_for_string (ChecksumType checksum_type, string str, size_t length);
+ }
+
/* Date and Time Functions */
public struct TimeVal {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]