00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Bind_Dispatcher_Guard.h 00006 * 00007 * $Id: Bind_Dispatcher_Guard.h 82593 2008-08-11 15:39:24Z johnnyw $ 00008 * 00009 * @author Carlos O'Ryan <coryan@uci.edu> 00010 * @author Chad Elliott <elliott_c@ociweb.com> 00011 */ 00012 //============================================================================= 00013 00014 #ifndef TAO_BIND_DISPATCHER_GUARD_H 00015 #define TAO_BIND_DISPATCHER_GUARD_H 00016 00017 #include /**/ "ace/pre.h" 00018 00019 #include "tao/Basic_Types.h" 00020 #include /**/ "tao/TAO_Export.h" 00021 00022 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00023 00024 class TAO_Reply_Dispatcher; 00025 class TAO_Transport_Mux_Strategy; 00026 00027 class TAO_Export TAO_Bind_Dispatcher_Guard 00028 { 00029 public: 00030 TAO_Bind_Dispatcher_Guard (CORBA::ULong request_id, 00031 TAO_Reply_Dispatcher* rd, 00032 TAO_Transport_Mux_Strategy* tms); 00033 00034 ~TAO_Bind_Dispatcher_Guard (void); 00035 00036 /// Returns 0 if succesful and non-zero otherwise. 00037 int unbind_dispatcher (void); 00038 00039 /// State information 00040 enum TAO_Bind_Dispatcher_Status 00041 { 00042 /// Unbind the dispatcher 00043 UNBIND = 0, 00044 /// Do not unbind dispatcher 00045 NO_UNBIND 00046 }; 00047 00048 /// Get status 00049 TAO_Bind_Dispatcher_Status status (void) const; 00050 00051 /// Set status 00052 void status (TAO_Bind_Dispatcher_Status status); 00053 00054 private: 00055 TAO_Bind_Dispatcher_Status status_; 00056 CORBA::ULong request_id_; 00057 TAO_Transport_Mux_Strategy* tms_; 00058 }; 00059 00060 TAO_END_VERSIONED_NAMESPACE_DECL 00061 00062 #if defined (__ACE_INLINE__) 00063 # include "tao/Bind_Dispatcher_Guard.inl" 00064 #endif /* __ACE_INLINE__ */ 00065 00066 #include /**/ "ace/post.h" 00067 #endif