static void
rakia_call_content_class_init (
    RakiaCallContentClass *rakia_call_content_class)
{
  GObjectClass *object_class = G_OBJECT_CLASS (rakia_call_content_class);
  TpBaseCallContentClass *bcc_class =
      TP_BASE_CALL_CONTENT_CLASS (rakia_call_content_class);
  GParamSpec *param_spec;

  g_type_class_add_private (rakia_call_content_class,
      sizeof (RakiaCallContentPrivate));

  object_class->constructed = rakia_call_content_constructed;
  object_class->dispose = rakia_call_content_dispose;
  object_class->set_property = rakia_call_content_set_property;

  bcc_class->deinit = rakia_call_content_deinit;

  param_spec = g_param_spec_object ("channel", "RakiaCallChannel object",
      "Call Channel.",
      RAKIA_TYPE_CALL_CHANNEL,
      G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (object_class, PROP_CHANNEL, param_spec);

  param_spec = g_param_spec_object ("sip-media", "RakiaSipMedia object",
      "SIP media object that is used for this SIP media channel object.",
      RAKIA_TYPE_SIP_MEDIA,
      G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
  g_object_class_install_property (object_class, PROP_SIP_MEDIA, param_spec);
}
コード例 #2
0
static void
gabble_call_content_class_init (
    GabbleCallContentClass *gabble_call_content_class)
{
  GObjectClass *object_class = G_OBJECT_CLASS (gabble_call_content_class);
  TpBaseCallContentClass *bcc_class =
      TP_BASE_CALL_CONTENT_CLASS (gabble_call_content_class);

  g_type_class_add_private (gabble_call_content_class,
      sizeof (GabbleCallContentPrivate));

  object_class->dispose = gabble_call_content_dispose;
  bcc_class->deinit = call_content_deinit;
}
static void
rakia_call_content_deinit (TpBaseCallContent *base)
{
  RakiaCallContent *self = RAKIA_CALL_CONTENT (base);
  RakiaCallContentPrivate *priv = self->priv;
  RakiaSipSession *session;

  session = rakia_sip_media_get_session (priv->media);

  /* If the media was removed, it means it's by user request, so we must
   * do a re-invite
   */
  if (rakia_sip_session_remove_media (session, priv->media, 0, NULL))
    rakia_sip_session_media_changed (session);


  tp_clear_object (&priv->stream);
  tp_clear_object (&priv->channel);

  TP_BASE_CALL_CONTENT_CLASS (
    rakia_call_content_parent_class)->deinit (base);
}
コード例 #4
0
static void
call_content_deinit (TpBaseCallContent *base)
{
  GabbleCallContent *self = GABBLE_CALL_CONTENT (base);
  GabbleCallContentPrivate *priv = self->priv;

  if (priv->deinit_has_run)
    return;

  priv->deinit_has_run = TRUE;

  while (priv->contents != NULL)
    {
      GabbleCallMemberContent *c = priv->contents->data;

      priv->contents = g_list_delete_link (priv->contents, priv->contents);
      gabble_call_member_content_remove (c);
    }

  TP_BASE_CALL_CONTENT_CLASS (
    gabble_call_content_parent_class)->deinit (base);
}