From: Bastien Nocera <hadess@hadess.net>
To: Peter Kornatowski <pkorn@gmx.net>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: error in setting speakergain in own application
Date: Wed, 02 Sep 2009 15:37:59 +0100 [thread overview]
Message-ID: <1251902279.3326.1413.camel@localhost.localdomain> (raw)
In-Reply-To: <20090902115213.61720@gmx.net>
On Wed, 2009-09-02 at 13:52 +0200, Peter Kornatowski wrote:
> Hi,
>
> I have a linux application where i do some stuff with bluez (4.50) over dbus. I have 3 headsets with which I test (Jabra BT530, Sora B-Speech, official PS3-BT headset) and on all I get the same behaviour/error.
>
> I would like to set the speakergain of a headset from my linux-app. I tried two methods:
>
> a) call the method "SetProperty":
>
> GValue value;
> value.g_type = 0; // also tried: value = { 0 };
> guint16 ugain = (guint16)gain; // also tried: guint ugain = (guint)gain;
> g_value_init(&value, G_TYPE_UINT);
> g_value_set_uint(&value, ugain);
> dbus_g_proxy_call(proxy, "SetProperty", &error, G_TYPE_STRING,
> "SpeakerGain", G_TYPE_VALUE, &value, G_TYPE_INVALID, G_TYPE_INVALID);
This would work (and you don't need to use a GValue, the call will take
care of marshalling the value to the proper type:
dbus_g_proxy_call(proxy, "SetProperty", &error, G_TYPE_STRING,
"SpeakerGain", G_TYPE_UINT, ugain, G_TYPE_INVALID, G_TYPE_INVALID);
> g_value_unset(&value);
Cheers
next prev parent reply other threads:[~2009-09-02 14:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 11:52 error in setting speakergain in own application Peter Kornatowski
2009-09-02 14:37 ` Bastien Nocera [this message]
2009-09-02 18:11 ` Peter Kornatowski
2009-09-02 18:22 ` Bastien Nocera
[not found] <7.0.1.0.2.20090903112603.0220ed58@gmx.net>
2009-09-03 14:38 ` Peter Kornatowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1251902279.3326.1413.camel@localhost.localdomain \
--to=hadess@hadess.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=pkorn@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox