📜 ⬆️ ⬇️

Training on Maemo. Day 2

So, the Maemo training held within the framework 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:
  1. Integration with the platform. Sergey Ivanov
  2. Integration with the platform. AddressBook. GConf. Sergey Ivanov
  3. Creating an application distribution kit. Dmitry Malichenko


The second day was shorter than the first hour by 3. I will try to describe it impartially, and give my assessment in custody.

Integration with the platform. Sergey Ivanov


The report is essentially an overview and introductory. The following topics were covered:
  1. D-bus
  2. Libosso
  3. Libconic

D-bus


It was told what actually D-Bus is, why it is needed and how it happens. It has also been repeatedly mentioned that it is all of a low-level one and you shouldn’t use it directly (duck is a little exaggerated for me, but oh well).

Libosso


The topic of D-Bus smoothly flowed into a small overview of the high-level wrapper over libdbus - LibOSSO.
Maemo,  2
In fact, yes, the add-in is quite high-level, but everything spoils the long, almost identical naming of macros and methods (in general, and not only in LibOSSO). In one example, the lines did not even fit on the slide :)
')

Libconic


The last part of the report was the largest. They told about LibConIc - a library for connecting to the network.
Maybe she really is a lot:

That is, in fact, there is everything you need and nothing extra. But this library is non-threadsafe, 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 may cause the standard connection manager. In the photo, the result of work on the device (first, we connected the wifi, then disconnected).
Maemo,  2

Integration with the platform. AddressBook. GConf. Sergey Ivanov


The report is more applied with two small practical tasks. The following topics were covered:
  1. Work with the address book (both API and graphic special widgets)
  2. Gconf

Work with address book


The following components are responsible for the address book:

Maemo,  2
The main work goes exactly with libosso-abook. In Maemo logic, a contact consists of one master contact (various identification data 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 cellular operator. The task is small and simple (if you do not take into account the long gtk lines), but for some reason a lot of time was allocated for it.
Maemo,  2

Gconf


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

Maemo,  2
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 a utility gconftool-2 , which allows you to set / change values, read values ​​and delete values.
GConf also had an easy practical task. It was necessary to add the ability to subscribe to change settings to an already ready application.
Maemo,  2

Creating an application distribution kit. Dmitry Malichenko


This was probably the most interesting report of the day. It was about how to build packages for Maemo. Topics covered:
  1. Theory about apt and dpkg utilities
  2. Creating .deb packages
  3. Basic packaging policy 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 some detail, but using the example of single packages (the topic of several packages from the same source code 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 aforementioned .desktop and .service file, which is responsible for registering the program in D-Bus.
The practical task in the report was to create your package with any application.
Maemo,  2

Conclusion


In general, I liked the second day of the training, but still there were a few moments:

The authors


Denis Kormalev: tass .
Vasily Sorokin: vass .

Source: https://habr.com/ru/post/89050/


All Articles