static GObject*
constructor (GType type,
             guint n_construct_params,
             GObjectConstructParam *construct_params)
{
	GObject *object;
	GObjectClass *klass;
	NMDeviceOlpcMesh *self;
	NMDeviceWifiCapabilities caps;

	klass = G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class);
	object = klass->constructor (type, n_construct_params, construct_params);
	if (!object)
		return NULL;

	self = NM_DEVICE_OLPC_MESH (object);

	if (!nm_platform_wifi_get_capabilities (nm_device_get_ifindex (NM_DEVICE (self)), &caps)) {
		_LOGW (LOGD_HW | LOGD_OLPC, "failed to initialize WiFi driver");
		g_object_unref (object);
		return NULL;
	}

	g_signal_connect (nm_manager_get (), "device-added", G_CALLBACK (device_added_cb), self);
	g_signal_connect (nm_manager_get (), "device-removed", G_CALLBACK (device_removed_cb), self);

	/* shorter timeout for mesh connectivity */
	nm_device_set_dhcp_timeout (NM_DEVICE (self), 20);
	return object;
}
示例#2
0
static void g_sql_result_dispose(GObject * gobj)
{
	GSQLResult * obj = (GSQLResult*)gobj;
	GObjectClass* klass = G_OBJECT_CLASS(g_sql_result_parent_class);

	g_signal_emit_by_name(obj,"destory");

	if(klass->dispose)
		klass->dispose(gobj);
}
static void
stereosplit_finalize (GstGLStereoSplit * self)
{
  GObjectClass *klass = G_OBJECT_CLASS (gst_gl_stereosplit_parent_class);

  if (self->viewconvert)
    gst_object_replace ((GstObject **) & self->viewconvert, NULL);

  klass->finalize ((GObject *) (self));
}
示例#4
0
static void
crank_composite_finalize (GObject *object)
{
  GObjectClass *pc = crank_composite_parent_class;
  CrankComposite *self = (CrankComposite*)object;
  CrankCompositePrivate *priv = crank_composite_get_instance_private (self);

  g_array_unref (priv->data);

  pc->finalize (object);
}
示例#5
0
static void g_sql_result_finalize(GObject * gobj)
{
	GSQLResult * obj = (GSQLResult*)gobj;
	GObjectClass* klass = G_OBJECT_CLASS(g_sql_result_parent_class);

	g_ptr_array_free(obj->colum,TRUE);

	obj->freerows(obj);
	g_signal_emit_by_name(gobj,"destory");
	if(klass->finalize)
		klass->finalize(gobj);
}
示例#6
0
static void
tr_core_dispose( GObject * obj )
{
    TrCore * core = TR_CORE( obj );

    if( !isDisposed( core ) )
    {
        GObjectClass * parent;

        core->priv = NULL;

        parent = g_type_class_peek( g_type_parent( TR_CORE_TYPE ) );
        parent->dispose( obj );
    }
}
示例#7
0
static void
clutter_settings_dispatch_properties_changed (GObject     *gobject,
                                              guint        n_pspecs,
                                              GParamSpec **pspecs)
{
  ClutterSettings *self = CLUTTER_SETTINGS (gobject);
  GObjectClass *klass;

  /* chain up to emit ::notify */
  klass = G_OBJECT_CLASS (clutter_settings_parent_class);
  klass->dispatch_properties_changed (gobject, n_pspecs, pspecs);

  /* emit settings-changed just once for multiple properties */
  if (self->backend != NULL)
    g_signal_emit_by_name (self->backend, "settings-changed");
}
static void
gabble_jingle_factory_constructed (GObject *obj)
{
  GabbleJingleFactory *self = GABBLE_JINGLE_FACTORY (obj);
  GObjectClass *parent = G_OBJECT_CLASS (gabble_jingle_factory_parent_class);

  if (parent->constructed != NULL)
    parent->constructed (obj);

  attach_to_wocky_session (self);

  jingle_share_register (self);
  jingle_media_rtp_register (self);
  jingle_transport_google_register (self);
  jingle_transport_rawudp_register (self);
  jingle_transport_iceudp_register (self);
}
示例#9
0
static GObject *
constructor (GType type, guint n_props, GObjectConstructParam *props)
{
    GObject *object;

    if (!the_builder) {
        GObjectClass *klass;

        klass = G_OBJECT_CLASS(cut_ui_factory_builder_parent_class);
        object = klass->constructor(type, n_props, props);
        the_builder = CUT_UI_FACTORY_BUILDER(object);
    } else {
        object = g_object_ref(the_builder);
    }

    return object;
}
示例#10
0
static GObject *
constructor (GType type, guint n_props, GObjectConstructParam *props)
{
    GObject *object;
    GObjectClass *klass;
    GCutGLibEventLoop *loop;
    GCutGLibEventLoopPrivate *priv;

    klass = G_OBJECT_CLASS(gcut_glib_event_loop_parent_class);
    object = klass->constructor(type, n_props, props);

    loop = GCUT_GLIB_EVENT_LOOP(object);
    priv = GCUT_GLIB_EVENT_LOOP_GET_PRIVATE(loop);
    priv->loop = g_main_loop_new(priv->context, FALSE);

    return object;
}
示例#11
0
static void
complete_finalize (GObject *object)
{
	GObjectClass *parent;
	GnmComplete *complete = GNM_COMPLETE (object);

	if (complete->idle_tag) {
		g_source_remove (complete->idle_tag);
		complete->idle_tag = 0;
	}

	g_free (complete->text);
	complete->text = NULL;

	parent = g_type_class_peek (PARENT_TYPE);
	parent->finalize (object);
}
static void eek_preview_get_property( GObject *object,
                                      guint property_id,
                                      GValue *value,
                                      GParamSpec *pspec)
{
    GObjectClass* gobjClass = G_OBJECT_CLASS(parent_class);
    switch ( property_id ) {
        case FOCUS_PROP_ID:
        {
            EekPreview* preview = EEK_PREVIEW( object );
            g_value_set_boolean( value, preview->_takesFocus );
        }
        break;
        default:
        {
            if ( gobjClass->get_property ) {
                gobjClass->get_property( object, property_id, value, pspec );
            }
        }
    }
}
示例#13
0
static void
crank_composite_dispose (GObject *object)
{
  GObjectClass *pc = crank_composite_parent_class;
  CrankComposite *self = (CrankComposite*)object;
  CrankCompositePrivate *priv = crank_composite_get_instance_private (self);

  guint i;

  for (i = priv->data->len; 0 < i;)
    {
      Percompositable *percompositable;
      CrankCompositable *compositable;
      GError *merr = NULL;
      i--;

      percompositable = & g_array_index (priv->data, Percompositable, i);
      compositable = percompositable->compositable;

      crank_composite_remove_compositable (self, compositable, &merr);

      if (merr != NULL)
        {
          g_warning ("crank_composite_dispose: Error upon removal:\n"
                     "  %s@%p : %s@%p\n"
                     "  %s",
                     G_OBJECT_TYPE_NAME (self), self,
                     G_OBJECT_TYPE_NAME (percompositable), compositable,
                     merr->message);
          g_clear_error (&merr);
        }
    }

  g_assert (priv->data->len == 0);

  pc->dispose (object);
}
示例#14
0
static GObject*
constructor (GType type,
             guint n_construct_params,
             GObjectConstructParam *construct_params)
{
	GObject *object;
	GObjectClass *klass;
	NMDeviceOlpcMesh *self;
	NMDeviceOlpcMeshPrivate *priv;

	klass = G_OBJECT_CLASS (nm_device_olpc_mesh_parent_class);
	object = klass->constructor (type, n_construct_params, construct_params);
	if (!object)
		return NULL;

	self = NM_DEVICE_OLPC_MESH (object);
	priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self);

	nm_log_dbg (LOGD_HW | LOGD_OLPC_MESH, "(%s): kernel ifindex %d",
	            nm_device_get_iface (NM_DEVICE (self)),
	            nm_device_get_ifindex (NM_DEVICE (self)));

	priv->wifi_data = wifi_utils_init (nm_device_get_iface (NM_DEVICE (self)),
	                                   nm_device_get_ifindex (NM_DEVICE (self)),
	                                   FALSE);
	if (priv->wifi_data == NULL) {
		nm_log_warn (LOGD_HW | LOGD_OLPC_MESH, "(%s): failed to initialize WiFi driver",
		             nm_device_get_iface (NM_DEVICE (self)));
		g_object_unref (object);
		return NULL;
	}

	/* shorter timeout for mesh connectivity */
	nm_device_set_dhcp_timeout (NM_DEVICE (self), 20);
	return object;
}