source: trunk/Modules/NetworkShare/NetworkShare.php

Last change on this file was 899, checked in by chronos, 4 years ago
File size: 1.3 KB
Line 
1<?php
2
3// This module is not fully converted and implemented
4
5include_once('SharePage.php');
6
7class ModuleNetworkShare extends Module
8{
9 function __construct(System $System)
10 {
11 parent::__construct($System);
12 $this->Name = 'NetworkShare';
13 $this->Version = '1.0';
14 $this->Creator = 'Chronos';
15 $this->License = 'GNU/GPLv3';
16 $this->Description = 'System for loading network computer share file list and allow fast searching.';
17 $this->Dependencies = array(ModuleNetwork::GetName());
18 $this->Models = array(NetworkShareItem::GetClassName(), NetworkShareError::GetClassName());
19 }
20
21 function DoStart(): void
22 {
23 $this->System->RegisterPage(['share'], 'SharePage');
24 }
25}
26
27class NetworkShareItem extends Model
28{
29 static function GetModelDesc(): ModelDesc
30 {
31 $Desc = new ModelDesc('NetworkShareItem');
32 $Desc->AddString('Name');
33 $Desc->AddReference('Parent', NetworkShareItem::GetClassName());
34 $Desc->AddReference('Host', NetworkDevice::GetClassName());
35 $Desc->AddBigInt('Size');
36 $Desc->AddString('Ext');
37 $Desc->AddDate('Date');
38 $Desc->AddInteger('Type');
39 return $Desc;
40 }
41}
42
43class NetworkShareError extends Model
44{
45 static function GetModelDesc(): ModelDesc
46 {
47 $Desc = new ModelDesc(self::GetClassName());
48 $Desc->AddString('Host');
49 $Desc->AddString('Message');
50 return $Desc;
51 }
52}
Note: See TracBrowser for help on using the repository browser.