Identity selector support for headless operation
[moonshot-ui.git] / src / moonshot-identities-manager.vala
1 using Gee;
2
3 public class IdentityManagerModel : Object {
4     private const string FILE_NAME = "identities.txt";
5
6     private IIdentityCardStore store;
7     public LinkedList<IdCard>  get_card_list() {
8          return store.get_card_list(); 
9     }
10     public signal void card_list_changed();
11
12     public void add_card(IdCard card) {
13         store.add_card(card);
14         card_list_changed();
15      }
16
17      public void update_card(IdCard card) {
18         store.update_card(card);
19         card_list_changed();
20      }
21
22      public void remove_card(IdCard card) {
23         store.remove_card(card);
24         card_list_changed();
25      }
26
27     private IdentityManagerApp parent;
28
29     public IdentityManagerModel(IdentityManagerApp parent_app) {
30         parent = parent_app;
31         store = new LocalFlatFileStore();
32     }
33 }