maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   HELP: Accessing data trough C++ API (Maemo) (https://talk.maemo.org/showthread.php?t=71247)

molcaobarman 2011-03-20 11:34

HELP: Accessing data trough C++ API (Maemo)
 
Hi.

I would like to ask for some serious help from senior programmers :)
I've been digging info about connectivity API for Maemo, but I can't find solid examples and how stuff works. Yes, I'm quite new in C++, but I would like to write something like sync and backup program (it's my student work).

What I need to know:

- what API can I use for connection to N900 (USB - like Nokia suite, WiFi, BT) ?

- are there more choices (C, C++ API or even Qt, different libs?)

- what will be best ways for accessing various data in N900?
Data: SMS, mails, contacts, files ?

I'm begging for some detailed info (code examples, ways of data exchange, etc.) :)

Thanks

uvatbc 2011-03-20 16:48

Re: HELP: Accessing data trough C++ API (Maemo)
 
Quote:

Originally Posted by molcaobarman (Post 971613)
Hi.

I would like to ask for some serious help from senior programmers :)
I've been digging info about connectivity API for Maemo, but I can't find solid examples and how stuff works. Yes, I'm quite new in C++, but I would like to write something like sync and backup program (it's my student work).

What I need to know:

- what API can I use for connection to N900 (USB - like Nokia suite, WiFi, BT) ?

I don't know enough about USB or BT connections, but if you're doing Wifi, then it will be like any other client/server or peer-to-peer utility: sockets.
Qt provides a tcp server convenience class and a tcp socket class to ease development.
There is a UDP class as well as a generic socket class.
Some examples of using these classes: Fortune Server Example, Fortune Client Example, Threaded Fortune Server Example, Blocking Fortune Client Example, Loopback Example, Torrent Example.

Shameless plug: You can also consider using mosquitto. It works on many platforms and I've recompiled and packaged it for Maemo.
My sig has the relevant links.

Quote:

Originally Posted by molcaobarman (Post 971613)
- are there more choices (C, C++ API or even Qt, different libs?)

Maemo is a full fledged Linux. You can make programs using libc, boost, Qt, python, and even Java (using IcedTea).

Quote:

Originally Posted by molcaobarman (Post 971613)
- what will be best ways for accessing various data in N900?
Data: SMS, mails, contacts, files ?

Qt Mobility has a bunch of classes to access mail, texts and contacts.

Examples: Sample Phonebook, Contacts API Usage

The reason I'm pushing Qt so much is that it is really quite easy to start with, and there are even python bindings for it. It is cross platform so if designed correctly, you can have one code base for both ends of your data connection.

Quote:

Originally Posted by molcaobarman (Post 971613)
I'm begging for some detailed info (code examples, ways of data exchange, etc.) :)

Thanks

Hope this helps.


All times are GMT. The time now is 16:30.

vBulletin® Version 3.8.8