File: Tictactoe.idl

package info (click to toggle)
libcorba-orbit-perl 0.4.3-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 404 kB
  • ctags: 313
  • sloc: ansic: 4,053; perl: 787; makefile: 57
file content (26 lines) | stat: -rw-r--r-- 722 bytes parent folder | download | duplicates (3)
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
module Tictactoe {
  exception BadTag {};
  exception InvalidMove {};
  exception AlreadyConnected {};

  interface Client {
    // Connect to another client, return a tag for future communication
    long   connect    (in Client opponent) raises (AlreadyConnected);

    // Disconnect from the game
    void    disconnect (in long tag) 
      raises (BadTag);

    // Put a mark at given position
    void    put        (in long tag, in short row, in short column) 
      raises (BadTag, InvalidMove);

    // Request starting the game over
    boolean request_reset (in long tag)
      raises (BadTag);

    // Response to request_reset
    void reset         (in long tag, in boolean ok)
      raises (BadTag);
  };
};