Questions about the migration from GConf to GSettings/DConf



Hi everyone,

I've been spending several days working on the migration from GConf to GSettings/DConf in our project evolution EAS, in order to store accounts of uncertain number. But I've encountered some problems and I think GSettings might not be the right direction. Do you have any suggestions? Here are the methods I've figured out:

1. Use relocatable schemas. In this case, we have one schema being relocatable, and multiple instance of that schema so we can store accounts of uncertain number. But the question is that the instances are separated and there seems no API to control them as a whole, which means we lost the structure information and make things harder in our project.

2. Use child in schema. In this case, we have one controller schema and some children schemas as separate accounts. We can maintain the structure information, but the question is that we can't define children with uncertain number since the name of the child must be defined one to one.

3. Use array of strings as the type of the key. In this case we have only one key named account-info and it consists of uncertain number of strings, which can save account information. The structure seems like this:

<key name="account-info" type="as">
Content: {{"email:example example com;username:example;serverUri:example.eas.com"}, {"email:test test com;username:test;serverUri:test.eas.com"}, {NULL}}

However, this method still have some inconvenience: we can't search information under exact one account using gsettings because the key here is "account-info", not the real account email address. This means every time we need to change one account or search for one account, we have to read the whole accounts information and then get the one we need. That will be inefficient

I don't have the perfect solution yet, so I'm here to see if anyone could help me. It will be very great if someone know the best way to do that.

Thank you.

Yours Sincerely,
Oliver



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]