Querying Collections from dbus

Maximilian Kossick maximilian.kossick at googlemail.com
Fri Feb 20 18:04:58 CET 2009


On Fri, Feb 20, 2009 at 4:04 PM, Ian Monroe <ian.monroe at gmail.com> wrote:
> On Fri, Feb 20, 2009 at 8:46 AM, Jeff Mitchell <mitchell at kde.org> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Ian Monroe wrote:
>>> On Thu, Feb 19, 2009 at 6:35 AM, Jeff Mitchell <mitchell at kde.org> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Maximilian Kossick wrote:
>>>>> In Amarok 1.x series external applications depended on Amarok's
>>>>> database schema. At least one popular application broke when a major
>>>>> update to the schema occured. External applications should access
>>>>> official interfaces which are (hopefully) designed to stay backwards
>>>>> compatible. And there's the script console for debugging purposes.
>>>>>
>>>>> On Wed, Feb 18, 2009 at 12:13 PM, Casey Link <unnamedrambler at gmail.com> wrote:
>>>>>>> A simple SQL pass-through method is a really bad idea imo.
>>>>>> Any particular reason?
>>>> Also, a malicious script that does a massive DELETE or even DROP.
>>>>
>>>> Using something like an XML schema that Max suggested, we could filter
>>>> out dangerous commands if we felt it a good idea.]
>>>
>>> A malicious script could just delete your home directory rather then
>>> run some D-Bus commands, lol. :)
>>
>> Fair enough.  But there is also the case of something that is
>> accidentally malicious -- i.e. a script with a DELETE that has improper
>> syntax.  :-)
>
> Well yea I think we should provide a QueryMaker api. Raw SQL access isn't great.
>
So we have the following options:

scripts:
-provide a (possibly simplfied) QueryMaker API to scripts

external applications/D-Bus:
-provide a dbus method that takes a query based on SQL syntax
-provide a dbus method that takes a query  as XML


More information about the Amarok-devel mailing list