コード例 #1
0
ファイル: call-volume.c プロジェクト: dzemskov/ofono
static int ril_call_volume_probe(struct ofono_call_volume *cv,
					unsigned int vendor, void *data)
{
	GRil *ril = data;
	struct cv_data *cvd;

	cvd = g_new0(struct cv_data, 1);
	if (cvd == NULL)
		return -ENOMEM;

	cvd->ril = g_ril_clone(ril);
	cvd->vendor = vendor;

	ofono_call_volume_set_data(cv, cvd);

	/*
	 * ofono_call_volume_register() needs to be called after
	 * the driver has been set in ofono_call_volume_create(),
	 * which calls this function.  Most other drivers make
	 * some kind of capabilities query to the modem, and then
	 * call register in the callback; we use an idle event instead.
	 */
	g_idle_add(ril_delayed_register, cv);

	return 0;
}
コード例 #2
0
ファイル: call-volume.c プロジェクト: yongsu/oFono
static void hfp_call_volume_remove(struct ofono_call_volume *cv)
{
	struct cv_data *vd = ofono_call_volume_get_data(cv);

	ofono_call_volume_set_data(cv, NULL);

	g_free(vd);
}
コード例 #3
0
ファイル: call-volume.c プロジェクト: dzemskov/ofono
static void ril_call_volume_remove(struct ofono_call_volume *cv)
{
	struct cv_data *cvd = ofono_call_volume_get_data(cv);

	ofono_call_volume_set_data(cv, NULL);

	g_ril_unref(cvd->ril);
	g_free(cvd);
}
コード例 #4
0
ファイル: call-volume.c プロジェクト: yongsu/oFono
static int hfp_call_volume_probe(struct ofono_call_volume *cv,
					unsigned int vendor, void *data)
{
	struct hfp_data *d = data;
	struct cv_data *vd;

	DBG("");
	vd = g_new0(struct cv_data, 1);
	vd->chat = d->chat;

	ofono_call_volume_set_data(cv, vd);

	hfp_call_volume_initialized(cv);

	return 0;
}