From: "David Stockwell" <dstockwell@frequency-one.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: [Bluez-devel] One more suggestion regarding Agent
Date: Fri, 4 Jul 2008 17:50:11 -0500 [thread overview]
Message-ID: <066701c8de28$51a90a70$6701a8c0@freqonedev> (raw)
This is also based on my previous experimentation.
There may be a valid use-case to allow for the Agent to be a separate
process. However, there needs to be a way to designate the BusName of
the connection from the other Agent process to the System bus.
For RegisterAgent and CreatePairedDevice, the syntax of the Object Path
is simply "/net/frequencyone/authorize", which defaults to an object in
the same process and using the process'es connection to the system bus.
I thought that one might incorporate the Bus Name/connection name into
the Object Path. For example, one might say:
"net.frequencyone:/net/frequencyone/authorize", which would point the
bus name to "net.frequencyone", and the object would be attached to that
"well-known name" (i.e., "net.frequencyone").
Alternatively, one might enter:
":1.57:/net/frequencyone/authorize", which would reference the unique
connection name and the object path. This would raise a problem with
passing the current unique connection name from the agent to the
application. Unless there was some way to search the System bus for
connections providing a given Object Path, or the unique name was shared
via a pipe or shared memory, this would probably not be a great
approach, but would still be within the realm of possibility.
However, in either case, the fact remains that the alternative formats
do not confirm to the standard for a DBUS_TYPE_OBJECT_PATH, or its Glib
binding version: DBUS_TYPE_G_OBJECT_PATH.
If it appears that this is a desirable added functionality (providing
for the Agent as an external process), we might provide for it by
additional definitions for the RegisterAgent and CreatePairedDevice
methods of Adapter. For example:
static GDBusMethodTable adapter_methods[] = {
...
{ "CreatePairedDevice", "sos", "o", create_paired_device,
G_DBUS_METHOD_FLAG_ASYNC},
{ "CreatePairedDevice", "soss", "o", create_paired_device_ext,
G_DBUS_METHOD_FLAG_ASYNC},
...
{ "RegisterAgent", "os", "", register_agent },
{ "RegisterAgent", "oss", "o", register_agent_ext},
...
}
A proxy call to call the RegisterAgent method might look like the
following:
dbus_g_proxy_call(dHciObj, "RegisterAgent", &gError,
DBUS_TYPE_G_OBJECT_PATH, "/net/frequencyone/authorize,
G_TYPE_STRING, "NoInputOutput",
G_TYPE_STRING, "net.frequencyone",
G_TYPE_INVALID,
G_TYPE_INVALID)
In the unique connection name case, it might be:
dbus_g_proxy_call(dHciObj, "RegisterAgent", &gError,
DBUS_TYPE_G_OBJECT_PATH, "/net/frequencyone/authorize,
G_TYPE_STRING, "NoInputOutput",
G_TYPE_STRING, ":1.57",
G_TYPE_INVALID,
G_TYPE_INVALID)
Of course, if the Agent code is registered and contained within the
current process, the call would remain:
dbus_g_proxy_call(dHciObj, "RegisterAgent", &gError,
DBUS_TYPE_G_OBJECT_PATH, "/net/frequencyone/authorize,
G_TYPE_STRING, "NoInputOutput",
G_TYPE_INVALID,
G_TYPE_INVALID)
Any comments, including the basic questions around whether this should
be done at all?
David Stockwell
Frequency One
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next reply other threads:[~2008-07-04 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-04 22:50 David Stockwell [this message]
2008-07-05 17:03 ` [Bluez-devel] One more suggestion regarding Agent Marcel Holtmann
2008-07-05 23:15 ` [Bluez-devel] Adapter.RegisterAgent David Stockwell
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='066701c8de28$51a90a70$6701a8c0@freqonedev' \
--to=dstockwell@frequency-one.com \
--cc=bluez-devel@lists.sourceforge.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