[Bug 30460] Generate client side API for Chan.T.ServerTLSConnection and TLSCertificate

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 4 09:45:11 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=30460

--- Comment #21 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2012-05-04 00:45:11 PDT ---
(In reply to comment #20)
> > +<SUBSECTION>
> > +tp_cli_authentication_tls_certificate_call_accept
> > +tp_cli_authentication_tls_certificate_call_reject
> > +tp_cli_authentication_tls_certificate_callback_for_accept
> > +tp_cli_authentication_tls_certificate_callback_for_reject
> > +tp_cli_authentication_tls_certificate_connect_to_accepted
> > +tp_cli_authentication_tls_certificate_connect_to_rejected
> > +tp_cli_authentication_tls_certificate_signal_callback_accepted
> > +tp_cli_authentication_tls_certificate_signal_callback_rejected
> 
> Please undocument these. (Now there's something you don't hear every day... :-)
> 
> Changing it to <SUBSECTION Private> would do nicely.

done.

> > + * tp_tls_certificate_rejection_raise_error:
> 
> should also document:
> 
> Returns: %FALSE

added (thanks gtk-doc for not catching this).

> > +_TP_AVAILABLE_IN_0_20
> > +struct _TpTLSCertificateRejectionClass {
> 
> Not portable. In MSVC++, those macros expand to __declspec(deprecated) or
> something, which can only be applied to extern symbols (functions/variables),
> not to types.
> 
> If we really need it, we could add _TP_GNUC_AVAILABLE_IN_0_20 which only does
> anything in gcc but can appear in more places - but we'd have to define it
> ourselves, using G_UNAVAILABLE in gcc >= 4.5 and no expansion otherwise.
> 
> Or, we could just drop it. If you can't call any function that returns one of
> these objects then in practice that'll be enough.

fixed (ameneded).

> +      g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
> +
> +      rej = _tp_tls_certificate_rejection_new (error,
> +          TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN, TP_ERROR_STR_CERT_INVALID,
> +          g_variant_builder_end (&builder));
> 
> g_variant_builder_end returns a new floating ref, and I was worried that
> _tp_tls_certificate_rejection_new doesn't seem to sink the floating
> reference... but g_object_new() probably uses a GValue, which sinks floating
> variants automatically.
> 
> This seems a bit subtle, it might be better if
> _tp_tls_certificate_rejection_new explicitly did:
> 
> g_variant_ref_sink (details);
> ret = g_object_new (..., details, ...);
> g_variant_unref (details);
> return ret;
> 
> I think _tp_tls_certificate_rejection_new should certainly document that it
> sinks floating references. (Assuming it does...)

done.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.



More information about the telepathy-bugs mailing list