[gcr/wip/nielsdg/use-g-deprecated: 4/6] Mark deprecated functions with G_DEPRECATED



commit fb1234158b18722e55206378365240e3e78056b2
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Tue Feb 4 19:32:49 2020 +0100

    Mark deprecated functions with G_DEPRECATED
    
    If we want applications to switch, deprecation warnings are a good way
    to make that happen.
    
    Fixes https://gitlab.gnome.org/GNOME/gcr/issues/36

 gck/gck-deprecated.h                | 21 +++++++++++++++++++++
 gcr/gcr-deprecated-base.h           |  8 ++++++++
 ui/gcr-certificate-basics-widget.h  |  4 ++++
 ui/gcr-certificate-details-widget.h |  4 ++++
 ui/gcr-deprecated.h                 |  3 +++
 5 files changed, 40 insertions(+)
---
diff --git a/gck/gck-deprecated.h b/gck/gck-deprecated.h
index 9314db7..029ab7e 100644
--- a/gck/gck-deprecated.h
+++ b/gck/gck-deprecated.h
@@ -31,75 +31,96 @@ G_BEGIN_DECLS
 
 typedef             GArray                                  GckMechanisms;
 
+G_DEPRECATED_FOR(g_array_free)
 #define             gck_mechanisms_free(a)                  (g_array_free (a, TRUE))
 
 #define             CKR_GCK_MODULE_PROBLEM                  GCK_ERROR_MODULE_PROBLEM
 
+G_DEPRECATED_FOR(gck_error_get_quark)
 GQuark              gck_get_error_quark                     (void);
 
+G_DEPRECATED_FOR(gck_uri_error_get_quark)
 GQuark              gck_uri_get_error_quark                 (void);
 
 #define             GCK_URI_BAD_PREFIX                      GCK_URI_BAD_SCHEME
 
+G_DEPRECATED_FOR(gck_attributes_get_type)
 GType               gck_attributes_get_boxed_type           (void) G_GNUC_CONST;
 
+G_DEPRECATED_FOR(gck_builder_set_all)
 GckAttributes *     gck_attributes_new_full                 (GckAllocator allocator);
 
+G_DEPRECATED_FOR(gck_builder_set_all)
 GckAttribute *      gck_attributes_add                      (GckAttributes *attrs,
                                                              GckAttribute *attr);
 
+G_DEPRECATED_FOR(gck_builder_set_all)
 void                gck_attributes_add_all                  (GckAttributes *attrs,
                                                              GckAttributes *from);
 
+G_DEPRECATED_FOR(gck_builder_add_data)
 GckAttribute *      gck_attributes_add_data                 (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              const guchar *value,
                                                              gsize length);
 
+G_DEPRECATED_FOR(gck_builder_add_invalid)
 GckAttribute *      gck_attributes_add_invalid              (GckAttributes *attrs,
                                                              gulong attr_type);
 
+G_DEPRECATED_FOR(gck_builder_add_empty)
 GckAttribute *      gck_attributes_add_empty                (GckAttributes *attrs,
                                                              gulong attr_type);
 
+G_DEPRECATED_FOR(gck_builder_add_boolean)
 GckAttribute*       gck_attributes_add_boolean              (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              gboolean value);
 
+G_DEPRECATED_FOR(gck_builder_add_string)
 GckAttribute*       gck_attributes_add_string               (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              const gchar *value);
 
+G_DEPRECATED_FOR(gck_builder_add_date)
 GckAttribute*       gck_attributes_add_date                 (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              const GDate *value);
 
+G_DEPRECATED_FOR(gck_builder_add_ulong)
 GckAttribute*       gck_attributes_add_ulong                (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              gulong value);
 
+G_DEPRECATED_FOR(gck_builder_set_data)
 void                gck_attributes_set                      (GckAttributes *attrs,
                                                              GckAttribute *attr);
 
+G_DEPRECATED_FOR(gck_builder_set_boolean)
 void                gck_attributes_set_boolean              (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              gboolean value);
 
+G_DEPRECATED_FOR(gck_builder_set_ulong)
 void                gck_attributes_set_ulong                (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              gulong value);
 
+G_DEPRECATED_FOR(gck_builder_set_string)
 void                gck_attributes_set_string               (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              const gchar *value);
 
+G_DEPRECATED_FOR(gck_builder_set_date)
 void                gck_attributes_set_date                 (GckAttributes *attrs,
                                                              gulong attr_type,
                                                              const GDate *value);
 
+G_DEPRECATED_FOR(gck_builder_set_all)
 void                gck_attributes_set_all                  (GckAttributes *attrs,
                                                              GckAttributes *from);
 
+G_DEPRECATED_FOR(gck_attributes_ref or gck_builder_add_all)
 GckAttributes *     gck_attributes_dup                      (GckAttributes *attrs);
 
 #endif /* GCK_DISABLE_DEPRECATED */
diff --git a/gcr/gcr-deprecated-base.h b/gcr/gcr-deprecated-base.h
index ef761e7..55dc087 100644
--- a/gcr/gcr-deprecated-base.h
+++ b/gcr/gcr-deprecated-base.h
@@ -38,18 +38,24 @@ G_BEGIN_DECLS
 
 #define           GCR_ERROR                                   (gcr_error_get_domain ())
 
+G_DEPRECATED
 GQuark            gcr_error_get_domain                        (void) G_GNUC_CONST;
 
+G_DEPRECATED_FOR(gcr_collection_contains)
 gboolean          gcr_simple_collection_contains              (GcrSimpleCollection *self,
                                                                GObject *object);
 
+G_DEPRECATED_FOR(gcr_importer_listen)
 GcrParser *       gcr_importer_get_parser                     (GcrImporter *self);
 
+G_DEPRECATED_FOR(gcr_importer_listen)
 void              gcr_importer_set_parser                     (GcrImporter *self,
                                                                GcrParser *parser);
 
+G_DEPRECATED
 GckSlot *         gcr_importer_get_slot                       (GcrImporter *self);
 
+G_DEPRECATED
 void              gcr_importer_set_slot                       (GcrImporter *self,
                                                                GckSlot *slot);
 
@@ -59,8 +65,10 @@ typedef enum {
        GCR_IMPORTER_PROMPT_NEVER
 } GcrImporterPromptBehavior;
 
+G_DEPRECATED
 GcrImporterPromptBehavior  gcr_importer_get_prompt_behavior   (GcrImporter *self);
 
+G_DEPRECATED
 void                       gcr_importer_set_prompt_behavior   (GcrImporter *self,
                                                                GcrImporterPromptBehavior behavior);
 
diff --git a/ui/gcr-certificate-basics-widget.h b/ui/gcr-certificate-basics-widget.h
index 66bd45b..9715ee9 100644
--- a/ui/gcr-certificate-basics-widget.h
+++ b/ui/gcr-certificate-basics-widget.h
@@ -45,12 +45,16 @@ G_BEGIN_DECLS
 typedef GcrCertificateWidget GcrCertificateBasicsWidget;
 typedef GcrCertificateWidgetClass GcrCertificateBasicsWidgetClass;
 
+G_DEPRECATED_FOR(gcr_certificate_widget_get_type)
 GType                        gcr_certificate_basics_widget_get_type               (void);
 
+G_DEPRECATED_FOR(gcr_certificate_widget_new)
 GcrCertificateBasicsWidget*  gcr_certificate_basics_widget_new                    (GcrCertificate *cert);
 
+G_DEPRECATED_FOR(gcr_certificate_widget_get_certificate)
 GcrCertificate*              gcr_certificate_basics_widget_get_certificate        
(GcrCertificateBasicsWidget *basics);
 
+G_DEPRECATED_FOR(gcr_certificate_widget_set_certificate)
 void                         gcr_certificate_basics_widget_set_certificate        
(GcrCertificateBasicsWidget *basics,
                                                                                    GcrCertificate *cert);
 
diff --git a/ui/gcr-certificate-details-widget.h b/ui/gcr-certificate-details-widget.h
index 27d6bb9..2a1de50 100644
--- a/ui/gcr-certificate-details-widget.h
+++ b/ui/gcr-certificate-details-widget.h
@@ -45,12 +45,16 @@ G_BEGIN_DECLS
 typedef GcrCertificateWidget GcrCertificateDetailsWidget;
 typedef GcrCertificateWidgetClass GcrCertificateDetailsWidgetClass;
 
+G_DEPRECATED_FOR(gcr_certificate_widget_get_type)
 GType                         gcr_certificate_details_widget_get_type               (void);
 
+G_DEPRECATED_FOR(gcr_certificate_widget_new)
 GcrCertificateDetailsWidget*  gcr_certificate_details_widget_new                    (GcrCertificate *cert);
 
+G_DEPRECATED_FOR(gcr_certificate_widget_get_certificate)
 GcrCertificate*               gcr_certificate_details_widget_get_certificate        
(GcrCertificateDetailsWidget *details);
 
+G_DEPRECATED_FOR(gcr_certificate_widget_set_certificate)
 void                          gcr_certificate_details_widget_set_certificate        
(GcrCertificateDetailsWidget *details,
                                                                                      GcrCertificate *cert);
 
diff --git a/ui/gcr-deprecated.h b/ui/gcr-deprecated.h
index 39cf50c..63086a9 100644
--- a/ui/gcr-deprecated.h
+++ b/ui/gcr-deprecated.h
@@ -37,11 +37,14 @@
 
 G_BEGIN_DECLS
 
+G_DEPRECATED_FOR(gcr_renderer_render_view)
 void              gcr_renderer_render                         (GcrRenderer *self,
                                                                GcrViewer *viewer);
 
+G_DEPRECATED_FOR(gcr_renderer_get_attributes)
 GckAttributes *   gcr_certificate_renderer_get_attributes     (GcrCertificateRenderer *self);
 
+G_DEPRECATED_FOR(gcr_renderer_set_attributes)
 void              gcr_certificate_renderer_set_attributes     (GcrCertificateRenderer *self,
                                                                GckAttributes *attrs);
 


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