Subversion Repositories freemyipod

Rev

Rev 833 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
808 theseven 1
//
2
//
3
//    Copyright 2011 TheSeven
4
//
5
//
6
//    This file is part of emCORE.
7
//
8
//    emCORE is free software: you can redistribute it and/or
9
//    modify it under the terms of the GNU General Public License as
10
//    published by the Free Software Foundation, either version 2 of the
11
//    License, or (at your option) any later version.
12
//
13
//    emCORE is distributed in the hope that it will be useful,
14
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
15
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
//    See the GNU General Public License for more details.
17
//
18
//    You should have received a copy of the GNU General Public License along
19
//    with emCORE.  If not, see <http://www.gnu.org/licenses/>.
20
//
21
//
22
 
23
 
24
#ifndef __APP_SETTINGS_H__
25
#define __APP_SETTINGS_H__
26
 
27
 
28
#include "emcoreapp.h"
29
 
30
 
31
#define SETTINGS_VERSION 1
32
struct settingdata
33
{
823 theseven 34
    char magic[8];
35
    char app[8];
808 theseven 36
    uint32_t version;
37
    long timeout_initial;
38
    long timeout_idle;
39
    int timeout_item;
40
    int default_item;
41
    int fastboot_item;
833 theseven 42
    int snow;
838 theseven 43
    int brightness;
808 theseven 44
};
45
 
823 theseven 46
#define SETTINGS_TIMEOUT_INITIAL_MIN 0
47
#define SETTINGS_TIMEOUT_INITIAL_MAX 2000000000
48
#define SETTINGS_TIMEOUT_INITIAL_STEP 1000000
49
#define SETTINGS_TIMEOUT_IDLE_MIN 0
50
#define SETTINGS_TIMEOUT_IDLE_MAX 2000000000
51
#define SETTINGS_TIMEOUT_IDLE_STEP 1000000
52
#define SETTINGS_TIMEOUT_ITEM_MIN 0
53
#define SETTINGS_TIMEOUT_ITEM_MAX 3
54
#define SETTINGS_DEFAULT_ITEM_MIN 0
55
#define SETTINGS_DEFAULT_ITEM_MAX 3
56
#define SETTINGS_FASTBOOT_ITEM_MIN 0
57
#define SETTINGS_FASTBOOT_ITEM_MAX 3
833 theseven 58
#define SETTINGS_SNOW_MIN 0
59
#define SETTINGS_SNOW_MAX 10
60
#define SETTINGS_SNOW_STEP 1
838 theseven 61
#define SETTINGS_BRIGHTNESS_MIN 20
62
#define SETTINGS_BRIGHTNESS_MAX 255
63
#define SETTINGS_BRIGHTNESS_STEP 5
808 theseven 64
 
823 theseven 65
#define SETTINGS_TIMEOUT_CUTOFF 3000000
66
 
67
 
808 theseven 68
extern struct settingdata settings_default;
69
extern struct settingdata settings;
70
 
71
 
72
extern void settings_init();
73
extern void settings_reset();
823 theseven 74
extern void setting_validate(void* setting);
808 theseven 75
extern void settings_validate_all();
76
extern void settings_apply();
77
extern void settings_save();
78
 
79
 
80
#endif