Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / APG / Streams / Message.h
blob61f2a320e3879e5bad59ce94ccd8ce9136292308
1 /* -*- C++ -*- */
2 #ifndef MESSAGE_H
3 #define MESSAGE_H
5 class RecordingDevice;
7 class Message
9 public:
10 Message () : device_(0), type_(0), id_(0)
11 { }
13 ~Message ()
14 { }
16 RecordingDevice *recorder ()
18 return this->device_;
21 void recorder (RecordingDevice *device)
23 this->device_ = device;
26 void type (MessageType *type)
28 this->type_ = type;
31 MessageType *type ()
33 return this->type_;
36 void caller_id (CallerId *id)
38 this->id_ = id;
41 CallerId *caller_id ()
43 return this->id_;
46 void addr (ACE_FILE_Addr &addr)
48 this->addr_ = addr;
51 void incoming_message (ACE_FILE_Addr &addr, MessageType *type)
53 this->addr_ = addr;
54 this->type_ = type;
57 ACE_FILE_Addr &addr ()
59 return this->addr_;
62 int is_text ()
64 return this->type_->is_text ();
67 int is_audio ()
69 return this->type_->is_audio ();
72 int is_video ()
74 return this->type_->is_video ();
77 private:
78 RecordingDevice *device_;
79 MessageType *type_;
80 CallerId *id_;
81 ACE_FILE_Addr addr_;
84 class AudioMessage : public Message
85 { };
87 class VideoMessage : public Message
88 { };
90 #endif /* MESSAGE_H */