Iliad:contentLister Implementation

From MobileRead
Jump to: navigation, search

[edit] Reference materials

  • The official sources are available at the Irex website.
  • These same source are available for on-line browsing here.

[edit] Startup

The location of contentLister executable is /usr/bin/contentLister.

ContentLister is almost a part of the Iliad operating system. It is started at boot time. the Iliad will reboot if contentLister is stopped for whatever reason.

The boot process starts contentLister in /etc/rc5.d/S99start, which is a link to /home/root/start.sh. There relevant part is:

 (/usr/bin/contentLister --sync ; reboot) &

REMARK for developers: when developing a an new version of contentLister one must be VERY careful to provide a robust program. A crashing contentLister will result is an Iliad that reboots endlessly. This can easily be remedied by removing the '; reboot' part from the above line, so it reads:

 (/usr/bin/contentLister --sync) &

[edit] Initialisation

ContenLister starts at main() [main.c]. The most relevant steps are:

  • gtk_rc_parse(DATA_DIR "/contentLister.rc"): The resource file loaded here (full path is /usr/share/contenlister/contenLister.rc) defines all fonts, icons, colours, etc... for contenLister's GUI. The directory DATA_DIR (/usr/share/contenlister) contains the refered icons, background images and sounds; the subdirectory modes contains language specific files.
  • load_registry() loads settings from the registry. The actual loading is handled by the library liberregxml (also open source). The location of the registry files is /var/registry, which is a symbolic link to /mnt/settings/registry. The interesting files are registry.xml (most off contentLister's settings) and nwprofiles.xml (network profiles)
  • window = gtk_window_new(GTK_WINDOW_TOPLEVEL)... The main window is created. This window is the parent of all contentLister windows
  • theContentLister = ctrlInit(window) [control.c]: main initialisation where new threads are created, connections are made... (TODO: STAY TUNED)
  • gtk_main(): the main loop of the GUI part is started
Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox