Index: uspace/app/bithenge/blob.h
===================================================================
--- uspace/app/bithenge/blob.h	(revision 04a7435f4ee13d275f9b652482de1d377eed4a8f)
+++ uspace/app/bithenge/blob.h	(revision 978ccaf1353e6dc7d83c324cc4bfc3d5a951be8c)
@@ -52,12 +52,11 @@
 typedef struct bithenge_random_access_blob_ops_t {
 	/** @copydoc bithenge_blob_t::bithenge_blob_size */
-	int (*size)(bithenge_blob_t *blob, aoff64_t *size);
+	int (*size)(bithenge_blob_t *self, aoff64_t *size);
 	/** @copydoc bithenge_blob_t::bithenge_blob_read */
-	int (*read)(bithenge_blob_t *blob, aoff64_t offset, char *buffer,
+	int (*read)(bithenge_blob_t *self, aoff64_t offset, char *buffer,
 	    aoff64_t *size);
 	/** Destroy the blob.
-	 * @param blob The blob.
-	 * @return EOK on success or an error code from errno.h. */
-	int (*destroy)(bithenge_blob_t *blob);
+	 * @param blob The blob. */
+	void (*destroy)(bithenge_blob_t *self);
 } bithenge_random_access_blob_ops_t;
 
@@ -87,9 +86,9 @@
 	 *
 	 * @memberof bithenge_blob_t
-	 * @param blob The blob.
+	 * @param self The blob.
 	 * @param[out] size Total size of the blob.
 	 * @return EOK on success or an error code from errno.h.
 	 */
-	int (*size)(bithenge_sequential_blob_t *blob, aoff64_t *size);
+	int (*size)(bithenge_sequential_blob_t *self, aoff64_t *size);
 
 	/** Read the next part of the blob. If the requested data extends
@@ -97,5 +96,5 @@
 	 * will be read.
 	 *
-	 * @param blob The blob.
+	 * @param self The blob.
 	 * @param[out] buffer Buffer to read into. If an error occurs, the contents are
 	 * undefined.
@@ -105,11 +104,10 @@
 	 * @return EOK on success or an error code from errno.h.
 	 */
-	int (*read)(bithenge_sequential_blob_t *blob, char *buffer,
+	int (*read)(bithenge_sequential_blob_t *self, char *buffer,
 	    aoff64_t *size);
 
 	/** Destroy the blob.
-	 * @param blob The blob.
-	 * @return EOK on success or an error code from errno.h. */
-	int (*destroy)(bithenge_sequential_blob_t *blob);
+	 * @param self The blob. */
+	void (*destroy)(bithenge_sequential_blob_t *self);
 } bithenge_sequential_blob_ops_t;
 
@@ -117,13 +115,13 @@
  *
  * @memberof bithenge_blob_t
- * @param blob The blob.
+ * @param self The blob.
  * @param[out] size Total size of the blob.
  * @return EOK on success or an error code from errno.h.
  */
-static inline int bithenge_blob_size(bithenge_blob_t *blob, aoff64_t *size)
-{
-	assert(blob);
-	assert(blob->base.blob_ops);
-	return blob->base.blob_ops->size(blob, size);
+static inline int bithenge_blob_size(bithenge_blob_t *self, aoff64_t *size)
+{
+	assert(self);
+	assert(self->base.blob_ops);
+	return self->base.blob_ops->size(self, size);
 }
 
@@ -134,5 +132,5 @@
  *
  * @memberof bithenge_blob_t
- * @param blob The blob.
+ * @param self The blob.
  * @param offset Byte offset within the blob.
  * @param[out] buffer Buffer to read into. If an error occurs, the contents are
@@ -143,10 +141,10 @@
  * @return EOK on success or an error code from errno.h.
  */
-static inline int bithenge_blob_read(bithenge_blob_t *blob, aoff64_t offset,
+static inline int bithenge_blob_read(bithenge_blob_t *self, aoff64_t offset,
     char *buffer, aoff64_t *size)
 {
-	assert(blob);
-	assert(blob->base.blob_ops);
-	return blob->base.blob_ops->read(blob, offset, buffer, size);
+	assert(self);
+	assert(self->base.blob_ops);
+	return self->base.blob_ops->read(self, offset, buffer, size);
 }
 
@@ -170,35 +168,30 @@
 }
 
-static inline int bithenge_blob_inc_ref(bithenge_blob_t *blob)
-{
-	return bithenge_node_inc_ref(bithenge_blob_as_node(blob));
-}
-
-static inline int bithenge_blob_dec_ref(bithenge_blob_t *blob)
-{
-	if (!blob)
-		return EOK;
-	return bithenge_node_dec_ref(bithenge_blob_as_node(blob));
-}
-
-int bithenge_new_random_access_blob(bithenge_blob_t *blob,
-    const bithenge_random_access_blob_ops_t *ops);
-
-int bithenge_new_sequential_blob(bithenge_sequential_blob_t *blob,
-    const bithenge_sequential_blob_ops_t *ops);
-
-int bithenge_new_blob_from_data(bithenge_node_t **out, const void *data,
-    size_t len);
-
-int bithenge_new_blob_from_buffer(bithenge_node_t **out, const void *buffer,
-    size_t len, bool needs_free);
-
-int bithenge_new_offset_blob(bithenge_node_t **out, bithenge_blob_t *blob,
-    aoff64_t offset);
-
-int bithenge_new_subblob(bithenge_node_t **out, bithenge_blob_t *blob,
-    aoff64_t offset, aoff64_t size);
-
-bool bithenge_blob_equal(bithenge_blob_t *a, bithenge_blob_t *b);
+/** Increment a blob's reference count.
+ * @param blob The blob to reference. */
+static inline void bithenge_blob_inc_ref(bithenge_blob_t *blob)
+{
+	bithenge_node_inc_ref(bithenge_blob_as_node(blob));
+}
+
+/** Decrement a blob's reference count.
+ * @param blob The blob to dereference, or NULL. */
+static inline void bithenge_blob_dec_ref(bithenge_blob_t *blob)
+{
+	if (blob)
+		bithenge_node_dec_ref(bithenge_blob_as_node(blob));
+}
+
+int bithenge_init_random_access_blob(bithenge_blob_t *,
+    const bithenge_random_access_blob_ops_t *);
+int bithenge_init_sequential_blob(bithenge_sequential_blob_t *,
+    const bithenge_sequential_blob_ops_t *);
+int bithenge_new_blob_from_data(bithenge_node_t **, const void *, size_t);
+int bithenge_new_blob_from_buffer(bithenge_node_t **, const void *, size_t,
+    bool);
+int bithenge_new_offset_blob(bithenge_node_t **, bithenge_blob_t *, aoff64_t);
+int bithenge_new_subblob(bithenge_node_t **, bithenge_blob_t *, aoff64_t,
+    aoff64_t);
+bool bithenge_blob_equal(bithenge_blob_t *, bithenge_blob_t *);
 
 #endif
