00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_MCAST_PARSER_H
00015 #define TAO_MCAST_PARSER_H
00016
00017 #include "ace/pre.h"
00018 #include "ace/Service_Config.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "tao/CORBA_String.h"
00025 #include "tao/IOR_Parser.h"
00026
00027 #if (TAO_HAS_MCAST_PARSER == 1)
00028
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 class TAO_Export TAO_MCAST_Parser : public TAO_IOR_Parser
00042 {
00043 public:
00044
00045 TAO_MCAST_Parser (void);
00046
00047
00048 virtual ~TAO_MCAST_Parser (void);
00049
00050
00051
00052 virtual bool match_prefix (const char *ior_string) const;
00053
00054
00055 virtual CORBA::Object_ptr parse_string (const char *ior,
00056 CORBA::ORB_ptr orb);
00057
00058 private:
00059
00060 CORBA::Object_ptr multicast_to_service (const char *service_name,
00061 unsigned short port,
00062 const char *mcast_address,
00063 int mcast_ttl,
00064 const char *mcast_nic,
00065 CORBA::ORB_ptr orb,
00066 ACE_Time_Value *timeout);
00067
00068 int multicast_query (char *&buf,
00069 const char *service_name,
00070 unsigned short port,
00071 const char *mcast_address,
00072 int mcast_ttl,
00073 const char *mcast_nic,
00074 ACE_Time_Value *timeout,
00075 CORBA::ORB_ptr orb);
00076
00077
00078
00079 void assign_to_variables (char const * mcast_name_ptr);
00080
00081 private:
00082
00083 CORBA::String_var mcast_address_;
00084
00085
00086 unsigned short mcast_port_;
00087
00088
00089 CORBA::String_var mcast_nic_;
00090
00091
00092 int mcast_ttl_;
00093
00094
00095 CORBA::String_var service_name_;
00096
00097 };
00098
00099 TAO_END_VERSIONED_NAMESPACE_DECL
00100
00101 #if defined (__ACE_INLINE__)
00102 # include "tao/MCAST_Parser.inl"
00103 #endif
00104
00105 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_MCAST_Parser)
00106 ACE_FACTORY_DECLARE (TAO, TAO_MCAST_Parser)
00107
00108 #endif
00109
00110 #include "ace/post.h"
00111 #endif