Prev |  | Next

# SandUhr::Timer

## Name

SandUhr::Timer -- CORBA interface for SandUhr timer objects

## SYNOPSIS

    module SandUhr {
      interface Timer {
        exception NotRunning { };

        enum TimerState { TSPrepare, TSRunning, TSDone };
        readonly attribute TimerState State;

        attribute string TimeSpec;
        attribute string Message;
        attribute AlarmAction Alarm;

        struct Color {
          unsigned short Red, Green, Blue;
        };
        attribute Color SandColor;

        attribute boolean WindowDecorations;

        enum Layer { LayerDesktop, LayerBelow, LayerNormal, LayerOntop };
        attribute Layer WindowLayer;

        void Destroy ();
        unsigned long TimeLeft () raises (NotRunning);
      };
    };

## DESCRIPTION

The central part of SandUhr is the `SandUhr::Timer` interface. It represents the sand-glass-shaped window and every piece of information associated to it.

- The state of the timer:

      enum TimerState { TSPrepare, TSRunning, TSDone };
      readonly attribute TimerState State;

  This is `TSPrepare` if the timer is not yet running (e.g. while the initial setup window is showing), `TSRunning` during normal operation, and `TSDone` after the timer elapsed (i.e. while the alarm is delivered).

- The alarm time:

      attribute string TimeSpec;

  The format of this string is explained in the manual section called the alarm time.

- The alarm message:

      attribute string Message;

  This is passed to the alarm action for delivery.

- The alarm action:

      attribute AlarmAction Alarm;

  There are several predefined subclasses of `SandUhr::AlarmAction` available. These are described in SandUhr::AlarmAction(3).

- The fill color of the sand glass:

      struct Color {
        unsigned short Red, Green, Blue;
      };
      attribute Color SandColor;

  The Red, Green, and Blue values may lay in the range from 0 to 255 inclusive. `(0,0,0)` gives black sand, `(255, 255, 255)` gives white sand.

- The destroy function:

      void Destroy ();

  Destroy the currently running timer without delivering the alarm.

- The remaining time:

      unsigned long TimeLeft () raises (NotRunning);

  Return the number of seconds left until the alarm is delivered. The `NotRunning` exception is raised if the timer's state is not `TSRunning`.

## SEE ALSO

SandUhr::TimerFactory(3), SandUhr::AlarmAction(3)

Prev | Home | Next
The SandUhr CORBA interface | Up | SandUhr::AlarmAction