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 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class TAO_Export TAO_MCAST_Parser : public TAO_IOR_Parser
00040 {
00041 public:
00042
00043 TAO_MCAST_Parser (void);
00044
00045
00046 virtual ~TAO_MCAST_Parser (void);
00047
00048
00049
00050 virtual int match_prefix (const char *ior_string) const;
00051
00052
00053 virtual CORBA::Object_ptr parse_string (const char *ior,
00054 CORBA::ORB_ptr orb
00055 ACE_ENV_ARG_DECL_NOT_USED)
00056 ACE_THROW_SPEC ((CORBA::SystemException));
00057
00058 private:
00059
00060 CORBA::Object_ptr multicast_to_service (const char *service_name,
00061 CORBA::UShort port,
00062 const char *mcast_address,
00063 const char *mcast_ttl,
00064 const char *mcast_nic,
00065 CORBA::ORB_ptr orb,
00066 ACE_Time_Value *timeout
00067 ACE_ENV_ARG_DECL_NOT_USED);
00068
00069 int multicast_query (char *&buf,
00070 const char *service_name,
00071 u_short port,
00072 const char *mcast_address,
00073 const char *mcast_ttl,
00074 const char *mcast_nic,
00075 ACE_Time_Value *timeout,
00076 CORBA::ORB_ptr orb);
00077
00078
00079
00080 void assign_to_variables (const char * &mcast_name_ptr);
00081
00082
00083 CORBA::String_var mcast_address_;
00084 CORBA::String_var mcast_port_;
00085 CORBA::String_var mcast_nic_;
00086 CORBA::String_var mcast_ttl_;
00087 CORBA::String_var service_name_;
00088 };
00089
00090 TAO_END_VERSIONED_NAMESPACE_DECL
00091
00092 #if defined (__ACE_INLINE__)
00093 # include "tao/MCAST_Parser.i"
00094 #endif
00095
00096 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_MCAST_Parser)
00097 ACE_FACTORY_DECLARE (TAO, TAO_MCAST_Parser)
00098
00099 #include "ace/post.h"
00100 #endif