[gnome-keyring/gnome-3-0] gck: Cleanup the documentation



commit 3fe36de1ef0e93c86021d7a0a256db189ce1e4f1
Author: Stef Walter <stefw collabora co uk>
Date:   Tue Apr 5 22:37:24 2011 +0200

    gck: Cleanup the documentation

 docs/reference/gck/Makefile.am          |   14 +-
 docs/reference/gck/gck-docs.sgml        |    6 +-
 docs/reference/gck/gck-pkcs11-links.xml |   25 +++
 docs/reference/gck/gck-sections.txt     |  137 +++++++++++--
 docs/reference/gck/gck.types            |    4 -
 gck/gck-attributes.c                    |  125 ++++++++-----
 gck/gck-dump.c                          |   12 ++
 gck/gck-enumerator.c                    |   68 ++++++-
 gck/gck-misc.c                          |   34 +++-
 gck/gck-module.c                        |   47 +++--
 gck/gck-modules.c                       |  123 ++++++++++--
 gck/gck-object.c                        |  154 ++++++++-------
 gck/gck-session.c                       |  267 +++++++++++++------------
 gck/gck-slot.c                          |  103 ++++-------
 gck/gck-uri.c                           |   23 ++-
 gck/gck.h                               |  331 +++++++------------------------
 16 files changed, 812 insertions(+), 661 deletions(-)
---
diff --git a/docs/reference/gck/Makefile.am b/docs/reference/gck/Makefile.am
index 422a3b0..b53011d 100644
--- a/docs/reference/gck/Makefile.am
+++ b/docs/reference/gck/Makefile.am
@@ -3,11 +3,6 @@
 # We require automake 1.6 at least.
 AUTOMAKE_OPTIONS = 1.6
 
-# This is a blank Makefile.am for using gtk-doc.
-# Copy this to your project's API docs directory and modify the variables to
-# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
-# of using the various options.
-
 # The name of the module, e.g. 'glib'.
 DOC_MODULE=gck
 
@@ -58,7 +53,11 @@ EXTRA_HFILES=
 
 # Header files to ignore when scanning. Use base file name, no paths
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES=
+IGNORE_HFILES= \
+	gck-private.h \
+	test-suite.h \
+	gck-mock.h \
+	gck-test.h
 
 # Images to copy into HTML directory.
 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
@@ -66,7 +65,8 @@ HTML_IMAGES=
 
 # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
 # e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files=
+content_files= \
+	gck-pkcs11-links.xml
 
 # SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
 # These files must be listed here *and* in content_files
diff --git a/docs/reference/gck/gck-docs.sgml b/docs/reference/gck/gck-docs.sgml
index b3d7746..aa77855 100644
--- a/docs/reference/gck/gck-docs.sgml
+++ b/docs/reference/gck/gck-docs.sgml
@@ -13,7 +13,7 @@
 		</releaseinfo>
 	</bookinfo>
 
-	<chapter>
+	<chapter id="reference">
 		<title>PKCS#11 GObject Bindings</title>
 		<xi:include href="xml/gck-module.xml"/>
 		<xi:include href="xml/gck-slot.xml"/>
@@ -21,8 +21,12 @@
 		<xi:include href="xml/gck-object.xml"/>
 		<xi:include href="xml/gck-attribute.xml"/>
 		<xi:include href="xml/gck-attributes.xml"/>
+		<xi:include href="xml/gck-enumerator.xml"/>
+		<xi:include href="xml/gck-modules.xml"/>
 		<xi:include href="xml/gck-error.xml"/>
 		<xi:include href="xml/gck-uri.xml"/>
 		<xi:include href="xml/gck-misc.xml"/>
 	</chapter>
+
+	<xi:include href="gck-pkcs11-links.xml"/>
 </book>
diff --git a/docs/reference/gck/gck-pkcs11-links.xml b/docs/reference/gck/gck-pkcs11-links.xml
new file mode 100644
index 0000000..fdd6fad
--- /dev/null
+++ b/docs/reference/gck/gck-pkcs11-links.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; [
+]>
+<chapter xml:id="pkcs11-links">
+	<title>About PKCS\#11</title>
+
+	<anchor id="CK-NOTIFY:CAPS"/>
+	<anchor id="CK-SLOT-ID:CAPS"/>
+	<anchor id="CK-FUNCTION-LIST-PTR:CAPS"/>
+	<anchor id="CK-RV:CAPS"/>
+	<anchor id="CK-SESSION-HANDLE:CAPS"/>
+	<anchor id="CK-OBJECT-HANDLE:CAPS"/>
+	<anchor id="CK-OBJECT-HANDLE-PTR:CAPS"/>
+	<anchor id="CK-ULONG:CAPS"/>
+	<anchor id="CK-BBOOL:CAPS"/>
+
+	<para>PKCS\#11 is an API for storing and using crypto objects, and performing
+	crypto operations on them.</para>
+
+	<para>It is specified at the
+	<ulink href="http://www.rsa.com/rsalabs/node.asp?id=2133";>RSA website</ulink>
+	and a <ulink href="http://www.cryptsoft.com/pkcs11doc/";>handy reference</ulink> is also
+	available.</para>
+
+</chapter>
diff --git a/docs/reference/gck/gck-sections.txt b/docs/reference/gck/gck-sections.txt
index 4edad3f..cd78d38 100644
--- a/docs/reference/gck/gck-sections.txt
+++ b/docs/reference/gck/gck-sections.txt
@@ -24,6 +24,8 @@ gck_attribute_get_date
 gck_attribute_dup
 gck_attribute_clear
 gck_attribute_free
+gck_attribute_dump
+gck_attribute_equal
 </SECTION>
 
 <SECTION>
@@ -32,7 +34,6 @@ GckAttributes
 GCK_TYPE_ATTRIBUTES
 gck_attributes_new
 gck_attributes_new_empty
-gck_attributes_newv
 gck_attributes_at
 gck_attributes_add
 gck_attributes_add_data
@@ -42,6 +43,7 @@ gck_attributes_add_boolean
 gck_attributes_add_string
 gck_attributes_add_date
 gck_attributes_add_ulong
+gck_attributes_add_all
 gck_attributes_find
 gck_attributes_find_boolean
 gck_attributes_find_ulong
@@ -50,12 +52,11 @@ gck_attributes_find_date
 gck_attributes_count
 gck_attributes_ref
 gck_attributes_unref
+gck_attributes_contains
+gck_attributes_dump
+gck_attributes_get_boxed_type
+gck_attributes_new_full
 GckAllocator
-GCK_BOOLEAN
-GCK_ULONG
-GCK_STRING
-GCK_DATE
-GCK_INVALID
 </SECTION>
 
 <SECTION>
@@ -69,14 +70,30 @@ gck_module_get_path
 gck_module_get_functions
 gck_module_get_info
 gck_module_get_slots
-gck_module_get_pool_sessions
-gck_module_set_pool_sessions
-gck_module_get_auto_authenticate
-gck_module_set_auto_authenticate
-gck_module_enumerate_objects
-GckObjectForeachFunc
 GckModuleInfo
 gck_module_info_free
+<SUBSECTION Standard>
+GckModuleClass
+gck_module_get_type
+GCK_IS_MODULE
+GCK_IS_MODULE_CLASS
+GCK_MODULE
+GCK_MODULE_CLASS
+GCK_MODULE_GET_CLASS
+GCK_TYPE_MODULE
+GckModulePrivate
+</SECTION>
+
+<SECTION>
+<FILE>gck-modules</FILE>
+gck_modules_enumerate_objects
+gck_modules_enumerate_uri
+gck_modules_get_slots
+gck_modules_initialize_registered
+gck_modules_list_registered_paths
+gck_modules_object_for_uri
+gck_modules_objects_for_uri
+gck_modules_token_for_uri
 </SECTION>
 
 <SECTION>
@@ -101,28 +118,39 @@ gck_slot_has_flags
 gck_slots_enumerate_objects
 gck_slot_open_session
 gck_slot_open_session_full
+gck_slot_open_session_full_async
 gck_slot_open_session_async
 gck_slot_open_session_finish
+gck_slot_from_handle
 GckSlotInfo
 gck_slot_info_free
 GckTokenInfo
 gck_token_info_free
+<SUBSECTION Standard>
+GckSlotClass
+gck_slot_get_type
+GCK_IS_SLOT
+GCK_IS_SLOT_CLASS
+GCK_SLOT
+GCK_SLOT_CLASS
+GCK_SLOT_GET_CLASS
+GCK_TYPE_SLOT
+GckSlotPrivate
 </SECTION>
 
 <SECTION>
 <FILE>gck-session</FILE>
 GckSession
+GckSessionOptions
 gck_session_from_handle
 gck_session_get_module
 gck_session_get_slot
 gck_session_get_handle
 gck_session_get_info
 gck_session_login
-gck_session_login_full
 gck_session_login_async
 gck_session_login_finish
 gck_session_logout
-gck_session_logout_full
 gck_session_logout_async
 gck_session_logout_finish
 gck_session_create_object
@@ -147,9 +175,43 @@ gck_session_verify
 gck_session_verify_full
 gck_session_verify_async
 gck_session_verify_finish
+gck_session_derive_key
+gck_session_derive_key_async
+gck_session_derive_key_finish
+gck_session_derive_key_full
+gck_session_generate_key_pair
+gck_session_generate_key_pair_async
+gck_session_generate_key_pair_finish
+gck_session_generate_key_pair_full
+gck_session_get_options
+gck_session_get_state
+gck_session_get_type
+gck_session_init_pin
+gck_session_init_pin_async
+gck_session_init_pin_finish
+gck_session_set_pin
+gck_session_set_pin_async
+gck_session_set_pin_finish
+gck_session_unwrap_key
+gck_session_unwrap_key_async
+gck_session_unwrap_key_finish
+gck_session_unwrap_key_full
+gck_session_wrap_key
+gck_session_wrap_key_async
+gck_session_wrap_key_finish
+gck_session_wrap_key_full
 GckSessionInfo
 gck_session_info_free
 GckMechanism
+<SUBSECTION Standard>
+GckSessionClass
+GCK_IS_SESSION
+GCK_IS_SESSION_CLASS
+GCK_SESSION
+GCK_SESSION_CLASS
+GCK_SESSION_GET_CLASS
+GCK_TYPE_SESSION
+GckSessionPrivate
 </SECTION>
 
 <SECTION>
@@ -160,12 +222,9 @@ gck_objects_from_handle_array
 gck_object_equal
 gck_object_hash
 gck_object_get_module
-gck_object_get_slot
 gck_object_get_handle
 gck_object_get_session
-gck_object_set_session
 gck_object_destroy
-gck_object_destroy_full
 gck_object_destroy_async
 gck_object_destroy_finish
 gck_object_set
@@ -178,6 +237,23 @@ gck_object_get_data
 gck_object_get_data_full
 gck_object_get_data_async
 gck_object_get_data_finish
+gck_object_get_full
+gck_object_get_template
+gck_object_get_template_async
+gck_object_get_template_finish
+gck_object_set_template
+gck_object_set_template_async
+gck_object_set_template_finish
+<SUBSECTION Standard>
+GckObjectClass
+gck_object_get_type
+GCK_IS_OBJECT
+GCK_IS_OBJECT_CLASS
+GCK_OBJECT
+GCK_OBJECT_CLASS
+GCK_OBJECT_GET_CLASS
+GCK_TYPE_OBJECT
+GckObjectPrivate
 </SECTION>
 
 <SECTION>
@@ -195,6 +271,28 @@ GckUriParseFlags
 gck_uri_parse
 gck_uri_build
 gck_uri_info_free
+GCK_URI_ERROR
+<SUBSECTION Private>
+gck_uri_get_error_quark
+</SECTION>
+
+<SECTION>
+<FILE>gck-enumerator</FILE>
+GckEnumerator
+gck_enumerator_next
+gck_enumerator_next_async
+gck_enumerator_next_finish
+gck_enumerator_next_n
+<SUBSECTION Standard>
+GckEnumeratorClass
+gck_enumerator_get_type
+GckEnumeratorPrivate
+GCK_ENUMERATOR
+GCK_ENUMERATOR_CLASS
+GCK_ENUMERATOR_GET_CLASS
+GCK_IS_ENUMERATOR
+GCK_IS_ENUMERATOR_CLASS
+GCK_TYPE_ENUMERATOR
 </SECTION>
 
 <SECTION>
@@ -202,4 +300,9 @@ gck_uri_info_free
 gck_list_ref_copy
 gck_list_unref_free
 gck_string_from_chars
+gck_value_to_boolean
+gck_value_to_ulong
+GCK_INVALID
+<SUBSECTION Private>
+gck_get_error_quark
 </SECTION>
diff --git a/gck/gck-attributes.c b/gck/gck-attributes.c
index d9fd204..5a530eb 100644
--- a/gck/gck-attributes.c
+++ b/gck/gck-attributes.c
@@ -48,6 +48,12 @@
  * This structure represents a PKCS11 CK_ATTRIBUTE.
  */
 
+/**
+ * GCK_TYPE_ATTRIBUTES:
+ *
+ * Boxed type for #GckAttributes
+ */
+
 static void
 attribute_init (GckAttribute *attr, gulong attr_type,
                 gconstpointer value, gsize length,
@@ -69,11 +75,11 @@ attribute_init (GckAttribute *attr, gulong attr_type,
 /**
  * gck_attribute_init:
  * @attr: An uninitialized attribute.
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The raw value of the attribute.
  * @length: The length of the raw value.
  *
- * Initialize a PKCS#11 attribute. This copies the value memory
+ * Initialize a PKCS\#11 attribute. This copies the value memory
  * into an internal buffer.
  *
  * When done with the attribute you should use gck_attribute_clear()
@@ -90,11 +96,11 @@ gck_attribute_init (GckAttribute *attr, gulong attr_type,
 /**
  * gck_attribute_init_invalid:
  * @attr: An uninitialized attribute.
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  *
- * Initialize a PKCS#11 attribute to an 'invalid' or 'not found'
+ * Initialize a PKCS\#11 attribute to an 'invalid' or 'not found'
  * state. Specifically this sets the value length to (CK_ULONG)-1
- * as specified in the PKCS#11 specification.
+ * as specified in the PKCS\#11 specification.
  *
  * When done with the attribute you should use gck_attribute_clear()
  * to free the internal memory.
@@ -112,9 +118,9 @@ gck_attribute_init_invalid (GckAttribute *attr, gulong attr_type)
 /**
  * gck_attribute_init_empty:
  * @attr: An uninitialized attribute.
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  *
- * Initialize a PKCS#11 attribute to an empty state. The attribute
+ * Initialize a PKCS\#11 attribute to an empty state. The attribute
  * type will be set, but no data will be set.
  *
  * When done with the attribute you should use gck_attribute_clear()
@@ -142,11 +148,11 @@ attribute_init_boolean (GckAttribute *attr, gulong attr_type,
 /**
  * gck_attribute_init_boolean:
  * @attr: An uninitialized attribute.
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The boolean value of the attribute.
  *
- * Initialize a PKCS#11 attribute to boolean. This will result
- * in a CK_BBOOL attribute from the PKCS#11 specs.
+ * Initialize a PKCS\#11 attribute to boolean. This will result
+ * in a CK_BBOOL attribute from the PKCS\#11 specs.
  *
  * When done with the attribute you should use gck_attribute_clear()
  * to free the internal memory.
@@ -179,11 +185,11 @@ attribute_init_date (GckAttribute *attr, gulong attr_type,
 /**
  * gck_attribute_init_date:
  * @attr: An uninitialized attribute.
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The date value of the attribute.
  *
- * Initialize a PKCS#11 attribute to a date. This will result
- * in a CK_DATE attribute from the PKCS#11 specs.
+ * Initialize a PKCS\#11 attribute to a date. This will result
+ * in a CK_DATE attribute from the PKCS\#11 specs.
  *
  * When done with the attribute you should use gck_attribute_clear()
  * to free the internal memory.
@@ -208,11 +214,11 @@ attribute_init_ulong (GckAttribute *attr, gulong attr_type,
 /**
  * gck_attribute_init_ulong:
  * @attr: An uninitialized attribute.
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The ulong value of the attribute.
  *
- * Initialize a PKCS#11 attribute to a unsigned long. This will result
- * in a CK_ULONG attribute from the PKCS#11 specs.
+ * Initialize a PKCS\#11 attribute to a unsigned long. This will result
+ * in a CK_ULONG attribute from the PKCS\#11 specs.
  *
  * When done with the attribute you should use gck_attribute_clear()
  * to free the internal memory.
@@ -236,10 +242,10 @@ attribute_init_string (GckAttribute *attr, gulong attr_type,
 /**
  * gck_attribute_init_string:
  * @attr: An uninitialized attribute.
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The null terminated string value of the attribute.
  *
- * Initialize a PKCS#11 attribute to a string. This will result
+ * Initialize a PKCS\#11 attribute to a string. This will result
  * in an attribute containing the text, but not the null terminator.
  * The text in the attribute will be of the same encoding as you pass
  * to this function.
@@ -257,11 +263,11 @@ gck_attribute_init_string (GckAttribute *attr, gulong attr_type,
 
 /**
  * gck_attribute_new:
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The raw value of the attribute.
  * @length: The length of the attribute.
  *
- * Create a new PKCS#11 attribute. The value will be copied
+ * Create a new PKCS\#11 attribute. The value will be copied
  * into the new attribute.
  *
  * Return value: The new attribute. When done with the attribute use
@@ -277,11 +283,11 @@ gck_attribute_new (gulong attr_type, gpointer value, gsize length)
 
 /**
  * gck_attribute_new_invalid:
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  *
- * Create a new PKCS#11 attribute as 'invalid' or 'not found'
+ * Create a new PKCS\#11 attribute as 'invalid' or 'not found'
  * state. Specifically this sets the value length to (CK_ULONG)-1
- * as specified in the PKCS#11 specification.
+ * as specified in the PKCS\#11 specification.
  *
  * Return value: The new attribute. When done with the attribute use
  * gck_attribute_free() to free it.
@@ -296,9 +302,9 @@ gck_attribute_new_invalid (gulong attr_type)
 
 /**
  * gck_attribute_new_empty:
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  *
- * Create a new PKCS#11 attribute with empty data.
+ * Create a new PKCS\#11 attribute with empty data.
  *
  * Return value: The new attribute. When done with the attribute use
  * gck_attribute_free() to free it.
@@ -313,11 +319,11 @@ gck_attribute_new_empty (gulong attr_type)
 
 /**
  * gck_attribute_new_boolean:
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The boolean value of the attribute.
  *
- * Initialize a PKCS#11 attribute to boolean. This will result
- * in a CK_BBOOL attribute from the PKCS#11 specs.
+ * Initialize a PKCS\#11 attribute to boolean. This will result
+ * in a CK_BBOOL attribute from the PKCS\#11 specs.
  *
  * Return value: The new attribute. When done with the attribute use
  * gck_attribute_free() to free it.
@@ -332,11 +338,11 @@ gck_attribute_new_boolean (gulong attr_type, gboolean value)
 
 /**
  * gck_attribute_new_date:
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The date value of the attribute.
  *
- * Initialize a PKCS#11 attribute to a date. This will result
- * in a CK_DATE attribute from the PKCS#11 specs.
+ * Initialize a PKCS\#11 attribute to a date. This will result
+ * in a CK_DATE attribute from the PKCS\#11 specs.
  *
  * Return value: The new attribute. When done with the attribute use
  * gck_attribute_free() to free it.
@@ -351,11 +357,11 @@ gck_attribute_new_date (gulong attr_type, const GDate *value)
 
 /**
  * gck_attribute_new_ulong:
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The ulong value of the attribute.
  *
- * Initialize a PKCS#11 attribute to a unsigned long. This will result
- * in a CK_ULONG attribute from the PKCS#11 specs.
+ * Initialize a PKCS\#11 attribute to a unsigned long. This will result
+ * in a CK_ULONG attribute from the PKCS\#11 specs.
  *
  * Return value: The new attribute. When done with the attribute use
  * gck_attribute_free() to free it.
@@ -370,10 +376,10 @@ gck_attribute_new_ulong (gulong attr_type, gulong value)
 
 /**
  * gck_attribute_new_string:
- * @attr_type: The PKCS#11 attribute type to set on the attribute.
+ * @attr_type: The PKCS\#11 attribute type to set on the attribute.
  * @value: The null terminated string value of the attribute.
  *
- * Initialize a PKCS#11 attribute to a string. This will result
+ * Initialize a PKCS\#11 attribute to a string. This will result
  * in an attribute containing the text, but not the null terminator.
  * The text in the attribute will be of the same encoding as you pass
  * to this function.
@@ -393,8 +399,8 @@ gck_attribute_new_string (gulong attr_type, const gchar *value)
  * gck_attribute_is_invalid:
  * @attr: The attribute to check.
  *
- * Check if the PKCS#11 attribute represents 'invalid' or 'not found'
- * according to the PKCS#11 spec. That is, having length
+ * Check if the PKCS\#11 attribute represents 'invalid' or 'not found'
+ * according to the PKCS\#11 spec. That is, having length
  * of (CK_ULONG)-1.
  *
  * Return value: Whether the attribute represents invalid or not.
@@ -410,7 +416,7 @@ gck_attribute_is_invalid (GckAttribute *attr)
  * gck_attribute_get_boolean:
  * @attr: The attribute to retrieve value from.
  *
- * Get the CK_BBOOL of a PKCS#11 attribute. No conversion
+ * Get the CK_BBOOL of a PKCS\#11 attribute. No conversion
  * is performed. It is an error to pass an attribute to this
  * function unless you're know it's supposed to contain a
  * boolean value.
@@ -434,7 +440,7 @@ gck_attribute_get_boolean (GckAttribute *attr)
  * gck_attribute_get_ulong:
  * @attr: The attribute to retrieve value from.
  *
- * Get the CK_ULONG value of a PKCS#11 attribute. No
+ * Get the CK_ULONG value of a PKCS\#11 attribute. No
  * conversion is performed. It is an error to pass an attribute
  * to this function unless you're know it's supposed to contain
  * a value of the right type.
@@ -458,7 +464,7 @@ gck_attribute_get_ulong (GckAttribute *attr)
  * gck_attribute_get_string:
  * @attr: The attribute to retrieve value from.
  *
- * Get the string value of a PKCS#11 attribute. No
+ * Get the string value of a PKCS\#11 attribute. No
  * conversion is performed. It is an error to pass an attribute
  * to this function unless you're know it's supposed to contain
  * a value of the right type.
@@ -484,7 +490,7 @@ gck_attribute_get_string (GckAttribute *attr)
  * @attr: The attribute to retrieve value from.
  * @value: The date value to fill in with the parsed date.
  *
- * Get the CK_DATE of a PKCS#11 attribute. No
+ * Get the CK_DATE of a PKCS\#11 attribute. No
  * conversion is performed. It is an error to pass an attribute
  * to this function unless you're know it's supposed to contain
  * a value of the right type.
@@ -530,7 +536,7 @@ gck_attribute_get_date (GckAttribute *attr, GDate *value)
  * gck_attribute_dup:
  * @attr: The attribute to duplicate.
  *
- * Duplicate the PKCS#11 attribute. All value memory is
+ * Duplicate the PKCS\#11 attribute. All value memory is
  * also copied.
  *
  * Return value: The duplicated attribute. Use gck_attribute_free()
@@ -574,7 +580,7 @@ attribute_init_copy (GckAttribute *dest, const GckAttribute *src, GckAllocator a
  * @dest: An uninitialized attribute.
  * @src: An attribute to copy.
  *
- * Initialize a PKCS#11 attribute as a copy of another attribute.
+ * Initialize a PKCS\#11 attribute as a copy of another attribute.
  * This copies the value memory as well.
  *
  * When done with the copied attribute you should use
@@ -633,6 +639,15 @@ gck_attribute_free (GckAttribute *attr)
 	}
 }
 
+/**
+ * gck_attribute_equal:
+ * @a: First attribute to compare.
+ * @b: Second attribute to compare.
+ *
+ * Compare two attributes. Useful with <code>GHashTable</code>.
+ *
+ * Returns: %TRUE if the attributes are equal.
+ */
 gboolean
 gck_attribute_equal (gconstpointer a, gconstpointer b)
 {
@@ -941,7 +956,7 @@ gck_attributes_add_empty (GckAttributes *attrs, gulong attr_type)
  *
  * Add an attribute with the specified type and value to the array.
  *
- * The value will be stored as a CK_BBOOL PKCS#11 style attribute.
+ * The value will be stored as a CK_BBOOL PKCS\#11 style attribute.
  *
  * Return value: The attribute that was added.
  **/
@@ -987,7 +1002,7 @@ gck_attributes_add_string (GckAttributes *attrs, gulong attr_type, const gchar *
  *
  * Add an attribute with the specified type and value to the array.
  *
- * The value will be stored as a CK_DATE PKCS#11 style attribute.
+ * The value will be stored as a CK_DATE PKCS\#11 style attribute.
  *
  * Return value: The attribute that was added.
  **/
@@ -1010,7 +1025,7 @@ gck_attributes_add_date (GckAttributes *attrs, gulong attr_type, const GDate *va
  *
  * Add an attribute with the specified type and value to the array.
  *
- * The value will be stored as a CK_ULONG PKCS#11 style attribute.
+ * The value will be stored as a CK_ULONG PKCS\#11 style attribute.
  *
  * Return value: The attribute that was added.
  **/
@@ -1025,6 +1040,13 @@ gck_attributes_add_ulong (GckAttributes *attrs, gulong attr_type, gulong value)
 	return added;
 }
 
+/**
+ * gck_attributes_add_all:
+ * @attrs: A set of attributes
+ * @from: Attributes to add
+ *
+ * Add all attributes in @from to @attrs.
+ */
 void
 gck_attributes_add_all (GckAttributes *attrs, GckAttributes *from)
 {
@@ -1243,6 +1265,15 @@ gck_attributes_unref (GckAttributes *attrs)
 	}
 }
 
+/**
+ * gck_attributes_contains:
+ * @attrs: The attributes to check
+ * @match: The attribute to find
+ *
+ * Check whether the attributes contain a certain attribute.
+ *
+ * Returns: %TRUE if the attributes contain the attribute.
+ */
 gboolean
 gck_attributes_contains (GckAttributes *attrs, GckAttribute *match)
 {
diff --git a/gck/gck-dump.c b/gck/gck-dump.c
index 98de10b..f2f6b12 100644
--- a/gck/gck-dump.c
+++ b/gck/gck-dump.c
@@ -323,6 +323,12 @@ dump_attribute_type (GckAttribute *attr)
 	}
 }
 
+/**
+ * gck_attribute_dump:
+ * @attr: The attribute
+ *
+ * Dump the specified attribute using g_printerr().
+ */
 void
 gck_attribute_dump (GckAttribute *attr)
 {
@@ -336,6 +342,12 @@ gck_attribute_dump (GckAttribute *attr)
 	}
 }
 
+/**
+ * gck_attributes_dump:
+ * @attrs: The attributes
+ *
+ * Dump the attributes using g_printerr().
+ */
 void
 gck_attributes_dump (GckAttributes *attrs)
 {
diff --git a/gck/gck-enumerator.c b/gck/gck-enumerator.c
index 49e71fd..d312197 100644
--- a/gck/gck-enumerator.c
+++ b/gck/gck-enumerator.c
@@ -31,15 +31,21 @@
 /**
  * SECTION:gck-enumerator
  * @title: GckEnumerator
- * @short_description: Enumerates through PKCS#11 objects.
+ * @short_description: Enumerates through PKCS\#11 objects.
  *
- * Xxxxxx
+ * A GckEnumerator can be used to enumerate through PKCS\#11 objects. It will
+ * automatically create sessions as necessary.
+ *
+ * Use gck_modules_enumerate_objects() or gck_modules_enumerate_uri() to create
+ * an enumerator. To get the objects use gck_enumerator_next() or
+ * gck_enumerator_next_async() functions.
  */
 
 /**
  * GckEnumerator:
+ * @parent: derived from this.
  *
- * Xxxxxx
+ * An object that allows enumerating of objects across modules, tokens.
  */
 
 typedef struct _GckEnumeratorState GckEnumeratorState;
@@ -593,6 +599,20 @@ free_enumerate_next (EnumerateNext *args)
 	g_free (args);
 }
 
+/**
+ * gck_enumerator_next:
+ * @self: The enumerator
+ * @cancellable: A #GCancellable or %NULL
+ * @error: A location to store an error on failure
+ *
+ * Get the next object in the enumerator, or %NULL if there are no more objects.
+ *
+ * %NULL is also returned if the function fails. Use the @error to determine
+ * whether a failure occurred or not.
+ *
+ * Returns: The next object, which must be released using g_object_unref,
+ *     or %NULL.
+ */
 GckObject*
 gck_enumerator_next (GckEnumerator *self, GCancellable *cancellable, GError **error)
 {
@@ -634,6 +654,22 @@ gck_enumerator_next (GckEnumerator *self, GCancellable *cancellable, GError **er
 	return result;
 }
 
+/**
+ * gck_enumerator_next_n:
+ * @self: An enumerator
+ * @max_objects: The maximum amount of objects to enumerate
+ * @cancellable: A #GCancellable or %NULL
+ * @error: A location to store an error on failure
+ *
+ * Get the next set of objects from the enumerator. The maximum number of
+ * objects can be specified with @max_objects. If -1 is specified, then all
+ * the remaining objects will be returned.
+ *
+ * %NULL is also returned if the function fails. Use the @error to determine
+ * whether a failure occurred or not.
+ *
+ * Returns: A list of objects, which should be freed using gck_list_unref_free().
+ */
 GList*
 gck_enumerator_next_n (GckEnumerator *self, gint max_objects, GCancellable *cancellable,
                        GError **error)
@@ -669,6 +705,19 @@ gck_enumerator_next_n (GckEnumerator *self, gint max_objects, GCancellable *canc
 	return results;
 }
 
+/**
+ * gck_enumerator_next_async:
+ * @self: An enumerator
+ * @max_objects: The maximum number of objects to get
+ * @cancellable: A #GCancellable or %NULL
+ * @callback: Called when the result is ready
+ * @user_data: Data to pass to the callback
+ *
+ * Get the next set of objects from the enumerator. This operation completes
+ * asynchronously.The maximum number of objects can be specified with
+ * @max_objects. If -1 is specified, then all the remaining objects will be
+ * enumerated.
+ */
 void
 gck_enumerator_next_async (GckEnumerator *self, gint max_objects, GCancellable *cancellable,
                            GAsyncReadyCallback callback, gpointer user_data)
@@ -697,6 +746,19 @@ gck_enumerator_next_async (GckEnumerator *self, gint max_objects, GCancellable *
 	g_object_unref (self);
 }
 
+/**
+ * gck_enumerator_next_finish:
+ * @self: An enumerator
+ * @result: The result passed to the callback
+ * @error: A location to raise an error on failure.
+ *
+ * Complete an operation to enumerate next objects.
+ *
+ * %NULL is also returned if the function fails. Use the @error to determine
+ * whether a failure occurred or not.
+ *
+ * Returns: The list of objects, which should be freed with gck_list_unref_free()
+ */
 GList*
 gck_enumerator_next_finish (GckEnumerator *self, GAsyncResult *result, GError **error)
 {
diff --git a/gck/gck-misc.c b/gck/gck-misc.c
index ae8b0d4..7511339 100644
--- a/gck/gck-misc.c
+++ b/gck/gck-misc.c
@@ -38,6 +38,12 @@
  */
 
 /**
+ * GCK_INVALID:
+ *
+ * Used as a terminator at the end of variable argument lists.
+ */
+
+/**
  * GCK_VENDOR_CODE:
  *
  * Custom PKCS11 errors that originate from the gck library, are
@@ -74,9 +80,9 @@ gck_get_error_quark (void)
 
 /**
  * gck_message_from_rv:
- * @rv: The PKCS#11 return value to get a message for.
+ * @rv: The PKCS\#11 return value to get a message for.
  *
- * Get a message for a PKCS#11 return value or error code. Do not
+ * Get a message for a PKCS\#11 return value or error code. Do not
  * pass CKR_OK or other such non errors to this function.
  *
  * Return value: The user readable message.
@@ -315,9 +321,9 @@ gck_list_ref_copy (GList *reflist)
  * @data: The character data to turn into a null terminated string.
  * @max: The maximum length of the charater data.
  *
- * Create a string from a set of PKCS#11 characters. This is
+ * Create a string from a set of PKCS\#11 characters. This is
  * similar to g_strndup, except for that it also strips trailing
- * spaces. These space padded strings are often used in PKCS#11
+ * spaces. These space padded strings are often used in PKCS\#11
  * structures.
  *
  * Return value: The null terminated string.
@@ -353,6 +359,16 @@ _gck_ulong_equal (gconstpointer v1, gconstpointer v2)
 	return *((const gulong*)v1) == *((const gulong*)v2);
 }
 
+/**
+ * gck_value_to_ulong:
+ * @value: memory to convert
+ * @length: length of memory
+ * @result: A location to store the result
+ *
+ * Convert CK_ULONG type memory to a boolean.
+ *
+ * Returns: Whether the conversion was successful.
+ */
 gboolean
 gck_value_to_ulong (gconstpointer value, gsize length, gulong *result)
 {
@@ -363,6 +379,16 @@ gck_value_to_ulong (gconstpointer value, gsize length, gulong *result)
 	return TRUE;
 }
 
+/**
+ * gck_value_to_boolean:
+ * @value: memory to convert
+ * @length: length of memory
+ * @result: A location to store the result
+ *
+ * Convert CK_BBOOL type memory to a boolean.
+ *
+ * Returns: Whether the conversion was successful.
+ */
 gboolean
 gck_value_to_boolean (gconstpointer value, gsize length, gboolean *result)
 {
diff --git a/gck/gck-module.c b/gck/gck-module.c
index 04d6ad6..650fac4 100644
--- a/gck/gck-module.c
+++ b/gck/gck-module.c
@@ -32,19 +32,20 @@
 /**
  * SECTION:gck-module
  * @title: GckModule
- * @short_description: A loaded and initialized PKCS#11 module.
+ * @short_description: A loaded and initialized PKCS\#11 module.
  *
- * A GckModule object holds a loaded PKCS#11 module. A PKCS#11 module is a shared library.
+ * A GckModule object holds a loaded PKCS\#11 module. A PKCS\#11 module is a shared library.
  *
- * You can load and initialize a PKCS#11 module with the gck_module_initialize() call. If you already
+ * You can load and initialize a PKCS\#11 module with the gck_module_initialize() call. If you already
  * have a loaded and initialized module that you'd like to use with the various gck functions, then
  * you can use gck_module_new().
  */
 
 /**
  * GckModule:
+ * @parent: derived from this.
  *
- * Holds a loaded and initialized PKCS#11 module.
+ * Holds a loaded and initialized PKCS\#11 module.
  */
 
 /**
@@ -59,7 +60,7 @@
  *
  * Holds information about the PKCS&num;11 module.
  *
- * This structure corresponds to CK_MODULE_INFO in the PKCS#11 standard. The
+ * This structure corresponds to CK_MODULE_INFO in the PKCS\#11 standard. The
  * strings are NULL terminated for easier use.
  *
  * Use gck_module_info_free() to release this structure when done with it.
@@ -417,17 +418,18 @@ gck_module_info_free (GckModuleInfo *module_info)
 
 /**
  * gck_module_initialize:
- * @path: The file system path to the PKCS#11 module to load.
- * @reserved: Extra arguments for the PKCS#11 module, should usually be NULL.
+ * @path: The file system path to the PKCS\#11 module to load.
+ * @reserved: Extra arguments for the PKCS\#11 module, should usually be NULL.
  * @reserved_options: No options are currently available.
- * @err: A location to store an error resulting from a failed load.
+ * @error: A location to store an error resulting from a failed load.
  *
- * Load and initialize a PKCS#11 module represented by a GckModule object.
+ * Load and initialize a PKCS\#11 module represented by a GckModule object.
  *
- * Return value: The loaded PKCS#11 module or NULL if failed.
+ * Return value: The loaded PKCS\#11 module or NULL if failed.
  **/
 GckModule*
-gck_module_initialize (const gchar *path, gpointer reserved, guint reserved_options, GError **err)
+gck_module_initialize (const gchar *path, gpointer reserved, guint reserved_options,
+                       GError **error)
 {
 	CK_C_GetFunctionList get_function_list;
 	CK_FUNCTION_LIST_PTR funcs;
@@ -436,19 +438,19 @@ gck_module_initialize (const gchar *path, gpointer reserved, guint reserved_opti
 	CK_RV rv;
 
 	g_return_val_if_fail (path != NULL, NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
 	/* Load the actual module */
 	module = g_module_open (path, 0);
 	if (!module) {
-		g_set_error (err, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
+		g_set_error (error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
 		             "Error loading pkcs11 module: %s", g_module_error ());
 		return NULL;
 	}
 
 	/* Get the entry point */
 	if (!g_module_symbol (module, "C_GetFunctionList", (void**)&get_function_list)) {
-		g_set_error (err, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
+		g_set_error (error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
 		             "Invalid pkcs11 module: %s", g_module_error ());
 		g_module_close (module);
 		return NULL;
@@ -457,7 +459,7 @@ gck_module_initialize (const gchar *path, gpointer reserved, guint reserved_opti
 	/* Get the function list */
 	rv = (get_function_list) (&funcs);
 	if (rv != CKR_OK) {
-		g_set_error (err, GCK_ERROR, rv, "Couldn't get pkcs11 function list: %s",
+		g_set_error (error, GCK_ERROR, rv, "Couldn't get pkcs11 function list: %s",
 		             gck_message_from_rv (rv));
 		g_module_close (module);
 		return NULL;
@@ -477,7 +479,7 @@ gck_module_initialize (const gchar *path, gpointer reserved, guint reserved_opti
 	/* Now initialize the module */
 	rv = (self->pv->funcs->C_Initialize) (&self->pv->init_args);
 	if (rv != CKR_OK) {
-		g_set_error (err, GCK_ERROR, rv, "Couldn't initialize module: %s",
+		g_set_error (error, GCK_ERROR, rv, "Couldn't initialize module: %s",
 		             gck_message_from_rv (rv));
 		g_object_unref (self);
 		return NULL;
@@ -489,13 +491,14 @@ gck_module_initialize (const gchar *path, gpointer reserved, guint reserved_opti
 
 /**
  * gck_module_new:
- * @funcs: Initialized PKCS#11 function list pointer
+ * @funcs: Initialized PKCS\#11 function list pointer
+ * @reserved_options: Must be zero
  *
- * Create a GckModule representing a PKCS#11 module. It is assumed that
+ * Create a GckModule representing a PKCS\#11 module. It is assumed that
  * this the module is already initialized. In addition it will not be
  * finalized when complete.
  *
- * Return value: The new PKCS#11 module.
+ * Return value: The new PKCS\#11 module.
  **/
 GckModule*
 gck_module_new (CK_FUNCTION_LIST_PTR funcs, guint reserved_options)
@@ -510,7 +513,7 @@ gck_module_new (CK_FUNCTION_LIST_PTR funcs, guint reserved_options)
  * @module2: A pointer to the second GckModule
  *
  * Checks equality of two modules. Two GckModule objects can point to the same
- * underlying PKCS#11 module.
+ * underlying PKCS\#11 module.
  *
  * Return value: TRUE if module1 and module2 are equal. FALSE if either is not a GckModule.
  **/
@@ -555,7 +558,7 @@ gck_module_hash (gconstpointer module)
  * gck_module_get_info:
  * @self: The module to get info for.
  *
- * Get the info about a PKCS#11 module.
+ * Get the info about a PKCS\#11 module.
  *
  * Return value: The module info. Release this with gck_module_info_free().
  **/
@@ -658,7 +661,7 @@ gck_module_get_path (GckModule *self)
  * gck_module_get_functions:
  * @self: The module for which to get the function list.
  *
- * Get the PKCS#11 function list for the module.
+ * Get the PKCS\#11 function list for the module.
  *
  * Return value: The function list, do not modify this structure.
  **/
diff --git a/gck/gck-modules.c b/gck/gck-modules.c
index c500d55..3c20250 100644
--- a/gck/gck-modules.c
+++ b/gck/gck-modules.c
@@ -32,38 +32,47 @@
 /**
  * SECTION:gck-modules
  * @title: GckModule lists
- * @short_description: Dealing with lists of PKCS#11 modules.
+ * @short_description: Dealing with lists of PKCS\#11 modules.
  *
- * Xxxxx
+ * These functions are useful for dealing with lists of modules, and performing
+ * operations on all of them.
  */
 
+/**
+ * gck_modules_list_registered_paths:
+ * @error: A location to store an error, on failure
+ *
+ * Get the paths for all registered modules.
+ *
+ * Returns: An array of module paths, should be freed with g_strfreev().
+ */
 gchar**
-gck_modules_list_registered_paths (GError **err)
+gck_modules_list_registered_paths (GError **error)
 {
-	GError *error = NULL;
+	GError *err = NULL;
 	const gchar *name;
 	gchar *path;
 	GDir *dir;
 	GArray *paths;
 
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
 	/* We use this below */
-	if (!err)
-		err = &error;
+	if (!error)
+		error = &err;
 
 	paths = g_array_new (TRUE, TRUE, sizeof (gchar*));
 
-	dir = g_dir_open (PKCS11_REGISTRY_DIR, 0, err);
+	dir = g_dir_open (PKCS11_REGISTRY_DIR, 0, error);
 
 	if (dir == NULL) {
-		if (g_error_matches (*err, G_FILE_ERROR, G_FILE_ERROR_NOENT) ||
-		    g_error_matches (*err, G_FILE_ERROR, G_FILE_ERROR_NOTDIR)) {
-			g_clear_error (err);
+		if (g_error_matches (*error, G_FILE_ERROR, G_FILE_ERROR_NOENT) ||
+		    g_error_matches (*error, G_FILE_ERROR, G_FILE_ERROR_NOTDIR)) {
+			g_clear_error (error);
 			return (gchar**)g_array_free (paths, FALSE);
 		} else {
 			g_array_free (paths, TRUE);
-			g_clear_error (&error);
+			g_clear_error (&err);
 			return NULL;
 		}
 	}
@@ -89,8 +98,17 @@ gck_modules_list_registered_paths (GError **err)
 	return (gchar**)g_array_free (paths, FALSE);
 }
 
+/**
+ * gck_modules_initialize_registered:
+ * @reserved_options: Module options
+ *
+ * Initialize all the registered modules.
+ *
+ * Returns: A list of #GckModule objects, which should be freed by
+ *     gck_list_unref_free().
+ */
 GList*
-gck_modules_initialize_registered (guint options)
+gck_modules_initialize_registered (guint reserved_options)
 {
 	GError *err = NULL;
 	gchar **paths, **p;
@@ -121,6 +139,16 @@ gck_modules_initialize_registered (guint options)
 	return results;
 }
 
+/**
+ * gck_modules_get_slots:
+ * @modules: The modules
+ * @token_present: Whether to only list slots with token present
+ *
+ * Get a list of slots for across all of the modules.
+ *
+ * Returns: A list of #GckSlot objects, which should be freed with
+ *     gck_list_unref_free().
+ */
 GList*
 gck_modules_get_slots (GList *modules, gboolean token_present)
 {
@@ -135,18 +163,16 @@ gck_modules_get_slots (GList *modules, gboolean token_present)
 }
 
 /**
- * gck_module_enumerate_objects:
- * @self: The module to enumerate objects.
- * @attrs: Attributes that the objects must have, or empty for all objects.
- * @session_flags: Flags for opening a session.
+ * gck_modules_enumerate_objects:
+ * @modules: The modules
+ * @attrs: Attributes that the objects must have, or empty for all objects
+ * @session_options: Options from GckSessionOptions
  *
  * Setup an enumerator for listing matching objects on the modules.
  *
  * This call will not block but will return an enumerator immediately.
- *
- * XXX
- *
- * Return value: A new enumerator
+
+ * Return value: A new enumerator, which should be released with g_object_unref().
  **/
 GckEnumerator*
 gck_modules_enumerate_objects (GList *modules, GckAttributes *attrs, guint session_options)
@@ -161,6 +187,17 @@ gck_modules_enumerate_objects (GList *modules, GckAttributes *attrs, guint sessi
 	return _gck_enumerator_new (modules, session_options, uri_info);
 }
 
+/**
+ * gck_modules_token_for_uri:
+ * @modules: The modules
+ * @uri: The URI that the token must match
+ * @error: A location to raise an error on failure
+ *
+ * Lookup a token that matches the URI.
+ *
+ * Returns: A newly allocated #GckSlot or %NULL if no such token was
+ *    found.
+ */
 GckSlot*
 gck_modules_token_for_uri (GList *modules, const gchar *uri, GError **error)
 {
@@ -205,6 +242,21 @@ gck_modules_token_for_uri (GList *modules, const gchar *uri, GError **error)
 	return result;
 }
 
+/**
+ * gck_modules_object_for_uri:
+ * @modules: The modules
+ * @uri: The URI the objects must match
+ * @session_options: Options from GckSessionOptions
+ * @error: A location to raise an error on failure.
+ *
+ * Find an object that matches a URI.
+ *
+ * This call can block. Use gck_modules_enumerate_uri() for a non-blocking
+ * version.
+ *
+ * Returns: A new #GckObject which should be released with g_object_unref(),
+ *     or %NULL if no matching object was found.
+ */
 GckObject*
 gck_modules_object_for_uri (GList *modules, const gchar *uri, guint session_options,
                             GError **error)
@@ -225,6 +277,21 @@ gck_modules_object_for_uri (GList *modules, const gchar *uri, guint session_opti
 	return result;
 }
 
+/**
+ * gck_modules_objects_for_uri:
+ * @modules: The modules
+ * @uri: The URI the objects must match
+ * @session_options: Options from GckSessionOptions
+ * @error: A location to raise an error on failure.
+ *
+ * Find objects that match a URI.
+ *
+ * This call can block. Use gck_modules_enumerate_uri() for a non-blocking
+ * version.
+ *
+ * Returns: A list of #GckObject which should be released with gck_list_unref_free(),
+ *     or %NULL if no matching object was found.
+ */
 GList*
 gck_modules_objects_for_uri (GList *modules, const gchar *uri, guint session_options,
                              GError **error)
@@ -245,6 +312,20 @@ gck_modules_objects_for_uri (GList *modules, const gchar *uri, guint session_opt
 	return results;
 }
 
+/**
+ * gck_modules_enumerate_uri:
+ * @modules: The modules
+ * @uri: The URI that the enumerator will match
+ * @session_options: Options from GckSessionOptions
+ * @error: A location to raise an error on failure.
+ *
+ * Enumerate objects that match a URI.
+ *
+ * This call will not block. Use the #GckEnumerator functions in order to
+ * get at the actual objects that match.
+ *
+ * Returns: A new #GckEnumerator, or %NULL if an error occurs.
+ */
 GckEnumerator*
 gck_modules_enumerate_uri (GList *modules, const gchar *uri, guint session_options,
                            GError **error)
diff --git a/gck/gck-object.c b/gck/gck-object.c
index 1c6fcf9..0067188 100644
--- a/gck/gck-object.c
+++ b/gck/gck-object.c
@@ -39,6 +39,7 @@
 
 /**
  * GckObject:
+ * @parent: derived from this.
  *
  * Represents a PKCS11 object handle such as a key or certifiacte.
  */
@@ -193,7 +194,7 @@ gck_object_class_init (GckObjectClass *klass)
  * @session: The session through which this object is accessed or created.
  * @handle: The raw handle of the object.
  *
- * Initialize a GckObject from a raw PKCS#11 handle. Normally you would use
+ * Initialize a GckObject from a raw PKCS\#11 handle. Normally you would use
  * gck_session_create_object() or gck_session_find_objects() to access objects.
  *
  * Return value: The new GckObject. You should use g_object_unref() when done with this object.
@@ -215,11 +216,11 @@ gck_object_from_handle (GckSession *session, CK_OBJECT_HANDLE handle)
 
 /**
  * gck_objects_from_handle_array:
- * @slot: The slot on which these objects are present.
+ * @session: The session for these objects
  * @handles: The raw object handles.
  * @n_handles: The number of raw object handles.
  *
- * Initialize a list of GckObject from raw PKCS#11 handles. The handles argument must contain
+ * Initialize a list of GckObject from raw PKCS\#11 handles. The handles argument must contain
  * contiguous CK_OBJECT_HANDLE handles in an array.
  *
  * Return value: The list of GckObject. You should use gck_list_unref_free() when done with
@@ -245,7 +246,7 @@ gck_objects_from_handle_array (GckSession *session, CK_OBJECT_HANDLE_PTR handles
  * @object2: A pointer to the second GckObject
  *
  * Checks equality of two objects. Two GckObject objects can point to the same
- * underlying PKCS#11 object.
+ * underlying PKCS\#11 object.
  *
  * Return value: TRUE if object1 and object2 are equal. FALSE if either is not a GckObject.
  **/
@@ -312,7 +313,7 @@ gck_object_hash (gconstpointer object)
  * gck_object_get_handle:
  * @self: The object.
  *
- * Get the raw PKCS#11 handle of a GckObject.
+ * Get the raw PKCS\#11 handle of a GckObject.
  *
  * Return value: The raw object handle.
  **/
@@ -327,7 +328,7 @@ gck_object_get_handle (GckObject *self)
  * gck_object_get_module:
  * @self: The object.
  *
- * Get the PKCS#11 module to which this object belongs.
+ * Get the PKCS\#11 module to which this object belongs.
  *
  * Return value: The module, which should be unreffed after use.
  **/
@@ -344,7 +345,7 @@ gck_object_get_module (GckObject *self)
  * gck_object_get_session:
  * @self: The object
  *
- * Get the PKCS#11 session assigned to make calls on when operating
+ * Get the PKCS\#11 session assigned to make calls on when operating
  * on this object.
  *
  * This will only return a session if it was set explitly on this
@@ -381,24 +382,24 @@ perform_destroy (Destroy *args)
  * gck_object_destroy:
  * @self: The object to destroy.
  * @cancellable: Optional cancellable object, or NULL to ignore.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
- * Destroy a PKCS#11 object, deleting it from storage or the session.
+ * Destroy a PKCS\#11 object, deleting it from storage or the session.
  * This call may block for an indefinite period.
  *
  * Return value: Whether the call was successful or not.
  **/
 gboolean
-gck_object_destroy (GckObject *self, GCancellable *cancellable, GError **err)
+gck_object_destroy (GckObject *self, GCancellable *cancellable, GError **error)
 {
 	Destroy args = { GCK_ARGUMENTS_INIT, 0 };
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), FALSE);
 	g_return_val_if_fail (GCK_IS_SESSION (self->pv->session), FALSE);
-	g_return_val_if_fail (!err || !*err, FALSE);
+	g_return_val_if_fail (!error || !*error, FALSE);
 
 	args.object = self->pv->handle;
-	return _gck_call_sync (self->pv->session, perform_destroy, NULL, &args, cancellable, err);
+	return _gck_call_sync (self->pv->session, perform_destroy, NULL, &args, cancellable, error);
 }
 
 /**
@@ -408,7 +409,7 @@ gck_object_destroy (GckObject *self, GCancellable *cancellable, GError **err)
  * @callback: Callback which is called when operation completes.
  * @user_data: Data to pass to the callback.
  *
- * Destroy a PKCS#11 object, deleting it from storage or the session.
+ * Destroy a PKCS\#11 object, deleting it from storage or the session.
  * This call will return immediately and complete asynchronously.
  **/
 void
@@ -430,19 +431,19 @@ gck_object_destroy_async (GckObject *self, GCancellable *cancellable,
  * gck_object_destroy_finish:
  * @self: The object being destroyed.
  * @result: The result of the destory operation passed to the callback.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
- * Get the status of the operation to destroy a PKCS#11 object, begun with
+ * Get the status of the operation to destroy a PKCS\#11 object, begun with
  * gck_object_destroy_async().
  *
  * Return value: Whether the object was destroyed successfully or not.
  */
 gboolean
-gck_object_destroy_finish (GckObject *self, GAsyncResult *result, GError **err)
+gck_object_destroy_finish (GckObject *self, GAsyncResult *result, GError **error)
 {
 	g_return_val_if_fail (GCK_IS_OBJECT (self), FALSE);
 	g_return_val_if_fail (GCK_IS_CALL (result), FALSE);
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
 
 /* --------------------------------------------------------------------------------------
@@ -481,22 +482,22 @@ free_set_attributes (SetAttributes *args)
  * @self: The object to set attributes on.
  * @attrs: The attributes to set on the object.
  * @cancellable: Optional cancellable object, or NULL to ignore.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
- * Set PKCS#11 attributes on an object. This call may block for an indefinite period.
+ * Set PKCS\#11 attributes on an object. This call may block for an indefinite period.
  *
  * Return value: Whether the call was successful or not.
  **/
 gboolean
 gck_object_set (GckObject *self, GckAttributes *attrs,
-                GCancellable *cancellable, GError **err)
+                GCancellable *cancellable, GError **error)
 {
 	SetAttributes args;
 	gboolean ret = FALSE;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), FALSE);
 	g_return_val_if_fail (attrs, FALSE);
-	g_return_val_if_fail (!err || !*err, FALSE);
+	g_return_val_if_fail (!error || !*error, FALSE);
 
 	_gck_attributes_lock (attrs);
 
@@ -504,7 +505,7 @@ gck_object_set (GckObject *self, GckAttributes *attrs,
 	args.attrs = attrs;
 	args.object = self->pv->handle;
 
-	ret = _gck_call_sync (self->pv->session, perform_set_attributes, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self->pv->session, perform_set_attributes, NULL, &args, cancellable, error);
 
 	_gck_attributes_unlock (attrs);
 	return ret;
@@ -518,7 +519,7 @@ gck_object_set (GckObject *self, GckAttributes *attrs,
  * @callback: Callback which is called when operation completes.
  * @user_data: Data to pass to the callback.
  *
- * Set PKCS#11 attributes on an object. This call will return
+ * Set PKCS\#11 attributes on an object. This call will return
  * immediately and completes asynchronously.
  **/
 void
@@ -544,28 +545,28 @@ gck_object_set_async (GckObject *self, GckAttributes *attrs, GCancellable *cance
  * gck_object_set_finish:
  * @self: The object to set attributes on.
  * @result: The result of the destory operation passed to the callback.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
- * Get the status of the operation to set attributes on a PKCS#11 object,
+ * Get the status of the operation to set attributes on a PKCS\#11 object,
  * begun with gck_object_set_async().
  *
  * Return value: Whether the attributes were successfully set on the object or not.
  */
 gboolean
-gck_object_set_finish (GckObject *self, GAsyncResult *result, GError **err)
+gck_object_set_finish (GckObject *self, GAsyncResult *result, GError **error)
 {
 	SetAttributes *args;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), FALSE);
 	g_return_val_if_fail (GCK_IS_CALL (result), FALSE);
-	g_return_val_if_fail (!err || !*err, FALSE);
+	g_return_val_if_fail (!error || !*error, FALSE);
 
 	/* Unlock the attributes we were using */
 	args = _gck_call_arguments (result, SetAttributes);
 	g_assert (args->attrs);
 	_gck_attributes_unlock (args->attrs);
 
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
 
 /* ------------------------------------------------------------------------------------
@@ -641,17 +642,18 @@ free_get_attributes (GetAttributes *args)
 /**
  * gck_object_get:
  * @self: The object to get attributes from.
- * @err: A location to store an error.
+ * @cancellable: A #GCancellable or %NULL
+ * @error: A location to store an error.
  * @...: The attribute types to get.
  *
  * Get the specified attributes from the object. This call may
  * block for an indefinite period.
  *
- * Return value: The resulting PKCS#11 attributes, or NULL if an error occurred.
+ * Return value: The resulting PKCS\#11 attributes, or NULL if an error occurred.
  * The result must be unreffed when you're finished with it.
  **/
 GckAttributes*
-gck_object_get (GckObject *self, GCancellable *cancellable, GError **err, ...)
+gck_object_get (GckObject *self, GCancellable *cancellable, GError **error, ...)
 {
 	GckAttributes *attrs;
 	GArray *array;
@@ -659,10 +661,10 @@ gck_object_get (GckObject *self, GCancellable *cancellable, GError **err, ...)
 	gulong type;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
 	array = g_array_new (FALSE, TRUE, sizeof (gulong));
-	va_start (va, err);
+	va_start (va, error);
 	for (;;) {
 		type = va_arg (va, gulong);
 		if (type == GCK_INVALID)
@@ -671,7 +673,7 @@ gck_object_get (GckObject *self, GCancellable *cancellable, GError **err, ...)
 	}
 	va_end (va);
 
-	attrs = gck_object_get_full (self, (gulong*)array->data, array->len, cancellable, err);
+	attrs = gck_object_get_full (self, (gulong*)array->data, array->len, cancellable, error);
 	g_array_free (array, TRUE);
 
 	return attrs;
@@ -683,7 +685,7 @@ gck_object_get (GckObject *self, GCancellable *cancellable, GError **err, ...)
  * @attr_types: The types of the attributes to get.
  * @n_attr_types: The number of attr_types
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get the specified attributes from the object. This call may
  * block for an indefinite period.
@@ -696,7 +698,7 @@ gck_object_get (GckObject *self, GCancellable *cancellable, GError **err, ...)
  **/
 GckAttributes*
 gck_object_get_full (GckObject *self, gulong *attr_types, guint n_attr_types,
-                      GCancellable *cancellable, GError **err)
+                      GCancellable *cancellable, GError **error)
 {
 	GetAttributes args;
 	GckAttributes *attrs;
@@ -705,7 +707,7 @@ gck_object_get_full (GckObject *self, gulong *attr_types, guint n_attr_types,
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
 	g_return_val_if_fail (n_attr_types, NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
 	attrs = gck_attributes_new ();
 	for (i = 0; i < n_attr_types; ++i)
@@ -717,7 +719,7 @@ gck_object_get_full (GckObject *self, gulong *attr_types, guint n_attr_types,
 	args.attrs = attrs;
 	args.object = self->pv->handle;
 
-	ret = _gck_call_sync (self->pv->session, perform_get_attributes, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self->pv->session, perform_get_attributes, NULL, &args, cancellable, error);
 	_gck_attributes_unlock (attrs);
 
 	if (!ret) {
@@ -773,7 +775,7 @@ gck_object_get_async (GckObject *self, gulong *attr_types, guint n_attr_types, G
  * gck_object_get_finish:
  * @self: The object to get attributes from.
  * @result: The result passed to the callback.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get the result of a get operation and return specified attributes from
  * the object.
@@ -784,20 +786,20 @@ gck_object_get_async (GckObject *self, gulong *attr_types, guint n_attr_types, G
  * NULL if not successful.
  **/
 GckAttributes*
-gck_object_get_finish (GckObject *self, GAsyncResult *result, GError **err)
+gck_object_get_finish (GckObject *self, GAsyncResult *result, GError **error)
 {
 	GetAttributes *args;
 	GckAttributes *attrs;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
 	g_return_val_if_fail (GCK_IS_CALL (result), NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
 	args = _gck_call_arguments (result, GetAttributes);
 	_gck_attributes_unlock (args->attrs);
 	attrs = gck_attributes_ref (args->attrs);
 
-	if (!_gck_call_basic_finish (result, err)) {
+	if (!_gck_call_basic_finish (result, error)) {
 		gck_attributes_unref (attrs);
 		attrs = NULL;
 	}
@@ -866,25 +868,26 @@ free_get_attribute_data (GetAttributeData *args)
  * gck_object_get_data:
  * @self: The object to get attribute data from.
  * @attr_type: The attribute to get data for.
+ * @cancellable: A #GCancellable or %NULL
  * @n_data: The length of the resulting data.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get the data for the specified attribute from the object. For convenience
  * the returned data has a null terminator.
  *
  * This call may block for an indefinite period.
  *
- * Return value: The resulting PKCS#11 attribute data, or NULL if an error occurred.
+ * Return value: The resulting PKCS\#11 attribute data, or NULL if an error occurred.
  **/
 gpointer
 gck_object_get_data (GckObject *self, gulong attr_type, GCancellable *cancellable,
-                     gsize *n_data, GError **err)
+                     gsize *n_data, GError **error)
 {
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
 	g_return_val_if_fail (n_data, NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
-	return gck_object_get_data_full (self, attr_type, g_realloc, cancellable, n_data, err);
+	return gck_object_get_data_full (self, attr_type, g_realloc, cancellable, n_data, error);
 }
 
 /**
@@ -894,25 +897,25 @@ gck_object_get_data (GckObject *self, gulong attr_type, GCancellable *cancellabl
  * @allocator: An allocator with which to allocate memory for the data, or NULL for default.
  * @cancellable: Optional cancellation object, or NULL.
  * @n_data: The length of the resulting data.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get the data for the specified attribute from the object. For convenience
  * the returned data has an extra null terminator, not included in the returned length.
  *
  * This call may block for an indefinite period.
  *
- * Return value: The resulting PKCS#11 attribute data, or NULL if an error occurred.
+ * Return value: The resulting PKCS\#11 attribute data, or NULL if an error occurred.
  **/
 gpointer
 gck_object_get_data_full (GckObject *self, gulong attr_type, GckAllocator allocator,
-                           GCancellable *cancellable, gsize *n_data, GError **err)
+                           GCancellable *cancellable, gsize *n_data, GError **error)
 {
 	GetAttributeData args;
 	gboolean ret;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
 	g_return_val_if_fail (n_data, NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
 	if (!allocator)
 		allocator = g_realloc;
@@ -922,7 +925,7 @@ gck_object_get_data_full (GckObject *self, gulong attr_type, GckAllocator alloca
 	args.object = self->pv->handle;
 	args.type = attr_type;
 
-	ret = _gck_call_sync (self->pv->session, perform_get_attribute_data, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self->pv->session, perform_get_attribute_data, NULL, &args, cancellable, error);
 
 	/* Free any value if failed */
 	if (!ret) {
@@ -975,18 +978,17 @@ gck_object_get_data_async (GckObject *self, gulong attr_type, GckAllocator alloc
  * @self: The object to get an attribute from.
  * @result: The result passed to the callback.
  * @n_data: The length of the resulting data.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get the result of an operation to get attribute data from
  * an object. For convenience the returned data has an extra null terminator,
  * not included in the returned length.
  *
- *
- * Return value: The PKCS#11 attribute data or NULL if an error occurred.
+ * Return value: The PKCS\#11 attribute data or NULL if an error occurred.
  **/
 gpointer
 gck_object_get_data_finish (GckObject *self, GAsyncResult *result,
-                             gsize *n_data, GError **err)
+                             gsize *n_data, GError **error)
 {
 	GetAttributeData *args;
 	guchar *data;
@@ -994,9 +996,9 @@ gck_object_get_data_finish (GckObject *self, GAsyncResult *result,
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
 	g_return_val_if_fail (GCK_IS_CALL (result), NULL);
 	g_return_val_if_fail (n_data, NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 
 	args = _gck_call_arguments (result, GetAttributeData);
@@ -1048,7 +1050,7 @@ free_set_template (set_template_args *args)
  * @attr_type: The attribute template type.
  * @attrs: The attribute template.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Set an attribute template on the object. The attr_type must be for
  * an attribute which contains a template.
@@ -1059,14 +1061,14 @@ free_set_template (set_template_args *args)
  **/
 gboolean
 gck_object_set_template (GckObject *self, gulong attr_type, GckAttributes *attrs,
-                         GCancellable *cancellable, GError **err)
+                         GCancellable *cancellable, GError **error)
 {
 	set_template_args args;
 	gboolean ret = FALSE;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), FALSE);
 	g_return_val_if_fail (attrs, FALSE);
-	g_return_val_if_fail (!err || !*err, FALSE);
+	g_return_val_if_fail (!error || !*error, FALSE);
 
 	_gck_attributes_lock (attrs);
 
@@ -1075,7 +1077,7 @@ gck_object_set_template (GckObject *self, gulong attr_type, GckAttributes *attrs
 	args.type = attr_type;
 	args.object = self->pv->handle;
 
-	ret = _gck_call_sync (self->pv->session, perform_set_template, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self->pv->session, perform_set_template, NULL, &args, cancellable, error);
 
 	_gck_attributes_unlock (attrs);
 	return ret;
@@ -1120,7 +1122,7 @@ gck_object_set_template_async (GckObject *self, gulong attr_type, GckAttributes
  * gck_object_set_template_finish:
  * @self: The object to set an attribute template on.
  * @result: The result passed to the callback.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get the result of an operation to set attribute template on
  * an object.
@@ -1128,20 +1130,20 @@ gck_object_set_template_async (GckObject *self, gulong attr_type, GckAttributes
  * Return value: TRUE if the operation succeeded.
  **/
 gboolean
-gck_object_set_template_finish (GckObject *self, GAsyncResult *result, GError **err)
+gck_object_set_template_finish (GckObject *self, GAsyncResult *result, GError **error)
 {
 	set_template_args *args;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), FALSE);
 	g_return_val_if_fail (GCK_IS_CALL (result), FALSE);
-	g_return_val_if_fail (!err || !*err, FALSE);
+	g_return_val_if_fail (!error || !*error, FALSE);
 
 	/* Unlock the attributes we were using */
 	args = _gck_call_arguments (result, set_template_args);
 	g_assert (args->attrs);
 	_gck_attributes_unlock (args->attrs);
 
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
 
 /* ---------------------------------------------------------------------------------------
@@ -1209,30 +1211,30 @@ free_get_template (get_template_args *args)
  * @self: The object to get an attribute template from.
  * @attr_type: The template attribute type.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get an attribute template from the object. The attr_type must be for
  * an attribute which returns a template.
  *
  * This call may block for an indefinite period.
  *
- * Return value: The resulting PKCS#11 attribute template, or NULL if an error occurred.
+ * Return value: The resulting PKCS\#11 attribute template, or NULL if an error occurred.
  **/
 GckAttributes*
 gck_object_get_template (GckObject *self, gulong attr_type,
-                         GCancellable *cancellable, GError **err)
+                         GCancellable *cancellable, GError **error)
 {
 	get_template_args args;
 	gboolean ret;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
 	memset (&args, 0, sizeof (args));
 	args.object = self->pv->handle;
 	args.type = attr_type;
 
-	ret = _gck_call_sync (self->pv->session, perform_get_template, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self->pv->session, perform_get_template, NULL, &args, cancellable, error);
 
 	_gck_attributes_unlock (args.attrs);
 
@@ -1280,24 +1282,24 @@ gck_object_get_template_async (GckObject *self, gulong attr_type,
  * gck_object_get_template_finish:
  * @self: The object to get an attribute from.
  * @result: The result passed to the callback.
- * @err: A location to store an error.
+ * @error: A location to store an error.
  *
  * Get the result of an operation to get attribute template from
  * an object.
  *
- * Return value: The resulting PKCS#11 attribute template, or NULL if an error occurred.
+ * Return value: The resulting PKCS\#11 attribute template, or NULL if an error occurred.
  **/
 GckAttributes*
 gck_object_get_template_finish (GckObject *self, GAsyncResult *result,
-                                GError **err)
+                                GError **error)
 {
 	get_template_args *args;
 
 	g_return_val_if_fail (GCK_IS_OBJECT (self), NULL);
 	g_return_val_if_fail (GCK_IS_CALL (result), NULL);
-	g_return_val_if_fail (!err || !*err, NULL);
+	g_return_val_if_fail (!error || !*error, NULL);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 
 	args = _gck_call_arguments (result, get_template_args);
diff --git a/gck/gck-session.c b/gck/gck-session.c
index 4c900b7..52d0a4c 100644
--- a/gck/gck-session.c
+++ b/gck/gck-session.c
@@ -42,11 +42,21 @@
 
 /**
  * GckSession:
+ * @parent: derived from this.
  *
  * Represents an open PKCS11 session.
  */
 
 /**
+ * GckSessionOptions:
+ * @GCK_SESSION_READ_WRITE: Open sessions as read/write
+ * @GCK_SESSION_LOGIN_USER: Login as user on new sessions.
+ * @GCK_SESSION_AUTHENTICATE: Authenticate as necessary
+ *
+ * Options for creating sessions.
+ */
+
+/**
  * GckMechanism:
  * @type: The mechanism type
  * @parameter: Mechanism specific data.
@@ -311,10 +321,10 @@ gck_session_info_free (GckSessionInfo *session_info)
 /**
  * gck_session_from_handle:
  * @slot: The slot which the session belongs to.
- * @handle: The raw PKCS#11 handle of the session.
+ * @handle: The raw PKCS\#11 handle of the session.
  * @options: Session options. Those which are used during opening a session have no effect.
  *
- * Initialize a GckSession object from a raw PKCS#11 session handle.
+ * Initialize a GckSession object from a raw PKCS\#11 session handle.
  * Usually one would use the gck_slot_open_session() function to
  * create a session.
  *
@@ -341,7 +351,7 @@ gck_session_from_handle (GckSlot *slot, CK_SESSION_HANDLE handle, guint options)
  * gck_session_get_handle:
  * @self: The session object.
  *
- * Get the raw PKCS#11 session handle from a GckSession object.
+ * Get the raw PKCS\#11 session handle from a GckSession object.
  *
  * Return value: The raw session handle.
  **/
@@ -356,7 +366,7 @@ gck_session_get_handle (GckSession *self)
  * gck_session_get_module:
  * @self: The session object.
  *
- * Get the PKCS#11 module to which this session belongs.
+ * Get the PKCS\#11 module to which this session belongs.
  *
  * Return value: The module, which should be unreffed after use.
  **/
@@ -372,7 +382,7 @@ gck_session_get_module (GckSession *self)
  * gck_session_get_slot:
  * @self: The session object.
  *
- * Get the PKCS#11 slot to which this session belongs.
+ * Get the PKCS\#11 slot to which this session belongs.
  *
  * Return value: The slot, which should be unreffed after use.
  **/
@@ -502,10 +512,10 @@ perform_init_pin (InitPin *args)
  * @pin: The user's PIN, or NULL for protected authentication path.
  * @n_pin: The length of the PIN.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Initialize the user's pin on this slot that this session is opened on.
- * According to the PKCS#11 standards, the session must be logged in with
+ * According to the PKCS\#11 standards, the session must be logged in with
  * the CKU_SO user type.
  *
  * This call may block for an indefinite period.
@@ -514,10 +524,10 @@ perform_init_pin (InitPin *args)
  **/
 gboolean
 gck_session_init_pin (GckSession *self, const guchar *pin, gsize n_pin,
-                      GCancellable *cancellable, GError **err)
+                      GCancellable *cancellable, GError **error)
 {
 	InitPin args = { GCK_ARGUMENTS_INIT, (guchar*)pin, n_pin };
-	return _gck_call_sync (self, perform_init_pin, NULL, &args, cancellable, err);
+	return _gck_call_sync (self, perform_init_pin, NULL, &args, cancellable, error);
 
 }
 
@@ -531,7 +541,7 @@ gck_session_init_pin (GckSession *self, const guchar *pin, gsize n_pin,
  * @user_data: Data to pass to the callback.
  *
  * Initialize the user's pin on this slot that this session is opened on.
- * According to the PKCS#11 standards, the session must be logged in with
+ * According to the PKCS\#11 standards, the session must be logged in with
  * the CKU_SO user type.
  *
  * This call will return immediately and completes asynchronously.
@@ -553,16 +563,16 @@ gck_session_init_pin_async (GckSession *self, const guchar *pin, gsize n_pin,
  * gck_session_init_pin_finish:
  * @self: The session.
  * @result: The result passed to the callback.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of initializing a user's PIN.
  *
  * Return value: Whether the operation was successful or not.
  **/
 gboolean
-gck_session_init_pin_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_init_pin_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
 
 
@@ -601,7 +611,7 @@ perform_set_pin (SetPin *args)
  * @new_pin: The user's new PIN, or NULL for protected authentication path.
  * @n_new_pin: The length of the PIN.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Change the user's pin on this slot that this session is opened on.
  *
@@ -612,10 +622,10 @@ perform_set_pin (SetPin *args)
 gboolean
 gck_session_set_pin (GckSession *self, const guchar *old_pin, gsize n_old_pin,
                      const guchar *new_pin, gsize n_new_pin, GCancellable *cancellable,
-                     GError **err)
+                     GError **error)
 {
 	SetPin args = { GCK_ARGUMENTS_INIT, (guchar*)old_pin, n_old_pin, (guchar*)new_pin, n_new_pin };
-	return _gck_call_sync (self, perform_set_pin, NULL, &args, cancellable, err);
+	return _gck_call_sync (self, perform_set_pin, NULL, &args, cancellable, error);
 }
 
 /**
@@ -652,16 +662,16 @@ gck_session_set_pin_async (GckSession *self, const guchar *old_pin, gsize n_old_
  * gck_session_set_pin_finish:
  * @self: The session.
  * @result: The result passed to the callback.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of changing a user's PIN.
  *
  * Return value: Whether the operation was successful or not.
  **/
 gboolean
-gck_session_set_pin_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_set_pin_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
 
 
@@ -697,7 +707,7 @@ perform_login (Login *args)
  * @pin: The user's PIN, or NULL for protected authentication path.
  * @n_pin: The length of the PIN.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Login the user on the session. This call may block for
  * an indefinite period.
@@ -706,10 +716,10 @@ perform_login (Login *args)
  **/
 gboolean
 gck_session_login (GckSession *self, gulong user_type, const guchar *pin,
-                   gsize n_pin, GCancellable *cancellable, GError **err)
+                   gsize n_pin, GCancellable *cancellable, GError **error)
 {
 	Login args = { GCK_ARGUMENTS_INIT, user_type, (guchar*)pin, n_pin };
-	return _gck_call_sync (self, perform_login, NULL, &args, cancellable, err);
+	return _gck_call_sync (self, perform_login, NULL, &args, cancellable, error);
 
 }
 
@@ -745,16 +755,16 @@ gck_session_login_async (GckSession *self, gulong user_type, const guchar *pin,
  * gck_session_login_finish:
  * @self: The session logged into.
  * @result: The result passed to the callback.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of a login operation.
  *
  * Return value: Whether the operation was successful or not.
  **/
 gboolean
-gck_session_login_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_login_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
 
 
@@ -772,17 +782,17 @@ perform_logout (GckArguments *args)
  * gck_session_logout:
  * @self: Logout of this session.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Log out of the session. This call may block for an indefinite period.
  *
  * Return value: Whether the logout was successful or not.
  **/
 gboolean
-gck_session_logout (GckSession *self, GCancellable *cancellable, GError **err)
+gck_session_logout (GckSession *self, GCancellable *cancellable, GError **error)
 {
 	GckArguments args = GCK_ARGUMENTS_INIT;
-	return _gck_call_sync (self, perform_logout, NULL, &args, cancellable, err);
+	return _gck_call_sync (self, perform_logout, NULL, &args, cancellable, error);
 }
 
 /**
@@ -807,16 +817,16 @@ gck_session_logout_async (GckSession *self, GCancellable *cancellable,
  * gck_session_logout_finish:
  * @self: Logout of this session.
  * @result: The result passed to the callback.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of logging out of a session.
  *
  * Return value: Whether the logout was successful or not.
  **/
 gboolean
-gck_session_logout_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_logout_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
 
 
@@ -855,16 +865,16 @@ perform_create_object (CreateObject *args)
  * @self: The session to create the object on.
  * @attrs: The attributes to create the object with.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
- * Create a new PKCS#11 object. This call may block for an
+ * Create a new PKCS\#11 object. This call may block for an
  * indefinite period.
  *
  * Return value: The newly created object or NULL if an error occurred.
  **/
 GckObject*
 gck_session_create_object (GckSession *self, GckAttributes *attrs,
-                           GCancellable *cancellable, GError **err)
+                           GCancellable *cancellable, GError **error)
 {
 	CreateObject args = { GCK_ARGUMENTS_INIT, attrs, 0 };
 	gboolean ret;
@@ -873,7 +883,7 @@ gck_session_create_object (GckSession *self, GckAttributes *attrs,
 	g_return_val_if_fail (attrs, NULL);
 
 	_gck_attributes_lock (attrs);
-	ret = _gck_call_sync (self, perform_create_object, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self, perform_create_object, NULL, &args, cancellable, error);
 	_gck_attributes_unlock (attrs);
 
 	if (!ret)
@@ -890,7 +900,7 @@ gck_session_create_object (GckSession *self, GckAttributes *attrs,
  * @callback: Called when the operation completes.
  * @user_data: Data to pass to the callback.
  *
- * Create a new PKCS#11 object. This call will return immediately
+ * Create a new PKCS\#11 object. This call will return immediately
  * and complete asynchronously.
  **/
 void
@@ -913,21 +923,21 @@ gck_session_create_object_async (GckSession *self, GckAttributes *attrs,
  * gck_session_create_object_finish:
  * @self: The session to create the object on.
  * @result: The result passed to the callback.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
- * Get the result of creating a new PKCS#11 object.
+ * Get the result of creating a new PKCS\#11 object.
  *
  * Return value: The newly created object or NULL if an error occurred.
  **/
 GckObject*
-gck_session_create_object_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_create_object_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
 	CreateObject *args;
 
 	args = _gck_call_arguments (result, CreateObject);
 	_gck_attributes_unlock (args->attrs);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 	return gck_object_from_handle (self, args->object);
 }
@@ -1026,7 +1036,7 @@ objlist_from_handles (GckSession *self, CK_OBJECT_HANDLE_PTR objects,
  * @self: The session to find objects on.
  * @attrs: The attributes to match.
  * @cancellable: Optional cancellation object or NULL.
- * @err: A location to return an error or NULL.
+ * @error: A location to return an error or NULL.
  *
  * Find the objects matching the passed attributes. This call may
  * block for an indefinite period.
@@ -1035,7 +1045,7 @@ objlist_from_handles (GckSession *self, CK_OBJECT_HANDLE_PTR objects,
  **/
 GList*
 gck_session_find_objects (GckSession *self, GckAttributes *attrs,
-                          GCancellable *cancellable, GError **err)
+                          GCancellable *cancellable, GError **error)
 {
 	FindObjects args = { GCK_ARGUMENTS_INIT, attrs, NULL, 0 };
 	GList *results = NULL;
@@ -1043,7 +1053,7 @@ gck_session_find_objects (GckSession *self, GckAttributes *attrs,
 	g_return_val_if_fail (attrs, NULL);
 	_gck_attributes_lock (attrs);
 
-	if (_gck_call_sync (self, perform_find_objects, NULL, &args, cancellable, err))
+	if (_gck_call_sync (self, perform_find_objects, NULL, &args, cancellable, error))
 		results = objlist_from_handles (self, args.objects, args.n_objects);
 
 	g_free (args.objects);
@@ -1078,21 +1088,21 @@ gck_session_find_objects_async (GckSession *self, GckAttributes *attrs,
  * gck_session_find_objects_finish:
  * @self: The session to find objects on.
  * @result: The attributes to match.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of a find operation.
  *
  * Return value: A list of the matching objects, which may be empty.
  **/
 GList*
-gck_session_find_objects_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_find_objects_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
 	FindObjects *args;
 
 	args = _gck_call_arguments (result, FindObjects);
 	_gck_attributes_unlock (args->attrs);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 	return objlist_from_handles (self, args->objects, args->n_objects);
 }
@@ -1146,7 +1156,7 @@ perform_generate_key_pair (GenerateKeyPair *args)
  * @public_key: A location to return the resulting public key.
  * @private_key: A location to return the resulting private key.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Generate a new key pair of public and private keys. This call may block for an
  * indefinite period.
@@ -1157,10 +1167,10 @@ gboolean
 gck_session_generate_key_pair (GckSession *self, gulong mech_type,
                                GckAttributes *public_attrs, GckAttributes *private_attrs,
                                GckObject **public_key, GckObject **private_key,
-                               GCancellable *cancellable, GError **err)
+                               GCancellable *cancellable, GError **error)
 {
 	GckMechanism mech = { mech_type, NULL, 0 };
-	return gck_session_generate_key_pair_full (self, &mech, public_attrs, private_attrs, public_key, private_key, cancellable, err);
+	return gck_session_generate_key_pair_full (self, &mech, public_attrs, private_attrs, public_key, private_key, cancellable, error);
 }
 
 /**
@@ -1172,7 +1182,7 @@ gck_session_generate_key_pair (GckSession *self, gulong mech_type,
  * @public_key: A location to return the resulting public key.
  * @private_key: A location to return the resulting private key.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Generate a new key pair of public and private keys. This call may block for an
  * indefinite period.
@@ -1183,7 +1193,7 @@ gboolean
 gck_session_generate_key_pair_full (GckSession *self, GckMechanism *mechanism,
                                      GckAttributes *public_attrs, GckAttributes *private_attrs,
                                      GckObject **public_key, GckObject **private_key,
-                                     GCancellable *cancellable, GError **err)
+                                     GCancellable *cancellable, GError **error)
 {
 	GenerateKeyPair args = { GCK_ARGUMENTS_INIT, GCK_MECHANISM_EMPTY, public_attrs, private_attrs, 0, 0 };
 	gboolean ret;
@@ -1201,7 +1211,7 @@ gck_session_generate_key_pair_full (GckSession *self, GckMechanism *mechanism,
 	_gck_attributes_lock (public_attrs);
 	if (public_attrs != private_attrs)
 		_gck_attributes_lock (private_attrs);
-	ret = _gck_call_sync (self, perform_generate_key_pair, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self, perform_generate_key_pair, NULL, &args, cancellable, error);
 	if (public_attrs != private_attrs)
 		_gck_attributes_unlock (private_attrs);
 	_gck_attributes_unlock (public_attrs);
@@ -1259,7 +1269,7 @@ gck_session_generate_key_pair_async (GckSession *self, GckMechanism *mechanism,
  * @result: The async result passed to the callback.
  * @public_key: A location to return the resulting public key.
  * @private_key: A location to return the resulting private key.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of a generate key pair operation.
  *
@@ -1268,7 +1278,7 @@ gck_session_generate_key_pair_async (GckSession *self, GckMechanism *mechanism,
 gboolean
 gck_session_generate_key_pair_finish (GckSession *self, GAsyncResult *result,
                                        GckObject **public_key, GckObject **private_key,
-                                       GError **err)
+                                       GError **error)
 {
 	GenerateKeyPair *args;
 
@@ -1281,7 +1291,7 @@ gck_session_generate_key_pair_finish (GckSession *self, GAsyncResult *result,
 	if (args->public_attrs != args->private_attrs)
 		_gck_attributes_unlock (args->private_attrs);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return FALSE;
 
 	*public_key = gck_object_from_handle (self, args->public_key);
@@ -1336,10 +1346,11 @@ perform_wrap_key (WrapKey *args)
  * gck_session_wrap_key:
  * @self: The session to use.
  * @wrapper: The key to use for wrapping.
- * @mechanism: The mechanism type to use for wrapping.
+ * @mech_type: The mechanism type to use for wrapping.
  * @wrapped: The key to wrap.
  * @n_result: A location in which to return the length of the wrapped data.
- * @err: A location to return an error, or NULL.
+ * @cancellable: A #GCancellable or %NULL
+ * @error: A location to return an error, or NULL.
  *
  * Wrap a key into a byte stream. This call may block for an
  * indefinite period.
@@ -1348,10 +1359,10 @@ perform_wrap_key (WrapKey *args)
  **/
 gpointer
 gck_session_wrap_key (GckSession *self, GckObject *key, gulong mech_type,
-                      GckObject *wrapped, gsize *n_result, GCancellable *cancellable, GError **err)
+                      GckObject *wrapped, gsize *n_result, GCancellable *cancellable, GError **error)
 {
 	GckMechanism mech = { mech_type, NULL, 0 };
-	return gck_session_wrap_key_full (self, key, &mech, wrapped, n_result, cancellable, err);
+	return gck_session_wrap_key_full (self, key, &mech, wrapped, n_result, cancellable, error);
 }
 
 /**
@@ -1362,7 +1373,7 @@ gck_session_wrap_key (GckSession *self, GckObject *key, gulong mech_type,
  * @wrapped: The key to wrap.
  * @n_result: A location in which to return the length of the wrapped data.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Wrap a key into a byte stream. This call may block for an
  * indefinite period.
@@ -1372,7 +1383,7 @@ gck_session_wrap_key (GckSession *self, GckObject *key, gulong mech_type,
 gpointer
 gck_session_wrap_key_full (GckSession *self, GckObject *wrapper, GckMechanism *mechanism,
                             GckObject *wrapped, gsize *n_result, GCancellable *cancellable,
-                            GError **err)
+                            GError **error)
 {
 	WrapKey args = { GCK_ARGUMENTS_INIT, GCK_MECHANISM_EMPTY, 0, 0, NULL, 0 };
 	gboolean ret;
@@ -1391,7 +1402,7 @@ gck_session_wrap_key_full (GckSession *self, GckObject *wrapper, GckMechanism *m
 	g_object_get (wrapped, "handle", &args.wrapped, NULL);
 	g_return_val_if_fail (args.wrapped != 0, NULL);
 
-	ret = _gck_call_sync (self, perform_wrap_key, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self, perform_wrap_key, NULL, &args, cancellable, error);
 
 	if (!ret)
 		return FALSE;
@@ -1442,7 +1453,7 @@ gck_session_wrap_key_async (GckSession *self, GckObject *key, GckMechanism *mech
  * @self: The session to use.
  * @result: The async result passed to the callback.
  * @n_result: A location in which to return the length of the wrapped data.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of a wrap key operation.
  *
@@ -1450,7 +1461,7 @@ gck_session_wrap_key_async (GckSession *self, GckObject *key, GckMechanism *mech
  **/
 gpointer
 gck_session_wrap_key_finish (GckSession *self, GAsyncResult *result,
-                              gsize *n_result, GError **err)
+                              gsize *n_result, GError **error)
 {
 	WrapKey *args;
 	gpointer ret;
@@ -1460,7 +1471,7 @@ gck_session_wrap_key_finish (GckSession *self, GAsyncResult *result,
 
 	args = _gck_call_arguments (result, WrapKey);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 
 	*n_result = args->n_result;
@@ -1518,7 +1529,7 @@ perform_unwrap_key (UnwrapKey *args)
  * @n_input: The length of the wrapped data.
  * @attrs: Additional attributes for the unwrapped key.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Unwrap a key from a byte stream. This call may block for an
  * indefinite period.
@@ -1528,10 +1539,10 @@ perform_unwrap_key (UnwrapKey *args)
 GckObject*
 gck_session_unwrap_key (GckSession *self, GckObject *wrapper, gulong mech_type,
                         gconstpointer input, gsize n_input, GckAttributes *attrs,
-                        GCancellable *cancellable, GError **err)
+                        GCancellable *cancellable, GError **error)
 {
 	GckMechanism mech = { mech_type, NULL, 0 };
-	return gck_session_unwrap_key_full (self, wrapper, &mech, input, n_input, attrs, cancellable, err);
+	return gck_session_unwrap_key_full (self, wrapper, &mech, input, n_input, attrs, cancellable, error);
 }
 
 /**
@@ -1543,7 +1554,7 @@ gck_session_unwrap_key (GckSession *self, GckObject *wrapper, gulong mech_type,
  * @n_input: The length of the wrapped data.
  * @attrs: Additional attributes for the unwrapped key.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Unwrap a key from a byte stream. This call may block for an
  * indefinite period.
@@ -1553,7 +1564,7 @@ gck_session_unwrap_key (GckSession *self, GckObject *wrapper, gulong mech_type,
 GckObject*
 gck_session_unwrap_key_full (GckSession *self, GckObject *wrapper, GckMechanism *mechanism,
                              gconstpointer input, gsize n_input, GckAttributes *attrs,
-                             GCancellable *cancellable, GError **err)
+                             GCancellable *cancellable, GError **error)
 {
 	UnwrapKey args = { GCK_ARGUMENTS_INIT, GCK_MECHANISM_EMPTY, attrs, 0, input, n_input, 0 };
 	gboolean ret;
@@ -1570,7 +1581,7 @@ gck_session_unwrap_key_full (GckSession *self, GckObject *wrapper, GckMechanism
 	g_return_val_if_fail (args.wrapper != 0, NULL);
 
 	_gck_attributes_lock (attrs);
-	ret = _gck_call_sync (self, perform_unwrap_key, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self, perform_unwrap_key, NULL, &args, cancellable, error);
 	_gck_attributes_unlock (attrs);
 
 	if (!ret)
@@ -1622,17 +1633,17 @@ gck_session_unwrap_key_async (GckSession *self, GckObject *wrapper, GckMechanism
 }
 
 /**
- * gck_session_wrap_key_finish:
+ * gck_session_unwrap_key_finish:
  * @self: The session to use.
  * @result: The async result passed to the callback.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of a unwrap key operation.
  *
  * Return value: The new unwrapped key or NULL if the operation failed.
  **/
 GckObject*
-gck_session_unwrap_key_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_unwrap_key_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
 	UnwrapKey *args;
 
@@ -1641,7 +1652,7 @@ gck_session_unwrap_key_finish (GckSession *self, GAsyncResult *result, GError **
 	args = _gck_call_arguments (result, UnwrapKey);
 	_gck_attributes_unlock (args->attrs);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 	return gck_object_from_handle (self, args->unwrapped);
 }
@@ -1685,10 +1696,10 @@ perform_derive_key (DeriveKey *args)
  * gck_session_derive_key:
  * @self: The session to use.
  * @base: The key to derive from.
- * @mechanism: The mechanism to use for derivation.
+ * @mech_type: The mechanism to use for derivation.
  * @attrs: Additional attributes for the derived key.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Derive a key from another key. This call may block for an
  * indefinite period.
@@ -1697,10 +1708,10 @@ perform_derive_key (DeriveKey *args)
  **/
 GckObject*
 gck_session_derive_key (GckSession *self, GckObject *base, gulong mech_type,
-                        GckAttributes *attrs, GCancellable *cancellable, GError **err)
+                        GckAttributes *attrs, GCancellable *cancellable, GError **error)
 {
 	GckMechanism mech = { mech_type, NULL, 0 };
-	return gck_session_derive_key_full (self, base, &mech, attrs, cancellable, err);
+	return gck_session_derive_key_full (self, base, &mech, attrs, cancellable, error);
 }
 
 /**
@@ -1710,7 +1721,7 @@ gck_session_derive_key (GckSession *self, GckObject *base, gulong mech_type,
  * @mechanism: The mechanism to use for derivation.
  * @attrs: Additional attributes for the derived key.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Derive a key from another key. This call may block for an
  * indefinite period.
@@ -1719,7 +1730,7 @@ gck_session_derive_key (GckSession *self, GckObject *base, gulong mech_type,
  **/
 GckObject*
 gck_session_derive_key_full (GckSession *self, GckObject *base, GckMechanism *mechanism,
-                             GckAttributes *attrs, GCancellable *cancellable, GError **err)
+                             GckAttributes *attrs, GCancellable *cancellable, GError **error)
 {
 	DeriveKey args = { GCK_ARGUMENTS_INIT, GCK_MECHANISM_EMPTY, attrs, 0, 0 };
 	gboolean ret;
@@ -1736,7 +1747,7 @@ gck_session_derive_key_full (GckSession *self, GckObject *base, GckMechanism *me
 	g_return_val_if_fail (args.key != 0, NULL);
 
 	_gck_attributes_lock (attrs);
-	ret = _gck_call_sync (self, perform_derive_key, NULL, &args, cancellable, err);
+	ret = _gck_call_sync (self, perform_derive_key, NULL, &args, cancellable, error);
 	_gck_attributes_unlock (attrs);
 
 	if (!ret)
@@ -1783,17 +1794,17 @@ gck_session_derive_key_async (GckSession *self, GckObject *base, GckMechanism *m
 }
 
 /**
- * gck_session_wrap_key_finish:
+ * gck_session_derive_key_finish:
  * @self: The session to use.
  * @result: The async result passed to the callback.
- * @err: A location to return an error.
+ * @error: A location to return an error.
  *
  * Get the result of a derive key operation.
  *
  * Return value: The new derived key or NULL if the operation failed.
  **/
 GckObject*
-gck_session_derive_key_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_derive_key_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
 	DeriveKey *args;
 
@@ -1802,7 +1813,7 @@ gck_session_derive_key_finish (GckSession *self, GAsyncResult *result, GError **
 	args = _gck_call_arguments (result, DeriveKey);
 	_gck_attributes_unlock (args->attrs);
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 
 	return gck_object_from_handle (self, args->derived);
@@ -2056,7 +2067,7 @@ free_crypt (Crypt *args)
 
 static guchar*
 crypt_sync (GckSession *self, GckObject *key, GckMechanism *mechanism, const guchar *input,
-            gsize n_input, gsize *n_result, GCancellable *cancellable, GError **err,
+            gsize n_input, gsize *n_result, GCancellable *cancellable, GError **error,
             CK_C_EncryptInit init_func, CK_C_Encrypt complete_func)
 {
 	Crypt args;
@@ -2085,7 +2096,7 @@ crypt_sync (GckSession *self, GckObject *key, GckMechanism *mechanism, const guc
 	authenticate_init (&args.auth, slot, key, self->pv->options);
 	g_object_unref (slot);
 
-	if (!_gck_call_sync (self, perform_crypt, complete_crypt, &args, cancellable, err)) {
+	if (!_gck_call_sync (self, perform_crypt, complete_crypt, &args, cancellable, error)) {
 		g_free (args.result);
 		return NULL;
 	}
@@ -2127,12 +2138,12 @@ crypt_async (GckSession *self, GckObject *key, GckMechanism *mechanism, const gu
 }
 
 static guchar*
-crypt_finish (GckSession *self, GAsyncResult *result, gsize *n_result, GError **err)
+crypt_finish (GckSession *self, GAsyncResult *result, gsize *n_result, GError **error)
 {
 	Crypt *args;
 	guchar *res;
 
-	if (!_gck_call_basic_finish (result, err))
+	if (!_gck_call_basic_finish (result, error))
 		return NULL;
 	args = _gck_call_arguments (result, Crypt);
 
@@ -2157,7 +2168,8 @@ crypt_finish (GckSession *self, GAsyncResult *result, gsize *n_result, GError **
  * @input: The data to encrypt.
  * @n_input: The length of the data to encrypt.
  * @n_result: A location to store the length of the result data.
- * @err: A location to place error information.
+ * @cancellable: Optional cancellation object, or %NULL
+ * @error: A location to place error information.
  *
  * Encrypt data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2166,10 +2178,10 @@ crypt_finish (GckSession *self, GAsyncResult *result, gsize *n_result, GError **
  */
 guchar*
 gck_session_encrypt (GckSession *self, GckObject *key, gulong mech_type, const guchar *input,
-                      gsize n_input, gsize *n_result, GCancellable *cancellable, GError **err)
+                      gsize n_input, gsize *n_result, GCancellable *cancellable, GError **error)
 {
 	GckMechanism mechanism = { mech_type, NULL, 0 };
-	return gck_session_encrypt_full (self, key, &mechanism, input, n_input, n_result, cancellable, err);
+	return gck_session_encrypt_full (self, key, &mechanism, input, n_input, n_result, cancellable, error);
 }
 
 /**
@@ -2181,7 +2193,7 @@ gck_session_encrypt (GckSession *self, GckObject *key, gulong mech_type, const g
  * @n_input: The length of the data to encrypt.
  * @n_result: A location to store the length of the result data.
  * @cancellable: A GCancellable which can be used to cancel the operation.
- * @err: A location to place error information.
+ * @error: A location to place error information.
  *
  * Encrypt data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2191,7 +2203,7 @@ gck_session_encrypt (GckSession *self, GckObject *key, gulong mech_type, const g
 guchar*
 gck_session_encrypt_full (GckSession *self, GckObject *key, GckMechanism *mechanism,
                            const guchar *input, gsize n_input, gsize *n_result,
-                           GCancellable *cancellable, GError **err)
+                           GCancellable *cancellable, GError **error)
 {
 	GckModule *module = NULL;
 	CK_FUNCTION_LIST_PTR funcs;
@@ -2203,7 +2215,7 @@ gck_session_encrypt_full (GckSession *self, GckObject *key, GckMechanism *mechan
 	funcs = gck_module_get_functions (module);
 	g_return_val_if_fail (module != NULL, NULL);
 
-	ret = crypt_sync (self, key, mechanism, input, n_input, n_result, cancellable, err,
+	ret = crypt_sync (self, key, mechanism, input, n_input, n_result, cancellable, error,
 	                  funcs->C_EncryptInit, funcs->C_Encrypt);
 
 	g_object_unref (module);
@@ -2249,7 +2261,7 @@ gck_session_encrypt_async (GckSession *self, GckObject *key, GckMechanism *mecha
  * @self: The session.
  * @result: The result object passed to the callback.
  * @n_result: A location to store the length of the result data.
- * @err: A location to place error information.
+ * @error: A location to place error information.
  *
  * Get the result of an encryption operation.
  *
@@ -2257,9 +2269,9 @@ gck_session_encrypt_async (GckSession *self, GckObject *key, GckMechanism *mecha
  */
 guchar*
 gck_session_encrypt_finish (GckSession *self, GAsyncResult *result, gsize *n_result,
-                             GError **err)
+                             GError **error)
 {
-	return crypt_finish (self, result, n_result, err);
+	return crypt_finish (self, result, n_result, error);
 }
 
 /* --------------------------------------------------------------------------------------------------
@@ -2274,7 +2286,8 @@ gck_session_encrypt_finish (GckSession *self, GAsyncResult *result, gsize *n_res
  * @input: The data to decrypt.
  * @n_input: The length of the data to decrypt.
  * @n_result: A location to store the length of the result data.
- * @err: A location to place an error.
+ * @cancellable: Optional cancellation object, or %NULL
+ * @error: A location to place an error.
  *
  * Decrypt data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2283,10 +2296,10 @@ gck_session_encrypt_finish (GckSession *self, GAsyncResult *result, gsize *n_res
  */
 guchar*
 gck_session_decrypt (GckSession *self, GckObject *key, gulong mech_type, const guchar *input,
-                      gsize n_input, gsize *n_result, GCancellable *cancellable, GError **err)
+                      gsize n_input, gsize *n_result, GCancellable *cancellable, GError **error)
 {
 	GckMechanism mechanism = { mech_type, NULL, 0 };
-	return gck_session_decrypt_full (self, key, &mechanism, input, n_input, n_result, cancellable, err);
+	return gck_session_decrypt_full (self, key, &mechanism, input, n_input, n_result, cancellable, error);
 }
 
 /**
@@ -2298,7 +2311,7 @@ gck_session_decrypt (GckSession *self, GckObject *key, gulong mech_type, const g
  * @n_input: The length of the data to decrypt.
  * @n_result: A location to store the length of the result data.
  * @cancellable: A GCancellable which can be used to cancel the operation.
- * @err: A location to place error information.
+ * @error: A location to place error information.
  *
  * Decrypt data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2308,7 +2321,7 @@ gck_session_decrypt (GckSession *self, GckObject *key, gulong mech_type, const g
 guchar*
 gck_session_decrypt_full (GckSession *self, GckObject *key, GckMechanism *mechanism,
                            const guchar *input, gsize n_input, gsize *n_result,
-                           GCancellable *cancellable, GError **err)
+                           GCancellable *cancellable, GError **error)
 {
 	GckModule *module = NULL;
 	CK_FUNCTION_LIST_PTR funcs;
@@ -2320,7 +2333,7 @@ gck_session_decrypt_full (GckSession *self, GckObject *key, GckMechanism *mechan
 	funcs = gck_module_get_functions (module);
 	g_return_val_if_fail (module != NULL, NULL);
 
-	ret = crypt_sync (self, key, mechanism, input, n_input, n_result, cancellable, err,
+	ret = crypt_sync (self, key, mechanism, input, n_input, n_result, cancellable, error,
 	                  funcs->C_DecryptInit, funcs->C_Decrypt);
 	g_object_unref (module);
 	return ret;
@@ -2364,7 +2377,7 @@ gck_session_decrypt_async (GckSession *self, GckObject *key, GckMechanism *mecha
  * @self: The session.
  * @result: The result object passed to the callback.
  * @n_result: A location to store the length of the result data.
- * @err: A location to place error information.
+ * @error: A location to place error information.
  *
  * Get the result of an decryption operation.
  *
@@ -2372,9 +2385,9 @@ gck_session_decrypt_async (GckSession *self, GckObject *key, GckMechanism *mecha
  */
 guchar*
 gck_session_decrypt_finish (GckSession *self, GAsyncResult *result,
-                             gsize *n_result, GError **err)
+                             gsize *n_result, GError **error)
 {
-	return crypt_finish (self, result, n_result, err);
+	return crypt_finish (self, result, n_result, error);
 }
 
 /* --------------------------------------------------------------------------------------------------
@@ -2389,7 +2402,8 @@ gck_session_decrypt_finish (GckSession *self, GAsyncResult *result,
  * @input: The data to sign.
  * @n_input: The length of the data to sign.
  * @n_result: A location to store the length of the result data.
- * @err: A location to place an error.
+ * @cancellable: Optional cancellation object, or %NULL
+ * @error: A location to place an error.
  *
  * Sign data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2398,10 +2412,10 @@ gck_session_decrypt_finish (GckSession *self, GAsyncResult *result,
  */
 guchar*
 gck_session_sign (GckSession *self, GckObject *key, gulong mech_type, const guchar *input,
-                   gsize n_input, gsize *n_result, GCancellable *cancellable, GError **err)
+                   gsize n_input, gsize *n_result, GCancellable *cancellable, GError **error)
 {
 	GckMechanism mechanism = { mech_type, NULL, 0 };
-	return gck_session_sign_full (self, key, &mechanism, input, n_input, n_result, NULL, err);
+	return gck_session_sign_full (self, key, &mechanism, input, n_input, n_result, NULL, error);
 }
 
 /**
@@ -2413,7 +2427,7 @@ gck_session_sign (GckSession *self, GckObject *key, gulong mech_type, const guch
  * @n_input: The length of the data to sign.
  * @n_result: A location to store the length of the result data.
  * @cancellable: A GCancellable which can be used to cancel the operation.
- * @err: A location to place error information.
+ * @error: A location to place error information.
  *
  * Sign data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2423,7 +2437,7 @@ gck_session_sign (GckSession *self, GckObject *key, gulong mech_type, const guch
 guchar*
 gck_session_sign_full (GckSession *self, GckObject *key, GckMechanism *mechanism,
                         const guchar *input, gsize n_input, gsize *n_result,
-                        GCancellable *cancellable, GError **err)
+                        GCancellable *cancellable, GError **error)
 {
 	GckModule *module = NULL;
 	CK_FUNCTION_LIST_PTR funcs;
@@ -2435,7 +2449,7 @@ gck_session_sign_full (GckSession *self, GckObject *key, GckMechanism *mechanism
 	funcs = gck_module_get_functions (module);
 	g_return_val_if_fail (module != NULL, NULL);
 
-	ret = crypt_sync (self, key, mechanism, input, n_input, n_result, cancellable, err,
+	ret = crypt_sync (self, key, mechanism, input, n_input, n_result, cancellable, error,
 	                  funcs->C_SignInit, funcs->C_Sign);
 	g_object_unref (module);
 	return ret;
@@ -2479,7 +2493,7 @@ gck_session_sign_async (GckSession *self, GckObject *key, GckMechanism *mechanis
  * @self: The session.
  * @result: The result object passed to the callback.
  * @n_result: A location to store the length of the result data.
- * @err: A location to place error information.
+ * @error: A location to place error information.
  *
  * Get the result of an signing operation.
  *
@@ -2487,9 +2501,9 @@ gck_session_sign_async (GckSession *self, GckObject *key, GckMechanism *mechanis
  */
 guchar*
 gck_session_sign_finish (GckSession *self, GAsyncResult *result,
-                          gsize *n_result, GError **err)
+                          gsize *n_result, GError **error)
 {
-	return crypt_finish (self, result, n_result, err);
+	return crypt_finish (self, result, n_result, error);
 }
 
 /* --------------------------------------------------------------------------------------------------
@@ -2558,7 +2572,8 @@ free_verify (Verify *args)
  * @n_input: The length of the data to verify.
  * @signature: The signature.
  * @n_signature: The length of the signature.
- * @err: A location to place an error.
+ * @cancellable: Optional cancellation object, or %NULL
+ * @error: A location to place an error.
  *
  * Verify data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2567,11 +2582,11 @@ free_verify (Verify *args)
  */
 gboolean
 gck_session_verify (GckSession *self, GckObject *key, gulong mech_type, const guchar *input,
-                     gsize n_input, const guchar *signature, gsize n_signature, GCancellable *cancellable, GError **err)
+                     gsize n_input, const guchar *signature, gsize n_signature, GCancellable *cancellable, GError **error)
 {
 	GckMechanism mechanism = { mech_type, NULL, 0 };
 	return gck_session_verify_full (self, key, &mechanism, input, n_input,
-	                                 signature, n_signature, NULL, err);
+	                                 signature, n_signature, NULL, error);
 }
 
 /**
@@ -2584,7 +2599,7 @@ gck_session_verify (GckSession *self, GckObject *key, gulong mech_type, const gu
  * @signature: The signature.
  * @n_signature: The length of the signature.
  * @cancellable: A GCancellable which can be used to cancel the operation.
- * @err: A location to place an error.
+ * @error: A location to place an error.
  *
  * Verify data in a mechanism specific manner. This call may
  * block for an indefinite period.
@@ -2594,7 +2609,7 @@ gck_session_verify (GckSession *self, GckObject *key, gulong mech_type, const gu
 gboolean
 gck_session_verify_full (GckSession *self, GckObject *key, GckMechanism *mechanism,
                           const guchar *input, gsize n_input, const guchar *signature,
-                          gsize n_signature, GCancellable *cancellable, GError **err)
+                          gsize n_signature, GCancellable *cancellable, GError **error)
 {
 	Verify args;
 	GckSlot *slot;
@@ -2619,7 +2634,7 @@ gck_session_verify_full (GckSession *self, GckObject *key, GckMechanism *mechani
 	authenticate_init (&args.auth, slot, key, self->pv->options);
 	g_object_unref (slot);
 
-	return _gck_call_sync (self, perform_verify, complete_verify, &args, cancellable, err);
+	return _gck_call_sync (self, perform_verify, complete_verify, &args, cancellable, error);
 }
 
 /**
@@ -2672,14 +2687,14 @@ gck_session_verify_async (GckSession *self, GckObject *key, GckMechanism *mechan
  * gck_session_verify_finish:
  * @self: The session.
  * @result: The result object passed to the callback.
- * @err: A location to place error information.
+ * @error: A location to place error information.
  *
  * Get the result of an verify operation.
  *
  * Returns: TRUE if the data verified correctly, otherwise a failure or error occurred.
  */
 gboolean
-gck_session_verify_finish (GckSession *self, GAsyncResult *result, GError **err)
+gck_session_verify_finish (GckSession *self, GAsyncResult *result, GError **error)
 {
-	return _gck_call_basic_finish (result, err);
+	return _gck_call_basic_finish (result, error);
 }
diff --git a/gck/gck-slot.c b/gck/gck-slot.c
index 990800d..96e9db1 100644
--- a/gck/gck-slot.c
+++ b/gck/gck-slot.c
@@ -31,14 +31,15 @@
 /**
  * SECTION:gck-slot
  * @title: GckSlot
- * @short_description: Represents a PKCS11 slot that can contain a token.
+ * @short_description: Represents a PKCS\#11 slot that can contain a token.
  *
  * A PKCS11 slot can contain a token. As an example, a slot might be a card reader, and the token
- * the card. If the PKCS11 module is not a hardware driver, often the slot and token are equivalent.
+ * the card. If the PKCS\#11 module is not a hardware driver, often the slot and token are equivalent.
  */
 
 /**
  * GckSlot:
+ * @parent: derived from this.
  *
  * Represents a PKCS11 slot.
  */
@@ -411,7 +412,7 @@ gck_mechanisms_check (GckMechanisms *mechanisms, ...)
  * @slot2: A pointer to the second GckSlot
  *
  * Checks equality of two slots. Two GckSlot objects can point to the same
- * underlying PKCS#11 slot.
+ * underlying PKCS\#11 slot.
  *
  * Return value: TRUE if slot1 and slot2 are equal. FALSE if either is not a GckSlot.
  **/
@@ -459,9 +460,9 @@ gck_slot_hash (gconstpointer slot)
 /**
  * gck_slot_from_handle:
  * @module: The module that this slot is on.
- * @slot_id: The raw PKCS#11 handle or slot id of this slot.
+ * @slot_id: The raw PKCS\#11 handle or slot id of this slot.
  *
- * Create a new GckSlot object for a raw PKCS#11 handle.
+ * Create a new GckSlot object for a raw PKCS\#11 handle.
  *
  * Return value: The new GckSlot object.
  **/
@@ -475,7 +476,7 @@ gck_slot_from_handle (GckModule *module, CK_SLOT_ID slot_id)
  * gck_slot_get_handle:
  * @self: The slot to get the handle of.
  *
- * Get the raw PKCS#11 handle of a slot.
+ * Get the raw PKCS\#11 handle of a slot.
  *
  * Return value: The raw handle.
  **/
@@ -798,55 +799,6 @@ gck_slots_enumerate_objects (GList *slots, GckAttributes *attrs, guint session_o
 }
 
 
-#if UNIMPLEMENTED
-
-typedef struct InitToken {
-	GckArguments base;
-	const guchar *pin;
-	gsize length;
-	const gchar *label;
-} InitToken;
-
-static CK_RV
-perform_init_token (InitToken *args)
-{
-	return (args->base.pkcs11->C_InitToken) (args->base.handle,
-	                                         args->pin, args->length,
-	                                         args->label);
-}
-
-gboolean
-gck_slot_init_token (GckSlot *self, const guchar *pin, gsize length,
-                      const gchar *label, GCancellable *cancellable,
-                      GError **err)
-{
-	InitToken args = { GCK_ARGUMENTS_INIT, pin, length, label };
-	return _gck_call_sync (self, perform_init_token, NULL, &args, err);
-}
-
-void
-gck_slot_init_token_async (GckSlot *self, const guchar *pin, gsize length,
-                            const gchar *label, GCancellable *cancellable,
-                            GAsyncReadyCallback callback, gpointer user_data)
-{
-	InitToken* args = _gck_call_async_prep (self, self, perform_init_token,
-	                                         NULL, sizeof (*args));
-
-	args->pin = pin;
-	args->length = length;
-	args->label = label;
-
-	_gck_call_async_go (args, cancellable, callback, user_data);
-}
-
-gboolean
-gck_slot_init_token_finish (GckSlot *self, GAsyncResult *result, GError **err)
-{
-	return _gck_call_basic_finish (self, result, err);
-}
-
-#endif /* UNIMPLEMENTED */
-
 typedef struct OpenSession {
 	GckArguments base;
 	GckSlot *slot;
@@ -928,8 +880,9 @@ free_open_session (OpenSession *args)
 /**
  * gck_slot_open_session:
  * @self: The slot ot open a session on.
- * @flags: The flags to open a session with.
- * @err: A location to return an error, or NULL.
+ * @options: The #GckSessionOptions to open a session with.
+ * @cancellable: An optional cancellation object, or %NULL.
+ * @error: A location to return an error, or %NULL.
  *
  * Open a session on the slot. If the 'auto reuse' setting is set,
  * then this may be a recycled session with the same flags.
@@ -939,20 +892,21 @@ free_open_session (OpenSession *args)
  * Return value: A new session or NULL if an error occurs.
  **/
 GckSession*
-gck_slot_open_session (GckSlot *self, guint options, GCancellable *cancellable, GError **err)
+gck_slot_open_session (GckSlot *self, guint options, GCancellable *cancellable,
+                       GError **error)
 {
-	return gck_slot_open_session_full (self, options, 0, NULL, NULL, cancellable, err);
+	return gck_slot_open_session_full (self, options, 0, NULL, NULL, cancellable, error);
 }
 
 /**
  * gck_slot_open_session_full:
  * @self: The slot to open a session on.
  * @options: The options to open the new session with.
- * @pkcs11_flags: Additional raw PKCS#11 flags.
+ * @pkcs11_flags: Additional raw PKCS\#11 flags.
  * @app_data: Application data for notification callback.
- * @notify: PKCS#11 notification callback.
+ * @notify: PKCS\#11 notification callback.
  * @cancellable: Optional cancellation object, or NULL.
- * @err: A location to return an error, or NULL.
+ * @error: A location to return an error, or NULL.
  *
  * Open a session on the slot. If the 'auto reuse' setting is set,
  * then this may be a recycled session with the same flags.
@@ -963,7 +917,7 @@ gck_slot_open_session (GckSlot *self, guint options, GCancellable *cancellable,
  **/
 GckSession*
 gck_slot_open_session_full (GckSlot *self, guint options, gulong pkcs11_flags, gpointer app_data,
-                            CK_NOTIFY notify, GCancellable *cancellable, GError **err)
+                            CK_NOTIFY notify, GCancellable *cancellable, GError **error)
 {
 	OpenSession args = { GCK_ARGUMENTS_INIT, 0,  };
 	GckSession *session = NULL;
@@ -989,7 +943,7 @@ gck_slot_open_session_full (GckSlot *self, guint options, gulong pkcs11_flags, g
 	if ((options & GCK_SESSION_READ_WRITE) == GCK_SESSION_READ_WRITE)
 		args.flags |= CKF_RW_SESSION;
 
-	if (_gck_call_sync (self, perform_open_session, complete_open_session, &args, cancellable, err))
+	if (_gck_call_sync (self, perform_open_session, complete_open_session, &args, cancellable, error))
 		session = make_session_object (self, options, args.session);
 
 	g_object_unref (module);
@@ -998,6 +952,19 @@ gck_slot_open_session_full (GckSlot *self, guint options, gulong pkcs11_flags, g
 	return session;
 }
 
+/**
+ * gck_slot_open_session_async:
+ * @self: The slot to open a session on.
+ * @options: The options to open the new session with.
+ * @cancellable: Optional cancellation object, or NULL.
+ * @callback: Called when the operation completes.
+ * @user_data: Data to pass to the callback.
+ *
+ * Open a session on the slot. If the 'auto reuse' setting is set,
+ * then this may be a recycled session with the same flags.
+ *
+ * This call will return immediately and complete asynchronously.
+ **/
 void
 gck_slot_open_session_async (GckSlot *self, guint options, GCancellable *cancellable,
                              GAsyncReadyCallback callback, gpointer user_data)
@@ -1006,12 +973,12 @@ gck_slot_open_session_async (GckSlot *self, guint options, GCancellable *cancell
 }
 
 /**
- * gck_slot_open_session_async:
+ * gck_slot_open_session_full_async:
  * @self: The slot to open a session on.
  * @options: Options to open the new session with.
- * @pkcs11_flags: Additional raw PKCS#11 flags.
+ * @pkcs11_flags: Additional raw PKCS\#11 flags.
  * @app_data: Application data for notification callback.
- * @notify: PKCS#11 notification callback.
+ * @notify: PKCS\#11 notification callback.
  * @cancellable: Optional cancellation object, or NULL.
  * @callback: Called when the operation completes.
  * @user_data: Data to pass to the callback.
@@ -1051,7 +1018,7 @@ gck_slot_open_session_full_async (GckSlot *self, guint options, gulong pkcs11_fl
  * gck_slot_open_session_finish:
  * @self: The slot to open a session on.
  * @result: The result passed to the callback.
- * @err: A location to return an error or NULL.
+ * @error: A location to return an error or NULL.
  *
  * Get the result of an open session operation. If the 'auto reuse' setting is set,
  * then this may be a recycled session with the same flags.
diff --git a/gck/gck-uri.c b/gck/gck-uri.c
index d73fac0..e218e8f 100644
--- a/gck/gck-uri.c
+++ b/gck/gck-uri.c
@@ -38,8 +38,8 @@
  * @title: PKCS11 URIs
  * @short_description: Parsing and building PKCS\#11 URIs.
  *
- * <ulink href='http://tools.ietf.org/html/draft-pechanec-pkcs11uri-03'>PKCS#11 URIs</ulink>
- * are a standard for referring to PKCS#11 modules, tokens, or objects. What the
+ * <ulink href='http://tools.ietf.org/html/draft-pechanec-pkcs11uri-03'>PKCS\#11 URIs</ulink>
+ * are a standard for referring to PKCS\#11 modules, tokens, or objects. What the
  * PKCS\#11 URI refers to depends on the context in which it is used.
  *
  * A PKCS\#11 URI can always resolve to more than one object, token or module. A
@@ -48,8 +48,7 @@
  *
  * In most cases the parsing or building of URIs is handled elsewhere in the GCK
  * library. For example to enumerate objects that match a PKCS\#11 URI use the
- * gck_modules_enumerate_uri() function. Or to build a PKCS\#11 URI for a given
- * object, use the gck_object_build_uri() function.
+ * gck_modules_enumerate_uri() function.
  *
  * To parse a PKCS\#11 URI use the gck_uri_parse() function passing in the type of
  * context in which you're using the URI. To build a URI use the gck_uri_build()
@@ -72,15 +71,21 @@
  */
 
 /**
- * GckUriContext:
- * @GCK_URI_CONTEXT_MODULE: the URI will be used to match modules.
- * @GCK_URI_CONTEXT_TOKEN: the URI will be used to match tokens.
- * @GCK_URI_CONTEXT_OBJECT: the URI will be used to match objects.
- * @GCK_URI_CONTEXT_ANY: parse all recognized components of the URI.
+ * GckUriParseFlags:
+ * @GCK_URI_PARSE_MODULE: the URI will be used to match modules.
+ * @GCK_URI_PARSE_TOKEN: the URI will be used to match tokens.
+ * @GCK_URI_PARSE_OBJECT: the URI will be used to match objects.
+ * @GCK_URI_PARSE_ANY: parse all recognized components of the URI.
  *
  * Which context the PKCS\#11 URI will be used in.
  */
 
+/**
+ * GCK_URI_ERROR:
+ *
+ * Error domain for URI errors.
+ */
+
 #define URI_PREFIX "pkcs11:"
 #define N_URI_PREFIX 7
 
diff --git a/gck/gck.h b/gck/gck.h
index 0f62be0..61bd780 100644
--- a/gck/gck.h
+++ b/gck/gck.h
@@ -272,6 +272,8 @@ typedef struct _GckModulePrivate GckModulePrivate;
 
 struct _GckModule {
 	GObject parent;
+
+	/*< private >*/
 	GckModulePrivate *pv;
 	gpointer reserved[4];
 };
@@ -283,6 +285,7 @@ struct _GckModuleClass {
 
 	gboolean (*authenticate_object) (GckModule *self, GckObject *object, gchar *label, gchar **password);
 
+	/*< private >*/
 	gpointer reserved[8];
 };
 
@@ -294,7 +297,7 @@ GckModule*            gck_module_new                          (CK_FUNCTION_LIST_
 GckModule*            gck_module_initialize                   (const gchar *path,
                                                                gpointer reserved,
                                                                guint reserved_options,
-                                                               GError **err);
+                                                               GError **error);
 
 gboolean              gck_module_equal                        (gconstpointer module1,
                                                                gconstpointer module2);
@@ -310,7 +313,7 @@ GckModuleInfo*        gck_module_get_info                     (GckModule *self);
 GList*                gck_module_get_slots                    (GckModule *self,
                                                                gboolean token_present);
 
-gchar**               gck_modules_list_registered_paths       (GError **err);
+gchar**               gck_modules_list_registered_paths       (GError **error);
 
 GList*                gck_modules_initialize_registered       (guint reserved_options);
 
@@ -357,12 +360,16 @@ typedef struct _GckEnumeratorPrivate GckEnumeratorPrivate;
 
 struct _GckEnumerator {
 	GObject parent;
+
+	/*< private >*/
 	GckEnumeratorPrivate *pv;
 	gpointer reserved[2];
 };
 
 struct _GckEnumeratorClass {
 	GObjectClass parent;
+
+	/*< private >*/
 	gpointer reserved[2];
 };
 
@@ -370,12 +377,12 @@ GType                 gck_enumerator_get_type                 (void) G_GNUC_CONS
 
 GckObject*            gck_enumerator_next                     (GckEnumerator *self,
                                                                GCancellable *cancellable,
-                                                               GError **err);
+                                                               GError **error);
 
 GList*                gck_enumerator_next_n                   (GckEnumerator *self,
                                                                gint max_objects,
                                                                GCancellable *cancellable,
-                                                               GError **err);
+                                                               GError **error);
 
 void                  gck_enumerator_next_async               (GckEnumerator *self,
                                                                gint max_objects,
@@ -384,8 +391,8 @@ void                  gck_enumerator_next_async               (GckEnumerator *se
                                                                gpointer user_data);
 
 GList*                gck_enumerator_next_finish              (GckEnumerator *self,
-                                                               GAsyncResult *res,
-                                                               GError **err);
+                                                               GAsyncResult *result,
+                                                               GError **error);
 
 /* ------------------------------------------------------------------------
  * SLOT
@@ -459,12 +466,16 @@ typedef struct _GckSlotPrivate GckSlotPrivate;
 
 struct _GckSlot {
 	GObject parent;
+
+	/*< private >*/
 	GckSlotPrivate *pv;
 	gpointer reserved[4];
 };
 
 struct _GckSlotClass {
 	GObjectClass parent;
+
+	/*< private >*/
 	gpointer reserved[9];
 };
 
@@ -498,32 +509,10 @@ GckEnumerator*      gck_slots_enumerate_objects             (GList *slots,
                                                              GckAttributes *attrs,
                                                              guint session_options);
 
-#if UNIMPLEMENTED
-
-gboolean            gck_slot_init_token                     (GckSlot *self,
-                                                             const guchar *pin,
-                                                             gsize length,
-                                                             const gchar *label,
-                                                             GError **err);
-
-
-void                gck_slot_init_token_async               (GckSlot *self,
-                                                             const guchar *pin,
-                                                             gsize length,
-                                                             const gchar *label,
-                                                             GAsyncReadyCallback callback,
-                                                             gpointer user_data);
-
-gboolean            gck_slot_init_token_finish              (GckSlot *self,
-                                                             GAsyncResult *result,
-                                                             GError **err);
-
-#endif /* UNIMPLEMENTED */
-
 GckSession*         gck_slot_open_session                   (GckSlot *self,
                                                              guint options,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 GckSession*         gck_slot_open_session_full              (GckSlot *self,
                                                              guint options,
@@ -531,7 +520,7 @@ GckSession*         gck_slot_open_session_full              (GckSlot *self,
                                                              gpointer app_data,
                                                              CK_NOTIFY notify,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_slot_open_session_async             (GckSlot *self,
                                                              guint options,
@@ -550,7 +539,7 @@ void                gck_slot_open_session_full_async        (GckSlot *self,
 
 GckSession*         gck_slot_open_session_finish            (GckSlot *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 /* ------------------------------------------------------------------------
  * SESSION
@@ -583,6 +572,8 @@ typedef struct _GckSessionPrivate GckSessionPrivate;
 
 struct _GckSession {
 	GObject parent;
+
+	/*< private >*/
 	GckSessionPrivate *pv;
 	gpointer reserved[4];
 };
@@ -592,6 +583,7 @@ struct _GckSessionClass {
 
 	gboolean (*discard_handle) (GckSession *session, CK_SESSION_HANDLE handle);
 
+	/*< private >*/
 	gpointer reserved[8];
 };
 
@@ -617,7 +609,7 @@ gboolean            gck_session_init_pin                    (GckSession *self,
                                                              const guchar *pin,
                                                              gsize n_pin,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_session_init_pin_async              (GckSession *self,
                                                              const guchar *pin,
@@ -628,7 +620,7 @@ void                gck_session_init_pin_async              (GckSession *self,
 
 gboolean            gck_session_init_pin_finish             (GckSession *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 gboolean            gck_session_set_pin                     (GckSession *self,
                                                              const guchar *old_pin,
@@ -636,7 +628,7 @@ gboolean            gck_session_set_pin                     (GckSession *self,
                                                              const guchar *new_pin,
                                                              gsize n_new_pin,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_session_set_pin_async               (GckSession *self,
                                                              const guchar *old_pin,
@@ -649,14 +641,14 @@ void                gck_session_set_pin_async               (GckSession *self,
 
 gboolean            gck_session_set_pin_finish              (GckSession *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 gboolean            gck_session_login                       (GckSession *self,
                                                              gulong user_type,
                                                              const guchar *pin,
                                                              gsize n_pin,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_session_login_async                 (GckSession *self,
                                                              gulong user_type,
@@ -668,11 +660,11 @@ void                gck_session_login_async                 (GckSession *self,
 
 gboolean            gck_session_login_finish                (GckSession *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 gboolean            gck_session_logout                      (GckSession *self,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_session_logout_async                (GckSession *self,
                                                              GCancellable *cancellable,
@@ -681,12 +673,12 @@ void                gck_session_logout_async                (GckSession *self,
 
 gboolean            gck_session_logout_finish               (GckSession *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 GckObject*          gck_session_create_object               (GckSession *self,
                                                              GckAttributes *attrs,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_session_create_object_async         (GckSession *self,
                                                              GckAttributes *attrs,
@@ -696,12 +688,12 @@ void                gck_session_create_object_async         (GckSession *self,
 
 GckObject*          gck_session_create_object_finish        (GckSession *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 GList*              gck_session_find_objects                (GckSession *self,
                                                              GckAttributes *attrs,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_session_find_objects_async          (GckSession *self,
                                                              GckAttributes *attrs,
@@ -711,27 +703,7 @@ void                gck_session_find_objects_async          (GckSession *self,
 
 GList*              gck_session_find_objects_finish         (GckSession *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
-
-#if UNIMPLEMENTED
-
-GckObject*          gck_session_generate_key                (GckSession *self,
-                                                             GckMechanism *mechanism,
-                                                             GError **err,
-                                                             ...);
-
-void                gck_session_generate_key_async          (GckSession *self,
-                                                             GckMechanism *mechanism,
-                                                             GAsyncReadyCallback callback,
-                                                             gpointer user_data,
-                                                             ...);
-
-GckObject*          gck_session_generate_key_finish         (GckSession *self,
-                                                             GAsyncResult *result,
-                                                             GError **err,
-                                                             ...);
-
-#endif /* UNIMPLEMENTED */
+                                                             GError **error);
 
 gboolean            gck_session_generate_key_pair           (GckSession *self,
                                                              gulong mech_type,
@@ -740,7 +712,7 @@ gboolean            gck_session_generate_key_pair           (GckSession *self,
                                                              GckObject **public_key,
                                                              GckObject **private_key,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 gboolean            gck_session_generate_key_pair_full      (GckSession *self,
                                                              GckMechanism *mechanism,
@@ -749,7 +721,7 @@ gboolean            gck_session_generate_key_pair_full      (GckSession *self,
                                                              GckObject **public_key,
                                                              GckObject **private_key,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_session_generate_key_pair_async     (GckSession *self,
                                                              GckMechanism *mechanism,
@@ -763,7 +735,7 @@ gboolean            gck_session_generate_key_pair_finish    (GckSession *self,
                                                              GAsyncResult *result,
                                                              GckObject **public_key,
                                                              GckObject **private_key,
-                                                             GError **err);
+                                                             GError **error);
 
 guchar*             gck_session_encrypt                      (GckSession *self,
                                                               GckObject *key,
@@ -772,7 +744,7 @@ guchar*             gck_session_encrypt                      (GckSession *self,
                                                               gsize n_input,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 guchar*             gck_session_encrypt_full                 (GckSession *self,
                                                               GckObject *key,
@@ -781,7 +753,7 @@ guchar*             gck_session_encrypt_full                 (GckSession *self,
                                                               gsize n_input,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 void                gck_session_encrypt_async                (GckSession *self,
                                                               GckObject *key,
@@ -795,7 +767,7 @@ void                gck_session_encrypt_async                (GckSession *self,
 guchar*             gck_session_encrypt_finish               (GckSession *self,
                                                               GAsyncResult *result,
                                                               gsize *n_result,
-                                                              GError **err);
+                                                              GError **error);
 
 guchar*             gck_session_decrypt                      (GckSession *self,
                                                               GckObject *key,
@@ -804,7 +776,7 @@ guchar*             gck_session_decrypt                      (GckSession *self,
                                                               gsize n_input,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 guchar*             gck_session_decrypt_full                 (GckSession *self,
                                                               GckObject *key,
@@ -813,7 +785,7 @@ guchar*             gck_session_decrypt_full                 (GckSession *self,
                                                               gsize n_input,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 void                gck_session_decrypt_async                (GckSession *self,
                                                               GckObject *key,
@@ -827,39 +799,7 @@ void                gck_session_decrypt_async                (GckSession *self,
 guchar*             gck_session_decrypt_finish               (GckSession *self,
                                                               GAsyncResult *result,
                                                               gsize *n_result,
-                                                              GError **err);
-
-#if UNIMPLEMENTED
-
-guchar*             gck_session_digest                       (GckSession *self,
-                                                              gulong mech_type,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              gsize *n_result,
-                                                              GError **err);
-
-guchar*             gck_session_digest_full                  (GckSession *self,
-                                                              GckMechanism *mechanism,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              gsize *n_result,
-                                                              GCancellable *cancellable,
-                                                              GError **err);
-
-void                gck_session_digest_async                 (GckSession *self,
-                                                              GckMechanism *mechanism,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              GCancellable *cancellable,
-                                                              GAsyncReadyCallback callback,
-                                                              gpointer user_data);
-
-guchar*             gck_session_digest_finish                (GckSession *self,
-                                                              GAsyncResult *result,
-                                                              gsize *n_result,
-                                                              GError **err);
-
-#endif /* UNIMPLEMENTED */
+                                                              GError **error);
 
 guchar*             gck_session_sign                         (GckSession *self,
                                                               GckObject *key,
@@ -868,7 +808,7 @@ guchar*             gck_session_sign                         (GckSession *self,
                                                               gsize n_input,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 guchar*             gck_session_sign_full                    (GckSession *self,
                                                               GckObject *key,
@@ -877,7 +817,7 @@ guchar*             gck_session_sign_full                    (GckSession *self,
                                                               gsize n_input,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 void                gck_session_sign_async                   (GckSession *self,
                                                               GckObject *key,
@@ -891,42 +831,7 @@ void                gck_session_sign_async                   (GckSession *self,
 guchar*             gck_session_sign_finish                  (GckSession *self,
                                                               GAsyncResult *result,
                                                               gsize *n_result,
-                                                              GError **err);
-
-#if UNIMPLEMENTED
-
-guchar*             gck_session_sign_recover                 (GckSession *self,
-                                                              GckObject *key,
-                                                              gulong mech_type,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              gsize *n_result,
-                                                              GError **err);
-
-guchar*             gck_session_sign_recover_full            (GckSession *self,
-                                                              GckObject *key,
-                                                              GckMechanism *mechanism,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              gsize *n_result,
-                                                              GCancellable *cancellable,
-                                                              GError **err);
-
-void                gck_session_sign_recover_async           (GckSession *self,
-                                                              GckObject *key,
-                                                              GckMechanism *mechanism,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              GCancellable *cancellable,
-                                                              GAsyncReadyCallback callback,
-                                                              gpointer user_data);
-
-guchar*             gck_session_sign_recover_finish          (GckSession *self,
-                                                              GAsyncResult *result,
-                                                              gsize *n_result,
-                                                              GError **err);
-
-#endif /* UNIMPLEMENTED */
+                                                              GError **error);
 
 gboolean            gck_session_verify                       (GckSession *self,
                                                               GckObject *key,
@@ -936,7 +841,7 @@ gboolean            gck_session_verify                       (GckSession *self,
                                                               const guchar *signature,
                                                               gsize n_signature,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 gboolean            gck_session_verify_full                  (GckSession *self,
                                                               GckObject *key,
@@ -946,7 +851,7 @@ gboolean            gck_session_verify_full                  (GckSession *self,
                                                               const guchar *signature,
                                                               gsize n_signature,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 void                gck_session_verify_async                 (GckSession *self,
                                                               GckObject *key,
@@ -961,42 +866,7 @@ void                gck_session_verify_async                 (GckSession *self,
 
 gboolean            gck_session_verify_finish                (GckSession *self,
                                                               GAsyncResult *result,
-                                                              GError **err);
-
-#if UNIMPLEMENTED
-
-guchar*             gck_session_verify_recover               (GckSession *self,
-                                                              GckObject *key,
-                                                              gulong mech_type,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              gsize *n_result,
-                                                              GError **err);
-
-guchar*             gck_session_verify_recover_full          (GckSession *self,
-                                                              GckObject *key,
-                                                              GckMechanism *mechanism,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              gsize *n_result,
-                                                              GCancellable *cancellable,
-                                                              GError **err);
-
-void                gck_session_verify_recover_async         (GckSession *self,
-                                                              GckObject *key,
-                                                              GckMechanism *mechanism,
-                                                              const guchar *input,
-                                                              gsize n_input,
-                                                              GCancellable *cancellable,
-                                                              GAsyncReadyCallback callback,
-                                                              gpointer user_data);
-
-guchar*             gck_session_verify_recover_finish        (GckSession *self,
-                                                              GAsyncResult *result,
-                                                              gsize *n_result,
-                                                              GError **err);
-
-#endif /* UNIMPLEMENTED */
+                                                              GError **error);
 
 gpointer            gck_session_wrap_key                     (GckSession *self,
                                                               GckObject *wrapper,
@@ -1004,7 +874,7 @@ gpointer            gck_session_wrap_key                     (GckSession *self,
                                                               GckObject *wrapped,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 gpointer            gck_session_wrap_key_full                (GckSession *self,
                                                               GckObject *wrapper,
@@ -1012,7 +882,7 @@ gpointer            gck_session_wrap_key_full                (GckSession *self,
                                                               GckObject *wrapped,
                                                               gsize *n_result,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 void                gck_session_wrap_key_async               (GckSession *self,
                                                               GckObject *wrapper,
@@ -1025,7 +895,7 @@ void                gck_session_wrap_key_async               (GckSession *self,
 gpointer            gck_session_wrap_key_finish              (GckSession *self,
                                                               GAsyncResult *result,
                                                               gsize *n_result,
-                                                              GError **err);
+                                                              GError **error);
 
 GckObject*          gck_session_unwrap_key                   (GckSession *self,
                                                               GckObject *wrapper,
@@ -1034,7 +904,7 @@ GckObject*          gck_session_unwrap_key                   (GckSession *self,
                                                               gsize n_input,
                                                               GckAttributes *attrs,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 GckObject*          gck_session_unwrap_key_full              (GckSession *self,
                                                               GckObject *wrapper,
@@ -1043,7 +913,7 @@ GckObject*          gck_session_unwrap_key_full              (GckSession *self,
                                                               gsize n_input,
                                                               GckAttributes *attrs,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 void                gck_session_unwrap_key_async             (GckSession *self,
                                                               GckObject *wrapper,
@@ -1057,21 +927,21 @@ void                gck_session_unwrap_key_async             (GckSession *self,
 
 GckObject*          gck_session_unwrap_key_finish            (GckSession *self,
                                                               GAsyncResult *result,
-                                                              GError **err);
+                                                              GError **error);
 
 GckObject*          gck_session_derive_key                   (GckSession *self,
                                                               GckObject *base,
                                                               gulong mech_type,
                                                               GckAttributes *attrs,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 GckObject*          gck_session_derive_key_full              (GckSession *self,
                                                               GckObject *base,
                                                               GckMechanism *mechanism,
                                                               GckAttributes *attrs,
                                                               GCancellable *cancellable,
-                                                              GError **err);
+                                                              GError **error);
 
 void                gck_session_derive_key_async             (GckSession *self,
                                                               GckObject *base,
@@ -1083,7 +953,7 @@ void                gck_session_derive_key_async             (GckSession *self,
 
 GckObject*          gck_session_derive_key_finish            (GckSession *self,
                                                               GAsyncResult *result,
-                                                              GError **err);
+                                                              GError **error);
 
 /* ------------------------------------------------------------------------
  * OBJECT
@@ -1101,6 +971,8 @@ typedef struct _GckObjectPrivate GckObjectPrivate;
 
 struct _GckObject {
 	GObject parent;
+
+	/*< private >*/
 	GckObjectPrivate *pv;
 	gpointer reserved[4];
 };
@@ -1130,46 +1002,9 @@ CK_OBJECT_HANDLE    gck_object_get_handle                   (GckObject *self);
 
 GckSession*         gck_object_get_session                  (GckObject *self);
 
-gchar*              gck_object_build_uri                    (GckObject *self,
-                                                             guint options,
-                                                             GCancellable *cancellable,
-                                                             GError **err);
-
-void                gck_object_build_uri_async              (GckObject *self,
-                                                             guint options,
-                                                             GCancellable *cancellable,
-                                                             GError **err);
-
-gchar*              gck_object_build_uri_finish             (GckObject *self,
-                                                             GAsyncResult *result,
-                                                             GError **err);
-
-#ifdef UNIMPLEMENTED
-
-GckObject*          gck_object_copy                         (GckObject *self,
-                                                             GCancellable *cancellable,
-                                                             GError **err);
-
-GckObject*          gck_object_copy_full                    (GckObject *self,
-                                                             GckAttributes *additional,
-                                                             GCancellable *cancellable,
-                                                             GError **err);
-
-void                gck_object_copy_async                   (GckObject *self,
-                                                             GckAttributes *additional,
-                                                             GCancellable *cancellable,
-                                                             GAsyncReadyCallback callback,
-                                                             gpointer user_data);
-
-GckObject*          gck_object_copy_finish                  (GckObject *self,
-                                                             GAsyncResult *result,
-                                                             GError **err);
-
-#endif /* UNIMPLEMENTED */
-
 gboolean            gck_object_destroy                      (GckObject *self,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_object_destroy_async                (GckObject *self,
                                                              GCancellable *cancellable,
@@ -1178,28 +1013,12 @@ void                gck_object_destroy_async                (GckObject *self,
 
 gboolean            gck_object_destroy_finish               (GckObject *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
-
-#if UNIMPLEMENTED
-
-gssize              gck_object_get_size                     (GckObject *self,
-                                                             GCancellable *cancellable,
-                                                             GError **err);
-
-void                gck_object_get_size_async               (GckObject *self,
-                                                             GAsyncReadyCallback callback,
-                                                             gpointer user_data);
-
-gssize              gck_object_get_size_finish              (GckObject *self,
-                                                             GAsyncResult *result,
-                                                             GError **err);
-
-#endif /* UNIMPLEMENTED */
+                                                             GError **error);
 
 gboolean            gck_object_set                          (GckObject *self,
                                                              GckAttributes *attrs,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_object_set_async                    (GckObject *self,
                                                              GckAttributes *attrs,
@@ -1209,18 +1028,18 @@ void                gck_object_set_async                    (GckObject *self,
 
 gboolean            gck_object_set_finish                   (GckObject *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 GckAttributes*      gck_object_get                          (GckObject *self,
                                                              GCancellable *cancellable,
-                                                             GError **err,
+                                                             GError **error,
                                                              ...);
 
 GckAttributes*      gck_object_get_full                     (GckObject *self,
                                                              gulong *attr_types,
                                                              guint n_attr_types,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_object_get_async                    (GckObject *self,
                                                              gulong *attr_types,
@@ -1231,20 +1050,20 @@ void                gck_object_get_async                    (GckObject *self,
 
 GckAttributes*      gck_object_get_finish                   (GckObject *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 gpointer            gck_object_get_data                     (GckObject *self,
                                                              gulong attr_type,
                                                              GCancellable *cancellable,
                                                              gsize *n_data,
-                                                             GError **err);
+                                                             GError **error);
 
 gpointer            gck_object_get_data_full                (GckObject *self,
                                                              gulong attr_type,
                                                              GckAllocator allocator,
                                                              GCancellable *cancellable,
                                                              gsize *n_data,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_object_get_data_async               (GckObject *self,
                                                              gulong attr_type,
@@ -1256,13 +1075,13 @@ void                gck_object_get_data_async               (GckObject *self,
 gpointer            gck_object_get_data_finish              (GckObject *self,
                                                              GAsyncResult *result,
                                                              gsize *n_data,
-                                                             GError **err);
+                                                             GError **error);
 
 gboolean            gck_object_set_template                 (GckObject *self,
                                                              gulong attr_type,
                                                              GckAttributes *attrs,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_object_set_template_async           (GckObject *self,
                                                              gulong attr_type,
@@ -1273,12 +1092,12 @@ void                gck_object_set_template_async           (GckObject *self,
 
 gboolean            gck_object_set_template_finish          (GckObject *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 GckAttributes*      gck_object_get_template                 (GckObject *self,
                                                              gulong attr_type,
                                                              GCancellable *cancellable,
-                                                             GError **err);
+                                                             GError **error);
 
 void                gck_object_get_template_async           (GckObject *self,
                                                              gulong attr_type,
@@ -1288,7 +1107,7 @@ void                gck_object_get_template_async           (GckObject *self,
 
 GckAttributes*      gck_object_get_template_finish          (GckObject *self,
                                                              GAsyncResult *result,
-                                                             GError **err);
+                                                             GError **error);
 
 /* ----------------------------------------------------------------------------
  * URI



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]