test malloc return value in jack_get_ports()
[jack.git] / jack / systemtest.h
blob27e0ae76eab57d422c34ef8e700acf748b13412e
1 #ifndef __jack_systemtest_h__
2 #define __jack_systemtest_h__
4 /**
5 * GPL, yabbadabba
7 * Set of functions to gather system information for the jack setup wizard.
8 *
9 * @author Florian Faber, faber@faberman.de
11 * @version 0.1 (2009-01-15) [FF]
12 * - initial version
14 **/
17 /**
18 * This function checks for the existence of known frequency scaling mechanisms
19 * in this system.
21 * @returns 0 if the system has no frequency scaling capabilities non-0 otherwise.
22 **/
23 int system_has_frequencyscaling();
26 /**
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
31 **/
32 int system_uses_frequencyscaling();
35 /***
36 * Checks for a definition in /etc/security/limits.conf that looks
37 * as if it allows RT scheduling priority.
39 * @returns 1 if there appears to be such a line
40 **/
41 int system_has_rtprio_limits_conf ();
43 /**
44 * Checks for the existence of the 'audio' group on this system
46 * @returns 0 is there is no 'audio' group, non-0 otherwise
47 **/
48 int system_has_audiogroup();
51 /**
52 * Tests wether the owner of this process is in the 'audio' group.
54 * @returns 0 if the owner of this process is not in the audio group, non-0 otherwise
55 **/
56 int system_user_in_audiogroup();
59 /**
60 * Determines wether the owner of this process can enable rt priority.
62 * @returns 0 if this process can not be switched to rt prio, non-0 otherwise
63 **/
64 int system_user_can_rtprio();
67 long long unsigned int system_memlock_amount();
70 /**
71 * Checks wether the memlock limit is unlimited
73 * @returns 0 if the memlock limit is limited, non-0 otherwise
74 **/
75 int system_memlock_is_unlimited();
78 long long unsigned int system_available_physical_mem();
81 /**
82 * Gets the version of the currently running kernel
84 * @returns String with the full version of the kernel
85 **/
86 char* system_kernel_version();
89 /**
90 * Returns the username. The caller is in charge of disposal of
91 * the returned name.
93 * @returns Pointer to a username or NULL
94 **/
95 char* system_get_username();
97 #endif /* __jack_systemtest_h__ */