[gcr] gcr: A few tweaks to GcrCertificate introspection data



commit c6591124a582b0021d1795031ac2cff2aaeb71ab
Author: Stef Walter <stefw gnome org>
Date:   Fri Nov 8 15:05:15 2013 +0100

    gcr: A few tweaks to GcrCertificate introspection data

 gcr/Gcr-3.metadata    |    1 -
 gcr/gcr-certificate.c |    4 ++--
 gcr/gcr-certificate.h |   20 +++++++++++++++++---
 3 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/gcr/Gcr-3.metadata b/gcr/Gcr-3.metadata
index ec246f8..bcf4973 100644
--- a/gcr/Gcr-3.metadata
+++ b/gcr/Gcr-3.metadata
@@ -2,7 +2,6 @@
 // See https://live.gnome.org/Vala/UpstreamGuide for more information
 
 Certificate
-       .get_der_data#virtual_method name="provide_der_data"
        .label nullable=true
        .markup nullable=true
        .subject nullable=true
diff --git a/gcr/gcr-certificate.c b/gcr/gcr-certificate.c
index ef26bff..c5d118c 100644
--- a/gcr/gcr-certificate.c
+++ b/gcr/gcr-certificate.c
@@ -398,9 +398,9 @@ gcr_certificate_compare (GcrComparable *first, GcrComparable *other)
  *
  * Gets the raw DER data for an X.509 certificate.
  *
- * Returns: (array length=n_data): raw DER data of the X.509 certificate
+ * Returns: (transfer none) (array length=n_data): raw DER data of the X.509 certificate
  **/
-const guchar *
+const guint8 *
 gcr_certificate_get_der_data (GcrCertificate *self,
                               gsize *n_data)
 {
diff --git a/gcr/gcr-certificate.h b/gcr/gcr-certificate.h
index 52aa553..b46cb76 100644
--- a/gcr/gcr-certificate.h
+++ b/gcr/gcr-certificate.h
@@ -45,8 +45,22 @@ typedef struct _GcrCertificateIface     GcrCertificateIface;
 struct _GcrCertificateIface {
        GTypeInterface parent;
 
-       const guchar * (*get_der_data) (GcrCertificate *self,
-                                       gsize *n_data);
+
+       /*
+        * g-ir-scanner cannot comprehend this yet ...
+        * See: https://bugzilla.gnome.org/show_bug.cgi?id=725501
+        *
+        * GcrCertificate.get_der_data:
+        * @self: a #GcrCertificate
+        * @n_data: a pointer to a location to store the size of the resulting DER data.
+        *
+        * Implemented to return the raw DER data for an X.509 certificate. The data
+        * should be owned by the #GcrCertificate object.
+        *
+        * Returns: (array length=n_data): raw DER data of the X.509 certificate
+        */
+       const guint8 * (* get_der_data) (GcrCertificate *self,
+                                        gsize *n_data);
 
        /*< private >*/
        gpointer dummy1;
@@ -60,7 +74,7 @@ struct _GcrCertificateIface {
 
 GType               gcr_certificate_get_type               (void);
 
-const guchar *      gcr_certificate_get_der_data           (GcrCertificate *self,
+const guint8 *      gcr_certificate_get_der_data           (GcrCertificate *self,
                                                             gsize *n_data);
 
 const GcrColumn*    gcr_certificate_get_columns            (void);


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