Go to the documentation of this file.00001 #ifndef maciResolveHelper_H_
00002 #define maciResolveHelper_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __cplusplus
00016 #error This is a C++ include file and cannot be used from plain C
00017 #endif
00018
00019 #include <acsutil.h>
00020 #include <maciExport.h>
00021
00022 #include <maciS.h>
00023
00024 #include <orbsvcs/CosNamingC.h>
00025
00026 #include <ace/SString.h>
00027
00028 #include <cdb.h>
00029
00030 #include <tao/IFR_Client/IFR_BasicC.h>
00031
00032 namespace maci {
00033
00041 class maci_EXPORT MACIHelper
00042 {
00043
00044 public:
00045
00051 static ACE_CString extractHostnameFromCorbaloc(const ACE_TCHAR *corbaloc);
00052
00065 static ACE_CString getManagerHostname(int argc, ACE_TCHAR **argv);
00066
00082 static maci::Manager_ptr resolveManager(CORBA::ORB_ptr orb,
00083 int argc, ACE_TCHAR **argv,
00084 int retries = 3, unsigned int secTimeout = 0);
00085
00094 static maci::Manager_ptr resolveManager(CORBA::ORB_ptr orb,
00095 const ACE_TCHAR * reference,
00096 int retries = 3, unsigned int secTimeout = 0);
00097
00111 static CosNaming::NamingContext_ptr resolveNameService(CORBA::ORB_ptr orb,
00112 int retries = 3, unsigned int secTimeout = 0);
00121 static CosNaming::NamingContext_ptr resolveNameService(CORBA::ORB_ptr orb,
00122 const ACE_TCHAR * reference,
00123 int retries = 3, unsigned int secTimeout = 0);
00124
00125
00143 static CORBA::Repository_ptr resolveInterfaceRepository(CORBA::ORB_ptr orb, maci::Manager_ptr manager,
00144 int argc, ACE_TCHAR **argv,
00145 int retries = 3, unsigned int secTimeout = 0);
00146
00155 static CORBA::Repository_ptr resolveInterfaceRepository(CORBA::ORB_ptr orb,
00156 const ACE_TCHAR * reference,
00157 int retries = 3, unsigned int secTimeout = 0);
00158
00163 static void terminateResolving(bool terminate = true);
00164
00165 private:
00166
00167 static bool m_terminate;
00168
00169
00170 };
00171
00172 };
00173
00174 #endif
00175