Active Topics

 


Reply
Thread Tools
Posts: 26 | Thanked: 1 time | Joined on Oct 2010
#1
I know this was solved here a few times, but I really didn't find, what I need.

We are working on a new application, it has to be in C++ and it has to use Qt (it's not like I complain :3), so I can not use python solution. Our application needs to know when someone calls, when it's received, when it's refused, when call is started from users side and when it ends. And it have to work under Maemo and also under MeeGo. When I wrote "call" I mean "phone call", like in N900. I found that I should use QtDBus, Dbus or telepathy-ring, but I was unable to find any example nor tutorial.

So, do anyone know about this? Thanks in advance

Last edited by Laethnes; 2011-04-29 at 09:01.
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#2
I'm not going to be much help as i'm still at work but...

You need to find the dbus command to identify when the phone is being called.
Then look for a C++ Dbus call ( C example here - http://people.collabora.co.uk/~tthur...tle/sand.c.txt )

Translate your dbus call into the code
(But yes QtDbus will work - you just need to find the dbus commands!)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 

The Following 2 Users Say Thank You to noobmonkey For This Useful Post:
bonapart's Avatar
Posts: 565 | Thanked: 816 times | Joined on Sep 2010 @ Nevinnomyssk
#3
QDBusConnection::systemBus().connect(QString(), "/com/nokia/csd/call", "com.nokia.csd.Call", "Coming", this, SLOT(callEvent(QString,QString)));
 

The Following 3 Users Say Thank You to bonapart For This Useful Post:
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#4
Originally Posted by Laethnes View Post
I know this was solved here a few times, but I really didn't find, what I need.

We are working on a new application, it has to be in C++ and it has to use Qt (it's not like I complain :3), so I can not use python solution. Our application needs to know when someone calls, when it's received, when it's refused, when call is started from users side and when it ends. And it have to work under Maemo and also under MeeGo. When I wrote "call" I mean "phone call", like in N900. I found that I should use QtDBus, Dbus or telepathy-ring, but I was unable to find any example nor tutorial.

So, do anyone know about this? Thanks in advance
You will need to write an telepathy observer class.
I have used QT and telepathy-qt4 in my code.
My Observer class is derived from the telepathy-qt4 Abstract Observer class.

The function of interest is Tp::AbstractClientObserver:: observeChannels, which you need to derive.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.

Last edited by uvatbc; 2010-10-21 at 17:31. Reason: Remove spurious smiley
 

The Following 2 Users Say Thank You to uvatbc For This Useful Post:
Posts: 26 | Thanked: 1 time | Joined on Oct 2010
#5
Yay, thank you very much!

It looks that QtDBus is exactly what we need and looks also simplest. (I guess I was little confused with using dbus commands with QtDBus.)

If it won't work, I'll look at the others, but I would like to use simplest solution :3.

But I have one more question; do you know some reference, list of dbus commands? I tried Google, found many about SMS, making calls, setting profiles etc., but I also need detect when outgoing call occures and when call (in and also out) ends.

Thank you very much for your help
 
Posts: 883 | Thanked: 980 times | Joined on Jul 2007 @ Bern, Switzerland
#6
Take a look at my Recaller sourcecode (even if it is in Python); I listen to most of the commands you're interested in.
You could also use MDbus2 or D-Feet and observe the D-Bus while making some calls, either install locally or do like this.
__________________
-Tom (N900, N810, N800)

"the idea of truly having a computer in your pocket just moved a big step closer."
 

The Following 3 Users Say Thank You to twaelti For This Useful Post:
Posts: 26 | Thanked: 1 time | Joined on Oct 2010
#7
Yay, thank you very much, there is everything we need... I hope :3.
 
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#8
MeeGo isn't using telepathy-ring, so I think you may have to use a different DBus path for it.
 

The Following 2 Users Say Thank You to MohammadAG For This Useful Post:
benlau's Avatar
Posts: 135 | Thanked: 375 times | Joined on Mar 2010 @ Hong Kong
#9
Originally Posted by Laethnes View Post
Yay, thank you very much!

It looks that QtDBus is exactly what we need and looks also simplest. (I guess I was little confused with using dbus commands with QtDBus.)

If it won't work, I'll look at the others, but I would like to use simplest solution :3.

But I have one more question; do you know some reference, list of dbus commands? I tried Google, found many about SMS, making calls, setting profiles etc., but I also need detect when outgoing call occures and when call (in and also out) ends.

Thank you very much for your help
Code:
dbus-send --print-reply --dest=com.nokia.csd.Call /com org.freedesktop.DBus.Introspectable.Introspect
It will show the interface available of the object. Change the path (the /com) will show more information.
__________________
Qt Ambassador | Nokia Certified Qt Specialist
PenPen SketchBook |
FrontView - 0.2 is released! | DQuest
Status: Now working on GTD software
 

The Following 2 Users Say Thank You to benlau For This Useful Post:
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#10
Originally Posted by MohammadAG View Post
MeeGo isn't using telepathy-ring, so I think you may have to use a different DBus path for it.
I didn't understand: Do you mean "com.nokia.csd.Call" will no longer be present in Meego or are you saying Meego will no longer use a telepathy CM for GSM calls?
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:37.