Parse ‘isDefault’ and ‘isMandatory’ from remote bundle index

This commit is contained in:
Allan Odgaard
2014-04-14 05:21:22 +07:00
parent 3e8fd7b72a
commit eb6d755ca5
2 changed files with 6 additions and 0 deletions

View File

@@ -324,6 +324,8 @@ namespace bundles_db
plist::get_key_path(item, "contactName", bundle->_contact_name);
plist::get_key_path(item, "contactEmailRot13", bundle->_contact_email);
plist::get_key_path(item, "description", bundle->_description);
plist::get_key_path(item, "isDefault", bundle->_is_default);
plist::get_key_path(item, "isMandatory", bundle->_is_mandatory);
if(bundle->_contact_email != NULL_STR)
bundle->_contact_email = decode::rot13(bundle->_contact_email);

View File

@@ -60,6 +60,8 @@ namespace bundles_db
oak::date_t path_updated () const { return _path_updated; }
int32_t rank () const { return _source ? _source->rank() : 0; }
int32_t size () const { return _size; }
bool is_mandatory () const { return _is_mandatory; }
bool is_default () const { return _is_default; }
bool installed () const { return _path != NULL_STR; }
bool has_update () const { return installed() && _path_updated < _url_updated; }
@@ -95,6 +97,8 @@ namespace bundles_db
std::string _url;
oak::date_t _url_updated;
int32_t _size;
bool _is_default = false;
bool _is_mandatory = false;
std::string _path;
oak::date_t _path_updated;