Пример #1
0
static void
__initialize_statement_delete_query_parameters (MidgardDBObjectClass *klass, const gchar *query_string, gboolean add_workspace)
{
	GdaSqlParser *parser = gda_sql_parser_new ();
	GdaStatement *stmt;
	GError *error = NULL;
	stmt = gda_sql_parser_parse_string (parser, query_string, NULL, &error);

	if (!stmt) {
		g_error ("Couldn't create %s class DELETE(UPDATE) prepared statement. %s", 
				G_OBJECT_CLASS_NAME (klass), error && error->message ? error->message : "Unknown reason");
		return;
	}

	GdaSet *params; 
	if (!gda_statement_get_parameters (stmt, &params, &error)) {
		g_error ("Failed to create DELETE(UPDATE) GdaSet for %s class. %s", 
				G_OBJECT_CLASS_NAME (klass), error && error->message ? error->message : "Unknown reason");
	}
	
	if (add_workspace) {
		klass->dbpriv->_workspace_statement_delete = stmt;
		klass->dbpriv->_workspace_statement_delete_params = params;
		return;
	}
	
	klass->dbpriv->_statement_delete = stmt;
	klass->dbpriv->_statement_delete_params = params;

	return;
}
void midgard_test_object_tree_basic(MidgardObjectTest *mot, gconstpointer data)
{
	g_assert(mot != NULL);
	MidgardObject *object = MIDGARD_OBJECT(mot->object);
	MidgardObjectClass *klass = MIDGARD_OBJECT_GET_CLASS(object);

	/* Get parent (in tree) class and check if parent has the same child declared */
	const gchar *pname = midgard_schema_object_tree_get_parent_name (object);
	
	if (!pname)
		return;

	MidgardObjectClass *pklass = MIDGARD_OBJECT_GET_CLASS_BY_NAME(pname);
	g_assert(pklass != NULL);

	/* There is tree parent declared so parent property can not be NULL */
	const gchar *parent_property = midgard_reflector_object_get_property_parent (G_OBJECT_CLASS_NAME (klass));
	g_assert(parent_property != NULL);

	guint n_child;
	gchar **children = midgard_reflector_object_list_children (G_OBJECT_CLASS_NAME (pklass), &n_child);
	g_assert(children != NULL);

	guint i = 0;
	gboolean has_child_class = FALSE;
	
	for (i = 0; i < n_child; i++) {
		if (g_type_from_name (children[i]) == G_OBJECT_CLASS_TYPE(klass))
			has_child_class = TRUE;
	}

	g_free(children);
	g_assert(has_child_class != FALSE);
}
Пример #3
0
/* Register stylable property of a class */
void xfdashboard_actor_install_stylable_property(XfdashboardActorClass *klass, GParamSpec *inParamSpec)
{
	GParamSpec		*stylableParamSpec;

	g_return_if_fail(XFDASHBOARD_IS_ACTOR_CLASS(klass));
	g_return_if_fail(G_IS_PARAM_SPEC(inParamSpec));
	g_return_if_fail(inParamSpec->flags & G_PARAM_WRITABLE);
	g_return_if_fail(!(inParamSpec->flags & G_PARAM_CONSTRUCT_ONLY));

	/* Check if param-spec is already registered */
	if(g_param_spec_pool_lookup(_xfdashboard_actor_stylable_properties_pool, g_param_spec_get_name(inParamSpec), G_OBJECT_CLASS_TYPE(klass), FALSE))
	{
		g_warning("Class '%s' already contains a stylable property '%s'",
					G_OBJECT_CLASS_NAME(klass),
					g_param_spec_get_name(inParamSpec));
		return;
	}

	/* Add param-spec to pool of themable properties */
	stylableParamSpec=g_param_spec_internal(G_PARAM_SPEC_TYPE(inParamSpec),
												g_param_spec_get_name(inParamSpec),
												NULL,
												NULL,
												0);
	g_param_spec_set_qdata_full(stylableParamSpec,
									XFDASHBOARD_ACTOR_PARAM_SPEC_REF,
									g_param_spec_ref(inParamSpec),
									(GDestroyNotify)g_param_spec_unref);
	g_param_spec_pool_insert(_xfdashboard_actor_stylable_properties_pool, stylableParamSpec, G_OBJECT_CLASS_TYPE(klass));
	XFDASHBOARD_DEBUG(NULL, STYLE,
						"Registered stylable property '%s' for class '%s'",
						g_param_spec_get_name(inParamSpec), G_OBJECT_CLASS_NAME(klass));
}
Пример #4
0
/*!
 * \brief Draw image
 *
 * Not optional on the PyDia side. If not implemented a runtime warning 
 * will be generated when called.
 *
 * \memberof _DiaPyRenderer
 */
static void
draw_image(DiaRenderer *renderer,
	   Point *point,
	   real width, real height,
	   DiaImage *image)
{
  PyObject *func, *res, *arg, *self = PYDIA_RENDERER (renderer);

  func = PyObject_GetAttrString (self, "draw_image");
  if (func && PyCallable_Check(func)) {
    PyObject *opoint = PyDiaPoint_New (point);
    PyObject *oimage = PyDiaImage_New (image);

    Py_INCREF(self);
    Py_INCREF(func);
    arg = Py_BuildValue ("(OddO)", opoint, width, height, oimage);
    if (arg) {
      res = PyEval_CallObject (func, arg);
      ON_RES(res, FALSE);
    }
    Py_XDECREF (arg);
    Py_XDECREF (opoint);
    Py_XDECREF (oimage);
    Py_DECREF(func);
    Py_DECREF(self);
  } else { /* member not optional */
    gchar *msg = g_strdup_printf ("%s.draw_image() implmentation missing.",
				  G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (renderer)));
    PyErr_Clear();
    PyErr_Warn (PyExc_RuntimeWarning, msg);
    g_free (msg);
  }
}
Пример #5
0
static void
attach (GeglOperation *self)
{
  g_warning ("kilroy was at What The Hack (%p, %s)\n", (void *) self,
             G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (self)));
  return;
}
Пример #6
0
/*!
 * \brief Draw line
 *
 * Not optional on the PyDia side. If not implemented a runtime warning 
 * will be generated when called.
 *
 * \memberof _DiaPyRenderer
 */
static void
draw_line(DiaRenderer *renderer, 
          Point *start, Point *end, 
          Color *line_colour)
{
  PyObject *func, *res, *arg, *self = PYDIA_RENDERER (renderer);

  func = PyObject_GetAttrString (self, "draw_line");
  if (func && PyCallable_Check(func)) {
    PyObject *ostart = PyDiaPoint_New (start);
    PyObject *oend = PyDiaPoint_New (end);
    PyObject *ocolor = PyDiaColor_New (line_colour);

    Py_INCREF(self);
    Py_INCREF(func);
    arg = Py_BuildValue ("(OOO)", ostart, oend, ocolor);
    if (arg) {
      res = PyEval_CallObject (func, arg);
      ON_RES(res, FALSE);
    }
    Py_XDECREF (arg);
    Py_XDECREF (ostart);
    Py_XDECREF (oend);
    Py_XDECREF (ocolor);
    Py_DECREF(func);
    Py_DECREF(self);
  }
  else { /* member not optional */
    gchar *msg = g_strdup_printf ("%s.draw_line() implmentation missing.",
				  G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (renderer)));
    PyErr_Clear();
    PyErr_Warn (PyExc_RuntimeWarning, msg);
    g_free (msg);
  }
}
Пример #7
0
/**
 * browser_perspective_uncustomize:
 * @perspective: an object implementing the #BrowserPerspective interface
 *
 * Remove any optional custom UI elements  which have been added
 * when browser_perspective_customize() was called.
 */
void
browser_perspective_uncustomize (BrowserPerspective *perspective)
{
	g_return_if_fail (IS_BROWSER_PERSPECTIVE (perspective));

	/* Current BrowserPage */
	GtkNotebook *nb;
	nb = (GtkNotebook*) browser_perspective_get_notebook (perspective);
	if (nb) {
		gint current_index;
		current_index = gtk_notebook_get_current_page (nb);
		if (current_index >= 0) {
			GtkWidget *current_page;
			current_page = gtk_notebook_get_nth_page (nb, current_index);
			if (current_page && IS_BROWSER_PAGE (current_page))
				browser_page_uncustomize (BROWSER_PAGE (current_page));
		}
	}

	if (BROWSER_PERSPECTIVE_GET_CLASS (perspective)->i_uncustomize)
		(BROWSER_PERSPECTIVE_GET_CLASS (perspective)->i_uncustomize) (perspective);
	else {
		g_print ("Default browser_perspective_uncustomize for %s\n",
			 G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (perspective)));
		if (customization_data_exists (G_OBJECT (perspective)))
			customization_data_release (G_OBJECT (perspective));
	}
}
/**
 * ges_timeline_element_set_inpoint:
 * @self: a #GESTimelineElement
 * @inpoint: the in-point in #GstClockTime
 *
 * Set the in-point, that is the moment at which the @self will start
 * outputting data from its contents.
 */
void
ges_timeline_element_set_inpoint (GESTimelineElement * self,
    GstClockTime inpoint)
{
  GESTimelineElementClass *klass;

  g_return_if_fail (GES_IS_TIMELINE_ELEMENT (self));

  GST_DEBUG_OBJECT (self, "current inpoint: %" GST_TIME_FORMAT
      " new inpoint: %" GST_TIME_FORMAT, GST_TIME_ARGS (inpoint),
      GST_TIME_ARGS (GES_TIMELINE_ELEMENT_INPOINT (self)));

  klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);

  if (klass->set_inpoint) {
    if (klass->set_inpoint (self, inpoint)) {
      self->inpoint = inpoint;
      g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INPOINT]);
    }

    return;
  }

  GST_WARNING_OBJECT (self, "No set_inpoint virtual method implementation"
      " on class %s. Can not set inpoint %" GST_TIME_FORMAT,
      G_OBJECT_CLASS_NAME (klass), GST_TIME_ARGS (inpoint));
}
/**
 * ges_timeline_element_set_duration:
 * @self: a #GESTimelineElement
 * @duration: the duration in #GstClockTime
 *
 * Set the duration of the object
 *
 * Note that if the timeline snap-distance property of the timeline containing
 * @self is set, @self will properly snap to its neighboors.
 */
void
ges_timeline_element_set_duration (GESTimelineElement * self,
    GstClockTime duration)
{
  GESTimelineElementClass *klass;

  g_return_if_fail (GES_IS_TIMELINE_ELEMENT (self));

  klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);

  GST_DEBUG_OBJECT (self, "current duration: %" GST_TIME_FORMAT
      " new duration: %" GST_TIME_FORMAT,
      GST_TIME_ARGS (GES_TIMELINE_ELEMENT_DURATION (self)),
      GST_TIME_ARGS (duration));

  if (klass->set_duration) {
    if (klass->set_duration (self, duration)) {
      self->duration = duration;
      g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_DURATION]);
    }

    return;
  }

  GST_WARNING_OBJECT (self, "No set_duration virtual method implementation"
      " on class %s. Can not set duration %" GST_TIME_FORMAT,
      G_OBJECT_CLASS_NAME (klass), GST_TIME_ARGS (duration));
}
Пример #10
0
Файл: json.c Проект: GNOME/gegl
static void
json_op_class_init (gpointer klass, gpointer class_data)
{
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
  GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
  JsonOpClass *json_op_class = (JsonOpClass *) (klass);
  const gchar *description;
  gchar *name;

  json_op_class->json_root = (JsonObject *) (class_data);

  object_class->set_property = set_property;
  object_class->get_property = get_property;
  object_class->constructor  = constructor;
  object_class->finalize = finalize;

  operation_class->attach = attach;

  json_op_class->properties = g_hash_table_new_full(g_direct_hash, g_direct_equal,
                                                    NULL, (GDestroyNotify)property_target_free);
  install_properties(json_op_class);

  description = metadata_get_property(json_op_class->json_root, "description");
  name = component2geglop(metadata_get_property(json_op_class->json_root, "name"));

  gegl_operation_class_set_keys (operation_class,
    "name",        (name) ? name : g_strdup_printf("json:%s", G_OBJECT_CLASS_NAME(object_class)),
    "categories",  "meta:json",
    "description",  (description) ? description : "",
    NULL);

  g_free(name);
}
Пример #11
0
static gboolean
_expandable_is_expanded(gconstpointer self)
{
  g_error("Bad implementation of expandable->is_expanded() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return FALSE;
}
Пример #12
0
static void
_expandable_build_string(gconstpointer     self,
                         GString          *buffer,
                         CoilStringFormat *format,
                         GError          **error)
{
  g_error("Bad implementation of expandable->build_string() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));
}
Пример #13
0
static void
gst_tag_mux_init (GstTagMux * mux, GstTagMuxClass * mux_class)
{
  GstElementClass *element_klass = GST_ELEMENT_CLASS (mux_class);
  GstPadTemplate *tmpl;

  mux->priv =
      G_TYPE_INSTANCE_GET_PRIVATE (mux, GST_TYPE_TAG_MUX, GstTagMuxPrivate);

  /* pad through which data comes in to the element */
  tmpl = gst_element_class_get_pad_template (element_klass, "sink");
  if (tmpl) {
    mux->priv->sinkpad = gst_pad_new_from_template (tmpl, "sink");
  } else {
    g_warning ("GstTagMux subclass '%s' did not install a %s pad template!\n",
        G_OBJECT_CLASS_NAME (element_klass), "sink");
    mux->priv->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
  }
  gst_pad_set_chain_function (mux->priv->sinkpad,
      GST_DEBUG_FUNCPTR (gst_tag_mux_chain));
  gst_pad_set_event_function (mux->priv->sinkpad,
      GST_DEBUG_FUNCPTR (gst_tag_mux_sink_event));
  gst_element_add_pad (GST_ELEMENT (mux), mux->priv->sinkpad);

  /* pad through which data goes out of the element */
  tmpl = gst_element_class_get_pad_template (element_klass, "src");
  if (tmpl) {
    GstCaps *tmpl_caps = gst_pad_template_get_caps (tmpl);

    mux->priv->srcpad = gst_pad_new_from_template (tmpl, "src");
    gst_pad_use_fixed_caps (mux->priv->srcpad);
    if (tmpl_caps != NULL && gst_caps_is_fixed (tmpl_caps)) {
      gst_pad_set_caps (mux->priv->srcpad, tmpl_caps);
    }
  } else {
    g_warning ("GstTagMux subclass '%s' did not install a %s pad template!\n",
        G_OBJECT_CLASS_NAME (element_klass), "source");
    mux->priv->srcpad = gst_pad_new ("src", GST_PAD_SRC);
  }
  gst_element_add_pad (GST_ELEMENT (mux), mux->priv->srcpad);

  mux->priv->render_start_tag = TRUE;
  mux->priv->render_end_tag = TRUE;
}
Пример #14
0
bool ofxGstRTPServer::on_message(GstMessage * msg){
	// read messages from the pipeline like dropped packages
	switch (GST_MESSAGE_TYPE (msg)) {
	case GST_MESSAGE_ELEMENT:{
		GstObject * messageSrc = GST_MESSAGE_SRC(msg);
		ofLogVerbose(LOG_NAME) << "Got " << GST_MESSAGE_TYPE_NAME(msg) << " message from " << GST_MESSAGE_SRC_NAME(msg);
		ofLogVerbose(LOG_NAME) << "Message source type: " << G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(messageSrc));
		ofLogVerbose(LOG_NAME) << "With structure name: " << gst_structure_get_name(gst_message_get_structure(msg));
		ofLogVerbose(LOG_NAME) << gst_structure_to_string(gst_message_get_structure(msg));
		return true;
	}
	case GST_MESSAGE_QOS:{
		GstObject * messageSrc = GST_MESSAGE_SRC(msg);
		ofLogVerbose(LOG_NAME) << "Got " << GST_MESSAGE_TYPE_NAME(msg) << " message from " << GST_MESSAGE_SRC_NAME(msg);
		ofLogVerbose(LOG_NAME) << "Message source type: " << G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(messageSrc));

		GstFormat format;
		guint64 processed;
		guint64 dropped;
		gst_message_parse_qos_stats(msg,&format,&processed,&dropped);
		ofLogVerbose(LOG_NAME) << "format " << gst_format_get_name(format) << " processed " << processed << " dropped " << dropped;

		gint64 jitter;
		gdouble proportion;
		gint quality;
		gst_message_parse_qos_values(msg,&jitter,&proportion,&quality);
		ofLogVerbose(LOG_NAME) << "jitter " << jitter << " proportion " << proportion << " quality " << quality;

		gboolean live;
		guint64 running_time;
		guint64 stream_time;
		guint64 timestamp;
		guint64 duration;
		gst_message_parse_qos(msg,&live,&running_time,&stream_time,&timestamp,&duration);
		ofLogVerbose(LOG_NAME) << "live stream " << live << " runninng_time " << running_time << " stream_time " << stream_time << " timestamp " << timestamp << " duration " << duration;

		return true;
	}
	default:
		//ofLogVerbose(LOG_NAME) << "Got " << GST_MESSAGE_TYPE_NAME(msg) << " message from " << GST_MESSAGE_SRC_NAME(msg);
		return false;
	}
}
Пример #15
0
static gint
_expandable_equals(gconstpointer self,
                   gconstpointer other,
                   GError     **error)
{
  g_error("Bad implementation of expandable->equals() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return 0;
}
Пример #16
0
static gboolean
_expandable_expand(gconstpointer  self,
                   const GValue **return_value,
                   GError       **error)
{
  g_error("Bad implementation of expandable->expand() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return FALSE;
}
Пример #17
0
static GeglRectangle
get_bounding_box (GeglOperation *self)
{
  GeglRectangle result = { 0, 0, 0, 0 };

  g_warning ("Gegl Source '%s' does not override %s()",
             G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (self)),
             G_STRFUNC);

  return result;
}
Пример #18
0
static void
kms_ice_base_agent_run_agent_default (KmsIceBaseAgent * self)
{
  KmsIceBaseAgentClass *klass =
      KMS_ICE_BASE_AGENT_CLASS (G_OBJECT_GET_CLASS (self));

  if (klass->run_agent == kms_ice_base_agent_run_agent_default) {
    GST_WARNING_OBJECT (self,
        "%s does not reimplement 'run_agent'", G_OBJECT_CLASS_NAME (klass));
  }
}
Пример #19
0
static CoilExpandable *
_expandable_copy(gconstpointer      self,
                 const gchar       *first_property_name,
                 va_list            properties,
                 GError           **error)
{
  g_error("Bad implementation of expandable->copy() in '%s' class.",
          G_OBJECT_CLASS_NAME(self));

  return NULL;
}
Пример #20
0
static void
set_fillstyle(DiaRenderer *self, FillStyle mode)
{
  switch(mode) {
  case FILLSTYLE_SOLID:
    break;
  default:
    g_warning ("%s: Unsupported fill mode specified!",
	       G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (self)));
  }
}
Пример #21
0
    arrow::Status Tell(int64_t *position) const override {
      if (!G_IS_SEEKABLE(output_stream_)) {
        std::string message("[gio-output-stream][tell] "
                            "not seekable output stream: <");
        message += G_OBJECT_CLASS_NAME(G_OBJECT_GET_CLASS(output_stream_));
        message += ">";
        return arrow::Status::NotImplemented(message);
      }

      *position = g_seekable_tell(G_SEEKABLE(output_stream_));
      return arrow::Status::OK();
    }
Пример #22
0
void
kms_webrtc_transport_sink_configure_default (KmsWebrtcTransportSink * self,
    KmsIceBaseAgent * agent, const char *stream_id, guint component_id)
{
  KmsWebrtcTransportSinkClass *klass =
      KMS_WEBRTC_TRANSPORT_SINK_CLASS (G_OBJECT_GET_CLASS (self));

  if (klass->configure == kms_webrtc_transport_sink_configure_default) {
    GST_WARNING_OBJECT (self,
        "%s does not reimplement 'configure'", G_OBJECT_CLASS_NAME (klass));
  }
}
static GList*
fs_rtp_special_source_class_add_blueprint (FsRtpSpecialSourceClass *klass,
    GList *blueprints)
{
  if (klass->add_blueprint)
    return klass->add_blueprint (klass, blueprints);
  else
    GST_CAT_DEBUG (fsrtpconference_disco,
        "Class %s has no add_blueprint function", G_OBJECT_CLASS_NAME(klass));

  return blueprints;
}
Пример #24
0
static void
kms_ice_base_agent_remove_stream_default (KmsIceBaseAgent * self,
    const char *stream_id)
{
  KmsIceBaseAgentClass *klass =
      KMS_ICE_BASE_AGENT_CLASS (G_OBJECT_GET_CLASS (self));

  if (klass->remove_stream == kms_ice_base_agent_remove_stream_default) {
    GST_WARNING_OBJECT (self,
        "%s does not reimplement 'remove_stream'", G_OBJECT_CLASS_NAME (klass));
  }
}
/**
 * ges_timeline_element_copy:
 * @self: The #GESTimelineElement to copy
 * @deep: whether we want to create the elements @self contains or not
 *
 * Copies @self
 *
 * Returns: (transfer floating): The newly create #GESTimelineElement, copied from @self
 */
GESTimelineElement *
ges_timeline_element_copy (GESTimelineElement * self, gboolean deep)
{
  GESAsset *asset;
  GParameter *params;
  GParamSpec **specs;
  GESTimelineElementClass *klass;
  guint n, n_specs, n_params;

  GESTimelineElement *ret = NULL;

  g_return_val_if_fail (GES_IS_TIMELINE_ELEMENT (self), FALSE);

  klass = GES_TIMELINE_ELEMENT_GET_CLASS (self);

  specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (self), &n_specs);
  params = g_new0 (GParameter, n_specs);
  n_params = 0;

  for (n = 0; n < n_specs; ++n) {
    /* We do not want the timeline or the name to be copied */
    if (g_strcmp0 (specs[n]->name, "parent") &&
        g_strcmp0 (specs[n]->name, "timeline") &&
        g_strcmp0 (specs[n]->name, "name") &&
        (specs[n]->flags & G_PARAM_READWRITE) == G_PARAM_READWRITE) {
      params[n_params].name = g_intern_string (specs[n]->name);
      g_value_init (&params[n_params].value, specs[n]->value_type);
      g_object_get_property (G_OBJECT (self), specs[n]->name,
          &params[n_params].value);
      ++n_params;
    }
  }

  ret = g_object_newv (G_OBJECT_TYPE (self), n_params, params);

  g_free (specs);
  g_free (params);


  asset = ges_extractable_get_asset (GES_EXTRACTABLE (self));
  if (asset)
    ges_extractable_set_asset (GES_EXTRACTABLE (ret), asset);
  if (deep) {
    if (klass->deep_copy)
      klass->deep_copy (self, ret);
    else
      GST_WARNING_OBJECT (self, "No deep_copy virtual method implementation"
          " on class %s. Can not finish the copy", G_OBJECT_CLASS_NAME (klass));
  }

  return ret;
}
Пример #26
0
static void
extension_subclass_init (GObjectClass *klass,
                         GType        *exten_types)
{
  guint i;
  guint property_id = 1;

  g_debug ("Initializing class '%s'", G_OBJECT_CLASS_NAME (klass));

  klass->set_property = extension_subclass_set_property;
  klass->get_property = extension_subclass_get_property;

  for (i = 0; exten_types[i] != 0; ++i)
    {
      guint n_props, j;
      gpointer iface_vtable;
      GParamSpec **properties;

      iface_vtable = g_type_default_interface_peek (exten_types[i]);
      properties = g_object_interface_list_properties (iface_vtable, &n_props);

      for (j = 0; j < n_props; ++j, ++property_id)
        {
          const gchar *property_name;

          property_name = g_param_spec_get_name (properties[j]);

          g_object_class_override_property (klass, property_id, property_name);

          g_debug ("Overrided '%s:%s' for '%s' proxy",
                   g_type_name (exten_types[i]), property_name,
                   G_OBJECT_CLASS_NAME (klass));
        }

      g_free (properties);
    }

  g_debug ("Initialized class '%s'", G_OBJECT_CLASS_NAME (klass));
}
static GList*
fs_rtp_special_source_class_negotiation_filter (FsRtpSpecialSourceClass *klass,
    GList *codec_associations)
{
  if (klass->negotiation_filter)
    return klass->negotiation_filter (klass, codec_associations);
  else
    GST_CAT_DEBUG (fsrtpconference_disco,
        "Class %s has no negotiation_filter function",
        G_OBJECT_CLASS_NAME(klass));

  return codec_associations;
}
Пример #28
0
static void
kms_ice_base_agent_add_relay_server_default (KmsIceBaseAgent * self,
    KmsIceRelayServerInfo server_info)
{
  KmsIceBaseAgentClass *klass =
      KMS_ICE_BASE_AGENT_CLASS (G_OBJECT_GET_CLASS (self));

  if (klass->add_relay_server == kms_ice_base_agent_add_relay_server_default) {
    GST_WARNING_OBJECT (self,
        "%s does not reimplement 'add_relay_server'",
        G_OBJECT_CLASS_NAME (klass));
  }
}
static void
    kms_webrtc_base_connection_set_certificate_pem_file_default
    (KmsWebRtcBaseConnection * self, const gchar * pem)
{
  KmsWebRtcBaseConnectionClass *klass =
      KMS_WEBRTC_BASE_CONNECTION_CLASS (G_OBJECT_GET_CLASS (self));

  if (klass->set_certificate_pem_file ==
      kms_webrtc_base_connection_set_certificate_pem_file_default) {
    GST_WARNING_OBJECT (self,
        "%s does not reimplement 'set_certificate_pem_file'",
        G_OBJECT_CLASS_NAME (klass));
  }
}
Пример #30
0
static GdaSet *
__get_statement_delete_params (MidgardDBObjectClass *klass, MidgardConnection *mgd)
{	
	GdaStatement *stmt = klass->dbpriv->get_statement_delete (klass, mgd);
	if (!stmt) {
		g_error ("Failed to get DELETE(UPDATE) GdaStatement and GdaSet (%s)", G_OBJECT_CLASS_NAME (klass));
		return NULL;
	}

	if (klass->dbpriv->uses_workspace && (mgd && MGD_CNC_USES_WORKSPACE (mgd)))
		return klass->dbpriv->_workspace_statement_delete_params;

	return klass->dbpriv->_statement_delete_params;
}