1
#ifndef __systemtest_h__
2
#define __systemtest_h__
7
* Set of functions to gather system information for the jack setup wizard.
9
* @author Florian Faber, faber@faberman.de
11
* @version 0.1 (2009-01-15) [FF]
18
* This function checks for the existence of known frequency scaling mechanisms
21
* @returns 0 if the system has no frequency scaling capabilities non-0 otherwise.
23
int system_has_frequencyscaling();
27
* This function determines wether the CPU has a variable clock speed if frequency
28
* scaling is available.
30
* @returns 0 if system doesn't use frequency scaling at the moment, non-0 otherwise
32
int system_uses_frequencyscaling();
35
* Tests wether the owner of this process is in the group 'name'.
37
* @returns 0 if the owner of this process is not in the group, non-0 otherwise
39
int system_user_in_group(const char *name);
42
* Checks for a definition in /etc/security/limits.conf that looks
43
* as if it allows RT scheduling priority.
45
* @returns 1 if there appears to be such a line
47
int system_has_rtprio_limits_conf ();
50
* Checks for the existence of the 'audio' group on this system
52
* @returns 0 is there is no 'audio' group, non-0 otherwise
54
int system_has_audiogroup();
57
* Checks for the existence of a group named 'name' on this system
59
* @returns 0 if not found, non-0 otherwise
61
int system_has_group(const char * name);
64
* Tests wether the owner of this process is in the 'audio' group.
66
* @returns 0 if the owner of this process is not in the audio group, non-0 otherwise
68
int system_user_in_audiogroup();
72
* Determines wether the owner of this process can enable rt priority.
74
* @returns 0 if this process can not be switched to rt prio, non-0 otherwise
76
int system_user_can_rtprio();
79
long long unsigned int system_memlock_amount();
83
* Checks wether the memlock limit is unlimited
85
* @returns 0 if the memlock limit is limited, non-0 otherwise
87
int system_memlock_is_unlimited();
90
long long unsigned int system_available_physical_mem();
94
* Gets the version of the currently running kernel
96
* @returns String with the full version of the kernel
98
char* system_kernel_version();
102
* Returns the username. The caller is in charge of disposal of
105
* @returns Pointer to a username or NULL
107
char* system_get_username();
109
#endif /* __jack_systemtest_h__ */