-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathIOperatingSystem.php
More file actions
64 lines (51 loc) · 1.25 KB
/
IOperatingSystem.php
File metadata and controls
64 lines (51 loc) · 1.25 KB
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
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\ServerInfo\OperatingSystems;
use OCA\ServerInfo\Resources\CPU;
use OCA\ServerInfo\Resources\Disk;
use OCA\ServerInfo\Resources\Memory;
use OCA\ServerInfo\Resources\NetInterface;
use OCA\ServerInfo\Resources\ThermalZone;
interface IOperatingSystem {
public function supported(): bool;
public function getCPU(): CPU;
public function getMemory(): Memory;
/**
* @return Disk[]
*/
public function getDiskInfo(): array;
/**
* Get info about network connection.
*
* [
* 'gateway' => string,
* 'hostname' => string,
* ]
*/
public function getNetworkInfo(): array;
/**
* Get info about available network interfaces.
*
* @return NetInterface[]
*/
public function getNetworkInterfaces(): array;
/**
* Get system time and timezone.
* Empty string in case of errors
*/
public function getTime(): string;
/**
* Get the total number of seconds the system has been up or -1 on failure.
*/
public function getUptime(): int;
/**
* Get info about available thermal zones.
*
* @return ThermalZone[]
*/
public function getThermalZones(): array;
}