diff options
author | bala <balanatarajan@users.noreply.github.com> | 2000-07-16 20:58:47 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2000-07-16 20:58:47 +0000 |
commit | 40c989b167b174557f9c39f8005c6b559b44a944 (patch) | |
tree | a390480f51b8efe6155ae284851ef9aecbf5de40 | |
parent | c1d1ded07b3863db465312452d84cd404c9fac0c (diff) | |
download | ATCD-40c989b167b174557f9c39f8005c6b559b44a944.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tao/Stub.cpp | 10 | ||||
-rw-r--r-- | TAO/tao/Stub.h | 9 | ||||
-rw-r--r-- | TAO/tao/Stub.i | 9 | ||||
-rw-r--r-- | TAO/tao/Tagged_Components.cpp | 84 | ||||
-rw-r--r-- | TAO/tao/Tagged_Components.h | 42 | ||||
-rw-r--r-- | TAO/tao/Tagged_Components.i | 21 |
6 files changed, 172 insertions, 3 deletions
diff --git a/TAO/tao/Stub.cpp b/TAO/tao/Stub.cpp index c40578907d3..090ac9f509b 100644 --- a/TAO/tao/Stub.cpp +++ b/TAO/tao/Stub.cpp @@ -526,6 +526,16 @@ TAO_Stub::put_params (TAO_GIOP_Invocation &call, } #endif /* TAO_HAS_MINIMUM_CORBA */ +// **************************************************************** + +#if (TAO_HAS_FT_CORBA == 1) +void +TAO_Stub::set_profile_from_primary (void) +{ + // For FT_CORBA we need to find the profile with FT_TAG_PRIMARY +} + +#endif /*TAO_HAS_FT_CORBA*/ // **************************************************************** diff --git a/TAO/tao/Stub.h b/TAO/tao/Stub.h index d546a34f68d..7b1b04469b9 100644 --- a/TAO/tao/Stub.h +++ b/TAO/tao/Stub.h @@ -419,6 +419,13 @@ private: TAO_Profile *next_forward_profile (void); // NON-THREAD-SAFE. utility method for next_profile. +#if (TAO_HAS_FT_CORBA == 1) +private: + void set_profile_from_primary (void); + // +#endif /*TAO_HAS_FT_CORBA*/ + + #if (TAO_HAS_RT_CORBA == 1) private: @@ -444,6 +451,8 @@ private: CORBA::Boolean is_client_protocol_policy_parsed_; #endif /* TAO_HAS_RT_CORBA == 1 */ + + private: TAO_MProfile base_profiles_; diff --git a/TAO/tao/Stub.i b/TAO/tao/Stub.i index 77f14eecdc8..bcd57b36175 100644 --- a/TAO/tao/Stub.i +++ b/TAO/tao/Stub.i @@ -37,7 +37,14 @@ TAO_Stub::reset_base (void) this->reset_first_locate_request (); this->profile_success_ = 0; +#if (TAO_HAS_FT_CORBA == 0) this->set_profile_in_use_i (base_profiles_.get_next ()); +#else + + // We need to follow a different approach for FT_CORBA. + this->set_profile_from_primary (); + +#endif /*TAO_HAS_FT_CORBA */ } ACE_INLINE void @@ -231,7 +238,7 @@ TAO_Stub::base_profiles (void) const } ACE_INLINE TAO_MProfile& -TAO_Stub::base_profiles (void) +TAO_Stub::base_profiles (void) { return this->base_profiles_; } diff --git a/TAO/tao/Tagged_Components.cpp b/TAO/tao/Tagged_Components.cpp index f0737c8beb3..d28762a2f45 100644 --- a/TAO/tao/Tagged_Components.cpp +++ b/TAO/tao/Tagged_Components.cpp @@ -170,6 +170,88 @@ TAO_Tagged_Components::set_known_component_i ( } } + +void +TAO_Tagged_Components::set_unique_component_i ( + const IOP::TaggedComponent& component) +{ + TAO_InputCDR cdr (ACE_reinterpret_cast (const char*, + component.component_data.get_buffer ()), + component.component_data.length ()); + + CORBA::Boolean byte_order; + if ((cdr >> ACE_InputCDR::to_boolean (byte_order)) == 0) + return; + cdr.reset_byte_order (ACE_static_cast(int,byte_order)); + +# if (TAO_HAS_FT_CORBA == 1) + if (component.tag == IOP::TAG_FT_PRIMARY) + { + CORBA::Boolean primary; + if ((cdr >> primary) == 0) + return; + + this->ft_tag_primary_ = 1; + } + else if (component.tag == IOP::TAG_FT_GROUP) + { + // Revision numbers of the FT specification + CORBA::Octet ft_minor, ft_major; + + if ((cdr >> ft_major) == 0) + return; + if ((cdr >> ft_minor) == 0) + return; + + // Check for the revsion numbers + if (ft_major != TAO_DEF_FT_CORBA_MAJOR && + ft_minor != TAO_DEF_FT_CORBA_MINOR) + { + // @@Should we print out an error?? + return; + } + + // Read the FTDomainId + if (cdr.char_translator () == 0) + { + CORBA::ULong length = 0; + if (cdr.read_ulong (length)) + { + // Do not include NULL character at the end. + // @@ This is not getting demarshaled using the codeset + // translators! + this->ft_tagged_component_.ft_domain_id_.set (cdr.rd_ptr (), + length - 1, + 0); + cdr.skip_bytes (length); + } + } + else + { + CORBA::String_var tmp; + cdr.read_string (tmp.inout ()); + this->ft_tagged_component_.ft_domain_id_.set (tmp._retn (), 1); + } + + // Read the Object Group ID + CORBA::ULongLong group_id; + if (cdr.read_ulonglong (group_id) == 0) + return; + + this->ft_tagged_component_.object_group_id_ = group_id; + + // Read the object group ref version + CORBA::ULong ref_version; + if (cdr.read_ulong (ref_version) == 0) + return; + + this->ft_tagged_component_.object_group_ref_version_ = + ref_version; + } +#endif /*TAO_HAS_FT_CORBA == 1 */ + +} + void TAO_Tagged_Components::set_component_i (const IOP::TaggedComponent& component) { @@ -267,6 +349,8 @@ TAO_Tagged_Components::decode (TAO_InputCDR& cdr) this->components_[i]; if (this->known_tag (component.tag)) this->set_known_component_i (component); + else if (this->unique_tag (component.tag)) + this->set_unique_component_i (component); } return 1; } diff --git a/TAO/tao/Tagged_Components.h b/TAO/tao/Tagged_Components.h index 0b1c589bd43..25c82f224fc 100644 --- a/TAO/tao/Tagged_Components.h +++ b/TAO/tao/Tagged_Components.h @@ -104,7 +104,37 @@ public: IOP::MultipleComponentProfile &components (void); // Read/Write access to the underlying // MutipleComponentProfile. Added by request from Chris Hafey - // <chris@stentorsoft.com> + // <chris@stentorsoft.com> + +# if (TAO_HAS_FT_CORBA == 1) + + CORBA::Boolean is_primary (void); + // Does the profile represent an endpoint of a primary + + struct TAO_FT_Group_Tagged_Component + { + // = TITLE + // Tagged components in TAG_FT_GROUP + // + // = DESCRIPTION + // Tagged components in the profile containing TAG_FT_GROUP + + IOP::FTDomainID ft_domain_id_; + // Identifier of the FT domain + + IOP::ObjectGroupID object_group_id_; + // The idetifier of the Object Group + + IOP::ObjectGroupRefVersion object_group_ref_version_; + // The version number of the Object Group Reference + }; + + TAO_Tagged_Components::TAO_FT_Group_Tagged_Component & + ft_group_tagged_component (void); + + const TAO_Tagged_Components::TAO_FT_Group_Tagged_Component & + ft_group_tagged_component (void); +#endif /*TAO_HAS_FT_CORBA */ private: void set_code_sets_i (CONV_FRAME::CodeSetComponent &lhs, @@ -112,6 +142,7 @@ private: // Helper method to implement set_code_sets() void set_known_component_i (const IOP::TaggedComponent& component); + void set_unique_component_i (const IOP::TaggedComponent& component); void set_component_i (const IOP::TaggedComponent& component); void set_component_i (IOP::TaggedComponent& component); void add_component_i (const IOP::TaggedComponent& component); @@ -143,6 +174,15 @@ private: // The rest of the components, to be compliant we cannot drop a // bunch of them. +# if (TAO_HAS_FT_CORBA == 1) + CORBA::Boolean ft_tag_primary_; + // Flag that indicates whether the profile is from a PRIMARY + + TAO_FT_Tagged_Component ft_tagged_component_; + // Tagged components in TAG_FT_GROUP + +#endif /*TAO_HAS_FT_CORBA */ + // A flag for each component... CORBA::Octet orb_type_set_; CORBA::Octet code_sets_set_; diff --git a/TAO/tao/Tagged_Components.i b/TAO/tao/Tagged_Components.i index da5b23331ba..6b36927ffe8 100644 --- a/TAO/tao/Tagged_Components.i +++ b/TAO/tao/Tagged_Components.i @@ -70,10 +70,11 @@ TAO_Tagged_Components::unique_tag (IOP::ComponentId tag) const || tag == IOP::TAG_SSL_SEC_TRANS || tag == IOP::TAG_CSI_ECMA_Public_SEC_MECH || tag == IOP::TAG_GENERIC_SEC_MECH - || tag == IOP::TAG_COMPLETE_OBJECT_KEY || tag == IOP::TAG_ENDPOINT_ID_POSITION || tag == IOP::TAG_LOCATION_POLICY + || tag == IOP::TAG_FT_PRIMARY + || tag == IOP::TAG_FT_GROUP || tag == IOP::TAG_DCE_STRING_BINDING || tag == IOP::TAG_DCE_BINDING_NAME || tag == IOP::TAG_DCE_NO_PIPES @@ -85,3 +86,21 @@ TAO_Tagged_Components::components (void) { return this->components_; } + +ACE_INLINE CORBA::Boolean +TAO_Tagged_Components::is_primary (void) +{ + return this->ft_tag_primary_; +} + +ACE_INLINE TAO_Tagged_Components::TAO_FT_Group_Tagged_Component & +TAO_Tagged_Components::ft_group_tagged_component (void) +{ + return this->ft_tagged_component_; +} + +ACE_INLINE const TAO_Tagged_Components::TAO_FT_Group_Tagged_Component& +TAO_Tagged_Components::ft_group_tagged_component (void) +{ + return this->ft_tagged_component_; +} |