Ship system_config with bundles again.
[ardour.git] / tools / sanity_check / systemtest.h
1 #ifndef __systemtest_h__
2 #define __systemtest_h__
3
4 /**
5  * GPL, yabbadabba
6  *
7  * Set of functions to gather system information for the jack setup wizard.
8  *
9  * @author Florian Faber, faber@faberman.de
10  *
11  * @version 0.1 (2009-01-15) [FF]
12  *              - initial version
13  *
14  **/
15
16
17 /**
18  * This function checks for the existence of known frequency scaling mechanisms
19  * in this system.
20  *
21  * @returns 0 if the system has no frequency scaling capabilities non-0 otherwise.
22  **/
23 int system_has_frequencyscaling();
24
25
26 /**
27  * This function determines wether the CPU has a variable clock speed if frequency
28  * scaling is available.
29  *
30  * @returns 0 if system doesn't use frequency scaling at the moment, non-0 otherwise
31  **/
32 int system_uses_frequencyscaling();
33
34 /**
35  * Tests wether the owner of this process is in the group 'name'.
36  *
37  * @returns 0 if the owner of this process is not in the group, non-0 otherwise
38  **/
39 int system_user_in_group(const char *name);
40
41 /***
42  * Checks for a definition in /etc/security/limits.conf that looks
43  * as if it allows RT scheduling priority.
44  *
45  * @returns 1 if there appears to be such a line
46  **/
47 int system_has_rtprio_limits_conf ();
48
49 /**
50  * Checks for the existence of the 'audio' group on this system
51  *
52  * @returns 0 is there is no 'audio' group, non-0 otherwise
53  **/
54 int system_has_audiogroup();
55
56 /**
57  * Checks for the existence of a group named 'name' on this system
58  *
59  * @returns 0 if not found, non-0 otherwise
60  **/
61 int system_has_group(const char * name);
62
63 /**
64  * Tests wether the owner of this process is in the 'audio' group.
65  *
66  * @returns 0 if the owner of this process is not in the audio group, non-0 otherwise
67  **/
68 int system_user_in_audiogroup();
69
70
71 /**
72  * Determines wether the owner of this process can enable rt priority.
73  *
74  * @returns 0 if this process can not be switched to rt prio, non-0 otherwise
75  **/
76 int system_user_can_rtprio();
77
78
79 long long unsigned int system_memlock_amount();
80
81
82 /**
83  * Checks wether the memlock limit is unlimited
84  *
85  * @returns 0 if the memlock limit is limited, non-0 otherwise
86  **/
87 int system_memlock_is_unlimited();
88
89
90 long long unsigned int system_available_physical_mem();
91
92
93 /**
94  * Gets the version of the currently running kernel
95  *
96  * @returns String with the full version of the kernel
97  **/
98 char* system_kernel_version();
99
100
101 /**
102  * Returns the username. The caller is in charge of disposal of
103  * the returned name.
104  *
105  * @returns Pointer to a username or NULL
106  **/
107 char* system_get_username();
108
109 #endif /* __jack_systemtest_h__ */