[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: Information request
From:       Tako Schotanus <quintesse () palacio-cristal ! com>
Date:       2006-04-13 9:27:24
Message-ID: 443E197C.2090002 () palacio-cristal ! com
[Download RAW message or body]

Matthew Johnson wrote:

>On Wed, 12 Apr 2006, Thiago Macieira wrote:
>
>  
>
>>>Is it possible for C to do a method call to method "i SomeMethod(i,s)"
>>>to all objects implementing the "org.foo.SomeIface" interface, and
>>>getting replies from all these objects?
>>>      
>>>
>>Not automatically.
>>
>>It could do a bus-search and find all objects in all services that
>>implement that interface, but not only would that be inefficient, it is
>>also not atomic (services could connect and disconnect at any time).
>>
>>    
>>
>You could have A and B reply to a signal from C by calling a method on C
>telling C that they provide org.foo.SomeIface and it can then iterate
>over them.
>
>so you would have
>
>C->* signal
>B->C register
>A->C register
>C->A call method
>C->B call method
>
>the register could be a signal or a method call, depending on how many
>other clients like C there are. A & B could send out a register signal
>when they start, periodically and when requested. All clients could
>watch for these signals and add them to a list to iterate over when they
>want to call the methods.
>
>  
>
The bad thing about this though is that all those aplications need to 
implement your interface which might not be realistic.
They might all implement a specific interface because maybe it's a 
standard (like all IMs implementing .org.freedesktop.IMessenger or 
something) but getting them to implement your IReallyCoolIdea might take 
some convincing. So IMO there are definitely usecases where it would be 
nice if foreach (service impelmenting IMessenger) {} could work.

Cheers,
 -Tako


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic