blob: 1b171b369a5cd97a488f12e41a7837fa4f8dd555 [file] [log] [blame]
atraczyk49822a32016-08-26 17:18:44 -04001/***************************************************************************
2 * Copyright (C) 2016 by Savoir-faire Linux *
3 * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
4 * Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.com> *
5 * *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program is distributed in the hope that it will be useful, *
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14 * GNU General Public License for more details. *
15 * *
16 * You should have received a copy of the GNU General Public License *
17 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
18 **************************************************************************/
19
20#pragma once
21
22namespace RingClientUWP
23{
24
25delegate void SelectIndex(int index);
atraczyk2425ddd2016-09-01 13:16:22 -040026delegate void LoadProfileImage();
atraczyk49822a32016-08-26 17:18:44 -040027
28namespace Configuration
29{
30
31/* delegates */
32
33public ref class UserPreferences sealed
34{
35public:
36 /* singleton */
37 static property UserPreferences^ instance
38 {
39 UserPreferences^ get()
40 {
41 static UserPreferences^ instance_ = ref new UserPreferences();
42 return instance_;
43 }
44 }
45
46 /* properties */
47 property int PREF_ACCOUNT_INDEX;
atraczyk2425ddd2016-09-01 13:16:22 -040048 property bool PREF_PROFILE_PHOTO;
atraczyk49822a32016-08-26 17:18:44 -040049
50 /* functions */
51 void save();
52 void load();
53 String^ Stringify();
54 void Destringify(String^ data);
55
56internal:
57
58 /* events */
59 event SelectIndex^ selectIndex;
atraczyk2425ddd2016-09-01 13:16:22 -040060 event LoadProfileImage^ loadProfileImage;
atraczyk49822a32016-08-26 17:18:44 -040061private:
atraczyk2425ddd2016-09-01 13:16:22 -040062 UserPreferences() { PREF_PROFILE_PHOTO = false; };
atraczyk49822a32016-08-26 17:18:44 -040063
64};
65
66}
67}