00001 // -*- C++ -*- 00002 00003 00004 //============================================================================= 00005 /** 00006 * @file Linear_Network_Priority_Mapping.h 00007 * 00008 * $Id: Linear_Network_Priority_Mapping.h 78627 2007-06-28 08:50:01Z johnnyw $ 00009 * 00010 * Declares the Linear_Network_Priority_Mapping interface, 00011 * 00012 * 00013 * @author Yamuna Krishnamurthy (yamuna@oomworks.com) 00014 */ 00015 //============================================================================= 00016 00017 00018 #ifndef TAO_LINEAR_NETWORK_PRIORITY_MAPPING_H 00019 #define TAO_LINEAR_NETWORK_PRIORITY_MAPPING_H 00020 #include /**/ "ace/pre.h" 00021 00022 #include "tao/orbconf.h" 00023 00024 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 00029 00030 #include "tao/RTCORBA/rtcorba_export.h" 00031 #include "tao/RTCORBA/Network_Priority_Mapping.h" 00032 00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00034 00035 /** 00036 * @class TAO_Linear_Network_Priority_Mapping 00037 * 00038 * @brief A simple implementation of the Network_Priority_Mapping interface 00039 * 00040 * This implementation uses linear mapping between the range of 00041 * DiffServ priorities and CORBA priorities. 00042 */ 00043 class TAO_RTCORBA_Export TAO_Linear_Network_Priority_Mapping : public TAO_Network_Priority_Mapping 00044 { 00045 public: 00046 00047 TAO_Linear_Network_Priority_Mapping (long); 00048 00049 CORBA::Boolean to_network (RTCORBA::Priority corba_priority, 00050 RTCORBA::NetworkPriority &network_priority); 00051 00052 CORBA::Boolean to_CORBA (RTCORBA::NetworkPriority network_priority, 00053 RTCORBA::Priority &corba_priority); 00054 }; 00055 00056 TAO_END_VERSIONED_NAMESPACE_DECL 00057 00058 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */ 00059 00060 #include /**/ "ace/post.h" 00061 #endif /* TAO_LINEAR_NETWORK_PRIORITY_MAPPING_H */