diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2008-03-04 14:51:23 +0000 |
commit | 99aa8c60282c7b8072eb35eb9ac815702f5bf586 (patch) | |
tree | bda96bf8c3a4c2875a083d7b16720533c8ffeaf4 /ACE/examples/APG/Streams/Message.h | |
parent | c4078c377d74290ebe4e66da0b4975da91732376 (diff) | |
download | ATCD-99aa8c60282c7b8072eb35eb9ac815702f5bf586.tar.gz |
undoing accidental deletion
Diffstat (limited to 'ACE/examples/APG/Streams/Message.h')
-rw-r--r-- | ACE/examples/APG/Streams/Message.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/ACE/examples/APG/Streams/Message.h b/ACE/examples/APG/Streams/Message.h new file mode 100644 index 00000000000..29ddd30d5a1 --- /dev/null +++ b/ACE/examples/APG/Streams/Message.h @@ -0,0 +1,92 @@ +/* -*- C++ -*- */ +// $Id$ + +#ifndef MESSAGE_H +#define MESSAGE_H + +class RecordingDevice; + +class Message +{ +public: + Message () : device_(0), type_(0), id_(0) + { } + + ~Message () + { } + + RecordingDevice *recorder (void) + { + return this->device_; + } + + void recorder (RecordingDevice *device) + { + this->device_ = device; + } + + void type (MessageType *type) + { + this->type_ = type; + } + + MessageType *type (void) + { + return this->type_; + } + + void caller_id (CallerId *id) + { + this->id_ = id; + } + + CallerId *caller_id (void) + { + return this->id_; + } + + void addr (ACE_FILE_Addr &addr) + { + this->addr_ = addr; + } + + void incoming_message (ACE_FILE_Addr &addr, MessageType *type) + { + this->addr_ = addr; + this->type_ = type; + } + + ACE_FILE_Addr &addr (void) + { + return this->addr_; + } + + int is_text (void) + { + return this->type_->is_text (); + } + + int is_audio (void) + { + return this->type_->is_audio (); + } + + int is_video (void) + { + return this->type_->is_video (); + } + +private: + RecordingDevice *device_; + MessageType *type_; + CallerId *id_; + ACE_FILE_Addr addr_; +}; + +class AudioMessage : public Message +{ }; + +class VideoMessage : public Message +{ }; + +#endif /* MESSAGE_H */ |