-
Notifications
You must be signed in to change notification settings - Fork 7
/
pgeSystem.h
154 lines (132 loc) · 3.22 KB
/
pgeSystem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
* pgeSystem.h: Header for System modules
*
* This file is part of "Phoenix Game Engine".
*
* Copyright (C) 2008 Phoenix Game Engine
* Copyright (C) 2008 InsertWittyName <[email protected]>
* Copyright (C) 2008 MK2k <[email protected]>
*
* Phoenix Game Engine is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Phoenix Game Engine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with Phoenix Game Engine. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __PGESYSTEM_H__
#define __PGESYSTEM_H__
#ifdef __cplusplus
extern "C" {
#endif
/** @defgroup pgeSystem System Info Library
* @{
*/
/**
* Enumerator for languages.
*/
enum pgeSystemLanguages
{
PGE_LANGUAGE_JAPANESE,
PGE_LANGUAGE_ENGLISH,
PGE_LANGUAGE_FRENCH,
PGE_LANGUAGE_SPANISH,
PGE_LANGUAGE_GERMAN,
PGE_LANGUAGE_ITALIAN,
PGE_LANGUAGE_DUTCH,
PGE_LANGUAGE_PORTUGUESE,
PGE_LANGUAGE_RUSSIAN,
PGE_LANGUAGE_KOREAN,
PGE_LANGUAGE_CHINESE_TRADITIONAL,
PGE_LANGUAGE_CHINESE_SIMPLIFIED
};
/**
* Get the nickname of the PSP
*
* @param nickname - Pointer to a buffer to store the nickname (should be 128 bytes).
*/
void pgeSystemGetNickname(char *nickname);
/**
* Get the PSID of the PSP
*
* @param psid - Pointer to a buffer to store the PSID (should be 16 bytes).
*/
void pgeSystemGetPsid(unsigned char *psid);
/**
* Get the language of the PSP
*
* @returns One of ::pgeSystemLanguages.
*/
int pgeSystemGetLanguage(void);
/**
* Get the MAC address of the PSP
*
* @param mac - Pointer to a buffer to store the mac (should be 8 bytes).
*/
void pgeSystemGetMac(unsigned char *mac);
/**
* Get the memory stick size.
*
* @returns The memory stick size in MB.
*/
float pgeSystemMsSize(void);
/**
* Get the free memory stick size.
*
* @returns The free memory stick size in MB.
*/
float pgeSystemMsFreeSize(void);
/**
* Get the free RAM size.
*
* @returns The free RAM size in MB (accurate to 512kb).
*/
unsigned int pgeSystemGetFreeRam(void);
/**
* Get the CPU speed.
*
* @param freq - The frequency of the CPU 1-333
*
* @returns 1 on success, 0 on error.
*/
int pgeSystemSetCpu(unsigned int freq);
/**
* Get the battery charge as a percentage.
*
* @returns The battery charge as a percentage (0-100).
*/
int pgeSystemGetBatteryPercent(void);
/**
* Get the battery charge in minutes.
*
* @returns The battery charge in minutes.
*/
int pgeSystemGetBatteryTime(void);
/**
* Get if the battery is charging or not.
*
* @returns 1 if charging, 0 if not.
*/
int pgeSystemGetBatteryCharging(void);
/**
* Get if the battery exists.
*
* @returns 1 if exists, 0 if not.
*/
int pgeSystemGetBatteryExists(void);
/**
* Get if the battery charge is low.
*
* @returns 1 if low, 0 if not.
*/
int pgeSystemGetBatteryIsLow(void);
/** @} */
#ifdef __cplusplus
}
#endif // __cplusplus
#endif // __PGESYSTEM_H__