Multiple-in-One Objects with Python
John (J5) Palmieri
johnp at redhat.com
Sun Sep 25 22:12:59 PDT 2005
In the old bindings we used to have a concept of Object Trees (one
object handling a all sub objects). I don't know if this is the best
way to go in the python bindings. What might be better is to allow the
ability to register a class for all sub objects in an object path and
then have the object instantiated when that object is called. This
would be a better paradigm if we ever add state to the bus. Life cycle
would be a problem that would have to be addressed though. Patches are
welcome as I won't have much time to work on this.
On Sat, 2005-09-24 at 14:54 -0700, Theodore Reed wrote:
> Hello!
>
> I'm developing a replacement for mserv, utilizing python, dbus,
> gstreamer and sqlobject. Work is progressing steadily (although
> slowly... full-time job and all that), but now I have a question that
> should be answered before I move much further with the database stuff.
>
> As it stands, I have a single DBus object which allows for simple
> manipulation of the player. I also plan to have another object that
> allows queries and manipulation of the database. I had the idea to
> allow access to database objects as (for
> example) /us/surreality/Tunara/Database/SongX, where X is the id of
> the song in the database. It would, however, be considerably wasteful
> to have a Python object around for each song in the database, which
> leads me to ask the following question:
>
> Is it possible, with dbus, to implement one object which acts as
> multiple objects, and the exact object is known when the method is
> called? If not, is this planned? I can't imagine the Gnumeric guys
> would want to implement a separate object for each cell in a
> spreadsheet either. It seems that it should be possible, on some
> level, but it appears that there's no way to do it with the Python
> bindings.
>
> Thanks in advance.
>
> -- Ted Reed
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
--
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus
mailing list