Comments (2)
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 heredialer_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 interfacedialer_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.
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)
- Tags for versions after 1.0.6 ? HOT 2
- Native test (ocasionally) fails HOT 2
- Test test_get_all_properties fails with given PYTHONHASHSEED HOT 4
- Skip tests.test_marshal.SigFromPyTests.test_long on Python 3 HOT 1
- Fix invalid name "pn" in txdbus/router.py:Rule.match HOT 5
- Add code linter to CI infrastructure HOT 1
- Create a new release on PyPI: 1.1.0 HOT 25
- string vs bytes type checking/handling HOT 1
- Py 3 does not have a long type HOT 2
- Main example is not Py2/3 safe HOT 6
- Roundtrip tests between different Py versions HOT 3
- Make sure all examples work with all python versions HOT 2
- Confirm integer marhsalling/unmarshalling HOT 2
- How to handle DBus structure on the receiver side HOT 2
- Missing 1.1.0 release HOT 1
- ValueError is raised when annotated functions are used HOT 2
- Add txdbus.__version__
- Add support for `bytes`? HOT 1
- TooManyOpenFiles
- is this repository still maintained? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from txdbus.