
Maemo Training. Day 2
So, Maemo training, held as part of the second Maemo conference. Second day.
An overview of the first day can be found here: http://habrahabr.ru/blogs/nokia/89046/ .
Summary of the second day:
The second day was shorter than the first hour by 3. I will try to describe in an impartial way, and give my assessment in conclusion.
The report is essentially overview and introductory. The following topics were addressed:
It was told what exactly D-Bus is, why it is needed and what happens. It has also been repeatedly mentioned that it is all of itself low-level and should not be used directly (for me, the duck is slightly exaggerated, but oh well).
The topic about D-Bus smoothly flowed into a small overview of the high-level wrapper over libdbus - LibOSSO.

In fact, yes, the add-in is quite high-level, but everyone spoils the long, almost identical naming of macros and methods (in general and not only in LibOSSO like that). In one example, the lines did not even fit on the slide :)
The last part of the report was the largest. They talked about LibConIc - a library for connecting to the network.
Maybe she really is a lot:
That is, in fact, there is everything that is needed and nothing more. But this library is not thread safe, its code must be executed in the main thread.
Unlike standard errors when using sockets, the library will also try to explain why it failed to connect and can call the standard connection manager. In the photo, the result of work on the device (first we connected the wifi, then disconnected).

The report is more applied with two small practical tasks. The topics covered were:
The following components are responsible for the address book:

The main work is with libosso-abook. In Maemo logic, a contact consists of one master contact (various identification details such as name, phone, avatar, etc.) and a bunch of roster contacts (VoIP / IM contacts). They also talked about the main interfaces that are used when working with the address book and about widgets.
Interfaces:
Widgets:
The address book was the first practical task: to show OssoABookContactChooser with filtering by mobile operator. The task is small and uncomplicated (if you do not take into account the long lines of gtk), but for some reason a lot of time was allocated for it.

After the coffee break, the second part of the report, GConf, began.
GConf is essentially one large repository of settings for all applications. Made on a client-server architecture (IMHO overhead for such a task, but on the other hand there is a plus in subscribing to changing settings).
GConf can only store data of the following types:

Data storage is organized as folders and all Maemo applications store data along the path / apps / maemo / YourApplicationNameHere / .
To work with GConf from the outside, there is the gconftool-2 utility , which allows you to set / change values, read values and delete values.
According to GConf, there was also a simple practical task. It was necessary to add to the ready-made application the ability to subscribe to change settings.

This was perhaps the most interesting report of the day. We talked about how to build packages for Maemo. Topics covered:
The first part was really very theoretical and briefly talked about what apt and dpkg are.
About the creation of .deb packages was described in sufficient detail, but on the example of single packages (the topic of several packages from the same source was considered, but in passing). An example of a .desktop file (which is essentially an instance in the Maemo menu) was also considered.
The third part included both the organization of source codes by directories and the story about additional files, such as the above .desktop and .service file, which is responsible for registering the program in D-Bus.
The practical task in the report was to create your own package with any application.

In general, I liked the second day of the training, but still there were a few points:
Denis Kormalev: tass .
Vasily Sorokin: vass .
An overview of the first day can be found here: http://habrahabr.ru/blogs/nokia/89046/ .
Summary of the second day:
- Integration with the platform. Sergey Ivanov
- Integration with the platform. AddressBook Gconf. Sergey Ivanov
- Creating an application distribution package. Dmitry Malichenko
The second day was shorter than the first hour by 3. I will try to describe in an impartial way, and give my assessment in conclusion.
Integration with the platform. Sergey Ivanov
The report is essentially overview and introductory. The following topics were addressed:
- D-bus
- Libosso
- Libconic
D-bus
It was told what exactly D-Bus is, why it is needed and what happens. It has also been repeatedly mentioned that it is all of itself low-level and should not be used directly (for me, the duck is slightly exaggerated, but oh well).
Libosso
The topic about D-Bus smoothly flowed into a small overview of the high-level wrapper over libdbus - LibOSSO.

In fact, yes, the add-in is quite high-level, but everyone spoils the long, almost identical naming of macros and methods (in general and not only in LibOSSO like that). In one example, the lines did not even fit on the slide :)
Libconic
The last part of the report was the largest. They talked about LibConIc - a library for connecting to the network.
Maybe she really is a lot:
- connection request;
- listening for status events;
- receiving statistics;
- getting proxy settings;
- getting a list of connections.
That is, in fact, there is everything that is needed and nothing more. But this library is not thread safe, its code must be executed in the main thread.
Unlike standard errors when using sockets, the library will also try to explain why it failed to connect and can call the standard connection manager. In the photo, the result of work on the device (first we connected the wifi, then disconnected).

Integration with the platform. AddressBook Gconf. Sergey Ivanov
The report is more applied with two small practical tasks. The topics covered were:
- Work with the address book (both API and graphic special widgets)
- Gconf
Work with the address book
The following components are responsible for the address book:
- Contacts application
- Libosso-abook library
- Evolution Data Server Storage (EDS)

The main work is with libosso-abook. In Maemo logic, a contact consists of one master contact (various identification details such as name, phone, avatar, etc.) and a bunch of roster contacts (VoIP / IM contacts). They also talked about the main interfaces that are used when working with the address book and about widgets.
Interfaces:
- OssoABookAvatar - avatar;
- OssoABookCaps - contact features (can I write an e-mail, call, etc.);
- OssoABookPresence - contact status (available, retired, not available, ...);
- OssoABookContact - the contact itself.
Widgets:
- OssoABookTouchContactStarter - display contact information and the ability to call / write SMS / ....
- OssoABookContactChooser - contact list. It allows you to make single and multiple choice of contacts (for the desired quantitative range), to filter by contacts (both on standard filters and on custom ones).
The address book was the first practical task: to show OssoABookContactChooser with filtering by mobile operator. The task is small and uncomplicated (if you do not take into account the long lines of gtk), but for some reason a lot of time was allocated for it.

Gconf
After the coffee break, the second part of the report, GConf, began.
GConf is essentially one large repository of settings for all applications. Made on a client-server architecture (IMHO overhead for such a task, but on the other hand there is a plus in subscribing to changing settings).
GConf can only store data of the following types:
- integer;
- boolean value;
- line;
- floating point number (with slight restrictions);
- enumerated type.

Data storage is organized as folders and all Maemo applications store data along the path / apps / maemo / YourApplicationNameHere / .
To work with GConf from the outside, there is the gconftool-2 utility , which allows you to set / change values, read values and delete values.
According to GConf, there was also a simple practical task. It was necessary to add to the ready-made application the ability to subscribe to change settings.

Creating an application distribution package. Dmitry Malichenko
This was perhaps the most interesting report of the day. We talked about how to build packages for Maemo. Topics covered:
- Theory of apt and dpkg utilities
- Creating .deb packages
- Key policy packages for Maemo
The first part was really very theoretical and briefly talked about what apt and dpkg are.
About the creation of .deb packages was described in sufficient detail, but on the example of single packages (the topic of several packages from the same source was considered, but in passing). An example of a .desktop file (which is essentially an instance in the Maemo menu) was also considered.
The third part included both the organization of source codes by directories and the story about additional files, such as the above .desktop and .service file, which is responsible for registering the program in D-Bus.
The practical task in the report was to create your own package with any application.

Conclusion
In general, I liked the second day of the training, but still there were a few points:
- Sergey Ivanov spoke well and vividly, but the report almost completely repeated the text on the slides, I would like more speech text (maybe some examples from life or lyrical digressions);
- Dmitry Malichenko spoke about an interesting topic, but a very monotonous report, I fell asleep slightly;
- On the second day there was a very large time frame for performing practical tasks, therefore, we just sat for a long time.
The authors
Denis Kormalev: tass .
Vasily Sorokin: vass .