various fixes to MidiRegionView selection handling, key handling, drawing of ghost...
[ardour2.git] / tools / sanity_check / systemtest.h
blobf9eb920f80fd490b1465db5cef56a719935a870a
1 #ifndef __systemtest_h__
2 #define __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();
34 /**
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
38 **/
39 int system_user_in_group(const char *name);
41 /***
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
46 **/
47 int system_has_rtprio_limits_conf ();
49 /**
50 * Checks for the existence of the 'audio' group on this system
52 * @returns 0 is there is no 'audio' group, non-0 otherwise
53 **/
54 int system_has_audiogroup();
56 /**
57 * Checks for the existence of a group named 'name' on this system
59 * @returns 0 if not found, non-0 otherwise
60 **/
61 int system_has_group(const char * name);
63 /**
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
67 **/
68 int system_user_in_audiogroup();
71 /**
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
75 **/
76 int system_user_can_rtprio();
79 long long unsigned int system_memlock_amount();
82 /**
83 * Checks wether the memlock limit is unlimited
85 * @returns 0 if the memlock limit is limited, non-0 otherwise
86 **/
87 int system_memlock_is_unlimited();
90 long long unsigned int system_available_physical_mem();
93 /**
94 * Gets the version of the currently running kernel
96 * @returns String with the full version of the kernel
97 **/
98 char* system_kernel_version();
102 * Returns the username. The caller is in charge of disposal of
103 * the returned name.
105 * @returns Pointer to a username or NULL
107 char* system_get_username();
109 #endif /* __jack_systemtest_h__ */