Git Product home page Git Product logo

Comments (2)

cocagne avatar cocagne commented on August 27, 2024

In order to call remote methods, an interface description is required.
Otherwise, the client code wouldn't know how to encode the arguments. The
interface can either be introspected on-the-fly or provided explicitly as
you're doing in your working code. Generally speaking, it's better to
provide an explicit interface as introspection isn't required by the DBus
specification and it only works if the object in question is online at the
time of the query. It's good for development and testing but I wouldn't
recommend relying upon it in production.

As to the API documentation, there isn't a well-documented API separate
from the tutorial. The docstrings are all there in the code but I never
figured out how to generate a separate doc with Lore. It might "just work"
but I haven't tried it. I recommend just browsing the modules on Github
directly. It's not quite as convenient as a standalone document but the
docstrings stick out pretty well and it's not a particularly large codebase.

Tom

On Sat, Feb 21, 2015 at 5:37 PM, funky12 [email protected] wrote:

Hi,

Is it mandatory to specify "Method" in interface explicitly?

=== Not working===
I tried following to call a remote method I wrote "ActivateConnection",
passed the argument using following piece of code:
Note I have not specified interface here

dialer_iface = DBusInterface(DIALUP_INTFACE)
self.dobj= yield self.mdmModel.bus.getRemoteObject(DIALUP_SERVICE,
DIALUP_OBJECT,dialer_iface)
self.path = yield
self.dobj.callRemote('ActivateConnection',self.mdmModel.device_opath,
timeout=80)
--> This gives an error that Remote Object doesnt have ActivateConnection
in any of interfaces --->

=== working===
Then I tried explicitly specifying the method in interface

dialer_iface = DBusInterface(DIALUP_INTFACE,
Method('ActivateConnection', 'o',returns=''))
self.dobj= yield self.mdmModel.bus.getRemoteObject(DIALUP_SERVICE,
DIALUP_OBJECT,dialer_iface)
self.path = yield
self.dobj.callRemote('ActivateConnection',self.mdmModel.device_opath,
timeout=80)

It works fine.. here, am I missing something?

  • Also do you have API documentation for all public API ?
  • Since from tutorial its tough to find all API definition and
    corresponding options


Reply to this email directly or view it on GitHub
#25.

from txdbus.

funky12 avatar funky12 commented on August 27, 2024

Thanks Tom, Yes now I am always using explicit definition. Will go through the code and if I comeup with a documentation, would try to share on the blog and give u the link

from txdbus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.