module MessageBoard { struct Message_info { string message_id; string message_title; string message_originator; long long message_create_time; }; exception does_not_exist { string reason; }; exception not_allowed { string reason; }; interface Message // to read info from a message { string get_message_id(); string get_text(); string get_title(); string get_message_originator(); long long get_message_create_time(); }; interface Board // to post, read and remove messages on the board { void post_message(in string title , in string text); Message get_message(in string message_id) raises(does_not_exist); void remove_message(in string message_id) raises(not_allowed,does_not_exist); void set_init_message_info(); // This operation creates a copy of all message titles on the server that // then can be retrieved by successive "get_next_message_info()" operations. Message_info get_next_message_info() raises(does_not_exist); // By successive calls to this operation all message titles on the server // can be retrieved. Before "set_init_message_info()" must be called. // When there are no more message titles exception "does_not_exist" will be raised. }; interface BoardCallback // this interface is used by the server to inform the clients about a change on the board. // After receiving this the client should perform a new message title reading from the server as above) { void board_changed(); }; interface BoardConnect // Interface to the login object. A reference to this is given in the ior-string. { Board login(in string user, in string passwd, in BoardCallback call_back) raises(does_not_exist, not_allowed); // Client login. // It is allowed to give null value for "call_back", // then there will be no callback from the server. }; };