Remove all uses of G_CONST_RETURN
[platform/upstream/glib.git] / glib / gchecksum.h
index 8f7d808..59bb31c 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
+#error "Only <glib.h> can be included directly."
+#endif
+
 #ifndef __G_CHECKSUM_H__
 #define __G_CHECKSUM_H__
 
@@ -34,8 +38,8 @@ G_BEGIN_DECLS
  * The hashing algorithm to be used by #GChecksum when performing the
  * digest of some data.
  *
- * Note that the #GChecksumType enumeration may be extended at a later 
- * date to include new hashing algorithm types. 
+ * Note that the #GChecksumType enumeration may be extended at a later
+ * date to include new hashing algorithm types.
  *
  * Since: 2.16
  */
@@ -45,27 +49,37 @@ typedef enum {
   G_CHECKSUM_SHA256
 } GChecksumType;
 
+/**
+ * GChecksum:
+ *
+ * An opaque structure representing a checksumming operation.
+ * To create a new GChecksum, use g_checksum_new(). To free
+ * a GChecksum, use g_checksum_free().
+ *
+ * Since: 2.16
+ */
 typedef struct _GChecksum       GChecksum;
 
-gssize                g_checksum_type_get_length (GChecksumType checksum_type);
+gssize                g_checksum_type_get_length    (GChecksumType    checksum_type);
 
-GChecksum *           g_checksum_new        (GChecksumType     checksum_type);
-GChecksum *           g_checksum_copy       (const GChecksum  *checksum);
-void                  g_checksum_free       (GChecksum        *checksum);
-void                  g_checksum_update     (GChecksum        *checksum,
-                                             const guchar     *data,
-                                             gssize            length);
-G_CONST_RETURN gchar *g_checksum_get_string (GChecksum        *checksum);
-void                  g_checksum_get_digest (GChecksum        *checksum,
-                                             guint8           *buffer,
-                                             gsize            *digest_len);
+GChecksum *           g_checksum_new                (GChecksumType    checksum_type);
+void                  g_checksum_reset              (GChecksum       *checksum);
+GChecksum *           g_checksum_copy               (const GChecksum *checksum);
+void                  g_checksum_free               (GChecksum       *checksum);
+void                  g_checksum_update             (GChecksum       *checksum,
+                                                     const guchar    *data,
+                                                     gssize           length);
+const gchar *         g_checksum_get_string         (GChecksum       *checksum);
+void                  g_checksum_get_digest         (GChecksum       *checksum,
+                                                     guint8          *buffer,
+                                                     gsize           *digest_len);
 
-gchar *g_compute_checksum_for_data   (GChecksumType  checksum_type,
-                                      const guchar  *data,
-                                      gsize          length);
-gchar *g_compute_checksum_for_string (GChecksumType  checksum_type,
-                                      const gchar   *str,
-                                      gssize         length);
+gchar                *g_compute_checksum_for_data   (GChecksumType    checksum_type,
+                                                     const guchar    *data,
+                                                     gsize            length);
+gchar                *g_compute_checksum_for_string (GChecksumType    checksum_type,
+                                                     const gchar     *str,
+                                                     gssize           length);
 
 G_END_DECLS