Merge lp:~rafalcieslak256/ubuntu-accomplishments-daemon/NewAPI into lp:ubuntu-accomplishments-daemon

Proposed by Rafał Cieślak
Status: Merged
Merged at revision: 45
Proposed branch: lp:~rafalcieslak256/ubuntu-accomplishments-daemon/NewAPI
Merge into: lp:ubuntu-accomplishments-daemon
Diff against target: 0 lines
To merge this branch: bzr merge lp:~rafalcieslak256/ubuntu-accomplishments-daemon/NewAPI
Reviewer Review Type Date Requested Status
Jono Bacon Pending
Review via email: mp+106229@code.launchpad.net

Description of the change

This branch fully implements the changes for the new API.

It, thus, removes many functions from the API, and adds a lot of new ones, according to specification.
Instead of passing file paths around, the accomIDs are now a basic data form that functions exchange - more details in the spec wiki page.

 * The new API introduces a lot of atomic functions, and rest of code makes use of them whenever it is possible.
 * The self.accDB is used to store all data concerning accomplishments in memory, for easier processing. It's a dictionary, that maps accomIDs to their data. It also stores information about collections (collection name as the key) and sets (key: "collection:set").
 * Pre-loading all data into accDB also reads ABOUT and extrainformation files, to store default lang in memory, for easier further usage (e.g. in get_all_extra_information), which also results in accomplishment collection files being accessed in only one function in code (reload_accom_database)
 * Apart from the new API, this branch also does some clean-up. I removed unnecessary, unused variables, groped common code into single functions (for e.g. displaying bubbles).
 * log.msg calls in __init__ changed to print, because __init__ happens before the logger is ready to work, and thus such messages were never displayed.
 * Caching images is not slightly simplified.
 * self.accomplishments_path got renamed to self.accomplishments_installpaths, as it now should allow to install accomplishments in several places, according to config file. It can store values (paths) separated with a ':' character.
 * "Scripts path" is now abandoned, as it can be in many different places. Instead, accDB stores 'script-path' for each accomplishment.
 * get_extra_information makes use of prepared translated labels.
 * 'author' fields (if present) are loaded and stored in collection data - one can use 'get_collection_authors' for an array of contributors to given collection.
 * The DBus API was accordingly updated.
 * Trophy files now contain an 'id' field, that stores accomplishment ID for the trophy, instead of using separate application and accomplishment fields.

To post a comment you must log in.
62. By Rafał Cieślak

passing empty extra-information in case none is set, for DBus does not know how to send NoneType

63. By Rafał Cieślak

fixed accomplished signal

64. By Rafał Cieślak

merge from parent

Preview Diff

Empty

Subscribers

People subscribed via source and target branches