maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   telepathy-qt4 Observer client example (https://talk.maemo.org/showthread.php?t=57458)

uvatbc 2010-06-30 09:13

telepathy-qt4 Observer client example
 
1 Attachment(s)
Hi all!
As part of my experiments with telepathy and attempting to "auto-accept" an incoming phone call, I made a series of test applications.

I started with an Approver client app - which worked on desktop Linux, but did not on n900.
Then I used the observer client class and it worked well for desktop Linux as well as n900.

This example app:
1. Presents a minimal UI by which you can select what channel types to observe.
2. Observes the channels that you selected and dumps out info to (an unreadable) text box and the console.

Now, how do I find out more info about the channel and "auto-accept" an incoming call?

The key callback is
Code:

void Tp::AbstractClientObserver::observeChannels(
const MethodInvocationContextPtr<> &        context,
const AccountPtr &        account,
const ConnectionPtr &        connection,
const QList< ChannelPtr > &        channels,
const ChannelDispatchOperationPtr &        dispatchOperation,
const QList< ChannelRequestPtr > &        requestsSatisfied,
const QVariantMap &        observerInfo       
);

What switch do I need to flip to achieve "auto-accept" ?
Also, when I try to get more information from the account object, it claims to be "not ready".

Pointers / hints / whack with a clue stick welcome.
Thanks!

PS: Code attached for reference

epage 2010-06-30 10:42

Re: telepathy-qt4 Observer client example
 
What I did was
  • Observe for new channels
  • Check if it is StreamedMedia
  • Check various properties to determine if its inbound
  • If it is, call AddMembers directly on the Channel

See
https://garage.maemo.org/plugins/ggi...6e96643ac11c93

I think the issue for me was I was telling the Connection Manager to accept the call but the Client was out of the loop. I think we wold need to tell the client to tell the CM to accept the call and am unsure how to do that.


All times are GMT. The time now is 04:13.

vBulletin® Version 3.8.8