00001
00002
00003 #ifndef OI_MSG_HH
00004 #define OI_MSG_HH
00005
00006 #include "rcs_defs.hh"
00007 #include "cms.hh"
00008 #include "nml.hh"
00009 #include "nmlmsg.hh"
00010
00011 class RCS_EXPORT RCS_OI_REQUEST_MSG:public NMLmsg
00012 {
00013 public:
00014 RCS_OI_REQUEST_MSG (NMLTYPE t, size_t sz);
00015 void update (CMS *);
00016 int terminal_id;
00017 };
00018 extern int RCS_EXPORT RCS_OI_REQUEST_format (NMLTYPE, void *, CMS *);
00019
00020 #define RCS_GENERIC_OI_REQUEST_TYPE ((NMLTYPE) 4000000)
00021
00022 class RCS_EXPORT RCS_GENERIC_OI_REQUEST:public RCS_OI_REQUEST_MSG
00023 {
00024 public:
00025 RCS_GENERIC_OI_REQUEST ();
00026 void update (CMS *);
00027 };
00028
00029 class RCS_EXPORT RCS_OI_REPLY_MSG:public NMLmsg
00030 {
00031 public:
00032 RCS_OI_REPLY_MSG (NMLTYPE t, size_t sz);
00033 void update (CMS *);
00034 int terminal_id;
00035 };
00036
00037 #define RCS_GENERIC_OI_REPLY_TYPE ((NMLTYPE) 5000000)
00038
00039 class RCS_EXPORT RCS_GENERIC_OI_REPLY:public RCS_OI_REPLY_MSG
00040 {
00041 public:
00042 RCS_GENERIC_OI_REPLY ();
00043 void update (CMS *);
00044 };
00045
00046 extern int RCS_EXPORT RCS_OI_REPLY_format (NMLTYPE, void *, CMS *);
00047
00048 class RCS_EXPORT RCS_OI_REQUEST_CHANNEL:public NML
00049 {
00050 public:
00051 RCS_OI_REQUEST_CHANNEL (NML_FORMAT_PTR, char *, char *, char *,
00052 int set_to_server = 0);
00053 RCS_OI_REQUEST_MSG *get_address ()
00054 {
00055 return ((RCS_OI_REQUEST_MSG *) NML::get_address ());
00056 };
00057 };
00058
00059 class RCS_EXPORT RCS_OI_REPLY_CHANNEL:public NML
00060 {
00061 public:
00062 RCS_OI_REPLY_CHANNEL (NML_FORMAT_PTR, char *, char *, char *,
00063 int set_to_server = 0);
00064 RCS_OI_REPLY_MSG *get_address ()
00065 {
00066 return ((RCS_OI_REPLY_MSG *) NML::get_address ());
00067 };
00068 };
00069
00070 class RCS_EXPORT OI_REPLY_QUEUE_NODE
00071 {
00072 public:
00073 OI_REPLY_QUEUE_NODE * next;
00074 RCS_OI_REPLY_MSG *msg;
00075 OI_REPLY_QUEUE_NODE (RCS_OI_REPLY_MSG * _msg);
00076 ~OI_REPLY_QUEUE_NODE ();
00077 };
00078
00079 class RCS_EXPORT OI_REPLY_QUEUE
00080 {
00081 OI_REPLY_QUEUE_NODE *head;
00082 OI_REPLY_QUEUE_NODE *tail;
00083 public:
00084 OI_REPLY_QUEUE ();
00085 ~OI_REPLY_QUEUE ();
00086 void add_message (RCS_OI_REPLY_MSG * _msg);
00087 RCS_OI_REPLY_MSG *get_message ();
00088 void flush ();
00089 };
00090
00091 #endif