static void
empathy_tls_certificate_class_init (EmpathyTLSCertificateClass *klass)
{
  GParamSpec *pspec;
  GObjectClass *oclass = G_OBJECT_CLASS (klass);
  TpProxyClass *pclass = TP_PROXY_CLASS (klass);

  oclass->get_property = empathy_tls_certificate_get_property;
  oclass->finalize = empathy_tls_certificate_finalize;

  pclass->interface = EMP_IFACE_QUARK_AUTHENTICATION_TLS_CERTIFICATE;
  pclass->must_have_unique_name = TRUE;

  g_type_class_add_private (klass, sizeof (EmpathyTLSCertificatePriv));

  pspec = g_param_spec_string ("cert-type", "Certificate type",
      "The type of this certificate.",
      NULL,
      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (oclass, PROP_CERT_TYPE, pspec);

  pspec = g_param_spec_boxed ("cert-data", "Certificate chain data",
      "The raw DER-encoded certificate chain data.",
      TP_ARRAY_TYPE_UCHAR_ARRAY_LIST,
      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (oclass, PROP_CERT_DATA, pspec);

  pspec = g_param_spec_uint ("state", "State",
      "The state of this certificate.",
      EMP_TLS_CERTIFICATE_STATE_PENDING, NUM_EMP_TLS_CERTIFICATE_STATES -1,
      EMP_TLS_CERTIFICATE_STATE_PENDING,
      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (oclass, PROP_STATE, pspec);
}
static void hev_impathy_tls_certificate_class_init(HevImpathyTLSCertificateClass * klass)
{
	GObjectClass * obj_class = G_OBJECT_CLASS(klass);
	TpProxyClass *proxy_class = TP_PROXY_CLASS(klass);
	GParamSpec *pspec = NULL;

	g_debug("%s:%d[%s]", __FILE__, __LINE__, __FUNCTION__);

	obj_class->constructor = hev_impathy_tls_certificate_constructor;
	obj_class->constructed = hev_impathy_tls_certificate_constructed;
	obj_class->dispose = hev_impathy_tls_certificate_dispose;
	obj_class->finalize = hev_impathy_tls_certificate_finalize;
	obj_class->get_property = hev_impathy_tls_certificate_get_property;

	proxy_class->interface =
		g_quark_from_static_string(
					"org.freedesktop.Telepathy.Authentication.TLSCertificate");
	proxy_class->must_have_unique_name = TRUE;

	pspec = g_param_spec_string("cert-type", "Certificate type",
				"The type of this certificate.",
				NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
	g_object_class_install_property(obj_class, PROP_CERT_TYPE, pspec);

	pspec = g_param_spec_boxed("cert-data", "Certificate chain data",
				"The raw DER-encoded certificate chain data.",
				TP_ARRAY_TYPE_UCHAR_ARRAY_LIST,
				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
	g_object_class_install_property(obj_class, PROP_CERT_DATA, pspec);

	pspec = g_param_spec_uint("state", "State",
				"The state of this certificate.",
				0, 2, 0,
				G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
	g_object_class_install_property(obj_class, PROP_STATE, pspec);

	g_type_class_add_private(klass, sizeof(HevImpathyTLSCertificatePrivate));
}
static void
tp_yts_status_class_init (TpYtsStatusClass *klass)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  TpProxyClass *proxy_class = TP_PROXY_CLASS (klass);
  GType tp_type = TP_TYPE_YTS_STATUS;

  object_class->constructed = tp_yts_status_constructed;
  object_class->get_property = tp_yts_status_get_property;
  object_class->dispose = tp_yts_status_dispose;
  object_class->finalize = tp_yts_status_finalize;

  proxy_class->interface = TP_YTS_IFACE_QUARK_STATUS;

  g_type_class_add_private (klass, sizeof (TpYtsStatusPrivate));

  /**
   * TpYtsStatus:discovered-services:
   *
   * Get the discovered Ytstenut services. The hash table is of
   * #TP_YTS_HASH_TYPE_SERVICE_MAP type, and has the following contents:
   *
   * <code><literallayout>
   *    GHashTable (
   *        gchar *contact_id,
   *        GHashTable (
   *            gchar *service_name,
   *            GValueArray (
   *                gchar *service_type,
   *                GHashTable (
   *                    gchar *language,
   *                    gchar *localized_name
   *                )
   *                gchar **capabilities
   *            )
   *        )
   *    )
   * </literallayout></code>
   */
  g_object_class_install_property (object_class, PROP_DISCOVERED_SERVICES,
      g_param_spec_boxed ("discovered-services", "Discovered Services",
          "Discovered Ytstenut Service Information",
          TP_YTS_HASH_TYPE_CONTACT_SERVICE_MAP,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  /**
   * TpYtsStatus:discovered-statuses:
   *
   * Get the discovered Ytstenut statuses for services. The hash table is of
   * #TP_YTS_HASH_TYPE_CONTACT_CAPABILITY_MAP type, and has the following
   * contents:
   *
   * <code><literallayout>
   *    GHashTable (
   *        gchar *contact_id,
   *        GHashTable (
   *            gchar *capability,
   *            GHashTable (
   *                gchar *service_name,
   *                gchar *status_xml
   *            )
   *        )
   *    )
   * </literallayout></code>
   */
  g_object_class_install_property (object_class, PROP_DISCOVERED_STATUSES,
      g_param_spec_boxed ("discovered-statuses", "Discovered Statuses",
          "Discovered Ytstenut Status Information",
          TP_YTS_HASH_TYPE_CONTACT_CAPABILITY_MAP,
          G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

  /**
   * TpYtsStatus::service-added:
   * @status: the #TpYtsStatus
   * @contact_id: The contact for the device on which a service was added.
   * @service_name: The name of the service which was added.
   * @service: Details of the service added.
   *
   * This signal is emitted when we discover that a Ytstenut service
   * has been advertised by a contact. The
   * #TpYtsStatus:discovered-services property will have been updated
   * before this signal is emitted.
   *
   * @service is a #GValueArray like this:
   *
   *
   * <code><literallayout>
   *    GValueArray (
   *        gchar *service_type,
   *            GHashTable (
   *                gchar *language,
   *                gchar *localized_name
   *            )
   *            gchar **capabilities
   *        )
   * </literallayout></code>
   */
  signals[SERVICE_ADDED] =
    g_signal_new ("service-added",
      G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST, 0,
      NULL, NULL,
      _tp_yts_marshal_VOID__STRING_STRING_BOXED,
      G_TYPE_NONE,
      3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VALUE_ARRAY);

  /**
   * TpYtsStatus::service-removed:
   * @status: a #TpYtsStatus
   * @contact_id: The contact for the device on which a service was removed.
   * @service_name: The name of the service which was removed.
   *
   * This signal is emitted when we discover that a Ytstenut service
   * has been removed by a Contact. The
   * #TpYtsStatus:discovered-services property will have been updated
   * before this signal is emitted.
   */
  signals[SERVICE_REMOVED] =
    g_signal_new ("service_removed",
      G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST, 0,
      NULL, NULL,
      _tp_yts_marshal_VOID__STRING_STRING,
      G_TYPE_NONE,
      2, G_TYPE_STRING, G_TYPE_STRING);

  /**
   * TpYtsStatus::status-changed:
   * @status: a #TpYtsStatus
   * @contact_id: The contact for the device on which the status changed.
   * @capability: The capability for which the status changed.
   * @service_name: The name of the service whose status changed.
   * @status: The UTF-8 encoded XML Ytstetus status, or a empty string
   *   if the status was cleared.
   *
   * This signal is emitted when we discover that a Ytstenut service
   * has changed or cleared its status on one one of the devices on
   * the local network. The #TpYtsStatus:discovered-statuses property
   * will have been updated before this signal is emitted.
   */
  signals[STATUS_CHANGED] =
    g_signal_new ("status-changed",
      G_TYPE_FROM_CLASS (klass),
      G_SIGNAL_RUN_LAST, 0,
      NULL, NULL,
      _tp_yts_marshal_VOID__STRING_STRING_STRING_STRING,
      G_TYPE_NONE,
      4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);

  tp_proxy_init_known_interfaces ();
  tp_proxy_or_subclass_hook_on_interface_add (tp_type,
      tp_yts_status_add_signals);
  tp_proxy_subclass_add_error_mapping (tp_type,
      TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
}