gck_attributes_ref
gck_attributes_unref
gck_attributes_contains
+gck_attributes_to_string
gck_attributes_dump
gck_attributes_new_full
GCK_TYPE_ATTRIBUTES
g_string_append (output, " ]");
}
+/**
+ * gck_attributes_to_string:
+ * attrs: the attributes
+ *
+ * Print out attributes to a string in aform that's useful for debugging
+ * or logging.
+ *
+ * The format of the string returned may change in the future.
+ *
+ * Returns: a newly allocated string
+ */
gchar *
-_gck_attributes_format (GckAttributes *attrs)
+gck_attributes_to_string (GckAttributes *attrs)
{
GString *output = g_string_sized_new (128);
_gck_format_attributes (output, attrs);
if (args->match->attributes) {
attrs = _gck_attributes_commit_out (args->match->attributes, &n_attrs);
if (_gck_debugging) {
- gchar *string = _gck_attributes_format (args->match->attributes);
+ gchar *string = gck_attributes_to_string (args->match->attributes);
_gck_debug ("finding objects matching: %s", string);
g_free (string);
}
if (GCK_IS_GET_ATTRIBUTE_RV_OK (rv)) {
if (_gck_debugging) {
- gchar *string = _gck_attributes_format (attrs);
+ gchar *string = gck_attributes_to_string (attrs);
_gck_debug ("retrieved attributes for object %lu: %s",
result->handle, string);
g_free (string);
{
if (_gck_debugging) {
gchar *attrs, *uri;
- attrs = uri_data->attributes ? _gck_attributes_format (uri_data->attributes) : NULL;
+ attrs = uri_data->attributes ? gck_attributes_to_string (uri_data->attributes) : NULL;
uri = uri_data ? gck_uri_build (uri_data, GCK_URI_FOR_TOKEN | GCK_URI_FOR_MODULE) : NULL;
_gck_debug ("for = %s, tokens = %s, objects = %s", type, uri, attrs);
g_free (attrs);
CK_ATTRIBUTE_PTR _gck_attributes_commit_out (GckAttributes *attrs,
CK_ULONG_PTR n_attrs);
-gchar * _gck_attributes_format (GckAttributes *attrs);
-
/* ----------------------------------------------------------------------------
* MISC
*/
&args->object);
if (_gck_debugging) {
- gchar *string = _gck_attributes_format (args->attrs);
+ gchar *string = gck_attributes_to_string (args->attrs);
if (rv == CKR_OK)
_gck_debug ("created object: %s", string);
else
CK_RV rv;
if (_gck_debugging) {
- gchar *string = _gck_attributes_format (args->attrs);
+ gchar *string = gck_attributes_to_string (args->attrs);
_gck_debug ("matching: %s", string);
g_free (string);
}
void gck_attributes_dump (GckAttributes *attrs);
+gchar * gck_attributes_to_string (GckAttributes *attrs);
+
/* -------------------------------------------------------------------------
* FORWARDS
*/
gck_attributes_set_date
gck_attributes_set_string
gck_attributes_set_ulong
+gck_attributes_to_string
gck_attributes_unref
gck_enumerator_get_chained
gck_enumerator_get_interaction