00001
00002 #ifndef INCLUDED_SoundManagerMsg_h
00003 #define INCLUDED_SoundManagerMsg_h
00004
00005 class RCRegion;
00006
00007
00008 struct SoundManagerMsg {
00009
00010 typedef unsigned short Snd_ID;
00011
00012 static const unsigned int MSG_SIZE=16;
00013
00014
00015 SoundManagerMsg() : type(unknown), id(static_cast<Snd_ID>(-1)), region(NULL) {}
00016
00017
00018
00019 virtual ~SoundManagerMsg() {}
00020
00021
00022 Snd_ID getID() const { return id; }
00023
00024 private:
00025 friend class SoundManager;
00026
00027
00028 enum MsgType { add, del, wakeup, unknown } type;
00029
00030
00031 Snd_ID id;
00032
00033
00034 RCRegion * region;
00035
00036
00037 void setAdd(Snd_ID sndid) {
00038 type=add;
00039 id=sndid;
00040 }
00041
00042
00043 void setDelete(RCRegion* rcregion) {
00044 type=del;
00045 region=rcregion;
00046 }
00047
00048
00049 void setWakeup() {
00050 type=wakeup;
00051 }
00052
00053 SoundManagerMsg(const SoundManagerMsg&);
00054 SoundManagerMsg operator=(const SoundManagerMsg&);
00055 };
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 #endif // INCLUDED_SoundManagerMsg_h