diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-04-18 12:39:21 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-09 12:14:10 +0200 |
commit | a380793b20a04cf9d6e40c23c3eaff227509162b (patch) | |
tree | 1adc97b845d4186215899732074039307743c869 | |
parent | bb29e6e5e47ad09b77ae2fe6c75f22f96d1758f5 (diff) |
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.
-rw-r--r-- | docs/reference/telepathy-glib-sections.txt | 3 | ||||
-rw-r--r-- | telepathy-glib/tls-certificate.c | 48 | ||||
-rw-r--r-- | 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 f1ada41bd..89895df56 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 b41628d36..4066545c1 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 d10bd6cb6..0ad956940 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> |