[next] telepathy-glib: tls-certificate: add accessors
Xavier Claessens
xclaesse at kemper.freedesktop.org
Wed May 9 13:10:49 PDT 2012
Module: telepathy-glib
Branch: next
Commit: a380793b20a04cf9d6e40c23c3eaff227509162b
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=a380793b20a04cf9d6e40c23c3eaff227509162b
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Wed Apr 18 12:39:21 2012 +0200
tls-certificate: add accessors
I didn't add one for the 'parent' property because it's more of an
implementation detail and a get_parent() method would look weird.
---
docs/reference/telepathy-glib-sections.txt | 3 ++
telepathy-glib/tls-certificate.c | 48 ++++++++++++++++++++++++++++
telepathy-glib/tls-certificate.h | 4 ++
3 files changed, 55 insertions(+), 0 deletions(-)
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index f1ada41..89895df 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -7338,6 +7338,9 @@ tp_tls_certificate_accept_finish
tp_tls_certificate_add_rejection
tp_tls_certificate_reject_async
tp_tls_certificate_reject_finish
+tp_tls_certificate_get_cert_type
+tp_tls_certificate_get_cert_data
+tp_tls_certificate_get_state
<SUBSECTION>
tp_cli_authentication_tls_certificate_call_accept
tp_cli_authentication_tls_certificate_call_reject
diff --git a/telepathy-glib/tls-certificate.c b/telepathy-glib/tls-certificate.c
index b41628d..4066545 100644
--- a/telepathy-glib/tls-certificate.c
+++ b/telepathy-glib/tls-certificate.c
@@ -883,3 +883,51 @@ tp_tls_certificate_get_nth_rejection (TpTLSCertificate *self,
return rej->error;
}
+
+/**
+ * tp_tls_certificate_get_cert_type:
+ * @self: a #TpTLSCertificate
+ *
+ * Return the #TpTLSCertificate:cert-type property
+ *
+ * Returns: the value of #TpTLSCertificate:cert-type property
+ *
+ * Since: UNRELEASED
+ */
+const gchar *
+tp_tls_certificate_get_cert_type (TpTLSCertificate *self)
+{
+ return self->priv->cert_type;
+}
+
+/**
+ * tp_tls_certificate_get_cert_data:
+ * @self: a #TpTLSCertificate
+ *
+ * Return the #TpTLSCertificate:cert-data property
+ *
+ * Returns: (transfer none) (type GLib.PtrArray) (element-type GLib.Array): the value of #TpTLSCertificate:cert-data property
+ *
+ * Since: UNRELEASED
+ */
+GPtrArray *
+tp_tls_certificate_get_cert_data (TpTLSCertificate *self)
+{
+ return self->priv->cert_data;
+}
+
+/**
+ * tp_tls_certificate_get_state:
+ * @self: a #TpTLSCertificate
+ *
+ * Return the #TpTLSCertificate:state property
+ *
+ * Returns: the value of #TpTLSCertificate:state property
+ *
+ * Since: UNRELEASED
+ */
+TpTLSCertificateState
+tp_tls_certificate_get_state (TpTLSCertificate *self)
+{
+ return self->priv->state;
+}
diff --git a/telepathy-glib/tls-certificate.h b/telepathy-glib/tls-certificate.h
index d10bd6c..0ad9569 100644
--- a/telepathy-glib/tls-certificate.h
+++ b/telepathy-glib/tls-certificate.h
@@ -106,6 +106,10 @@ gboolean tp_tls_certificate_reject_finish (TpTLSCertificate *self,
void tp_tls_certificate_init_known_interfaces (void);
+const gchar * tp_tls_certificate_get_cert_type (TpTLSCertificate *self);
+GPtrArray * tp_tls_certificate_get_cert_data (TpTLSCertificate *self);
+TpTLSCertificateState tp_tls_certificate_get_state (TpTLSCertificate *self);
+
G_END_DECLS
#include <telepathy-glib/_gen/tp-cli-tls-cert.h>
More information about the telepathy-commits
mailing list