Universität Ulm,
Fakultät für Mathematik und Wirtschaftswissenschaften,
SAI
WS 2000/01 || Entwicklung objekt-orientierter Bibliotheken || Beispiele || Rooms
DEFINITION Maintenance
(* Ulm's Oberon Library
Copyright (C) 1989-1994 by University of Ulm, SAI, D-89069 Ulm, Germany
----------------------------------------------------------------------------
Ulm's Oberon Library is free software; you can redistribute it
and/or modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either version
2 of the License, or (at your option) any later version.
Ulm's Oberon Library is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
----------------------------------------------------------------------------
E-mail contact: oberon@mathematik.uni-ulm.de
----------------------------------------------------------------------------
$Id$
----------------------------------------------------------------------------
$Log$
----------------------------------------------------------------------------
Martin Hasch, Sep 1994
----------------------------------------------------------------------------
*)
DEFINITION Maintenance;
IMPORT Events, Messages, Objects, RelatedEvents, Shards, Times;
CONST
shutdown = 0;
reboot = 1;
TYPE
JobType = SHORTINT; (* [shutdown..reboot] *)
Object = Messages.Object;
SimpleProc = PROCEDURE (object: Object);
Job = POINTER TO JobRec;
JobRec =
RECORD
(Objects.ObjectRec)
proc: SimpleProc;
control: Shards.Pot;
delay: Times.Time; (* NIL -> default delay *)
END;
CONST
notCapable = 0; (* job has not been defined *)
noPermission = 1; (* job was not permitted *)
noAccess = 2; (* job request did not reach object *)
errorcodes = 3;
TYPE
ErrorEvent = POINTER TO ErrorEventRec;
ErrorEventRec =
RECORD
(Events.EventRec)
errorcode: SHORTINT;
END;
VAR
errormsg: ARRAY errorcodes OF Events.Message;
error: Events.EventType;
PROCEDURE Attach(object: Object; job: Job; type: JobType);
PROCEDURE Shutdown(object: Object; auth: Shards.Lid): BOOLEAN;
PROCEDURE Reboot(object: Object; auth: Shards.Lid): BOOLEAN;
END Maintenance.
WS 2000/01 || Entwicklung objekt-orientierter Bibliotheken || Beispiele || Rooms
Andreas Borchert, 29. Januar 2001