[gcr/wip/gcr4] gck: Remove deprecated header
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr/wip/gcr4] gck: Remove deprecated header
- Date: Mon, 4 Oct 2021 18:41:52 +0000 (UTC)
commit 1c218f1b718f3aebcccc3ea60fa6fca50c1b3d1b
Author: Corentin Noël <corentin noel collabora com>
Date: Mon Oct 4 20:25:20 2021 +0200
gck: Remove deprecated header
Remove deprecated functions and declarations
gck/gck-attributes.c | 331 -----------------------------------------------
gck/gck-deprecated.h | 132 -------------------
gck/gck-module.c | 4 +-
gck/gck-modules.c | 4 +-
gck/gck-uri.c | 7 -
gck/gck.h | 1 -
gck/gck.symbols | 20 ---
gck/meson.build | 1 -
gck/test-gck-module.c | 4 +-
gck/test-gck-modules.c | 4 +-
gck/test-gck-slot.c | 2 +-
gck/test-gck-uri.c | 2 +-
gcr/gcr-key-mechanisms.c | 2 +-
13 files changed, 11 insertions(+), 503 deletions(-)
---
diff --git a/gck/gck-attributes.c b/gck/gck-attributes.c
index 8612a28..c722b55 100644
--- a/gck/gck-attributes.c
+++ b/gck/gck-attributes.c
@@ -2044,13 +2044,6 @@ gck_attribute_hash (gconstpointer attr)
G_DEFINE_BOXED_TYPE (GckAttributes, gck_attributes,
gck_attributes_ref, gck_attributes_unref)
-GType
-gck_attributes_get_boxed_type (void)
-{
- /* Deprecated version */
- return gck_attributes_get_type ();
-}
-
/**
* gck_attributes_new_empty:
* @first_type: the first empty attribute type
@@ -2840,327 +2833,3 @@ gck_attributes_new (gulong reserved)
GckBuilder builder = GCK_BUILDER_INIT;
return gck_builder_end (&builder);
}
-
-/**
- * gck_attributes_new_full: (skip)
- * @allocator: memory allocator for attribute data, or %NULL for default
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_all() instead.
- *
- * Returns: returns %NULL
- **/
-GckAttributes *
-gck_attributes_new_full (GckAllocator allocator)
-{
- g_warning ("gck_attributes_new_full() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_add:
- * @attrs: the attributes array to add to
- * @attr: the attribute to add
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_all() instead.
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add (GckAttributes *attrs,
- GckAttribute *attr)
-{
- g_warning ("gck_attributes_add() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_set:
- * @attrs: attributes array to add to
- * @attr: attribute to set
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_data() instead.
- **/
-void
-gck_attributes_set (GckAttributes *attrs,
- GckAttribute *attr)
-{
- g_warning ("gck_attributes_set() is no no longer supported");
-}
-
-/**
- * gck_attributes_add_data:
- * @attrs: The attributes array to add to.
- * @attr_type: The type of attribute to add.
- * @value: (array length=length): the raw memory of the attribute value
- * @length: The length of the attribute value.
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_data() instead.
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add_data (GckAttributes *attrs,
- gulong attr_type,
- const guchar *value,
- gsize length)
-{
- g_warning ("gck_attributes_add_data() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_add_invalid:
- * @attrs: The attributes array to add to.
- * @attr_type: The type of attribute to add.
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_invalid() instead
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add_invalid (GckAttributes *attrs,
- gulong attr_type)
-{
- g_warning ("gck_attributes_add_invalid() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_add_empty:
- * @attrs: The attributes array to add.
- * @attr_type: The type of attribute to add.
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_empty() instead.
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add_empty (GckAttributes *attrs,
- gulong attr_type)
-{
- g_warning ("gck_attributes_add_empty() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_add_boolean:
- * @attrs: the attributes array to add to
- * @attr_type: the type of attribute to add
- * @value: the boolean value to add
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_boolean() instead.
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add_boolean (GckAttributes *attrs,
- gulong attr_type,
- gboolean value)
-{
- g_warning ("gck_attributes_add_boolean() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_set_boolean:
- * @attrs: the attributes
- * @attr_type: the type of attribute to set
- * @value: boolean value to set
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_boolean() instead.
- */
-void
-gck_attributes_set_boolean (GckAttributes *attrs,
- gulong attr_type,
- gboolean value)
-{
- g_warning ("gck_attributes_set_boolean() is no no longer supported");
-
-}
-
-/**
- * gck_attributes_add_string:
- * @attrs: the attributes array to add to
- * @attr_type: the type of attribute to add
- * @value: the null terminated string value to add
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_string() instead.
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add_string (GckAttributes *attrs,
- gulong attr_type,
- const gchar *value)
-{
- g_warning ("gck_attributes_add_string() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_set_string:
- * @attrs: the attributes
- * @attr_type: the type of attribute to set
- * @value: null terminated string value to set
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_string() instead.
- */
-void
-gck_attributes_set_string (GckAttributes *attrs,
- gulong attr_type,
- const gchar *value)
-{
- g_warning ("gck_attributes_set_string() is no no longer supported");
-}
-
-/**
- * gck_attributes_add_date:
- * @attrs: the attributes array to add to
- * @attr_type: the type of attribute to add
- * @value: the GDate value to add
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_date() instead.
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add_date (GckAttributes *attrs,
- gulong attr_type,
- const GDate *value)
-{
- g_warning ("gck_attributes_add_date() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_set_date:
- * @attrs: the attributes
- * @attr_type: the type of attribute to set
- * @value: date value to set
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_date() instead.
- */
-void
-gck_attributes_set_date (GckAttributes *attrs,
- gulong attr_type,
- const GDate *value)
-{
- g_warning ("gck_attributes_set_date() is no no longer supported");
-}
-
-/**
- * gck_attributes_add_ulong:
- * @attrs: the attributes array to add to
- * @attr_type: the type of attribute to add
- * @value: the gulong value to add
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_ulong() instead.
- *
- * Returns: (transfer none): returns %NULL
- **/
-GckAttribute *
-gck_attributes_add_ulong (GckAttributes *attrs,
- gulong attr_type,
- gulong value)
-{
- g_warning ("gck_attributes_add_ulong() is no no longer supported");
- return NULL;
-}
-
-/**
- * gck_attributes_set_ulong:
- * @attrs: the attributes
- * @attr_type: the type of attribute to set
- * @value: gulong value to set
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_ulong() instead.
- */
-void
-gck_attributes_set_ulong (GckAttributes *attrs,
- gulong attr_type,
- gulong value)
-{
- g_warning ("gck_attributes_set_ulong() is no no longer supported");
-}
-
-/**
- * gck_attributes_add_all:
- * @attrs: a set of attributes
- * @from: attributes to add
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_add_all() instead.
- */
-void
-gck_attributes_add_all (GckAttributes *attrs,
- GckAttributes *from)
-{
- g_warning ("gck_attributes_add_all() is no no longer supported");
-}
-
-/**
- * gck_attributes_set_all:
- * @attrs: set of attributes
- * @from: attributes to add
- *
- * #GckAttributes are now immutable. This method no longer does anything.
- *
- * Deprecated: 3.4: Use gck_builder_set_all() instead.
- */
-void
-gck_attributes_set_all (GckAttributes *attrs,
- GckAttributes *from)
-{
- g_warning ("gck_attributes_set_all() is no no longer supported");
-}
-
-/**
- * gck_attributes_dup:
- * @attrs: set of attributes to copy
- *
- * #GckAttributes are now immutable, and can be used in mulitple places.
- *
- * Deprecated: 3.4: Use gck_attributes_ref() or gck_builder_add_all() instead.
- *
- * Returns: (transfer none): a new floating #GckAttributes
- */
-GckAttributes *
-gck_attributes_dup (GckAttributes *attrs)
-{
- GckBuilder builder = GCK_BUILDER_INIT;
-
- if (attrs == NULL)
- return NULL;
-
- gck_builder_add_all (&builder, attrs);
- return gck_builder_end (&builder);
-}
diff --git a/gck/gck-module.c b/gck/gck-module.c
index 1fa7584..c5cc0ee 100644
--- a/gck/gck-module.c
+++ b/gck/gck-module.c
@@ -328,9 +328,9 @@ perform_initialize (Initialize *args)
funcs = p11_kit_module_load (args->path, P11_KIT_MODULE_CRITICAL);
if (funcs == NULL) {
- g_set_error (&args->error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
+ g_set_error (&args->error, GCK_ERROR, (int)GCK_ERROR_MODULE_PROBLEM,
_("Error loading PKCS#11 module: %s"), p11_kit_message ());
- return CKR_GCK_MODULE_PROBLEM;
+ return GCK_ERROR_MODULE_PROBLEM;
}
result = g_object_new (GCK_TYPE_MODULE,
diff --git a/gck/gck-modules.c b/gck/gck-modules.c
index a5ffae3..804999d 100644
--- a/gck/gck-modules.c
+++ b/gck/gck-modules.c
@@ -58,9 +58,9 @@ perform_initialize_registered (InitializeRegistered *args)
modules = p11_kit_modules_load_and_initialize (0);
if (modules == NULL) {
- g_set_error (&args->error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM,
+ g_set_error (&args->error, GCK_ERROR, (int)GCK_ERROR_MODULE_PROBLEM,
_("Couldn’t initialize registered PKCS#11 modules: %s"), p11_kit_message ());
- return CKR_GCK_MODULE_PROBLEM;
+ return GCK_ERROR_MODULE_PROBLEM;
}
for (funcs = modules; *funcs; ++funcs) {
diff --git a/gck/gck-uri.c b/gck/gck-uri.c
index 7187042..814b199 100644
--- a/gck/gck-uri.c
+++ b/gck/gck-uri.c
@@ -144,13 +144,6 @@ struct _GckUri {
GckAttributes *attributes;
};
-GQuark
-gck_uri_get_error_quark (void)
-{
- /* This is deprecated version */
- return gck_uri_error_get_quark ();
-}
-
GQuark
gck_uri_error_get_quark (void)
{
diff --git a/gck/gck.h b/gck/gck.h
index 61e87c2..39f2cc5 100644
--- a/gck/gck.h
+++ b/gck/gck.h
@@ -47,7 +47,6 @@
#include <gck/gck-object-cache.h>
#include <gck/gck-password.h>
#include <gck/gck-uri.h>
-#include <gck/gck-deprecated.h>
#undef __GCK_INSIDE_HEADER__
diff --git a/gck/gck.symbols b/gck/gck.symbols
index ae784c9..a32ea0f 100644
--- a/gck/gck.symbols
+++ b/gck/gck.symbols
@@ -30,38 +30,20 @@ gck_attribute_new_empty
gck_attribute_new_invalid
gck_attribute_new_string
gck_attribute_new_ulong
-gck_attributes_add
-gck_attributes_add_all
-gck_attributes_add_boolean
-gck_attributes_add_data
-gck_attributes_add_date
-gck_attributes_add_empty
-gck_attributes_add_invalid
-gck_attributes_add_string
-gck_attributes_add_ulong
gck_attributes_at
gck_attributes_contains
gck_attributes_count
gck_attributes_dump
-gck_attributes_dup
gck_attributes_find
gck_attributes_find_boolean
gck_attributes_find_date
gck_attributes_find_string
gck_attributes_find_ulong
-gck_attributes_get_boxed_type
gck_attributes_get_type
gck_attributes_new
gck_attributes_new_empty
-gck_attributes_new_full
gck_attributes_ref
gck_attributes_ref_sink
-gck_attributes_set
-gck_attributes_set_all
-gck_attributes_set_boolean
-gck_attributes_set_date
-gck_attributes_set_string
-gck_attributes_set_ulong
gck_attributes_to_string
gck_attributes_unref
gck_builder_add_all
@@ -116,7 +98,6 @@ gck_enumerator_set_object_type
gck_enumerator_set_object_type_full
gck_error_get_quark
gck_error_get_type
-gck_get_error_quark
gck_list_ref_copy
gck_list_unref_free
gck_list_get_boxed_type
@@ -301,7 +282,6 @@ gck_uri_data_new
gck_uri_error_get_quark
gck_uri_error_get_type
gck_uri_flags_get_type
-gck_uri_get_error_quark
gck_uri_parse
gck_value_to_boolean
gck_value_to_ulong
diff --git a/gck/meson.build b/gck/meson.build
index 117700b..23d048b 100644
--- a/gck/meson.build
+++ b/gck/meson.build
@@ -65,7 +65,6 @@ gck_sources = [
gck_exported_headers = [
gck_headers,
gck_version_h,
- 'gck-deprecated.h',
'pkcs11.h',
'pkcs11n.h',
'pkcs11x.h',
diff --git a/gck/test-gck-module.c b/gck/test-gck-module.c
index 91e7e4d..0cd8c1c 100644
--- a/gck/test-gck-module.c
+++ b/gck/test-gck-module.c
@@ -95,14 +95,14 @@ test_invalid_modules (Test *test, gconstpointer unused)
/* Shouldn't be able to load modules */
invalid = gck_module_initialize ("blah-blah-non-existant", NULL, &error);
- g_assert_error (error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM);
+ g_assert_error (error, GCK_ERROR, (int)GCK_ERROR_MODULE_PROBLEM);
g_assert_null (invalid);
g_clear_error (&error);
/* Shouldn't be able to load any file successfully */
invalid = gck_module_initialize ("/usr/lib/libm.so", NULL, &error);
- g_assert_error (error, GCK_ERROR, (int)CKR_GCK_MODULE_PROBLEM);
+ g_assert_error (error, GCK_ERROR, (int)GCK_ERROR_MODULE_PROBLEM);
g_assert_null (invalid);
g_clear_error (&error);
diff --git a/gck/test-gck-modules.c b/gck/test-gck-modules.c
index 1468b9b..6ef994e 100644
--- a/gck/test-gck-modules.c
+++ b/gck/test-gck-modules.c
@@ -114,7 +114,7 @@ test_token_for_uri_error (Test *test, gconstpointer unused)
slot = gck_modules_token_for_uri (test->modules, "http://invalid.uri", &error);
g_assert_null (slot);
- g_assert_error (error, GCK_URI_ERROR, GCK_URI_BAD_PREFIX);
+ g_assert_error (error, GCK_URI_ERROR, GCK_URI_BAD_SCHEME);
g_error_free (error);
}
@@ -148,7 +148,7 @@ test_object_for_uri_error (Test *test, gconstpointer unused)
object = gck_modules_object_for_uri (test->modules, "http://invalid.uri", 0, &error);
g_assert_null (object);
- g_assert_error (error, GCK_URI_ERROR, GCK_URI_BAD_PREFIX);
+ g_assert_error (error, GCK_URI_ERROR, GCK_URI_BAD_SCHEME);
g_error_free (error);
}
diff --git a/gck/test-gck-slot.c b/gck/test-gck-slot.c
index c314233..4cfddbe 100644
--- a/gck/test-gck-slot.c
+++ b/gck/test-gck-slot.c
@@ -182,7 +182,7 @@ test_slot_mechanisms (Test *test, gconstpointer unused)
gck_mechanism_info_free (info);
}
- gck_mechanisms_free (mechs);
+ g_array_unref (mechs);
}
static void
diff --git a/gck/test-gck-uri.c b/gck/test-gck-uri.c
index bbfddda..57adee9 100644
--- a/gck/test-gck-uri.c
+++ b/gck/test-gck-uri.c
@@ -59,7 +59,7 @@ test_parse_bad_scheme (void)
uri_data = gck_uri_parse ("http:\\example.com\test", GCK_URI_FOR_ANY, &error);
g_assert_null (uri_data);
- g_assert_error (error, GCK_URI_ERROR, GCK_URI_BAD_PREFIX);
+ g_assert_error (error, GCK_URI_ERROR, GCK_URI_BAD_SCHEME);
g_error_free (error);
}
diff --git a/gcr/gcr-key-mechanisms.c b/gcr/gcr-key-mechanisms.c
index 7d82908..89f968a 100644
--- a/gcr/gcr-key-mechanisms.c
+++ b/gcr/gcr-key-mechanisms.c
@@ -70,7 +70,7 @@ find_first_usable_mechanism (GckObject *key,
break;
}
- gck_mechanisms_free (mechs);
+ g_array_unref (mechs);
if (i < n_mechanisms)
return mechanisms[i];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]