view design.txt @ 5:e4ff04df085c

use libnotify's pkgconfig for buildflags
author Pavol Rusnak <stick@gk2.sk>
date Thu, 06 Oct 2011 15:38:49 +0200
parents f5e03fc667f8
children
line wrap: on
line source

Design
======

Objects:
OUIApp(GtkApplication)
    - Icon *icon
    - Backend *backend
    - GSettings *settings
        * bind preferences to settings above
        + check_frequency
        + check_mobile_connection
        + startup_timeout
        + notify_package
        + notify_patch_critical
        + notify_patch_recommended
        + notify_patch_optional
    - PreferencesDialog *preferences_dialog

startup:
    unique
    one-shot timer
    regular timer
    hide
one-shot timer: check update
timer: 24 h check update
check update:
    if battery critical:
        set timer +1h
    if not online:
        set timer +1h
    if on mobile and no allowed:
        set timer +1h
    run /usr/sbin/zypp-refresh-wrapper
    run zypper --xmlout list-updates --type patch
    run zypper --xmlout list-updates --type package
    parse XML output
    merge package and patch updates?
    if updates:
        select icon based on type of update
        display icon and tooltip with number of updates
    else:
        hide
left click on icon:
    start yast2 online_update
right click:
    preferences
    about
preferences:
    interval (hourly/daily/weekly/never)
    check on mobile internet


TODO:
parse xml
DBus check
check low power with upower
check connection with NetworkManager
unique application
see packagekit


Defer to later:
NM online and mobile check
UPower battery check