summaryrefslogtreecommitdiff
path: root/ACE/examples/APG/Streams/Message.h
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/examples/APG/Streams/Message.h')
-rw-r--r--ACE/examples/APG/Streams/Message.h92
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 */