00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef QOS_DECORATOR_H
00015 #define QOS_DECORATOR_H
00016 #include "ace/pre.h"
00017
00018 #include "ace/Reactor.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "ace/INET_Addr.h"
00025 #include "ace/Event_Handler.h"
00026 #include "SOCK_Dgram_Mcast_QoS.h"
00027 #include "ACE_QoS_Export.h"
00028
00029 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 class ACE_QoS_Export ACE_QoS_Decorator_Base : public ACE_Event_Handler
00044 {
00045
00046 public:
00047
00048
00049
00050 ACE_QoS_Decorator_Base (void);
00051
00052
00053 ACE_QoS_Decorator_Base (ACE_Event_Handler *event_handler);
00054
00055
00056 ~ACE_QoS_Decorator_Base (void);
00057
00058
00059 virtual ACE_HANDLE get_handle (void) const;
00060
00061
00062 virtual int handle_input (ACE_HANDLE fd);
00063
00064
00065 virtual int handle_qos (ACE_HANDLE fd);
00066
00067 private:
00068
00069
00070 ACE_Event_Handler *event_handler_;
00071
00072 };
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 class ACE_QoS_Export ACE_QoS_Event_Handler : public ACE_Event_Handler
00085 {
00086
00087
00088 ~ACE_QoS_Event_Handler (void);
00089
00090
00091 virtual ACE_HANDLE get_handle (void) const;
00092
00093
00094 virtual int handle_input (ACE_HANDLE fd);
00095
00096
00097 void qos_session (ACE_QoS_Session *qos_session);
00098
00099 friend class ACE_QoS_Decorator;
00100
00101 private:
00102
00103
00104
00105 ACE_QoS_Event_Handler (void);
00106
00107
00108 ACE_QoS_Event_Handler (ACE_QoS_Decorator_Base *decorator_base);
00109
00110
00111 ACE_QoS_Session *qos_session_;
00112
00113
00114 ACE_QoS_Decorator_Base *decorator_base_;
00115
00116 };
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127 class ACE_QoS_Export ACE_QoS_Decorator : public ACE_QoS_Decorator_Base
00128 {
00129
00130 public:
00131
00132
00133
00134 ACE_QoS_Decorator (void);
00135
00136
00137 ACE_QoS_Decorator (ACE_Event_Handler *event_handler,
00138 ACE_QoS_Session *qos_session,
00139 ACE_Reactor *reactor = ACE_Reactor::instance ());
00140
00141
00142 ~ACE_QoS_Decorator (void);
00143
00144
00145 virtual ACE_HANDLE get_handle (void) const;
00146
00147
00148 virtual int handle_input (ACE_HANDLE fd);
00149
00150
00151 virtual int handle_qos (ACE_HANDLE fd);
00152
00153
00154
00155 int init (void);
00156
00157 private:
00158
00159
00160 ACE_QoS_Decorator_Base *decorator_base_;
00161
00162
00163
00164 ACE_QoS_Event_Handler *qos_event_handler_;
00165
00166
00167
00168 ACE_QoS_Session *qos_session_;
00169
00170
00171
00172 ACE_Reactor *reactor_;
00173
00174 };
00175
00176 ACE_END_VERSIONED_NAMESPACE_DECL
00177
00178 #include "ace/post.h"
00179 #endif