Merge pull request #2218 from jwillemsen/jwi-pthreadsigmask
[ACE_TAO.git] / TAO / tao / DiffServPolicy / Client_Network_Priority_Policy.h
blob876a84a93bd284ddb065b05222305af1da8ebb68
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Client_Network_Priority_Policy.h
6 */
7 //=============================================================================
10 #ifndef TAO_CLIENT_NETWORK_PRIORITY_POLICY_H
11 #define TAO_CLIENT_NETWORK_PRIORITY_POLICY_H
13 #include /**/ "ace/pre.h"
15 #include "tao/DiffServPolicy/DiffServPolicy_Export.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/LocalObject.h"
22 #include "tao/Basic_Types.h"
23 #include "tao/DiffServPolicy/DiffServPolicy.h"
25 #if defined(_MSC_VER)
26 #pragma warning(push)
27 #pragma warning(disable:4250)
28 #endif /* _MSC_VER */
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 /**
33 * @class TAO_Client_Network_Priority_Policy
35 * @brief Implementation class for TAO-specific Network Priority Policy.
37 * This policy is defined by a client application to specify the
38 * network priority model that it would like to follow, as well as
39 * the request DiffServ codepoint and reply DiffServ codepoint
40 * corresponding to the network priority model.
42 class TAO_DiffServPolicy_Export TAO_Client_Network_Priority_Policy
43 : public TAO::NetworkPriorityPolicy,
44 public ::CORBA::LocalObject
46 public:
47 /// Constructor.
48 TAO_Client_Network_Priority_Policy ();
50 /// Constructor.
51 TAO_Client_Network_Priority_Policy (
52 const TAO::DiffservCodepoint request_diffserv_codepoint,
53 const TAO::DiffservCodepoint reply_diffserv_codepoint,
54 TAO::NetworkPriorityModel network_priority_model);
56 /// Copy constructor.
57 TAO_Client_Network_Priority_Policy (
58 const TAO_Client_Network_Priority_Policy &rhs);
60 /// Returns a copy of <this>.
61 TAO_Client_Network_Priority_Policy *clone () const;
63 TAO::DiffservCodepoint request_diffserv_codepoint ();
65 void request_diffserv_codepoint (TAO::DiffservCodepoint req_dscp);
67 TAO::DiffservCodepoint reply_diffserv_codepoint ();
69 void reply_diffserv_codepoint (TAO::DiffservCodepoint reply_dscp);
71 TAO::NetworkPriorityModel network_priority_model ();
73 void network_priority_model (TAO::NetworkPriorityModel npm);
75 static CORBA::Policy_ptr create (const CORBA::Any &val);
77 CORBA::PolicyType policy_type ();
79 CORBA::Policy_ptr copy ();
81 void destroy ();
83 // Return the cached policy type for this policy.
84 TAO_Cached_Policy_Type _tao_cached_type () const;
86 // Returns the scope at which this policy can be applied. See orbconf.h.
87 TAO_Policy_Scope _tao_scope () const;
89 private:
90 /// The attribute
91 TAO::DiffservCodepoint request_diffserv_codepoint_;
92 TAO::DiffservCodepoint reply_diffserv_codepoint_;
93 TAO::NetworkPriorityModel network_priority_model_;
96 TAO_END_VERSIONED_NAMESPACE_DECL
98 #if defined(_MSC_VER)
99 #pragma warning(pop)
100 #endif /* _MSC_VER */
102 #include /**/ "ace/post.h"
103 #endif /* TAO_CLIENT_NETWORK_PRIORITY_POLICY_H */