← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Telephony C++ API

 

Hi Gustavo,

On Wed, Apr 23, 2014 at 10:02 AM, Gustavo Boiko <gustavo.boiko@xxxxxxxxxxxxx
> wrote:

> Hi Felipe
>
> On Wed, Apr 23, 2014 at 12:15 AM, Felipe De La Puente <
> fdelapuente@xxxxxxxxx> wrote:
>
>> Hi,
>> I'm trying Ubuntu Touch, and wanted to get my hands on messaging.
>> Reviewed the code of messaging-app and dialer-app and to my surprise the
>> communication with telepathy is always handled on the QML side of the app.
>>
>
> That's not entirely true. Most of the communication with the telepathy
> infrastructure is done through some C++ QML wrappers and with the help of
> some C++ daemons.
> The code for this is all in this branch:
> https://code.launchpad.net/~phablet-team/telephony-service/trunk
>

Well, may be I used the wrong words, but I think you got the idea. Only the
QML wrappers are exported at the moment. Thanks for pointing out the code
of telephony-service.


>
>
>>
>> I want to keep QML strictly for UI, and write the functional code on the
>> C++ side.
>>
>
> Most of the code you see in the QML is to provide the UI representing the
> current state of the telepathy accounts, but  there is always the need to
> invoke the C++ code from the QML, and that's basically what you see there.
> Of course there might be places where this could have been better divided,
> so if you have suggestions and/or patches, we would be glad to review and
> apply them.
>
>
As soon as I get my hands on, and have something interesting I'll try to
push it back. First I need to understand the architecture and materialize
my ideas.


>
>> Are there any plans on having C++ API for the Telephony Service soon?
>>
>
> The API that is there today is already C++, but mostly meant to be used
> from the QML side. It is not declared public yet (we are still finishing
> implementing all the required telephony features), but I think at some
> point it will, just not sure when this is going to happen.
>

Great!  Hope it's sooner than later.


>
>
>> Should I try to communicate with telepathy directly by using its own API?
>>
>
> That depends on what you are trying to achieve. If you want to add support
> for a new service/protocol, that's probably the way to go, but if you want
> to write a different UI for the telephony stack, you can probably reuse the
> QML bindings we already have, but just be aware that as they are not
> declared as public APIs yet, they are very likely to change in the future.
>

I would like to try an integrated approach to messaging, where all my
accounts can be handled with some sort of customizable priorities to decide
which protocol/account has precedence when sending a message to a contact.
This is the long term goal. I think the same approach could be used for
voice/video calls.


>
> If you need help understanding how all of this is implemented in Ubuntu
> Touch, you can find me and Tiago on the Ubuntu Touch IRC channels on
> freenode (I'm boiko on #ubuntu-touch and #ubuntu-app-devel)
>

Thanks!


>
> Cheers
>
> Boiko
>

Best Regards,
Felipe.

References