IceE-1.2.0/0000755000076400007640000000000010620544016012231 5ustar matthewmatthewIceE-1.2.0/INSTALL.LINUX0000644000076400007640000001316610620544016014167 0ustar matthewmatthew====================================================================== Requirements ====================================================================== Operating System ---------------- Ice-E is expected to build and run properly on any recent Linux distribution for x86 and x86_64. However, Ice-E is officially supported only on: Development Platform | Runtime Platform -------------------------------|-------------------------------------- Red Hat Enterprise Linux AS | Same as development 4 update 4 (i386 or x86_64) | | Novell SuSE Linux Enterprise | Same as development Server 10 (i586 or x86_64) | | Red Hat Enterprise Linux AS | Gumstix Linux buildroot revision 1364 4 update 4 (i386) with Gumstix | buildroot revision 1364 | C++ compiler ------------ Ice-E is expected to build properly with GCC 3.3 or later. However, only the following compilers are officially supported: - GCC 3.4.6 on RHEL 4.4 - GCC 4.1.0 on SLES 10 - GCC 4.1.1 ARM cross-compiler for Gumstix Slice-to-Embedded-C++ translator -------------------------------- You will need the Slice-to-Embedded-C++ translator (slice2cppe) and preprocessor (icecpp). You can download a binary distribution from the ZeroC web site, or you can build the Slice-to-Embedded-C++ translator yourself. Binary and source distributions for the supported platforms are available at http://www.zeroc.com/icee/download.html The directory containing the translator executables must be added to your PATH. For example, if the translator distribution is installed in /opt/IceE-1.2.0, you must add /opt/IceE-1.2.0/bin to your PATH. Python ------ You will need Python to run the automated test suite. If you have no interest in running the test scripts, Python is not required. ====================================================================== Compilation and Testing ====================================================================== Extract the Ice-E archive in any directory you like (for example, in your home directory): $ tar xvfz IceE-1.2.0.tar.gz Change the working directory to IceE-1.2.0: $ cd IceE-1.2.0 Review the README file to determine whether you want to modify the default set of features provided by the run time libraries. Next, edit config/Make.rules to establish your build configuration. The comments in the file provide more information. Now you're ready to build Ice-E: $ make This will build the Ice-E library, tests and examples. After a successful build, you can run the test suite, provided that you have installed Python: $ make test This is equivalent to: $ python allTests.py If everything worked out, you should see lots of "ok" messages. In case of a failure, the tests abort with "failed". If you want to try out any of the demos and you did not build Ice-E statically, make sure to update your LD_LIBRARY_PATH environment variable to add the "lib" directory: $ export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH Cross-compiling for Gumstix --------------------------- To build Ice-E for the Gumstix embedded environment, you must first build the buildroot toolchain. Ice-E has been tested with revision 1364 of buildroot. For information on how to obtain and build the toolchain, please see the following link from the Gumstix Support Wiki: http://docwiki.gumstix.org/Buildroot Make sure to enable C++ support in the toolchain, as discussed at the link below: http://docwiki.gumstix.org/Sample_code/Cpp/Hello_World Once you have the toolchain built, add the bin directory to your path by executing the following command: $ export PATH=/build_arm_nofpu/staging_dir/bin:$PATH You now must set the following environment variables: $ export CXX=arm-linux-c++ $ export AR=arm-linux-ar Finally, follow the regular Ice-E build steps as described above. If you have python installed on your gumstix, you can execute the allTests.py script to run the test suite. First you need to copy the compiled tests and test suite scripts to your gumstix. From the Ice-E source distribution base directory, run the following commands: $ find . -name *.o | xargs rm $ scp -r allTests.py config lib test : The first command removes the object files so you don't copy them as well. If you built Ice-E statically, there is no need to include "lib" in the above command. Finally, start the test suite by changing to your chosen installation directory and running: $ python allTests.py If you do not have python then you can run most tests by manually running the server in one window followed by the client in a separate window. ====================================================================== 32 bit builds on x86_64 ====================================================================== By default, builds on x86_64 are 64-bit. To perform a 32-bit build on an x86_64 Linux system, set the environment variable LP64 to no, as shown below: $ export LP64=no ====================================================================== Installation ====================================================================== Simply run "make install". This will install Ice-E in the directory specified by the "prefix" variable in config/Make.rules. After installation, make sure the /lib directory is in your LD_LIBRARY_PATH. When compiling Ice-E programs, you must also make sure to pass the location of the /include directory to the compiler with the -I option, and the location of the /lib directory with the -L option. On an x86_64 system, the libraries are installed in /lib64 unless LP64 is set to no. No other changes are necessary. IceE-1.2.0/INSTALL.WINDOWS0000644000076400007640000000771410620544016014424 0ustar matthewmatthew====================================================================== Requirements ====================================================================== Windows version --------------- Ice-E has been extensively tested on: - Windows XP x86 - Windows Vista x86 C++ compiler ------------ The following C++ compilers are supported: - Microsoft Visual C++ 2005 (both Professional and Express editions) Visual C++ 2005 Express is available for download from: http://msdn.microsoft.com/vstudio/express/visualc/ Visual C++ 2005 Express Setup ----------------------------- Users of Visual C++ 2005 Express need to install the Microsoft Platform SDK: http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en Once installed, follow the instructions at the link below: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/ You also need to add the Platform SDK directories to the INCLUDE, LIB and PATH environment variables. For example: @SET PDK_HOME=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2 @SET PATH=%PDK_HOME%\bin;%PATH% @SET INCLUDE=%PDK_HOME%\include;%INCLUDE% @SET LIB=%PDK_HOME%\lib;%LIB% The PDK_HOME environment variable must be defined in order to build the Ice-E source distribution. Note that PDK_HOME must not contain a trailing backslash (\). You may also need to execute the vsvars32.bat script, located in C:\Program Files\Microsoft Visual Studio 8\Common7\Tools, to properly configure your build environment. Slice-to-Embedded-C++ translator -------------------------------- You will need the Slice-to-Embedded-C++ translator (slice2cppe) and preprocessor (icecpp). You can download a binary distribution from the ZeroC web site, or you can build the Slice-to-Embedded-C++ translator yourself. Binary and source distributions for the supported platforms are available at http://www.zeroc.com/icee/download.html The directory containing the translator executables must be added to your PATH. For example, if the translator distribution is installed in C:\IceE-1.2.0, you must add C:\IceE-1.2.0\bin to your PATH. Python ------ You will need Python to run the automated test suite. If you have no interest in running the test scripts, Python is not required. You can download a Python distribution for Windows from http://www.python.org/download ====================================================================== Compilation and Testing ====================================================================== Building Ice ------------ Using your favorite Zip tool, unzip the Ice source archive anywhere you like. Open a Visual Studio 2005 command prompt and change the working directory to IceE-1.2.0. For example: > cd C:\IceE-1.2.0 Edit config\Make.rules.mak to establish your build configuration. The comments in the file provide more information. In particular, you must ensure that CPP_COMPILER is set appropriately for your environment. Now you're ready to build Ice-E: > nmake /f Makefile.mak After a successful build, you can run the test suite, provided that you have installed Python: > nmake /f makefile.mak test This is equivalent to: > python allTests.py If everything worked out, you should see lots of "ok" messages. In case of a failure, the tests abort with "failed". If you want to try out any of the demos and you did not build Ice-E statically, make sure to update your PATH environment variable to add the "bin" directory that contains the Ice-E DLLs. ====================================================================== Installation ====================================================================== Simply run "nmake /f Makefile.mak install". This will install Ice-E in the directory specified by the "prefix" variable in the file config\Make.rules.mak. After installation, make sure to add the include directory to the Visual C++ "Include files" and the lib directory to the "Library files" in the IDE (Tools->Options->Projects and Solutions->VC++ Directories). IceE-1.2.0/test/0000755000076400007640000000000010620544015013207 5ustar matthewmatthewIceE-1.2.0/test/Common/0000755000076400007640000000000010620544003014434 5ustar matthewmatthewIceE-1.2.0/test/Common/.depend0000644000076400007640000000414310616637156015717 0ustar matthewmatthewTestCommon$(OBJEXT): TestCommon.cpp ../../include/IceE/DisableWarnings.h ../include/TestCommon.h ../../include/IceE/Config.h ../../include/IceE/IceE.h ../../include/IceE/Initialize.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Shared.h ../../include/IceE/PropertiesF.h ../../include/IceE/LoggerF.h ../../include/IceE/InstanceF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/LocalException.h ../../include/IceE/Properties.h ../../include/IceE/Logger.h ../../include/IceE/LoggerUtil.h ../../include/IceE/Communicator.h ../../include/IceE/RecMutex.h ../../include/IceE/ObjectAdapter.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/DispatchStatus.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/UUID.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Incoming.h ../../include/IceE/Thread.h ../../include/IceE/Functional.h ../../include/IceE/Unicode.h ../include/TestApplication.h ../../include/IceE/StaticMutex.h IceE-1.2.0/test/Common/Makefile.mak0000755000076400007640000000275010620347541016662 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\.. LIBNAME = $(top_srcdir)\lib\testcommon$(LIBSUFFIX).lib DLLNAME = $(top_srcdir)\bin\testcommon$(SOVERSION)$(LIBSUFFIX).dll TARGETS = $(LIBNAME) $(DLLNAME) OBJS = TestCommon.obj SRCS = $(OBJS:.obj=.cpp) !include $(top_srcdir)\config\Make.rules.mak CPPFLAGS = -I..\include $(CPPFLAGS) -DICE_TEST_COMMON_API_EXPORTS !if "$(STATICLIBS)" != "yes" & "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb) !endif !if "$(EMBEDDED_DEVICE)" != "" LIBS = $(LIBS) !endif !if "$(STATICLIBS)" == "yes" $(DLLNAME): $(LIBNAME): $(OBJS) $(AR) $(ARFLAGS) $(PDBFLAGS) $(OBJS) /out:$(LIBNAME) !else $(LIBNAME): $(DLLNAME) $(DLLNAME): $(OBJS) $(LINK) $(LDFLAGS) /dll $(PDBFLAGS) $(OBJS) /out:$(DLLNAME) $(LIBS) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest @if exist $(DLLNAME:.dll=.exp) del /q $(DLLNAME:.dll=.exp) !endif clean:: del /q $(LIBNAME:.dll=.*) !if "$(STATICLIBS)" != "yes" clean:: del /q $(DLLNAME:.dll=.*) !endif !include .depend IceE-1.2.0/test/Common/Makefile0000644000076400007640000000224510576536574016127 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../.. LIBFILENAME = $(call mklibfilename,TestCommon,$(VERSION)) SONAME = $(call mksoname,TestCommon,$(SOVERSION)) LIBNAME = $(call mklibname,TestCommon) TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) OBJS = TestCommon.o SRCS = $(OBJS:.o=.cpp) HDIR = $(includedir)/Ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I../include $(CPPFLAGS) -DICE_TEST_COMMON_API_EXPORTS LINKWITH := -lIceE ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) rm -f $@ ln -s $(LIBFILENAME) $@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME) rm -f $@ ln -s $(SONAME) $@ endif include .depend IceE-1.2.0/test/Common/TestCommon.cpp0000755000076400007640000002451210576536574017267 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include using namespace std; using namespace Ice; static IceUtil::StaticMutex globalMutex = ICE_STATIC_MUTEX_INITIALIZER; class LoggerI : public Logger { public: virtual void print(const string& message) { IceUtil::StaticMutex::Lock sync(globalMutex); tprintf("%s\n", message.c_str()); } virtual void trace(const string& category, const string& message) { IceUtil::StaticMutex::Lock sync(globalMutex); string s = "[ "; { char buf[1024]; #ifdef _WIN32 sprintf(buf, "%ld", GetTickCount()); #else sprintf(buf, "%lu", (long)IceUtil::Time::now().toMilliSeconds()); #endif s += buf; } s += ' '; if(!category.empty()) { s += category + ": "; } s += message + " ]"; string::size_type idx = 0; while((idx = s.find("\n", idx)) != string::npos) { s.insert(idx + 1, " "); ++idx; } tprintf("%s\n", s.c_str()); } virtual void warning(const string& message) { IceUtil::StaticMutex::Lock sync(globalMutex); tprintf("warning: %s\n", message.c_str()); } virtual void error(const string& message) { IceUtil::StaticMutex::Lock sync(globalMutex); tprintf("error: %s\n", message.c_str()); } }; static IceUtil::StaticMutex terminatedMutex = ICE_STATIC_MUTEX_INITIALIZER; static bool appTerminated= false; #ifdef _WIN32_WCE const TCHAR windowClassName[] = L"Test Driver"; #define IDC_MAIN_EDIT 101 class TestSuiteFailed { public: }; static FILE* _tprintfp = 0; static HWND hEdit; static HWND mainWnd; static IceUtil::ThreadControl mainThread; void tprintf(const char* fmt, ...) { va_list va; va_start(va, fmt); char buf[1024]; _vsnprintf(buf, sizeof(buf)-1, fmt, va); buf[sizeof(buf)-1] = '\0'; va_end(va); if(_tprintfp) { fwrite(buf, strlen(buf), 1, _tprintfp); fflush(_tprintfp); return; } char* start = buf; const char* end = start + strlen(start); char* curr = start; while(curr < end) { bool nl = false; while(curr < end && *curr != '\n') { // Not designed to handle \r assert(*curr != '\r'); ++curr; } if(*curr == '\n') { nl = true; } *curr = '\0'; static TCHAR nlStr[] = L"\r\n"; // // If the thread is not the main thread we have to post a message // to the main thread to do the EM_REPLACESEL. Calling SendMessage // from a thread other than main is not permitted. // if(IceUtil::ThreadControl() != mainThread) { wchar_t* wtext = new wchar_t[sizeof(wchar_t) * (curr - start)+1]; mbstowcs(wtext, start, (curr - start) + 1); ::PostMessage(mainWnd, WM_USER, (WPARAM)FALSE, (LPARAM)wtext); if(nl) { wchar_t* wtext = new wchar_t[sizeof(nlStr)]; wcscpy(wtext, nlStr); ::PostMessage(mainWnd, WM_USER, (WPARAM)FALSE, (LPARAM)wtext); } } else { TCHAR wtext[1024]; mbstowcs(wtext, start, (curr - start) + 1); ::SendMessage(hEdit, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)wtext); if(nl) { ::SendMessage(hEdit, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)nlStr); } } ++curr; start = curr; } // // Process pending events. // if(IceUtil::ThreadControl() == mainThread) { MSG Msg; while(PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } } static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_USER: { // tprint from a thread other than main. lParam holds a pointer to the text. ::SendMessage(hEdit, EM_REPLACESEL, (WPARAM)wParam, (LPARAM)lParam); wchar_t* text = (wchar_t*)lParam; delete[] text; } break; case WM_CREATE: { RECT rcClient; GetClientRect(hWnd, &rcClient); hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"", WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hWnd, (HMENU)IDC_MAIN_EDIT, GetModuleHandle(NULL), NULL); assert(hEdit != NULL); } break; case WM_SIZE: { RECT rcClient; GetClientRect(hWnd, &rcClient); SetWindowPos(hEdit, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER); } break; case WM_CLOSE: { DestroyWindow(hWnd); break; } case WM_QUIT: case WM_DESTROY: { PostQuitMessage(0); IceUtil::StaticMutex::Lock sync(terminatedMutex); appTerminated = true; break; } default: return DefWindowProc(hWnd, msg, wParam, lParam); } return 0; } int TestApplication::main(HINSTANCE hInstance) { WNDCLASS wc; wc.style = CS_HREDRAW|CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = windowClassName; if(!RegisterClass(&wc)) { MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } wchar_t wName[1024] = L"Test"; if(_name.size() > 0) { int len = _name.size(); if(len > 1023) { len = 1023; } mbstowcs(wName, _name.c_str(), len); wName[len] = L'\0'; } RECT rect; GetClientRect(GetDesktopWindow(), &rect); int width = rect.right - rect.left; if(width > 320) { width = 320; } int height = rect.bottom - rect.top; if(height > 200) { height = 200; } mainWnd = CreateWindow(windowClassName, wName, WS_VISIBLE|WS_OVERLAPPED|WS_SYSMENU|WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL); if(mainWnd == NULL) { MessageBox(NULL, L"Window Creation Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } ShowWindow(mainWnd, SW_SHOW); UpdateWindow(mainWnd); int status = EXIT_SUCCESS; try { extern int __argc; extern char **__argv; status = run(__argc, __argv); } catch(const TestSuiteFailed&) { tprintf("test failed\n"); } catch(const Exception& ex) { tprintf("%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } catch(const std::exception& ex) { tprintf("std::exception: %s\n", ex.what()); status = EXIT_FAILURE; } catch(const string& msg) { tprintf("std::string: %s\n", msg.c_str()); status = EXIT_FAILURE; } catch(const char* msg) { tprintf("const char*: %s\n", msg); status = EXIT_FAILURE; } catch(...) { tprintf("unknown exception\n"); status = EXIT_FAILURE; } MSG Msg; while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } if(_communicator) { try { _communicator->destroy(); } catch(const Exception& ex) { tprintf("communicator::destroy() failed: %s\n", ex.toString().c_str()); status = EXIT_FAILURE; } _communicator = 0; } return status; } void TestApplication::loadConfig(const PropertiesPtr& properties) { // // COMPILERBUG: For some unknown reason the simple approach // doesn't work under WinCE if you compile with optimization. It // looks like a compiler bug to me. // string config = "config"; WIN32_FIND_DATA data; HANDLE h = FindFirstFile(L"config", &data); if(h == INVALID_HANDLE_VALUE) { config = "config.txt"; HANDLE h = FindFirstFile(L"config.txt", &data); if(h == INVALID_HANDLE_VALUE) { return; } } FindClose(h); try { properties->load(config); } catch(const FileException&) { } } #else static IceUtil::StaticMutex tprintMutex = ICE_STATIC_MUTEX_INITIALIZER; void tprintf(const char* fmt, ...) { IceUtil::StaticMutex::Lock sync(tprintMutex); va_list va; va_start(va, fmt); char buf[1024]; vprintf(fmt, va); buf[sizeof(buf)-1] = '\0'; va_end(va); fflush(stdout); } int TestApplication::main(int ac, char* av[]) { int status; try { status = run(ac, av); } catch(const Exception& ex) { tprintf("%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } catch(const std::exception& ex) { tprintf("std::exception: %s\n", ex.what()); status = EXIT_FAILURE; } catch(const string& msg) { tprintf("std::string: %s\n", msg.c_str()); status = EXIT_FAILURE; } catch(const char* msg) { tprintf("const char*: %s\n", msg); status = EXIT_FAILURE; } catch(...) { tprintf("unknown exception\n"); status = EXIT_FAILURE; } if(_communicator) { try { _communicator->destroy(); } catch(const Exception& ex) { tprintf("communicator::destroy() failed: %s\n", ex.toString().c_str()); status = EXIT_FAILURE; } _communicator = 0; } return status; } void TestApplication::loadConfig(const PropertiesPtr& properties) { try { properties->load("config"); } catch(const FileException&) { try { properties->load("config.txt"); } catch(const FileException&) { } } } #endif TestApplication::TestApplication(const std::string& name) : _name(name) { } LoggerPtr TestApplication::getLogger() { return new LoggerI(); } void TestApplication::setCommunicator(const CommunicatorPtr& communicator) { _communicator = communicator; #ifdef _WIN32_WCE if(communicator->getProperties()->getPropertyWithDefault("LogToFile", "0") != "0") { _tprintfp = fopen(("log-" + _name + ".txt").c_str(), "w"); } #endif } CommunicatorPtr TestApplication::communicator() { return _communicator; } bool TestApplication::terminated() const { IceUtil::StaticMutex::Lock sync(terminatedMutex); return appTerminated; } void testFailed(const char* expr, const char* file, unsigned int line) { tprintf("failed!\n"); tprintf("%s:%u: assertion `%s' failed\n", file, line, expr); #ifdef _WIN32_WCE throw TestSuiteFailed(); #else abort(); #endif } IceE-1.2.0/test/Makefile.mak0000755000076400007640000000107610600254657015435 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. !include $(top_srcdir)/config/Make.rules.mak SUBDIRS = Common \ IceE $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/test/include/0000755000076400007640000000000010620544015014632 5ustar matthewmatthewIceE-1.2.0/test/include/TestApplication.h0000644000076400007640000000223710616652361020123 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_APPLICATION_H #define TEST_APPLICATION_H #include #include #include // // XXX: For ICE_TEST_COMMON_API. We could create a TestConfig.h later, or // perhaps make Test/... subdirectory. // #include class ICE_TEST_COMMON_API TestApplication { public: TestApplication(const std::string& = ""); virtual ~TestApplication() { } #ifdef _WIN32_WCE int main(HINSTANCE); #else int main(int, char*[]); #endif virtual int run(int, char*[]) = 0; Ice::LoggerPtr getLogger(); void setCommunicator(const Ice::CommunicatorPtr&); Ice::CommunicatorPtr communicator(); bool terminated() const; void loadConfig(const Ice::PropertiesPtr&); private: const std::string _name; Ice::CommunicatorPtr _communicator; }; #endif IceE-1.2.0/test/include/TestCommon.h0000644000076400007640000000144610576536575017126 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_COMMON_H #define TEST_COMMON_H #include #include #ifdef ICE_TEST_COMMON_API_EXPORTS # define ICE_TEST_COMMON_API ICE_DECLSPEC_EXPORT #else # define ICE_TEST_COMMON_API ICE_DECLSPEC_IMPORT #endif ICE_TEST_COMMON_API void tprintf(const char* fmt, ...); ICE_TEST_COMMON_API void testFailed(const char*, const char*, unsigned int); #define test(ex) ((ex) ? ((void)0) : testFailed(#ex, __FILE__, __LINE__)) #endif IceE-1.2.0/test/Makefile0000644000076400007640000000106710576536574014700 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. include $(top_srcdir)/config/Make.rules SUBDIRS = Common \ IceE $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done IceE-1.2.0/test/IceE/0000755000076400007640000000000010620544015014014 5ustar matthewmatthewIceE-1.2.0/test/IceE/proxy/0000755000076400007640000000000010620544011015171 5ustar matthewmatthewIceE-1.2.0/test/IceE/proxy/.depend0000644000076400007640000005236310616561253016456 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Base64.h ../../../include/IceE/Config.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h ../../include/TestApplication.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Base64.h ../../../include/IceE/Config.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../../include/IceE/Router.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h Test.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Base64.h ../../../include/IceE/Config.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h TestI.h Test.h ../../include/TestCommon.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Base64.h ../../../include/IceE/Config.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h ../../include/TestApplication.h TestI.h Test.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Base64.h ../../../include/IceE/Config.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h TestI.h Test.h ../../include/TestCommon.h Collocated$(OBJEXT): Collocated.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Base64.h ../../../include/IceE/Config.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h ../../include/TestApplication.h TestI.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Base64.h ../../../include/IceE/Config.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../../include/IceE/Router.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/proxy/TestI.cpp0000644000076400007640000000157310616553120016741 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include MyDerivedClassI::MyDerivedClassI() { } void MyDerivedClassI::shutdown(const Ice::Current& c) { c.adapter->getCommunicator()->shutdown(); } Ice::Context MyDerivedClassI::getContext(const Ice::Current& c) { return _ctx; } bool MyDerivedClassI::ice_isA(const std::string& s, const Ice::Current& current) const { _ctx = current.ctx; #ifdef __BCPLUSPLUS__ return Test::MyDerivedClass::ice_isA(s, current); #else return MyDerivedClass::ice_isA(s, current); #endif } IceE-1.2.0/test/IceE/proxy/TestI.h0000644000076400007640000000131210616553120016375 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class MyDerivedClassI : public Test::MyDerivedClass { public: MyDerivedClassI(); virtual void shutdown(const Ice::Current&); virtual Ice::Context getContext(const Ice::Current&); virtual bool ice_isA(const std::string&, const Ice::Current&) const; private: mutable Ice::Context _ctx; }; #endif IceE-1.2.0/test/IceE/proxy/Makefile.mak0000644000076400007640000000345110616553120017411 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ Server.obj COLOBJS = Test.obj \ TestI.obj \ Collocated.obj \ AllTests.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) \ $(COLOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) $(LINK) $(LDFLAGS) $(COPDBFLAGS) $(COLOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/proxy/AllTests.cpp0000644000076400007640000005052310616637156017457 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_ROUTER #include #endif #ifdef ICEE_HAS_LOCATOR #include #endif #include #include using namespace std; Test::MyClassPrx allTests(const Ice::CommunicatorPtr& communicator) { tprintf("testing stringToProxy... "); string ref = "test:default -p 12010 -t 10000"; Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); Ice::ObjectPrx b1 = communicator->stringToProxy("test:tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); b1 = communicator->stringToProxy("test :tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); b1 = communicator->stringToProxy(" test :tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); b1 = communicator->stringToProxy(" test:tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); b1 = communicator->stringToProxy("'test -f facet':tcp"); test(b1->ice_getIdentity().name == "test -f facet" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); try { b1 = communicator->stringToProxy("\"test -f facet':tcp"); test(false); } catch(const Ice::ProxyParseException&) { } b1 = communicator->stringToProxy("\"test -f facet\":tcp"); test(b1->ice_getIdentity().name == "test -f facet" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); b1 = communicator->stringToProxy("\"test -f facet@test\":tcp"); test(b1->ice_getIdentity().name == "test -f facet@test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); b1 = communicator->stringToProxy("\"test -f facet@test @test\":tcp"); test(b1->ice_getIdentity().name == "test -f facet@test @test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); try { b1 = communicator->stringToProxy("test test:tcp"); test(false); } catch(const Ice::ProxyParseException&) { } b1 = communicator->stringToProxy("test\\040test:tcp"); test(b1->ice_getIdentity().name == "test test" && b1->ice_getIdentity().category.empty()); try { b1 = communicator->stringToProxy("test\\777:tcp"); test(false); } catch(const Ice::IdentityParseException&) { } b1 = communicator->stringToProxy("test\\40test:tcp"); test(b1->ice_getIdentity().name == "test test"); // Test some octal and hex corner cases. b1 = communicator->stringToProxy("test\\4test:tcp"); test(b1->ice_getIdentity().name == "test\4test"); b1 = communicator->stringToProxy("test\\04test:tcp"); test(b1->ice_getIdentity().name == "test\4test"); b1 = communicator->stringToProxy("test\\004test:tcp"); test(b1->ice_getIdentity().name == "test\4test"); b1 = communicator->stringToProxy("test\\1114test:tcp"); test(b1->ice_getIdentity().name == "test\1114test"); b1 = communicator->stringToProxy("test\\b\\f\\n\\r\\t\\'\\\"\\\\test:tcp"); test(b1->ice_getIdentity().name == "test\b\f\n\r\t\'\"\\test" && b1->ice_getIdentity().category.empty()); b1 = communicator->stringToProxy("category/test:tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category == "category"); #ifdef ICEE_HAS_LOCATOR b1 = communicator->stringToProxy("test@adapter"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getAdapterId() == "adapter"); try { b1 = communicator->stringToProxy("id@adapter test"); test(false); } catch(const Ice::ProxyParseException&) { } b1 = communicator->stringToProxy("category/test@adapter"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category == "category" && b1->ice_getAdapterId() == "adapter"); b1 = communicator->stringToProxy("category/test@adapter:tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category == "category" && b1->ice_getAdapterId() == "adapter:tcp"); b1 = communicator->stringToProxy("'category 1/test'@adapter"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category == "category 1" && b1->ice_getAdapterId() == "adapter"); b1 = communicator->stringToProxy("'category/test 1'@adapter"); test(b1->ice_getIdentity().name == "test 1" && b1->ice_getIdentity().category == "category" && b1->ice_getAdapterId() == "adapter"); b1 = communicator->stringToProxy("'category/test'@'adapter 1'"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category == "category" && b1->ice_getAdapterId() == "adapter 1"); b1 = communicator->stringToProxy("\"category \\/test@foo/test\"@adapter"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category == "category /test@foo" && b1->ice_getAdapterId() == "adapter"); b1 = communicator->stringToProxy("\"category \\/test@foo/test\"@\"adapter:tcp\""); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category == "category /test@foo" && b1->ice_getAdapterId() == "adapter:tcp"); #endif b1 = communicator->stringToProxy("id -f facet:tcp"); test(b1->ice_getIdentity().name == "id" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet"); b1 = communicator->stringToProxy("id -f 'facet x':tcp"); test(b1->ice_getIdentity().name == "id" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet x"); b1 = communicator->stringToProxy("id -f \"facet x\":tcp"); test(b1->ice_getIdentity().name == "id" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet x"); try { b1 = communicator->stringToProxy("id -f \"facet x:tcp"); test(false); } catch(const Ice::ProxyParseException&) { } try { b1 = communicator->stringToProxy("id -f \'facet x:tcp"); test(false); } catch(const Ice::ProxyParseException&) { } b1 = communicator->stringToProxy("test -f facet:tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet"); b1 = communicator->stringToProxy("test -f \"facet:tcp\":tcp"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet:tcp"); #ifdef ICEE_HAS_LOCATOR b1 = communicator->stringToProxy("test -f facet@test"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet" && b1->ice_getAdapterId() == "test"); b1 = communicator->stringToProxy("test -f 'facet@test'"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet@test" && b1->ice_getAdapterId().empty()); b1 = communicator->stringToProxy("test -f 'facet@test'@test"); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet() == "facet@test" && b1->ice_getAdapterId() == "test"); try { b1 = communicator->stringToProxy("test -f facet@test @test"); test(false); } catch(const Ice::ProxyParseException&) { } #endif b1 = communicator->stringToProxy("test:tcp"); test(b1->ice_isTwoway()); b1 = communicator->stringToProxy("test -t:tcp"); test(b1->ice_isTwoway()); b1 = communicator->stringToProxy("test -o:tcp:tcp"); test(b1->ice_isOneway()); b1 = communicator->stringToProxy("test -O:tcp"); test(b1->ice_isBatchOneway()); b1 = communicator->stringToProxy("test -d:tcp"); test(b1->ice_isDatagram()); b1 = communicator->stringToProxy("test -D:tcp"); test(b1->ice_isBatchDatagram()); b1 = communicator->stringToProxy("test:tcp"); test(!b1->ice_isSecure()); b1 = communicator->stringToProxy("test -s:tcp"); test(b1->ice_isSecure()); try { b1 = communicator->stringToProxy("test:tcp@adapterId"); test(false); } catch(const Ice::EndpointParseException&) { } // This is an unknown endpoint warning, not a parse exception. // //try //{ // b1 = communicator->stringToProxy("test -f the:facet:tcp"); // test(false); //} //catch(const Ice::EndpointParseException&) //{ //} try { b1 = communicator->stringToProxy("test::tcp"); test(false); } catch(const Ice::EndpointParseException&) { } tprintf("ok\n"); tprintf("testing propertyToProxy... "); Ice::PropertiesPtr prop = communicator->getProperties(); string propertyPrefix = "Foo.Proxy"; prop->setProperty(propertyPrefix, "test:default -p 12010 -t 10000"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() && b1->ice_getFacet().empty()); // These two properties don't do anything to direct proxies so // first we test that. #ifdef ICEE_HAS_LOCATOR string property = propertyPrefix + ".Locator"; test(!b1->ice_getLocator()); prop->setProperty(property, "locator:default -p 10000"); b1 = communicator->propertyToProxy(propertyPrefix); test(!b1->ice_getLocator()); prop->setProperty(property, ""); #endif /* property = propertyPrefix + ".LocatorCacheTimeout"; test(b1->ice_getLocatorCacheTimeout() == 0); prop->setProperty(property, "1"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getLocatorCacheTimeout() == 0); prop->setProperty(property, ""); */ // Now retest with an indirect proxy. #ifdef ICEE_HAS_LOCATOR prop->setProperty(propertyPrefix, "test"); property = propertyPrefix + ".Locator"; prop->setProperty(property, "locator:default -p 10000"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getLocator() && b1->ice_getLocator()->ice_getIdentity().name == "locator"); prop->setProperty(property, ""); #endif /* property = propertyPrefix + ".LocatorCacheTimeout"; test(b1->ice_getLocatorCacheTimeout() == -1); prop->setProperty(property, "1"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getLocatorCacheTimeout() == 1); prop->setProperty(property, ""); */ // This cannot be tested so easily because the property is cached // on communicator initialization. // //prop->setProperty("Ice.Default.LocatorCacheTimeout", "60"); //b1 = communicator->propertyToProxy(propertyPrefix); //test(b1->ice_getLocatorCacheTimeout() == 60); //prop->setProperty("Ice.Default.LocatorCacheTimeout", ""); prop->setProperty(propertyPrefix, "test:default -p 12010 -t 10000"); #ifdef ICEE_HAS_ROUTER property = propertyPrefix + ".Router"; test(!b1->ice_getRouter()); prop->setProperty(property, "router:default -p 10000"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getRouter() && b1->ice_getRouter()->ice_getIdentity().name == "router"); prop->setProperty(property, ""); #endif /* property = propertyPrefix + ".PreferSecure"; test(!b1->ice_isPreferSecure()); prop->setProperty(property, "1"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_isPreferSecure()); prop->setProperty(property, ""); property = propertyPrefix + ".ConnectionCached"; test(b1->ice_isConnectionCached()); prop->setProperty(property, "0"); b1 = communicator->propertyToProxy(propertyPrefix); test(!b1->ice_isConnectionCached()); prop->setProperty(property, ""); property = propertyPrefix + ".EndpointSelection"; test(b1->ice_getEndpointSelection() == Ice::Random); prop->setProperty(property, "Random"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getEndpointSelection() == Ice::Random); prop->setProperty(property, "Ordered"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_getEndpointSelection() == Ice::Ordered); prop->setProperty(property, ""); property = propertyPrefix + ".CollocationOptimization"; test(b1->ice_isCollocationOptimized()); prop->setProperty(property, "0"); b1 = communicator->propertyToProxy(propertyPrefix); test(!b1->ice_isCollocationOptimized()); prop->setProperty(property, ""); property = propertyPrefix + ".ThreadPerConnection"; test(!b1->ice_isThreadPerConnection()); prop->setProperty(property, "1"); b1 = communicator->propertyToProxy(propertyPrefix); test(b1->ice_isThreadPerConnection()); prop->setProperty(property, ""); */ tprintf("ok\n"); tprintf("testing ice_getCommunicator... "); test(base->ice_getCommunicator() == communicator); tprintf("ok\n"); tprintf("testing proxy methods... "); test(communicator->identityToString(base->ice_identity(communicator->stringToIdentity("other"))->ice_getIdentity()) == "other"); test(base->ice_facet("facet")->ice_getFacet() == "facet"); #ifdef ICEE_HAS_LOCATOR test(base->ice_adapterId("id")->ice_getAdapterId() == "id"); #endif test(base->ice_twoway()->ice_isTwoway()); test(base->ice_oneway()->ice_isOneway()); test(base->ice_batchOneway()->ice_isBatchOneway()); test(base->ice_datagram()->ice_isDatagram()); test(base->ice_batchDatagram()->ice_isBatchDatagram()); test(base->ice_secure(true)->ice_isSecure()); test(!base->ice_secure(false)->ice_isSecure()); //test(base->ice_collocationOptimized(true)->ice_isCollocationOptimized()); //test(!base->ice_collocationOptimized(false)->ice_isCollocationOptimized()); tprintf("ok\n"); tprintf("testing proxy comparison... "); test(communicator->stringToProxy("foo:tcp") == communicator->stringToProxy("foo:tcp")); test(communicator->stringToProxy("foo:tcp") != communicator->stringToProxy("foo2:tcp")); test(communicator->stringToProxy("foo:tcp") < communicator->stringToProxy("foo2:tcp")); test(!(communicator->stringToProxy("foo2:tcp") < communicator->stringToProxy("foo:tcp"))); Ice::ObjectPrx compObj = communicator->stringToProxy("foo:tcp"); test(compObj->ice_facet("facet") == compObj->ice_facet("facet")); test(compObj->ice_facet("facet") != compObj->ice_facet("facet1")); test(compObj->ice_facet("facet") < compObj->ice_facet("facet1")); test(!(compObj->ice_facet("facet") < compObj->ice_facet("facet"))); test(compObj->ice_oneway() == compObj->ice_oneway()); test(compObj->ice_oneway() != compObj->ice_twoway()); test(compObj->ice_twoway() < compObj->ice_oneway()); test(!(compObj->ice_oneway() < compObj->ice_twoway())); test(compObj->ice_secure(true) == compObj->ice_secure(true)); test(compObj->ice_secure(false) != compObj->ice_secure(true)); test(compObj->ice_secure(false) < compObj->ice_secure(true)); test(!(compObj->ice_secure(true) < compObj->ice_secure(false))); /* test(compObj->ice_collocationOptimized(true) == compObj->ice_collocationOptimized(true)); test(compObj->ice_collocationOptimized(false) != compObj->ice_collocationOptimized(true)); test(compObj->ice_collocationOptimized(false) < compObj->ice_collocationOptimized(true)); test(!(compObj->ice_collocationOptimized(true) < compObj->ice_collocationOptimized(false))); test(compObj->ice_connectionCached(true) == compObj->ice_connectionCached(true)); test(compObj->ice_connectionCached(false) != compObj->ice_connectionCached(true)); test(compObj->ice_connectionCached(false) < compObj->ice_connectionCached(true)); test(!(compObj->ice_connectionCached(true) < compObj->ice_connectionCached(false))); test(compObj->ice_endpointSelection(Ice::Random) == compObj->ice_endpointSelection(Ice::Random)); test(compObj->ice_endpointSelection(Ice::Random) != compObj->ice_endpointSelection(Ice::Ordered)); test(compObj->ice_endpointSelection(Ice::Random) < compObj->ice_endpointSelection(Ice::Ordered)); test(!(compObj->ice_endpointSelection(Ice::Ordered) < compObj->ice_endpointSelection(Ice::Random))); test(compObj->ice_connectionId("id2") == compObj->ice_connectionId("id2")); test(compObj->ice_connectionId("id1") != compObj->ice_connectionId("id2")); test(compObj->ice_connectionId("id1") < compObj->ice_connectionId("id2")); test(!(compObj->ice_connectionId("id2") < compObj->ice_connectionId("id1"))); test(compObj->ice_compress(true) == compObj->ice_compress(true)); test(compObj->ice_compress(false) != compObj->ice_compress(true)); test(compObj->ice_compress(false) < compObj->ice_compress(true)); test(!(compObj->ice_compress(true) < compObj->ice_compress(false))); */ test(compObj->ice_timeout(20) == compObj->ice_timeout(20)); test(compObj->ice_timeout(10) != compObj->ice_timeout(20)); test(compObj->ice_timeout(10) < compObj->ice_timeout(20)); test(!(compObj->ice_timeout(20) < compObj->ice_timeout(10))); Ice::ObjectPrx compObj1 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10000"); Ice::ObjectPrx compObj2 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10001"); test(compObj1 != compObj2); test(compObj1 < compObj2); test(!(compObj2 < compObj1)); #ifdef ICEE_HAS_LOCATOR compObj1 = communicator->stringToProxy("foo@MyAdapter1"); compObj2 = communicator->stringToProxy("foo@MyAdapter2"); test(compObj1 != compObj2); test(compObj1 < compObj2); test(!(compObj2 < compObj1)); #endif /* test(compObj1->ice_locatorCacheTimeout(20) == compObj1->ice_locatorCacheTimeout(20)); test(compObj1->ice_locatorCacheTimeout(10) != compObj1->ice_locatorCacheTimeout(20)); test(compObj1->ice_locatorCacheTimeout(10) < compObj1->ice_locatorCacheTimeout(20)); test(!(compObj1->ice_locatorCacheTimeout(20) < compObj1->ice_locatorCacheTimeout(10))); */ #ifdef ICEE_HAS_LOCATOR compObj1 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 1000"); compObj2 = communicator->stringToProxy("foo@MyAdapter1"); test(compObj1 != compObj2); test(compObj1 < compObj2); test(!(compObj2 < compObj1)); #endif // // TODO: Ideally we should also test comparison of fixed proxies. // tprintf("ok\n"); tprintf("testing checked cast... "); Test::MyClassPrx cl = Test::MyClassPrx::checkedCast(base); test(cl); Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(cl); test(derived); test(cl == base); test(derived == base); test(cl == derived); #ifdef ICEE_HAS_LOCATOR Ice::LocatorPrx loc = Ice::LocatorPrx::checkedCast(base); test(loc == 0); #endif // // Upcasting // Test::MyClassPrx cl2 = Test::MyClassPrx::checkedCast(derived); Ice::ObjectPrx obj = Ice::ObjectPrx::checkedCast(derived); test(cl2); test(obj); test(cl2 == obj); test(cl2 == derived); // // Now with alternate API // cl = checkedCast(base); test(cl); derived = checkedCast(cl); test(derived); test(cl == base); test(derived == base); test(cl == derived); #ifdef ICEE_HAS_LOCATOR loc = checkedCast(base); test(loc == 0); #endif cl2 = checkedCast(derived); obj = checkedCast(derived); test(cl2); test(obj); test(cl2 == obj); test(cl2 == derived); tprintf("ok\n"); tprintf("testing checked cast with context... "); Ice::Context c = cl->getContext(); test(c.size() == 0); c["one"] = "hello"; c["two"] = "world"; cl = Test::MyClassPrx::checkedCast(base, c); Ice::Context c2 = cl->getContext(); test(c == c2); // // Now with alternate API // cl = checkedCast(base); c = cl->getContext(); test(c.size() == 0); cl = checkedCast(base, c); c2 = cl->getContext(); test(c == c2); tprintf("ok\n"); return cl; } IceE-1.2.0/test/IceE/proxy/Server.cpp0000644000076400007640000000317710616553120017161 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class ProxyTestApplication : public TestApplication { public: ProxyTestApplication() : TestApplication("proxy server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); initData.properties->setProperty("Ice.Warn.Connections", "0"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator()->stringToIdentity("test")); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { ProxyTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { ProxyTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/proxy/run.py0000755000076400007640000000154510616553120016365 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "proxy") print "tests with regular server." TestUtil.clientServerTest(name) print "tests with collocated server." TestUtil.collocatedTest(name) sys.exit(0) IceE-1.2.0/test/IceE/proxy/Makefile0000644000076400007640000000205210616553120016636 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server COLLOCATED = collocated TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.o \ Client.o \ AllTests.o SOBJS = Test.o \ TestI.o \ Server.o COLOBJS = Test.o \ TestI.o \ Collocated.o \ AllTests.o SRCS = $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) \ $(COLOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(TESTLIBS) $(SERVER): $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(TESTLIBS) $(COLLOCATED): $(COLOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COLOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/proxy/Test.ice0000644000076400007640000000106610616553120016603 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { dictionary Context; ["ami"] class MyClass { void shutdown(); Context getContext(); }; ["ami"] class MyDerivedClass extends MyClass { }; }; #endif IceE-1.2.0/test/IceE/proxy/Client.cpp0000644000076400007640000000417110616553120017124 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class ProxyTestApplication : public TestApplication { public: ProxyTestApplication() : TestApplication("proxy client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // In this test, we need at least two threads in the // client side thread pool for nested AMI. // initData.properties->setProperty("Ice.ThreadPool.Client.Size", "2"); initData.properties->setProperty("Ice.ThreadPool.Client.SizeWarn", "0"); loadConfig(initData.properties); // // Now parse argc/argv into initData // initData.properties = Ice::createProperties(argc, argv, initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); // // We don't want connection warnings because of the timeout test. // communicator()->getProperties()->setProperty("Ice.Warn.Connections", "0"); // // Use a faster connection monitor timeout to test AMI // timeouts. // communicator()->getProperties()->setProperty("Ice.MonitorConnections", "1"); Test::MyClassPrx allTests(const Ice::CommunicatorPtr&); Test::MyClassPrx myClass = allTests(communicator()); myClass->shutdown(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { ProxyTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { ProxyTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/proxy/Collocated.cpp0000644000076400007640000000333710616553120017762 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class ProxyTestApplication : public TestApplication { public: ProxyTestApplication() : TestApplication("proxy collocated") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); // // Now parse argc/argv into initData.properties // initData.properties = Ice::createProperties(argc, argv, initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator()->stringToIdentity("test")); adapter->activate(); Test::MyClassPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator()); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { ProxyTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { ProxyTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/slicing/0000755000076400007640000000000010620544013015442 5ustar matthewmatthewIceE-1.2.0/test/IceE/slicing/.depend0000644000076400007640000003625410616637156016734 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h ServerPrivate$(OBJEXT): ServerPrivate.cpp ServerPrivate.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Test.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp TestI.h ServerPrivate.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Test.h ../../include/TestCommon.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h ServerPrivate.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Test.h Test.cpp: Test.ice ServerPrivate.cpp: ServerPrivate.ice Test.ice IceE-1.2.0/test/IceE/slicing/TestI.cpp0000644000076400007640000000617510576536574017236 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace Test; TestI::TestI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter) { } void TestI::baseAsBase(const ::Ice::Current&) { Base b; b.b = "Base.b"; throw b; } void TestI::unknownDerivedAsBase(const ::Ice::Current&) { UnknownDerived d; d.b = "UnknownDerived.b"; d.ud = "UnknownDerived.ud"; throw d; } void TestI::knownDerivedAsBase(const ::Ice::Current&) { KnownDerived d; d.b = "KnownDerived.b"; d.kd = "KnownDerived.kd"; throw d; } void TestI::knownDerivedAsKnownDerived(const ::Ice::Current&) { KnownDerived d; d.b = "KnownDerived.b"; d.kd = "KnownDerived.kd"; throw d; } void TestI::unknownIntermediateAsBase(const ::Ice::Current&) { UnknownIntermediate ui; ui.b = "UnknownIntermediate.b"; ui.ui = "UnknownIntermediate.ui"; throw ui; } void TestI::knownIntermediateAsBase(const ::Ice::Current&) { KnownIntermediate ki; ki.b = "KnownIntermediate.b"; ki.ki = "KnownIntermediate.ki"; throw ki; } void TestI::knownMostDerivedAsBase(const ::Ice::Current&) { KnownMostDerived kmd; kmd.b = "KnownMostDerived.b"; kmd.ki = "KnownMostDerived.ki"; kmd.kmd = "KnownMostDerived.kmd"; throw kmd; } void TestI::knownIntermediateAsKnownIntermediate(const ::Ice::Current&) { KnownIntermediate ki; ki.b = "KnownIntermediate.b"; ki.ki = "KnownIntermediate.ki"; throw ki; } void TestI::knownMostDerivedAsKnownIntermediate(const ::Ice::Current&) { KnownMostDerived kmd; kmd.b = "KnownMostDerived.b"; kmd.ki = "KnownMostDerived.ki"; kmd.kmd = "KnownMostDerived.kmd"; throw kmd; } void TestI:: knownMostDerivedAsKnownMostDerived(const ::Ice::Current&) { KnownMostDerived kmd; kmd.b = "KnownMostDerived.b"; kmd.ki = "KnownMostDerived.ki"; kmd.kmd = "KnownMostDerived.kmd"; throw kmd; } void TestI::unknownMostDerived1AsBase(const ::Ice::Current&) { UnknownMostDerived1 umd1; umd1.b = "UnknownMostDerived1.b"; umd1.ki = "UnknownMostDerived1.ki"; umd1.umd1 = "UnknownMostDerived1.umd1"; throw umd1; } void TestI::unknownMostDerived1AsKnownIntermediate(const ::Ice::Current&) { UnknownMostDerived1 umd1; umd1.b = "UnknownMostDerived1.b"; umd1.ki = "UnknownMostDerived1.ki"; umd1.umd1 = "UnknownMostDerived1.umd1"; throw umd1; } void TestI::unknownMostDerived2AsBase(const ::Ice::Current&) { UnknownMostDerived2 umd2; umd2.b = "UnknownMostDerived2.b"; umd2.ui = "UnknownMostDerived2.ui"; umd2.umd2 = "UnknownMostDerived2.umd2"; throw umd2; } void TestI::shutdown(const ::Ice::Current&) { _adapter->getCommunicator()->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } IceE-1.2.0/test/IceE/slicing/TestI.h0000644000076400007640000000274110576536574016676 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TESTI_H #define TESTI_H #include class TestI : virtual public Test::TestIntf { public: TestI(const ::Ice::ObjectAdapterPtr&); virtual void baseAsBase(const ::Ice::Current&); virtual void unknownDerivedAsBase(const ::Ice::Current&); virtual void knownDerivedAsBase(const ::Ice::Current&); virtual void knownDerivedAsKnownDerived(const ::Ice::Current&); virtual void unknownIntermediateAsBase(const ::Ice::Current&); virtual void knownIntermediateAsBase(const ::Ice::Current&); virtual void knownMostDerivedAsBase(const ::Ice::Current&); virtual void knownIntermediateAsKnownIntermediate(const ::Ice::Current&); virtual void knownMostDerivedAsKnownIntermediate(const ::Ice::Current&); virtual void knownMostDerivedAsKnownMostDerived(const ::Ice::Current&); virtual void unknownMostDerived1AsBase(const ::Ice::Current&); virtual void unknownMostDerived1AsKnownIntermediate(const ::Ice::Current&); virtual void unknownMostDerived2AsBase(const ::Ice::Current&); virtual void shutdown(const ::Ice::Current&); private: const ::Ice::ObjectAdapterPtr _adapter; }; #endif IceE-1.2.0/test/IceE/slicing/Makefile.mak0000755000076400007640000000273010614106575017670 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ ServerPrivate.obj \ TestI.obj \ Server.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak ICECPPFLAGS = -I. $(ICECPPFLAGS) -DWIN32_LEAN_AND_MEAN CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h del /q ServerPrivate.cpp ServerPrivate.h !include .depend IceE-1.2.0/test/IceE/slicing/AllTests.cpp0000644000076400007640000001430510576536574017733 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class CallbackBase : public IceUtil::Monitor { public: CallbackBase() : _called(false) { } virtual ~CallbackBase() { } bool check() { IceUtil::Monitor::Lock sync(*this); while(!_called) { if(!timedWait(IceUtil::Time::seconds(5))) { return false; } } _called = false; return true; } protected: void called() { IceUtil::Monitor::Lock sync(*this); assert(!_called); _called = true; notify(); } private: bool _called; }; TestIntfPrx allTests(const Ice::CommunicatorPtr& communicator) { string ref = communicator->getProperties()->getPropertyWithDefault("Slicing.Proxy", "Test:default -p 12010"); Ice::ObjectPrx obj = communicator->stringToProxy(ref); TestIntfPrx test = TestIntfPrx::checkedCast(obj); tprintf("base... "); fflush(stdout); { try { test->baseAsBase(); test(false); } catch(const Base& b) { test(b.b == "Base.b"); test(b.ice_name() =="Test::Base"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("slicing of unknown derived... "); fflush(stdout); { try { test->unknownDerivedAsBase(); test(false); } catch(const Base& b) { test(b.b == "UnknownDerived.b"); test(b.ice_name() =="Test::Base"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("non-slicing of known derived as base... "); fflush(stdout); { try { test->knownDerivedAsBase(); test(false); } catch(const KnownDerived& k) { test(k.b == "KnownDerived.b"); test(k.kd == "KnownDerived.kd"); test(k.ice_name() =="Test::KnownDerived"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("non-slicing of known derived as derived... "); fflush(stdout); { try { test->knownDerivedAsKnownDerived(); test(false); } catch(const KnownDerived& k) { test(k.b == "KnownDerived.b"); test(k.kd == "KnownDerived.kd"); test(k.ice_name() =="Test::KnownDerived"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("slicing of unknown intermediate as base... "); fflush(stdout); { try { test->unknownIntermediateAsBase(); test(false); } catch(const Base& b) { test(b.b == "UnknownIntermediate.b"); test(b.ice_name() =="Test::Base"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("slicing of known intermediate as base... "); fflush(stdout); { try { test->knownIntermediateAsBase(); test(false); } catch(const KnownIntermediate& ki) { test(ki.b == "KnownIntermediate.b"); test(ki.ki == "KnownIntermediate.ki"); test(ki.ice_name() =="Test::KnownIntermediate"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("slicing of known most derived as base... "); fflush(stdout); { try { test->knownMostDerivedAsBase(); test(false); } catch(const KnownMostDerived& kmd) { test(kmd.b == "KnownMostDerived.b"); test(kmd.ki == "KnownMostDerived.ki"); test(kmd.kmd == "KnownMostDerived.kmd"); test(kmd.ice_name() =="Test::KnownMostDerived"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("non-slicing of known intermediate as intermediate... "); fflush(stdout); { try { test->knownIntermediateAsKnownIntermediate(); test(false); } catch(const KnownIntermediate& ki) { test(ki.b == "KnownIntermediate.b"); test(ki.ki == "KnownIntermediate.ki"); test(ki.ice_name() =="Test::KnownIntermediate"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("non-slicing of known most derived exception as intermediate... "); fflush(stdout); { try { test->knownMostDerivedAsKnownIntermediate(); test(false); } catch(const KnownMostDerived& kmd) { test(kmd.b == "KnownMostDerived.b"); test(kmd.ki == "KnownMostDerived.ki"); test(kmd.kmd == "KnownMostDerived.kmd"); test(kmd.ice_name() =="Test::KnownMostDerived"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("non-slicing of known most derived as most derived... "); fflush(stdout); { try { test->knownMostDerivedAsKnownMostDerived(); test(false); } catch(const KnownMostDerived& kmd) { test(kmd.b == "KnownMostDerived.b"); test(kmd.ki == "KnownMostDerived.ki"); test(kmd.kmd == "KnownMostDerived.kmd"); test(kmd.ice_name() =="Test::KnownMostDerived"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("slicing of unknown most derived, known intermediate as base... "); fflush(stdout); { try { test->unknownMostDerived1AsBase(); test(false); } catch(const KnownIntermediate& ki) { test(ki.b == "UnknownMostDerived1.b"); test(ki.ki == "UnknownMostDerived1.ki"); test(ki.ice_name() =="Test::KnownIntermediate"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("slicing of unknown most derived, known intermediate as intermediate... "); fflush(stdout); { try { test->unknownMostDerived1AsKnownIntermediate(); test(false); } catch(const KnownIntermediate& ki) { test(ki.b == "UnknownMostDerived1.b"); test(ki.ki == "UnknownMostDerived1.ki"); test(ki.ice_name() =="Test::KnownIntermediate"); } catch(...) { test(false); } } tprintf("ok\n"); tprintf("slicing of unknown most derived, unknown intermediate as base... "); fflush(stdout); { try { test->unknownMostDerived2AsBase(); test(false); } catch(const Base& b) { test(b.b == "UnknownMostDerived2.b"); test(b.ice_name() =="Test::Base"); } catch(...) { test(false); } } tprintf("ok\n"); return test; } IceE-1.2.0/test/IceE/slicing/Server.cpp0000644000076400007640000000323310616652361017430 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; class SlicingTestApplication : public TestApplication { public: SlicingTestApplication() : TestApplication("slicing server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("Ice.Warn.Dispatch", "0"); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 2000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, communicator()->stringToIdentity("Test")); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { SlicingTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { SlicingTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/slicing/run.py0000755000076400007640000000144310576536574016654 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "slicing") print "tests with regular server." TestUtil.clientServerTest(name) sys.exit(0) IceE-1.2.0/test/IceE/slicing/Makefile0000644000076400007640000000164010576536574017132 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) COBJS = Test.o \ Client.o \ AllTests.o SOBJS = Test.o \ ServerPrivate.o \ TestI.o \ Server.o SRCS = $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Test.ice ServerPrivate.ice include $(top_srcdir)/config/Make.rules ICECPPFLAGS := -I. $(ICECPPFLAGS) CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(TESTLIBS) $(SERVER): $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/slicing/Test.ice0000644000076400007640000000257410576536574017102 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { exception Base { string b; }; exception KnownDerived extends Base { string kd; }; exception KnownIntermediate extends Base { string ki; }; exception KnownMostDerived extends KnownIntermediate { string kmd; }; interface TestIntf { void baseAsBase() throws Base; void unknownDerivedAsBase() throws Base; void knownDerivedAsBase() throws Base; void knownDerivedAsKnownDerived() throws KnownDerived; void unknownIntermediateAsBase() throws Base; void knownIntermediateAsBase() throws Base; void knownMostDerivedAsBase() throws Base; void knownIntermediateAsKnownIntermediate() throws KnownIntermediate; void knownMostDerivedAsKnownIntermediate() throws KnownIntermediate; void knownMostDerivedAsKnownMostDerived() throws KnownMostDerived; void unknownMostDerived1AsBase() throws Base; void unknownMostDerived1AsKnownIntermediate() throws KnownIntermediate; void unknownMostDerived2AsBase() throws Base; void shutdown(); }; }; #endif IceE-1.2.0/test/IceE/slicing/Client.cpp0000644000076400007640000000254210576536574017416 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class SlicingTestApplication : public TestApplication { public: SlicingTestApplication() : TestApplication("slicing client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); TestIntfPrx allTests(const Ice::CommunicatorPtr&); TestIntfPrx Test = allTests(communicator()); Test->shutdown(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { SlicingTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { SlicingTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/slicing/ServerPrivate.ice0000644000076400007640000000132410576536574020754 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef SERVERPRIVATE_ICE #define SERVERPRIVATE_ICE #include module Test { exception UnknownDerived extends Base { string ud; }; exception UnknownIntermediate extends Base { string ui; }; exception UnknownMostDerived1 extends KnownIntermediate { string umd1; }; exception UnknownMostDerived2 extends UnknownIntermediate { string umd2; }; }; #endif IceE-1.2.0/test/IceE/location/0000755000076400007640000000000010620544007015625 5ustar matthewmatthewIceE-1.2.0/test/IceE/location/.depend0000644000076400007640000003315510616637156017111 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/Config.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h Test.h ../../../include/IceE/Router.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/Config.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h TestI.h Test.h ServerLocator.h ServerLocator$(OBJEXT): ServerLocator.cpp ../../../include/IceE/Config.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ServerLocator.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ServerLocator.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/location/TestI.cpp0000644000076400007640000000762710576536574017421 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_LOCATOR #include #include #include #include using namespace Test; ServerManagerI::ServerManagerI(const Ice::ObjectAdapterPtr& adapter, const ServerLocatorRegistryPtr& registry, const Ice::InitializationData& initData) : _adapter(adapter), _registry(registry), _initData(initData) { } void ServerManagerI::startServer(const Ice::Current&) { for(::std::vector::const_iterator i = _communicators.begin(); i != _communicators.end(); ++i) { (*i)->waitForShutdown(); (*i)->destroy(); } _communicators.clear(); // // Simulate a server: create a new communicator and object // adapter. The object adapter is started on a system allocated // port. The configuration used here contains the Ice.Locator // configuration variable. The new object adapter will register // its endpoints with the locator and create references containing // the adapter id instead of the endpoints. // Ice::CommunicatorPtr serverCommunicator = Ice::initialize(_initData); _communicators.push_back(serverCommunicator); Ice::ObjectAdapterPtr adapter = serverCommunicator->createObjectAdapter("TestAdapter"); Ice::ObjectAdapterPtr adapter2 = serverCommunicator->createObjectAdapter("TestAdapter2"); // Note that this assumes the server is running port 12010. Ice::ObjectPrx locator = serverCommunicator->stringToProxy("locator:default -p 12010"); adapter->setLocator(Ice::LocatorPrx::uncheckedCast(locator)); adapter2->setLocator(Ice::LocatorPrx::uncheckedCast(locator)); Ice::ObjectPtr object = new TestI(adapter, adapter2, _registry); _registry->addObject(adapter->add(object, serverCommunicator->stringToIdentity("test"))); _registry->addObject(adapter->add(object, serverCommunicator->stringToIdentity("test2"))); adapter->activate(); adapter2->activate(); } void ServerManagerI::shutdown(const Ice::Current&) { // // Clear the registry. // _registry->clear(); // // Destroy each of the communicators. // for(::std::vector::const_iterator i = _communicators.begin(); i != _communicators.end(); ++i) { (*i)->destroy(); } _adapter->getCommunicator()->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::ObjectAdapterPtr& adapter2, const ServerLocatorRegistryPtr& registry) : _adapter1(adapter), _adapter2(adapter2), _registry(registry) { _registry->addObject(_adapter1->add(new HelloI(), _adapter1->getCommunicator()->stringToIdentity("hello"))); } void TestI::shutdown(const Ice::Current&) { _adapter1->getCommunicator()->shutdown(); } HelloPrx TestI::getHello(const Ice::Current&) { return HelloPrx::uncheckedCast(_adapter1->createIndirectProxy( _adapter1->getCommunicator()->stringToIdentity("hello"))); } HelloPrx TestI::getReplicatedHello(const Ice::Current&) { return HelloPrx::uncheckedCast(_adapter1->createProxy(_adapter1->getCommunicator()->stringToIdentity("hello"))); } void TestI::migrateHello(const Ice::Current&) { const Ice::Identity id = _adapter1->getCommunicator()->stringToIdentity("hello"); try { _registry->addObject(_adapter2->add(_adapter1->remove(id), id)); } catch(Ice::NotRegisteredException&) { _registry->addObject(_adapter1->add(_adapter2->remove(id), id)); } } void HelloI::sayHello(const Ice::Current&) { } #endif IceE-1.2.0/test/IceE/location/TestI.h0000644000076400007640000000306410576536574017055 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include #ifdef ICEE_HAS_LOCATOR #include #include #include class ServerManagerI : public Test::ServerManager { public: ServerManagerI(const Ice::ObjectAdapterPtr&, const ServerLocatorRegistryPtr&, const Ice::InitializationData&); virtual void startServer(const Ice::Current&); virtual void shutdown(const Ice::Current&); private: Ice::ObjectAdapterPtr _adapter; ServerLocatorRegistryPtr _registry; Ice::InitializationData _initData; std::vector _communicators; }; class HelloI : public Test::Hello { public: virtual void sayHello(const Ice::Current&); }; class TestI : public Test::TestIntf { public: TestI(const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const ServerLocatorRegistryPtr&); virtual void shutdown(const Ice::Current&); virtual ::Test::HelloPrx getHello(const Ice::Current&); virtual ::Test::HelloPrx getReplicatedHello(const Ice::Current&); virtual void migrateHello(const Ice::Current&); private: Ice::ObjectAdapterPtr _adapter1; Ice::ObjectAdapterPtr _adapter2; ServerLocatorRegistryPtr _registry; }; #endif #endif IceE-1.2.0/test/IceE/location/Makefile.mak0000644000076400007640000000261010614106575020042 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ ServerLocator.obj \ Server.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/location/AllTests.cpp0000644000076400007640000001775610576536574020130 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_LOCATOR #include #include #include #include #ifdef ICEE_HAS_ROUTER # include #endif using namespace std; using namespace Test; void allTests(const Ice::CommunicatorPtr& communicator) { ServerManagerPrx manager = ServerManagerPrx::checkedCast( communicator->stringToProxy( communicator->getProperties()->getPropertyWithDefault( "Location.Proxy", "ServerManager:default -p 12010 -t 10000"))); Ice::LocatorPrx locator = Ice::LocatorPrx::uncheckedCast(communicator->getDefaultLocator()); test(manager); tprintf("testing stringToProxy..."); Ice::ObjectPrx base = communicator->stringToProxy("test @ TestAdapter"); Ice::ObjectPrx base2 = communicator->stringToProxy("test @ TestAdapter"); Ice::ObjectPrx base3 = communicator->stringToProxy("test"); Ice::ObjectPrx base4 = communicator->stringToProxy("ServerManager"); Ice::ObjectPrx base5 = communicator->stringToProxy("test2"); Ice::ObjectPrx base6 = communicator->stringToProxy("test @ ReplicatedAdapter"); tprintf("ok\n"); tprintf("testing ice_locator and ice_getLocator... "); test(Ice::proxyIdentityEqual(base->ice_getLocator(), communicator->getDefaultLocator())); Ice::LocatorPrx anotherLocator = Ice::LocatorPrx::uncheckedCast(communicator->stringToProxy("anotherLocator")); base = base->ice_locator(anotherLocator); test(Ice::proxyIdentityEqual(base->ice_getLocator(), anotherLocator)); communicator->setDefaultLocator(0); base = communicator->stringToProxy("test @ TestAdapter"); test(!base->ice_getLocator()); base = base->ice_locator(anotherLocator); test(Ice::proxyIdentityEqual(base->ice_getLocator(), anotherLocator)); communicator->setDefaultLocator(locator); base = communicator->stringToProxy("test @ TestAdapter"); test(Ice::proxyIdentityEqual(base->ice_getLocator(), communicator->getDefaultLocator())); #ifdef ICEE_HAS_ROUTER // // We also test ice_router/ice_getRouter (perhaps we should add a // test/Ice/router test?) // test(!base->ice_getRouter()); Ice::RouterPrx anotherRouter = Ice::RouterPrx::uncheckedCast(communicator->stringToProxy("anotherRouter")); base = base->ice_router(anotherRouter); test(Ice::proxyIdentityEqual(base->ice_getRouter(), anotherRouter)); Ice::RouterPrx router = Ice::RouterPrx::uncheckedCast(communicator->stringToProxy("dummyrouter")); communicator->setDefaultRouter(router); base = communicator->stringToProxy("test @ TestAdapter"); test(Ice::proxyIdentityEqual(base->ice_getRouter(), communicator->getDefaultRouter())); communicator->setDefaultRouter(0); base = communicator->stringToProxy("test @ TestAdapter"); test(!base->ice_getRouter()); #endif tprintf("ok\n"); tprintf("starting server..."); manager->startServer(); tprintf("ok\n"); tprintf("testing checked cast..."); TestIntfPrx obj = TestIntfPrx::checkedCast(base); obj = TestIntfPrx::checkedCast(communicator->stringToProxy("test@TestAdapter")); obj = TestIntfPrx::checkedCast(communicator->stringToProxy("test @TestAdapter")); obj = TestIntfPrx::checkedCast(communicator->stringToProxy("test@ TestAdapter")); test(obj); TestIntfPrx obj2 = TestIntfPrx::checkedCast(base2); test(obj2); TestIntfPrx obj3 = TestIntfPrx::checkedCast(base3); test(obj3); ServerManagerPrx obj4 = ServerManagerPrx::checkedCast(base4); test(obj4); TestIntfPrx obj5 = TestIntfPrx::checkedCast(base5); test(obj5); TestIntfPrx obj6 = TestIntfPrx::checkedCast(base6); test(obj6); tprintf("ok\n"); tprintf("testing id@AdapterId indirect proxy..."); obj->shutdown(); manager->startServer(); try { obj2 = TestIntfPrx::checkedCast(base2); obj2->ice_ping(); } catch(const Ice::LocalException&) { test(false); } tprintf("ok\n"); tprintf("testing id@ReplicaGroupId indirect proxy..."); obj->shutdown(); manager->startServer(); try { obj6 = TestIntfPrx::checkedCast(base6); obj6->ice_ping(); } catch(const Ice::LocalException&) { test(false); } tprintf("ok\n"); tprintf("testing identity indirect proxy..."); obj->shutdown(); manager->startServer(); try { obj3 = TestIntfPrx::checkedCast(base3); obj3->ice_ping(); } catch(const Ice::LocalException&) { test(false); } try { obj2 = TestIntfPrx::checkedCast(base2); obj2->ice_ping(); } catch(const Ice::LocalException&) { test(false); } obj->shutdown(); manager->startServer(); try { obj2 = TestIntfPrx::checkedCast(base2); obj2->ice_ping(); } catch(const Ice::LocalException&) { test(false); } try { obj3 = TestIntfPrx::checkedCast(base3); obj3->ice_ping(); } catch(const Ice::LocalException&) { test(false); } obj->shutdown(); manager->startServer(); try { obj2 = TestIntfPrx::checkedCast(base2); obj2->ice_ping(); } catch(const Ice::LocalException&) { test(false); } obj->shutdown(); manager->startServer(); try { obj3 = TestIntfPrx::checkedCast(base3); obj3->ice_ping(); } catch(const Ice::LocalException&) { test(false); } obj->shutdown(); manager->startServer(); try { obj2 = TestIntfPrx::checkedCast(base2); obj2->ice_ping(); } catch(const Ice::LocalException&) { test(false); } obj->shutdown(); manager->startServer(); try { obj5 = TestIntfPrx::checkedCast(base5); obj5->ice_ping(); } catch(const Ice::LocalException&) { test(false); } tprintf("ok\n"); tprintf("testing reference with unknown identity..."); try { base = communicator->stringToProxy("unknown/unknown"); base->ice_ping(); test(false); } catch (const Ice::NotRegisteredException& ex) { test(ex.kindOfObject == "object"); test(ex.id == "unknown/unknown"); } tprintf("ok\n"); tprintf("testing reference with unknown adapter..."); try { base = communicator->stringToProxy("test @ TestAdapterUnknown"); base->ice_ping(); test(false); } catch (const Ice::NotRegisteredException& ex) { test(ex.kindOfObject == "object adapter"); test(ex.id == "TestAdapterUnknown"); } tprintf("ok\n"); tprintf("testing object reference from server..."); HelloPrx hello = obj->getHello(); hello->sayHello(); test(communicator->proxyToString(hello).find("TestAdapter") != string::npos); hello = obj->getReplicatedHello(); hello->sayHello(); test(communicator->proxyToString(hello).find("ReplicatedAdapter") != string::npos); tprintf("ok\n"); tprintf("testing object reference from server after shutdown..."); obj->shutdown(); manager->startServer(); hello->sayHello(); tprintf("ok\n"); tprintf("testing object migration..."); hello = HelloPrx::checkedCast(communicator->stringToProxy("hello")); obj->migrateHello(); hello->sayHello(); obj->migrateHello(); hello->sayHello(); obj->migrateHello(); hello->sayHello(); tprintf("ok\n"); tprintf("shutdown server..."); obj->shutdown(); tprintf("ok\n"); tprintf("testing whether server is gone..."); try { obj2->ice_ping(); test(false); } catch(const Ice::LocalException&) { } try { obj3->ice_ping(); test(false); } catch(const Ice::LocalException&) { } try { obj5->ice_ping(); test(false); } catch(const Ice::LocalException&) { } tprintf("ok\n"); tprintf("shutdown server manager..."); manager->shutdown(); tprintf("ok\n"); } #endif IceE-1.2.0/test/IceE/location/Server.cpp0000644000076400007640000000754610602225335017613 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_LOCATOR #include #include #include using namespace std; class LocationTestApplication : public TestApplication { public: LocationTestApplication() : TestApplication("location server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(argc, argv); initData.properties->setProperty("ServerManager.Endpoints", "default -p 12010"); loadConfig(initData.properties); // // For blocking client test, set timeout so CloseConnection send will // return quickly. Otherwise server will hang since client is not // listening for these messages. // if(initData.properties->getPropertyAsInt("Ice.Blocking") > 0) { initData.properties->setProperty("Ice.Override.Timeout", "100"); initData.properties->setProperty("Ice.Warn.Connections", "0"); } // // These properties cannot be overridden. The OAs started by // the ServerManager must be local. // initData.properties->setProperty("TestAdapter.Endpoints", "default"); initData.properties->setProperty("TestAdapter.AdapterId", "TestAdapter"); initData.properties->setProperty("TestAdapter.ReplicaGroupId", "ReplicatedAdapter"); initData.properties->setProperty("TestAdapter2.Endpoints", "default"); initData.properties->setProperty("TestAdapter2.AdapterId", "TestAdapter2"); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); // // Register the server manager. The server manager creates a // new 'server' (a server isn't a different process, it's just // a new communicator and object adapter). // Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("ServerManager"); // // We also register a sample server locator which implements // the locator interface, this locator is used by the clients // and the 'servers' created with the server manager // interface. // ServerLocatorRegistryPtr registry = new ServerLocatorRegistry(); registry->addObject(adapter->createProxy(communicator()->stringToIdentity("ServerManager"))); Ice::ObjectPtr object = new ServerManagerI(adapter, registry, initData); adapter->add(object, communicator()->stringToIdentity("ServerManager")); Ice::LocatorRegistryPrx registryPrx = Ice::LocatorRegistryPrx::uncheckedCast(adapter->add(registry, communicator()->stringToIdentity("registry"))); Ice::LocatorPtr locator = new ServerLocator(registry, registryPrx); adapter->add(locator, communicator()->stringToIdentity("locator")); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { LocationTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { LocationTestApplication app; return app.main(argc, argv); } #endif #else #include #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { tprintf("Adapter Ready\n"); return 0; } #else int main(int argc, char* argv[]) { #ifdef _WIN32 tprintf("%d\n", _getpid()); #else tprintf("%d\n", getpid()); #endif tprintf("Adapter Ready\n"); return 0; } #endif #endif IceE-1.2.0/test/IceE/location/run.py0000755000076400007640000000140610576536574017033 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "location") TestUtil.mixedClientServerTest(name) sys.exit(0) IceE-1.2.0/test/IceE/location/ServerLocator.h0000644000076400007640000000346210576536574020621 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef SERVER_LOCATOR_H #define SERVER_LOCATOR_H #include #ifdef ICEE_HAS_LOCATOR #include #include class ServerLocatorRegistry : public Ice::LocatorRegistry { public: ServerLocatorRegistry(); virtual void setAdapterDirectProxy(const ::std::string&, const ::Ice::ObjectPrx&, const ::Ice::Current&); virtual void setReplicatedAdapterDirectProxy(const std::string&, const ::std::string&, const ::Ice::ObjectPrx&, const ::Ice::Current&); // // Internal method // ::Ice::ObjectPrx getAdapter(const ::std::string&) const; ::Ice::ObjectPrx getObject(const ::Ice::Identity&) const; void addObject(const ::Ice::ObjectPrx&); void clear(); private: ::std::map< ::std::string, ::Ice::ObjectPrx> _adapters; ::std::map< ::Ice::Identity, ::Ice::ObjectPrx> _objects; }; typedef ::IceInternal::Handle< ServerLocatorRegistry> ServerLocatorRegistryPtr; class ServerLocator : public ::Ice::Locator { public: ServerLocator(const ::ServerLocatorRegistryPtr&, const ::Ice::LocatorRegistryPrx&); virtual ::Ice::ObjectPrx findObjectById(const ::Ice::Identity&, const ::Ice::Current&) const; virtual ::Ice::ObjectPrx findAdapterById(const ::std::string&, const ::Ice::Current&) const; virtual ::Ice::LocatorRegistryPrx getRegistry(const ::Ice::Current&) const; private: ServerLocatorRegistryPtr _registry; ::Ice::LocatorRegistryPrx _registryPrx; }; #endif #endif IceE-1.2.0/test/IceE/location/Makefile0000644000076400007640000000162510576536574017315 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Test.o \ COBJS = Client.o \ AllTests.o SOBJS = TestI.o \ ServerLocator.o \ Server.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(TESTLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/location/Test.ice0000644000076400007640000000130410576536574017250 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { interface ServerManager { void startServer(); idempotent void shutdown(); }; interface Hello { idempotent void sayHello(); }; interface TestIntf { idempotent void shutdown(); idempotent Hello* getHello(); idempotent Hello* getReplicatedHello(); void migrateHello(); }; }; #endif IceE-1.2.0/test/IceE/location/Client.cpp0000644000076400007640000000415710602225335017556 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_LOCATOR #include #include using namespace std; class LocationTestApplication : public TestApplication { public: LocationTestApplication() : TestApplication("location client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(argc, argv); loadConfig(initData.properties); // // For blocking client change retry interval from default. // if(initData.properties->getPropertyAsInt("Ice.Blocking") > 0) { initData.properties->setProperty("Ice.RetryIntervals", "0 0"); initData.properties->setProperty("Ice.Warn.Connections", "0"); } initData.properties->setProperty("Ice.Default.Locator", initData.properties->getPropertyWithDefault("Location.Locator", "locator:default -p 12010")); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); void allTests(const Ice::CommunicatorPtr&); allTests(communicator()); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { LocationTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { LocationTestApplication app; return app.main(argc, argv); } #endif #else #include #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { tprintf("Adapter Ready\n"); return 0; } #else int main(int argc, char* argv[]) { #ifdef _WIN32 tprintf("%d\n", _getpid()); #else tprintf("%d\n", getpid()); #endif tprintf("Adapter Ready\n"); return 0; } #endif #endif IceE-1.2.0/test/IceE/location/ServerLocator.cpp0000644000076400007640000000450710576536574021155 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_LOCATOR #include #include #include using namespace std; ServerLocatorRegistry::ServerLocatorRegistry() { } void ServerLocatorRegistry::setAdapterDirectProxy(const ::std::string& adapter, const ::Ice::ObjectPrx& object, const ::Ice::Current&) { _adapters[adapter] = object; } void ServerLocatorRegistry::setReplicatedAdapterDirectProxy(const std::string& adapter, const std::string& replicaId, const ::Ice::ObjectPrx& object, const ::Ice::Current&) { _adapters[adapter] = object; _adapters[replicaId] = object; } Ice::ObjectPrx ServerLocatorRegistry::getAdapter(const ::std::string& adapter) const { ::std::map< string, ::Ice::ObjectPrx>::const_iterator p = _adapters.find(adapter); if(_adapters.find(adapter) == _adapters.end()) { throw Ice::AdapterNotFoundException(); } return p->second; } Ice::ObjectPrx ServerLocatorRegistry::getObject(const ::Ice::Identity& id) const { ::std::map< ::Ice::Identity, ::Ice::ObjectPrx>::const_iterator p = _objects.find(id); if(p == _objects.end()) { throw Ice::ObjectNotFoundException(); } return p->second; } void ServerLocatorRegistry::addObject(const Ice::ObjectPrx& object) { _objects[object->ice_getIdentity()] = object; } void ServerLocatorRegistry::clear() { _objects.clear(); _adapters.clear(); } ServerLocator::ServerLocator(const ServerLocatorRegistryPtr& registry, const ::Ice::LocatorRegistryPrx& registryPrx) : _registry(registry), _registryPrx(registryPrx) { } Ice::ObjectPrx ServerLocator::findObjectById(const Ice::Identity& id, const Ice::Current& current) const { return _registry->getObject(id); } Ice::ObjectPrx ServerLocator::findAdapterById(const string& id, const Ice::Current& current) const { return _registry->getAdapter(id); } Ice::LocatorRegistryPrx ServerLocator::getRegistry(const ::Ice::Current&) const { return _registryPrx; } #endif IceE-1.2.0/test/IceE/Makefile.mak0000644000076400007640000000150010616662372016233 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\.. !include $(top_srcdir)\config\Make.rules.mak SUBDIRS = proxy \ operations \ exceptions \ inheritance \ facets \ location \ slicing \ custom \ retry \ thread \ uuid !if "$(EMBEDDED_DEVICE)" == "" SUBDIRS = $(SUBDIRS) \ faultTolerance \ adapterDeactivation \ !endif $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/test/IceE/uuid/0000755000076400007640000000000010620544015014762 5ustar matthewmatthewIceE-1.2.0/test/IceE/uuid/.depend0000644000076400007640000000437110616637156016245 0ustar matthewmatthewClient$(OBJEXT): Client.cpp ../../../include/IceE/UUID.h ../../../include/IceE/Exception.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Handle.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../include/TestApplication.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h IceE-1.2.0/test/IceE/uuid/Makefile.mak0000644000076400007640000000164110614106575017203 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe TARGETS = $(CLIENT) OBJS = Client.obj SRCS = $(OBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(LINK) $(LDFLAGS) $(PDBFLAGS) $(OBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest !include .depend IceE-1.2.0/test/IceE/uuid/run.py0000755000076400007640000000177210576536575016200 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "uuid") testdir = os.path.join(toplevel, "test", name) client = os.path.join(testdir, "client") print "starting client...", clientPipe = os.popen(client + " 2>&1") print "ok" TestUtil.printOutputFromPipe(clientPipe); clientStatus = clientPipe.close() if clientStatus: sys.exit(1) sys.exit(0) IceE-1.2.0/test/IceE/uuid/Makefile0000644000076400007640000000115410576536575016451 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client TARGETS = $(CLIENT) OBJS = Client.o SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/uuid/Client.cpp0000644000076400007640000001441610576536575016740 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include using namespace IceUtil; using namespace std; static StaticMutex staticMutex = ICE_STATIC_MUTEX_INITIALIZER; inline void usage(const char* myName) { tprintf("Usage: %s [number of UUIDs to generate] [number of threads]\n", myName); } class CountedBarrier : public Shared, public Monitor { public: CountedBarrier(int count) : _count(count) { } void decrement() { Lock sync(*this); --_count; if(_count == 0) { notifyAll(); } } void waitZero() { Lock sync(*this); while(_count != 0) { wait(); } } bool isZero() const { Lock sync(*this); return _count == 0; } private: int _count; }; typedef Handle CountedBarrierPtr; class InsertThread : public Thread, public Mutex { public: InsertThread(const CountedBarrierPtr& start, const CountedBarrierPtr& stop, int threadId, set& uuidSet, long howMany, bool verbose) : _start(start), _stop(stop), _threadId(threadId), _uuidSet(uuidSet), _howMany(howMany), _verbose(verbose), _destroyed(false) { } virtual void run() { _start->decrement(); _start->waitZero(); for(long i = 0; i < _howMany && !destroyed(); i++) { string uuid = generateUUID(); { StaticMutex::Lock lock(staticMutex); pair::iterator, bool> ok = _uuidSet.insert(uuid); if(!ok.second) { tprintf("******* iteration %d\n", i); tprintf("******* Duplicate UUID: %s\n", (*ok.first).c_str()); } test(ok.second); } #ifdef _WIN32_WCE if(i > 0 && (i % 100) == 0) { tprintf("."); } #else if(_verbose && i > 0 && (i % 100000 == 0)) { tprintf("Thread %d: generated %d UUIDs.\n", _threadId, i); } #endif } _stop->decrement(); #ifdef _WIN32_WCE // This will cause the main thread to wake. tprintf("."); #endif } void destroy() { Lock sync(*this); _destroyed = true; } bool destroyed() const { Lock sync(*this); return _destroyed; } private: const CountedBarrierPtr _start; const CountedBarrierPtr _stop; const int _threadId; set& _uuidSet; const long _howMany; const bool _verbose; bool _destroyed; }; typedef Handle InsertThreadPtr; class UuidTestApplication : public TestApplication { public: UuidTestApplication() : TestApplication("uuid test") { } virtual int run(int argc, char* argv[]) { #ifdef _WIN32_WCE long howMany = 3000; #else long howMany = 300000; #endif int threadCount = 3; bool verbose = false; if(argc > 3) { usage(argv[0]); return EXIT_FAILURE; } else if(argc == 3) { howMany = atol(argv[1]); if (howMany == 0) { usage(argv[0]); return EXIT_FAILURE; } threadCount = atoi(argv[2]); if(threadCount <= 0) { usage(argv[0]); return EXIT_FAILURE; } verbose = true; } else if(argc == 2) { howMany = atol(argv[1]); if (howMany == 0) { usage(argv[0]); return EXIT_FAILURE; } } tprintf("Generating %d UUIDs", howMany); tprintf("... "); if(verbose) { tprintf("\n"); } // // First measure raw time to produce UUIDs. // Time startTime = Time::now(); long i; for(i = 0; i < howMany; i++) { generateUUID(); } #ifdef _WIN32_WCE if(terminated()) { return EXIT_SUCCESS; } #endif Time finish = Time::now(); tprintf("ok\n"); #ifndef _WIN32_WCE if(verbose) #endif { tprintf("Each UUID took an average of %.04f ms to generate and insert into a set.\n", ((double) ((finish - startTime).toMilliSeconds())) / howMany); } tprintf("Generating %d UUIDs using %d thread", howMany, threadCount); if(threadCount > 1) { tprintf("s"); } tprintf("... "); if(verbose) { tprintf("\n"); } set uuidSet; startTime = Time::now(); vector threads; CountedBarrierPtr stop = new CountedBarrier(threadCount); CountedBarrierPtr start = new CountedBarrier(threadCount); for(i = 0; i < threadCount; i++) { InsertThreadPtr t = new InsertThread(start, stop, i, uuidSet, howMany / threadCount, verbose); t->start(); threads.push_back(t); } vector::iterator p; #ifdef _WIN32_WCE while(!stop->isZero() && !terminated()) { MSG Msg; if(GetMessage(&Msg, NULL, 0, 0)) { // // Process all pending events. // do { TranslateMessage(&Msg); DispatchMessage(&Msg); } while(PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)); } } // // If the user terminated the app, the destroy all the // threads. This loop will end once all the threads have gone. // if(terminated()) { for(p = threads.begin(); p != threads.end(); ++p) { (*p)->destroy(); } } #endif stop->waitZero(); finish = Time::now(); for(p = threads.begin(); p != threads.end(); ++p) { (*p)->getThreadControl().join(); } tprintf("ok\n"); #ifndef _WIN32_WCE if(verbose) #endif { tprintf("Each UUID took an average of %.04f ms to generate and insert into a set.\n", ((double) ((finish - startTime).toMilliSeconds())) / howMany); } return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UuidTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { UuidTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/inheritance/0000755000076400007640000000000010620544007016306 5ustar matthewmatthewIceE-1.2.0/test/IceE/inheritance/.depend0000644000076400007640000004206410616637156017571 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h Collocated$(OBJEXT): Collocated.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/inheritance/TestI.cpp0000644000076400007640000000464010576536574020072 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace Test; MA::CAPrx CAI_::caop(const MA::CAPrx& p, const Ice::Current&) { return p; } MB::CBPrx CBI::cbop(const MB::CBPrx& p, const Ice::Current&) { return p; } MA::CCPrx CCI::ccop(const MA::CCPrx& p, const Ice::Current&) { return p; } MA::CDPrx CDI::cdop(const MA::CDPrx& p, const Ice::Current&) { return p; } MA::IAPrx IAI::iaop(const MA::IAPrx& p, const Ice::Current&) { return p; } MB::IB1Prx IB1I::ib1op(const MB::IB1Prx& p, const Ice::Current&) { return p; } MB::IB2Prx IB2I::ib2op(const MB::IB2Prx& p, const Ice::Current&) { return p; } MA::ICPrx ICI::icop(const MA::ICPrx& p, const Ice::Current&) { return p; } InitialI::InitialI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter) { _ca = MA::CAPrx::uncheckedCast(_adapter->addWithUUID(new CAI_)); _cb = MB::CBPrx::uncheckedCast(_adapter->addWithUUID(new CBI)); _cc = MA::CCPrx::uncheckedCast(_adapter->addWithUUID(new CCI)); _cd = MA::CDPrx::uncheckedCast(_adapter->addWithUUID(new CDI)); _ia = MA::IAPrx::uncheckedCast(_adapter->addWithUUID(new IAI)); _ib1 = MB::IB1Prx::uncheckedCast(_adapter->addWithUUID(new IB1I)); _ib2 = MB::IB2Prx::uncheckedCast(_adapter->addWithUUID(new IB2I)); _ic = MA::ICPrx::uncheckedCast(_adapter->addWithUUID(new ICI)); } void InitialI::shutdown(const Ice::Current&) { _adapter->getCommunicator()->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } MA::CAPrx InitialI::caop(const Ice::Current&) { return _ca; } MB::CBPrx InitialI::cbop(const Ice::Current&) { return _cb; } MA::CCPrx InitialI::ccop(const Ice::Current&) { return _cc; } MA::CDPrx InitialI::cdop(const Ice::Current&) { return _cd; } MA::IAPrx InitialI::iaop(const Ice::Current&) { return _ia; } MB::IB1Prx InitialI::ib1op(const Ice::Current&) { return _ib1; } MB::IB2Prx InitialI::ib2op(const Ice::Current&) { return _ib2; } MA::ICPrx InitialI::icop(const Ice::Current&) { return _ic; } IceE-1.2.0/test/IceE/inheritance/TestI.h0000644000076400007640000000472610576536574017544 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TESTI_H #define TESTI_H #include class InitialI : public Test::Initial { public: InitialI(const Ice::ObjectAdapterPtr&); virtual void shutdown(const Ice::Current&); virtual Test::MA::CAPrx caop(const Ice::Current&); virtual Test::MB::CBPrx cbop(const Ice::Current&); virtual Test::MA::CCPrx ccop(const Ice::Current&); virtual Test::MA::CDPrx cdop(const Ice::Current&); virtual Test::MA::IAPrx iaop(const Ice::Current&); virtual Test::MB::IB1Prx ib1op(const Ice::Current&); virtual Test::MB::IB2Prx ib2op(const Ice::Current&); virtual Test::MA::ICPrx icop(const Ice::Current&); private: Ice::ObjectAdapterPtr _adapter; Test::MA::CAPrx _ca; Test::MB::CBPrx _cb; Test::MA::CCPrx _cc; Test::MA::CDPrx _cd; Test::MA::IAPrx _ia; Test::MB::IB1Prx _ib1; Test::MB::IB2Prx _ib2; Test::MA::ICPrx _ic; }; class CAI_ : virtual public Test::MA::CA { public: virtual Test::MA::CAPrx caop(const Test::MA::CAPrx&, const Ice::Current&); }; class CBI : virtual public Test::MB::CB, virtual public CAI_ { public: virtual Test::MB::CBPrx cbop(const Test::MB::CBPrx&, const Ice::Current&); }; class CCI : virtual public Test::MA::CC, virtual public CBI { public: virtual Test::MA::CCPrx ccop(const Test::MA::CCPrx&, const Ice::Current&); }; class IAI : virtual public Test::MA::IA { public: virtual Test::MA::IAPrx iaop(const Test::MA::IAPrx&, const Ice::Current&); }; class IB1I : virtual public Test::MB::IB1, virtual public IAI { public: virtual Test::MB::IB1Prx ib1op(const Test::MB::IB1Prx&, const Ice::Current&); }; class IB2I : virtual public Test::MB::IB2, virtual public IAI { public: virtual Test::MB::IB2Prx ib2op(const Test::MB::IB2Prx&, const Ice::Current&); }; class ICI : virtual public Test::MA::IC, virtual public IB1I, virtual public IB2I { public: virtual Test::MA::ICPrx icop(const Test::MA::ICPrx&, const Ice::Current&); }; class CDI : virtual public Test::MA::CD, virtual public CCI, virtual public IB1I, virtual public IB2I { public: virtual Test::MA::CDPrx cdop(const Test::MA::CDPrx&, const Ice::Current&); }; #endif IceE-1.2.0/test/IceE/inheritance/Makefile.mak0000644000076400007640000000345110614106575020527 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ Server.obj COLOBJS = Test.obj \ TestI.obj \ Collocated.obj \ AllTests.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) \ $(COLOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) $(LINK) $(LDFLAGS) $(COPDBFLAGS) $(COLOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/inheritance/AllTests.cpp0000644000076400007640000001214610576536574020575 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; InitialPrx allTests(const Ice::CommunicatorPtr& communicator) { tprintf("testing stringToProxy..."); string ref = communicator->getProperties()->getPropertyWithDefault( "Inheritance.Proxy", "initial:default -p 12010 -t 10000"); Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); tprintf("ok\n"); tprintf("testing checked cast..."); InitialPrx initial = InitialPrx::checkedCast(base); test(initial); test(initial == base); tprintf("ok\n"); tprintf("getting proxies for class hierarchy..."); MA::CAPrx ca = initial->caop(); MB::CBPrx cb = initial->cbop(); MA::CCPrx cc = initial->ccop(); MA::CDPrx cd = initial->cdop(); test(ca != cb); test(ca != cc); test(ca != cd); test(cb != cc); test(cb != cd); test(cc != cd); tprintf("ok\n"); tprintf("getting proxies for interface hierarchy..."); MA::IAPrx ia = initial->iaop(); MB::IB1Prx ib1 = initial->ib1op(); MB::IB2Prx ib2 = initial->ib2op(); MA::ICPrx ic = initial->icop(); test(ia != ib1); test(ia != ib2); test(ia != ic); test(ib1 != ic); test(ib2 != ic); tprintf("ok\n"); tprintf("invoking proxy operations on class hierarchy..."); MA::CAPrx cao; MB::CBPrx cbo; MA::CCPrx cco; cao = ca->caop(ca); test(cao == ca); cao = ca->caop(cb); test(cao == cb); cao = ca->caop(cc); test(cao == cc); cao = cb->caop(ca); test(cao == ca); cao = cb->caop(cb); test(cao == cb); cao = cb->caop(cc); test(cao == cc); cao = cc->caop(ca); test(cao == ca); cao = cc->caop(cb); test(cao == cb); cao = cc->caop(cc); test(cao == cc); cao = cb->cbop(cb); test(cao == cb); cbo = cb->cbop(cb); test(cbo == cb); cao = cb->cbop(cc); test(cao == cc); cbo = cb->cbop(cc); test(cbo == cc); cao = cc->cbop(cb); test(cao == cb); cbo = cc->cbop(cb); test(cbo == cb); cao = cc->cbop(cc); test(cao == cc); cbo = cc->cbop(cc); test(cbo == cc); cao = cc->ccop(cc); test(cao == cc); cbo = cc->ccop(cc); test(cbo == cc); cco = cc->ccop(cc); test(cco == cc); tprintf("ok\n"); tprintf("ditto, but for interface hierarchy..."); MA::IAPrx iao; MB::IB1Prx ib1o; MB::IB2Prx ib2o; MA::ICPrx ico; iao = ia->iaop(ia); test(iao == ia); iao = ia->iaop(ib1); test(iao == ib1); iao = ia->iaop(ib2); test(iao == ib2); iao = ia->iaop(ic); test(iao == ic); iao = ib1->iaop(ia); test(iao == ia); iao = ib1->iaop(ib1); test(iao == ib1); iao = ib1->iaop(ib2); test(iao == ib2); iao = ib1->iaop(ic); test(iao == ic); iao = ib2->iaop(ia); test(iao == ia); iao = ib2->iaop(ib1); test(iao == ib1); iao = ib2->iaop(ib2); test(iao == ib2); iao = ib2->iaop(ic); test(iao == ic); iao = ic->iaop(ia); test(iao == ia); iao = ic->iaop(ib1); test(iao == ib1); iao = ic->iaop(ib2); test(iao == ib2); iao = ic->iaop(ic); test(iao == ic); iao = ib1->ib1op(ib1); test(iao == ib1); ib1o = ib1->ib1op(ib1); test(ib1o == ib1); iao = ib1->ib1op(ic); test(iao == ic); ib1o = ib1->ib1op(ic); test(ib1o == ic); iao = ic->ib1op(ib1); test(iao == ib1); ib1o = ic->ib1op(ib1); test(ib1o == ib1); iao = ic->ib1op(ic); test(iao == ic); ib1o = ic->ib1op(ic); test(ib1o == ic); iao = ib2->ib2op(ib2); test(iao == ib2); ib2o = ib2->ib2op(ib2); test(ib2o == ib2); iao = ib2->ib2op(ic); test(iao == ic); ib2o = ib2->ib2op(ic); test(ib2o == ic); iao = ic->ib2op(ib2); test(iao == ib2); ib2o = ic->ib2op(ib2); test(ib2o == ib2); iao = ic->ib2op(ic); test(iao == ic); ib2o = ic->ib2op(ic); test(ib2o == ic); iao = ic->icop(ic); test(iao == ic); ib1o = ic->icop(ic); test(ib1o == ic); ib2o = ic->icop(ic); test(ib2o == ic); ico = ic->icop(ic); test(ico == ic); tprintf("ok\n"); tprintf("ditto, but for class implementing interfaces..."); MA::CDPrx cdo; cao = cd->caop(cd); test(cao == cd); cbo = cd->cbop(cd); test(cbo == cd); cco = cd->ccop(cd); test(cco == cd); iao = cd->iaop(cd); test(iao == cd); ib1o = cd->ib1op(cd); test(ib1o == cd); ib2o = cd->ib2op(cd); test(ib2o == cd); cao = cd->cdop(cd); test(cao == cd); cbo = cd->cdop(cd); test(cbo == cd); cco = cd->cdop(cd); test(cco == cd); iao = cd->cdop(cd); test(iao == cd); ib1o = cd->cdop(cd); test(ib1o == cd); ib2o = cd->cdop(cd); test(ib2o == cd); tprintf("ok\n"); return initial; } IceE-1.2.0/test/IceE/inheritance/Server.cpp0000644000076400007640000000315110576536574020304 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; class InheritanceTestApplication : public TestApplication { public: InheritanceTestApplication() : TestApplication("inheritance server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new InitialI(adapter); adapter->add(object, communicator()->stringToIdentity("initial")); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { InheritanceTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { InheritanceTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/inheritance/run.py0000755000076400007640000000144210576536574017514 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "inheritance") TestUtil.clientServerTest(name) TestUtil.collocatedTest(name) sys.exit(0) IceE-1.2.0/test/IceE/inheritance/Makefile0000644000076400007640000000213310576536574017771 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server COLLOCATED = collocated TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) OBJS = Test.o \ COBJS = Client.o \ AllTests.o SOBJS = TestI.o \ Server.o COLOBJS = TestI.o \ Collocated.o \ AllTests.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) \ $(COLOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(TESTLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(TESTLIBS) $(COLLOCATED): $(OBJS) $(COLOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/inheritance/Test.ice0000644000076400007640000000211510576536574017732 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { module MA { interface IA { IA* iaop(IA* p); }; class CA { CA* caop(CA* p); }; }; module MB { interface IB1 extends MA::IA { IB1* ib1op(IB1* p); }; interface IB2 extends MA::IA { IB2* ib2op(IB2* p); }; class CB extends MA::CA { CB* cbop(CB* p); }; }; module MA { interface IC extends MB::IB1, MB::IB2 { IC* icop(IC* p); }; class CC extends MB::CB { CC* ccop(CC* p); }; class CD extends CC implements MB::IB1, MB::IB2 { CD* cdop(CD* p); }; }; interface Initial { void shutdown(); MA::CA* caop(); MB::CB* cbop(); MA::CC* ccop(); MA::CD* cdop(); MA::IA* iaop(); MB::IB1* ib1op(); MB::IB2* ib2op(); MA::IC* icop(); }; }; #endif IceE-1.2.0/test/IceE/inheritance/Client.cpp0000644000076400007640000000257310576536574020263 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class InheritanceTestApplication : public TestApplication { public: InheritanceTestApplication() : TestApplication("inheritance client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); InitialPrx allTests(const Ice::CommunicatorPtr&); InitialPrx initial = allTests(communicator()); initial->shutdown(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { InheritanceTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { InheritanceTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/inheritance/Collocated.cpp0000644000076400007640000000324410576536574021112 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class InheritanceTestApplication : public TestApplication { public: InheritanceTestApplication() : TestApplication("inheritance collocated") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new InitialI(adapter); adapter->add(object, communicator()->stringToIdentity("initial")); adapter->activate(); InitialPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator()); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { InheritanceTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { InheritanceTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/operations/0000755000076400007640000000000010620544010016172 5ustar matthewmatthewIceE-1.2.0/test/IceE/operations/.depend0000644000076400007640000007356010616637156017470 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h ../../include/TestApplication.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h Test.h Twoways$(OBJEXT): Twoways.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h Test.h BatchOneways$(OBJEXT): BatchOneways.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h Test.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h TestI.h Test.h ../../include/TestCommon.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h ../../include/TestApplication.h TestI.h Test.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h TestI.h Test.h ../../include/TestCommon.h Collocated$(OBJEXT): Collocated.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h ../../include/TestApplication.h TestI.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h Test.h Twoways$(OBJEXT): Twoways.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h Test.h BatchOneways$(OBJEXT): BatchOneways.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ../../include/TestCommon.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/operations/TestI.cpp0000644000076400007640000002120310616553437017746 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include MyDerivedClassI::MyDerivedClassI() { } void MyDerivedClassI::shutdown(const Ice::Current& current) { current.adapter->getCommunicator()->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } void MyDerivedClassI::opVoid(const Ice::Current&) { } void MyDerivedClassI::opSleep(int duration, const Ice::Current&) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(duration)); } Ice::Byte MyDerivedClassI::opByte(Ice::Byte p1, Ice::Byte p2, Ice::Byte& p3, const Ice::Current&) { p3 = p1 ^ p2; return p1; } bool MyDerivedClassI::opBool(bool p1, bool p2, bool& p3, const Ice::Current&) { p3 = p1; return p2; } Ice::Long MyDerivedClassI::opShortIntLong(Ice::Short p1, Ice::Int p2, Ice::Long p3, Ice::Short& p4, Ice::Int& p5, Ice::Long& p6, const Ice::Current&) { p4 = p1; p5 = p2; p6 = p3; return p3; } Ice::Double MyDerivedClassI::opFloatDouble(Ice::Float p1, Ice::Double p2, Ice::Float& p3, Ice::Double& p4, const Ice::Current&) { p3 = p1; p4 = p2; return p2; } std::string MyDerivedClassI::opString(const std::string& p1, const std::string& p2, std::string& p3, const Ice::Current&) { p3 = p2 + " " + p1; return p1 + " " + p2; } Test::MyEnum MyDerivedClassI::opMyEnum(Test::MyEnum p1, Test::MyEnum& p2, const Ice::Current&) { p2 = p1; return Test::enum3; } Test::MyClassPrx MyDerivedClassI::opMyClass(const Test::MyClassPrx& p1, Test::MyClassPrx& p2, Test::MyClassPrx& p3, const Ice::Current& current) { p2 = p1; p3 = Test::MyClassPrx::uncheckedCast(current.adapter->createProxy( current.adapter->getCommunicator()->stringToIdentity("noSuchIdentity"))); return Test::MyClassPrx::uncheckedCast(current.adapter->createProxy(current.id)); } Test::Structure MyDerivedClassI::opStruct(const Test::Structure& p1, const ::Test::Structure& p2, ::Test::Structure& p3, const Ice::Current&) { p3 = p1; p3.s.s = "a new string"; return p2; } Test::ByteS MyDerivedClassI::opByteS(const Test::ByteS& p1, const Test::ByteS& p2, Test::ByteS& p3, const Ice::Current&) { p3.resize(p1.size()); std::reverse_copy(p1.begin(), p1.end(), p3.begin()); Test::ByteS r = p1; std::copy(p2.begin(), p2.end(), std::back_inserter(r)); return r; } Test::BoolS MyDerivedClassI::opBoolS(const Test::BoolS& p1, const Test::BoolS& p2, Test::BoolS& p3, const Ice::Current&) { p3 = p1; std::copy(p2.begin(), p2.end(), std::back_inserter(p3)); Test::BoolS r; r.resize(p1.size()); std::reverse_copy(p1.begin(), p1.end(), r.begin()); return r; } Test::LongS MyDerivedClassI::opShortIntLongS(const Test::ShortS& p1, const Test::IntS& p2, const Test::LongS& p3, Test::ShortS& p4, Test::IntS& p5, Test::LongS& p6, const Ice::Current&) { p4 = p1; p5.resize(p2.size()); std::reverse_copy(p2.begin(), p2.end(), p5.begin()); p6 = p3; std::copy(p3.begin(), p3.end(), std::back_inserter(p6)); return p3; } Test::DoubleS MyDerivedClassI::opFloatDoubleS(const Test::FloatS& p1, const Test::DoubleS& p2, Test::FloatS& p3, Test::DoubleS& p4, const Ice::Current&) { p3 = p1; p4.resize(p2.size()); std::reverse_copy(p2.begin(), p2.end(), p4.begin()); Test::DoubleS r = p2; std::copy(p1.begin(), p1.end(), std::back_inserter(r)); return r; } Test::StringS MyDerivedClassI::opStringS(const Test::StringS& p1, const Test::StringS& p2, Test::StringS& p3, const Ice::Current&) { p3 = p1; std::copy(p2.begin(), p2.end(), std::back_inserter(p3)); Test::StringS r; r.resize(p1.size()); std::reverse_copy(p1.begin(), p1.end(), r.begin()); return r; } Test::ByteSS MyDerivedClassI::opByteSS(const Test::ByteSS& p1, const Test::ByteSS& p2, Test::ByteSS& p3, const Ice::Current&) { p3.resize(p1.size()); std::reverse_copy(p1.begin(), p1.end(), p3.begin()); Test::ByteSS r = p1; std::copy(p2.begin(), p2.end(), std::back_inserter(r)); return r; } Test::BoolSS MyDerivedClassI::opBoolSS(const Test::BoolSS& p1, const Test::BoolSS& p2, Test::BoolSS& p3, const Ice::Current&) { p3 = p1; std::copy(p2.begin(), p2.end(), std::back_inserter(p3)); Test::BoolSS r; r.resize(p1.size()); std::reverse_copy(p1.begin(), p1.end(), r.begin()); return r; } Test::LongSS MyDerivedClassI::opShortIntLongSS(const Test::ShortSS& p1, const Test::IntSS& p2, const Test::LongSS& p3, Test::ShortSS& p4, Test::IntSS& p5, Test::LongSS& p6, const Ice::Current&) { p4 = p1; p5.resize(p2.size()); std::reverse_copy(p2.begin(), p2.end(), p5.begin()); p6 = p3; std::copy(p3.begin(), p3.end(), std::back_inserter(p6)); return p3; } Test::DoubleSS MyDerivedClassI::opFloatDoubleSS(const Test::FloatSS& p1, const Test::DoubleSS& p2, Test::FloatSS& p3, Test::DoubleSS& p4, const Ice::Current&) { p3 = p1; p4.resize(p2.size()); std::reverse_copy(p2.begin(), p2.end(), p4.begin()); Test::DoubleSS r = p2; std::copy(p2.begin(), p2.end(), std::back_inserter(r)); return r; } Test::StringSS MyDerivedClassI::opStringSS(const Test::StringSS& p1, const Test::StringSS& p2, Test::StringSS& p3, const Ice::Current&) { p3 = p1; std::copy(p2.begin(), p2.end(), std::back_inserter(p3)); Test::StringSS r; r.resize(p2.size()); std::reverse_copy(p2.begin(), p2.end(), r.begin()); return r; } Test::StringSSS MyDerivedClassI::opStringSSS(const Test::StringSSS& p1, const Test::StringSSS& p2, Test::StringSSS& p3, const ::Ice::Current&) { p3 = p1; std::copy(p2.begin(), p2.end(), std::back_inserter(p3)); Test::StringSSS r; r.resize(p2.size()); std::reverse_copy(p2.begin(), p2.end(), r.begin()); return r; } Test::ByteBoolD MyDerivedClassI::opByteBoolD(const Test::ByteBoolD& p1, const Test::ByteBoolD& p2, Test::ByteBoolD& p3, const Ice::Current&) { p3 = p1; Test::ByteBoolD r = p1; std::set_union(p1.begin(), p1.end(), p2.begin(), p2.end(), std::inserter(r, r.end())); return r; } Test::ShortIntD MyDerivedClassI::opShortIntD(const Test::ShortIntD& p1, const Test::ShortIntD& p2, Test::ShortIntD& p3, const Ice::Current&) { p3 = p1; Test::ShortIntD r = p1; std::set_union(p1.begin(), p1.end(), p2.begin(), p2.end(), std::inserter(r, r.end())); return r; } Test::LongFloatD MyDerivedClassI::opLongFloatD(const Test::LongFloatD& p1, const Test::LongFloatD& p2, Test::LongFloatD& p3, const Ice::Current&) { p3 = p1; Test::LongFloatD r = p1; std::set_union(p1.begin(), p1.end(), p2.begin(), p2.end(), std::inserter(r, r.end())); return r; } Test::StringStringD MyDerivedClassI::opStringStringD(const Test::StringStringD& p1, const Test::StringStringD& p2, Test::StringStringD& p3, const Ice::Current&) { p3 = p1; Test::StringStringD r = p1; std::set_union(p1.begin(), p1.end(), p2.begin(), p2.end(), std::inserter(r, r.end())); return r; } Test::StringMyEnumD MyDerivedClassI::opStringMyEnumD(const Test::StringMyEnumD& p1, const Test::StringMyEnumD& p2, Test::StringMyEnumD& p3, const Ice::Current&) { p3 = p1; Test::StringMyEnumD r = p1; std::set_union(p1.begin(), p1.end(), p2.begin(), p2.end(), std::inserter(r, r.end())); return r; } Test::IntS MyDerivedClassI::opIntS(const Test::IntS& s, const Ice::Current&) { Test::IntS r; std::transform(s.begin(), s.end(), std::back_inserter(r), std::negate()); return r; } void MyDerivedClassI::opByteSOneway(const Test::ByteS&, const Ice::Current&) { } Test::StringStringD MyDerivedClassI::opContext(const Ice::Current& c) { return c.ctx; } void MyDerivedClassI::opDoubleMarshaling(Ice::Double p1, const Test::DoubleS& p2, const Ice::Current&) { Ice::Double d = 1278312346.0 / 13.0; test(p1 == d); for(unsigned int i = 0; i < p2.size(); ++i) { test(p2[i] == d); } } void MyDerivedClassI::opDerived(const Ice::Current&) { } IceE-1.2.0/test/IceE/operations/TestI.h0000644000076400007640000001070710616553437017422 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class MyDerivedClassI : public Test::MyDerivedClass { public: MyDerivedClassI(); virtual void shutdown(const Ice::Current&); virtual void opVoid(const Ice::Current&); virtual void opSleep(int, const Ice::Current&); virtual Ice::Byte opByte(Ice::Byte, Ice::Byte, Ice::Byte&, const Ice::Current&); virtual bool opBool(bool, bool, bool&, const Ice::Current&); virtual Ice::Long opShortIntLong(Ice::Short, Ice::Int, Ice::Long, Ice::Short&, Ice::Int&, Ice::Long&, const Ice::Current&); virtual Ice::Double opFloatDouble(Ice::Float, Ice::Double, Ice::Float&, Ice::Double&, const Ice::Current&); virtual std::string opString(const std::string&, const std::string&, std::string&, const Ice::Current&); virtual Test::MyEnum opMyEnum(Test::MyEnum, Test::MyEnum&, const Ice::Current&); virtual Test::MyClassPrx opMyClass(const Test::MyClassPrx&, Test::MyClassPrx&, Test::MyClassPrx&, const Ice::Current&); virtual Test::Structure opStruct(const Test::Structure&, const Test::Structure&, Test::Structure&, const Ice::Current&); virtual Test::ByteS opByteS(const Test::ByteS&, const Test::ByteS&, Test::ByteS&, const Ice::Current&); virtual Test::BoolS opBoolS(const Test::BoolS&, const Test::BoolS&, Test::BoolS&, const Ice::Current&); virtual Test::LongS opShortIntLongS(const Test::ShortS&, const Test::IntS&, const Test::LongS&, Test::ShortS&, Test::IntS&, Test::LongS&, const Ice::Current&); virtual Test::DoubleS opFloatDoubleS(const Test::FloatS&, const Test::DoubleS&, Test::FloatS&, Test::DoubleS&, const Ice::Current&); virtual Test::StringS opStringS(const Test::StringS&, const Test::StringS&, Test::StringS&, const Ice::Current&); virtual Test::ByteSS opByteSS(const Test::ByteSS&, const Test::ByteSS&, Test::ByteSS&, const Ice::Current&); virtual Test::BoolSS opBoolSS(const Test::BoolSS&, const Test::BoolSS&, Test::BoolSS&, const Ice::Current&); virtual Test::LongSS opShortIntLongSS(const Test::ShortSS&, const Test::IntSS&, const Test::LongSS&, Test::ShortSS&, Test::IntSS&, Test::LongSS&, const Ice::Current&); virtual Test::DoubleSS opFloatDoubleSS(const Test::FloatSS&, const Test::DoubleSS&, Test::FloatSS&, Test::DoubleSS&, const Ice::Current&); virtual Test::StringSS opStringSS(const Test::StringSS&, const Test::StringSS&, Test::StringSS&, const Ice::Current&); virtual Test::StringSSS opStringSSS(const Test::StringSSS&, const Test::StringSSS&, Test::StringSSS&, const ::Ice::Current&); virtual Test::ByteBoolD opByteBoolD(const Test::ByteBoolD&, const Test::ByteBoolD&, Test::ByteBoolD&, const Ice::Current&); virtual Test::ShortIntD opShortIntD(const Test::ShortIntD&, const Test::ShortIntD&, Test::ShortIntD&, const Ice::Current&); virtual Test::LongFloatD opLongFloatD(const Test::LongFloatD&, const Test::LongFloatD&, Test::LongFloatD&, const Ice::Current&); virtual Test::StringStringD opStringStringD(const Test::StringStringD&, const Test::StringStringD&, Test::StringStringD&, const Ice::Current&); virtual Test::StringMyEnumD opStringMyEnumD(const Test::StringMyEnumD&, const Test::StringMyEnumD&, Test::StringMyEnumD&, const Ice::Current&); virtual Test::IntS opIntS(const Test::IntS&, const Ice::Current&); virtual void opByteSOneway(const Test::ByteS&, const Ice::Current&); virtual Ice::Context opContext(const Ice::Current&); virtual void opDoubleMarshaling(Ice::Double, const Test::DoubleS&, const Ice::Current&); virtual void opDerived(const Ice::Current&); }; #endif IceE-1.2.0/test/IceE/operations/Makefile.mak0000644000076400007640000000357310614106575020426 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.obj \ Client.obj \ AllTests.obj \ Twoways.obj \ BatchOneways.obj SOBJS = Test.obj \ TestI.obj \ Server.obj COLOBJS = Test.obj \ TestI.obj \ Collocated.obj \ AllTests.obj \ Twoways.obj \ BatchOneways.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) \ $(COLOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) $(LINK) $(LDFLAGS) $(COPDBFLAGS) $(COLOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/operations/AllTests.cpp0000644000076400007640000000314010616553437020451 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; Test::MyClassPrx allTests(const Ice::CommunicatorPtr& communicator, const Ice::InitializationData& initData) { string ref = communicator->getProperties()->getPropertyWithDefault( "Operations.Proxy", "test:default -p 12010 -t 10000"); Ice::ObjectPrx base = communicator->stringToProxy(ref); Test::MyClassPrx cl = Test::MyClassPrx::checkedCast(base); Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(cl); tprintf("testing timeout..."); Test::MyClassPrx clTimeout = Test::MyClassPrx::uncheckedCast(cl->ice_timeout(500)); try { clTimeout->opSleep(2000); test(false); } catch(const Ice::TimeoutException&) { } tprintf("ok\n"); tprintf("testing twoway operations... "); void twoways(const Ice::CommunicatorPtr&, const Ice::InitializationData&, const Test::MyClassPrx&); twoways(communicator, initData, cl); twoways(communicator, initData, derived); derived->opDerived(); tprintf("ok\n"); tprintf("testing batch oneway operations... "); void batchOneways(const Test::MyClassPrx&); batchOneways(cl); batchOneways(derived); tprintf("ok\n"); return cl; } IceE-1.2.0/test/IceE/operations/BatchOneways.cpp0000644000076400007640000000246410576536574021325 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; void batchOneways(const Test::MyClassPrx& p) { const Test::ByteS bs1(10 * 1024, 0); const Test::ByteS bs2(99 * 1024, 0); const Test::ByteS bs3(100 * 1024, 0); try { p->opByteSOneway(bs1); test(true); } catch(const Ice::MemoryLimitException&) { test(false); } try { p->opByteSOneway(bs2); test(true); } catch(const Ice::MemoryLimitException&) { test(false); } try { p->opByteSOneway(bs3); test(false); } catch(const Ice::MemoryLimitException&) { test(true); } Test::MyClassPrx batch = Test::MyClassPrx::uncheckedCast(p->ice_batchOneway()); int i; for(i = 0 ; i < 30 ; ++i) { try { batch->opByteSOneway(bs1); test(true); } catch(const Ice::MemoryLimitException&) { test(false); } } batch->ice_getConnection()->flushBatchRequests(); } IceE-1.2.0/test/IceE/operations/Server.cpp0000644000076400007640000000330410616652361020162 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class OperationsTestApplication : public TestApplication { public: OperationsTestApplication() : TestApplication("operations server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); //initData.properties->setProperty("Ice.Trace.Network", "5"); //initData.properties->setProperty("Ice.Trace.Protocol", "5"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator()->stringToIdentity("test")); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { OperationsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { OperationsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/operations/run.py0000755000076400007640000000155210576536574017410 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "operations") print "tests with regular server." TestUtil.clientServerTest(name) print "tests with collocated server." TestUtil.collocatedTest(name) sys.exit(0) IceE-1.2.0/test/IceE/operations/Makefile0000644000076400007640000000216410576536574017667 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server COLLOCATED = collocated TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.o \ Client.o \ AllTests.o \ Twoways.o \ BatchOneways.o SOBJS = Test.o \ TestI.o \ Server.o COLOBJS = Test.o \ TestI.o \ Collocated.o \ AllTests.o \ Twoways.o \ BatchOneways.o SRCS = $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) \ $(COLOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(TESTLIBS) $(SERVER): $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(TESTLIBS) $(COLLOCATED): $(COLOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COLOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/operations/Test.ice0000644000076400007640000000670310616553437017623 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { enum MyEnum { enum1, enum2, enum3 }; class MyClass; struct AnotherStruct { string s; }; struct Structure { MyClass* p; MyEnum e; AnotherStruct s; }; sequence ByteS; sequence BoolS; sequence ShortS; sequence IntS; sequence LongS; sequence FloatS; sequence DoubleS; sequence StringS; sequence MyEnumS; sequence MyClassS; sequence ByteSS; sequence BoolSS; sequence ShortSS; sequence IntSS; sequence LongSS; sequence FloatSS; sequence DoubleSS; sequence StringSS; sequence MyEnumSS; sequence MyClassSS; sequence StringSSS; dictionary ByteBoolD; dictionary ShortIntD; dictionary LongFloatD; dictionary StringStringD; dictionary StringMyEnumD; class MyClass { void shutdown(); void opVoid(); void opSleep(int duration); byte opByte(byte p1, byte p2, out byte p3); bool opBool(bool p1, bool p2, out bool p3); long opShortIntLong(short p1, int p2, long p3, out short p4, out int p5, out long p6); double opFloatDouble(float p1, double p2, out float p3, out double p4); string opString(string p1, string p2, out string p3); MyEnum opMyEnum(MyEnum p1, out MyEnum p2); MyClass* opMyClass(MyClass* p1, out MyClass* p2, out MyClass* p3); Structure opStruct(Structure p1, Structure p2, out Structure p3); ByteS opByteS(ByteS p1, ByteS p2, out ByteS p3); BoolS opBoolS(BoolS p1, BoolS p2, out BoolS p3); LongS opShortIntLongS(Test::ShortS p1, IntS p2, LongS p3, out ::Test::ShortS p4, out IntS p5, out LongS p6); DoubleS opFloatDoubleS(FloatS p1, DoubleS p2, out FloatS p3, out DoubleS p4); StringS opStringS(StringS p1, StringS p2, out StringS p3); ByteSS opByteSS(ByteSS p1, ByteSS p2, out ByteSS p3); BoolSS opBoolSS(BoolSS p1, BoolSS p2, out BoolSS p3); LongSS opShortIntLongSS(ShortSS p1, IntSS p2, LongSS p3, out ShortSS p4, out IntSS p5, out LongSS p6); DoubleSS opFloatDoubleSS(FloatSS p1, DoubleSS p2, out FloatSS p3, out DoubleSS p4); StringSS opStringSS(StringSS p1, StringSS p2, out StringSS p3); StringSSS opStringSSS(StringSSS p1, StringSSS p2, out StringSSS p3); ByteBoolD opByteBoolD(ByteBoolD p1, ByteBoolD p2, out ByteBoolD p3); ShortIntD opShortIntD(ShortIntD p1, ShortIntD p2, out ShortIntD p3); LongFloatD opLongFloatD(LongFloatD p1, LongFloatD p2, out LongFloatD p3); StringStringD opStringStringD(StringStringD p1, StringStringD p2, out StringStringD p3); StringMyEnumD opStringMyEnumD(StringMyEnumD p1, StringMyEnumD p2, out StringMyEnumD p3); IntS opIntS(IntS s); void opByteSOneway(ByteS s); StringStringD opContext(); void opDoubleMarshaling(double p1, DoubleS p2); }; class MyDerivedClass extends MyClass { void opDerived(); }; }; #endif IceE-1.2.0/test/IceE/operations/Client.cpp0000644000076400007640000000414210616550523020130 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class OperationsTestApplication : public TestApplication { public: OperationsTestApplication() : TestApplication("operations client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // We must set MessageSizeMax to an explicit values, because // we run tests to check whether Ice.MemoryLimitException is // raised as expected. // initData.properties->setProperty("Ice.MessageSizeMax", "100"); loadConfig(initData.properties); // // Now parse argc/argv into initData // initData.properties = Ice::createProperties(argc, argv, initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); // // We don't want connection warnings because of the timeout test. // communicator()->getProperties()->setProperty("Ice.Warn.Connections", "0"); Test::MyClassPrx allTests(const Ice::CommunicatorPtr&, const Ice::InitializationData&); Test::MyClassPrx myClass = allTests(communicator(), initData); tprintf("testing server shutdown... "); myClass->shutdown(); try { myClass->opVoid(); test(false); } catch(const Ice::LocalException&) { tprintf("ok\n"); } return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { OperationsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { OperationsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/operations/Collocated.cpp0000644000076400007640000000376210616554026020774 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class OperationsTestApplication : public TestApplication { public: OperationsTestApplication() : TestApplication("operations collocated") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // We must set MessageSizeMax to an explicit values, because // we run tests to check whether Ice.MemoryLimitException is // raised as expected. // initData.properties->setProperty("Ice.MessageSizeMax", "100"); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); // // Now parse argc/argv into initData.properties // initData.properties = Ice::createProperties(argc, argv, initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); adapter->add(new MyDerivedClassI, communicator()->stringToIdentity("test")); adapter->activate(); Test::MyClassPrx allTests(const Ice::CommunicatorPtr&, const Ice::InitializationData&); allTests(communicator(), initData); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { OperationsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { OperationsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/operations/Twoways.cpp0000644000076400007640000003615110614145762020377 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include // // Stupid Visual C++ defines min and max as macros :-( // #ifdef min # undef min #endif #ifdef max # undef max #endif using namespace std; void twoways(const Ice::CommunicatorPtr& communicator, const Ice::InitializationData& initializationData, const Test::MyClassPrx& p) { { p->opVoid(); } { Ice::Byte b; Ice::Byte r; r = p->opByte(Ice::Byte(0xff), Ice::Byte(0x0f), b); test(b == Ice::Byte(0xf0)); test(r == Ice::Byte(0xff)); } { bool b; bool r; r = p->opBool(true, false, b); test(b); test(!r); } { Ice::Short s; Ice::Int i; Ice::Long l; Ice::Long r; r = p->opShortIntLong(10, 11, 12, s, i, l); test(s == 10); test(i == 11); test(l == 12); test(r == 12); r = p->opShortIntLong(numeric_limits::min(), numeric_limits::min(), numeric_limits::min(), s, i, l); test(s == numeric_limits::min()); test(i == numeric_limits::min()); test(l == numeric_limits::min()); test(r == numeric_limits::min()); r = p->opShortIntLong(numeric_limits::max(), numeric_limits::max(), numeric_limits::max(), s, i, l); test(s == numeric_limits::max()); test(i == numeric_limits::max()); test(l == numeric_limits::max()); test(r == numeric_limits::max()); } { Ice::Float f; Ice::Double d; Ice::Double r; r = p->opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10), f, d); test(f == Ice::Float(3.14)); test(d == Ice::Double(1.1E10)); test(r == Ice::Double(1.1E10)); r = p->opFloatDouble(numeric_limits::min(), numeric_limits::min(), f, d); test(f == numeric_limits::min()); test(d == numeric_limits::min()); test(r == numeric_limits::min()); r = p->opFloatDouble(numeric_limits::max(), numeric_limits::max(), f, d); test(f == numeric_limits::max()); test(d == numeric_limits::max()); test(r == numeric_limits::max()); } { string s; string r; r = p->opString("hello", "world", s); test(s == "world hello"); test(r == "hello world"); } { Test::MyEnum e; Test::MyEnum r; r = p->opMyEnum(Test::enum2, e); test(e == Test::enum2); test(r == Test::enum3); } { Test::MyClassPrx c1; Test::MyClassPrx c2; Test::MyClassPrx r; r = p->opMyClass(p, c1, c2); test(Ice::proxyIdentityAndFacetEqual(c1, p)); test(!Ice::proxyIdentityAndFacetEqual(c2, p)); test(Ice::proxyIdentityAndFacetEqual(r, p)); test(c1->ice_getIdentity() == communicator->stringToIdentity("test")); test(c2->ice_getIdentity() == communicator->stringToIdentity("noSuchIdentity")); test(r->ice_getIdentity() == communicator->stringToIdentity("test")); r->opVoid(); c1->opVoid(); try { c2->opVoid(); test(false); } catch(const Ice::ObjectNotExistException&) { } r = p->opMyClass(0, c1, c2); test(c1 == 0); test(c2 != 0); test(Ice::proxyIdentityAndFacetEqual(r, p)); r->opVoid(); } { Test::Structure si1; si1.p = p; si1.e = Test::enum3; si1.s.s = "abc"; Test::Structure si2; si2.p = 0; si2.e = Test::enum2; si2.s.s = "def"; Test::Structure so; Test::Structure rso = p->opStruct(si1, si2, so); test(rso.p == 0); test(rso.e == Test::enum2); test(rso.s.s == "def"); test(so.p == p); test(so.e == Test::enum3); test(so.s.s == "a new string"); so.p->opVoid(); } { Test::ByteS bsi1; Test::ByteS bsi2; bsi1.push_back(Ice::Byte(0x01)); bsi1.push_back(Ice::Byte(0x11)); bsi1.push_back(Ice::Byte(0x12)); bsi1.push_back(Ice::Byte(0x22)); bsi2.push_back(Ice::Byte(0xf1)); bsi2.push_back(Ice::Byte(0xf2)); bsi2.push_back(Ice::Byte(0xf3)); bsi2.push_back(Ice::Byte(0xf4)); Test::ByteS bso; Test::ByteS rso; rso = p->opByteS(bsi1, bsi2, bso); test(bso.size() == 4); test(bso[0] == Ice::Byte(0x22)); test(bso[1] == Ice::Byte(0x12)); test(bso[2] == Ice::Byte(0x11)); test(bso[3] == Ice::Byte(0x01)); test(rso.size() == 8); test(rso[0] == Ice::Byte(0x01)); test(rso[1] == Ice::Byte(0x11)); test(rso[2] == Ice::Byte(0x12)); test(rso[3] == Ice::Byte(0x22)); test(rso[4] == Ice::Byte(0xf1)); test(rso[5] == Ice::Byte(0xf2)); test(rso[6] == Ice::Byte(0xf3)); test(rso[7] == Ice::Byte(0xf4)); } { Test::BoolS bsi1; Test::BoolS bsi2; bsi1.push_back(true); bsi1.push_back(true); bsi1.push_back(false); bsi2.push_back(false); Test::BoolS bso; Test::BoolS rso; rso = p->opBoolS(bsi1, bsi2, bso); test(bso.size() == 4); test(bso[0]); test(bso[1]); test(!bso[2]); test(!bso[3]); test(rso.size() == 3); test(!rso[0]); test(rso[1]); test(rso[2]); } { Test::ShortS ssi; Test::IntS isi; Test::LongS lsi; ssi.push_back(1); ssi.push_back(2); ssi.push_back(3); isi.push_back(5); isi.push_back(6); isi.push_back(7); isi.push_back(8); lsi.push_back(10); lsi.push_back(30); lsi.push_back(20); Test::ShortS sso; Test::IntS iso; Test::LongS lso; Test::LongS rso; rso = p->opShortIntLongS(ssi, isi, lsi, sso, iso, lso); test(sso.size() == 3); test(sso[0] == 1); test(sso[1] == 2); test(sso[2] == 3); test(iso.size() == 4); test(iso[0] == 8); test(iso[1] == 7); test(iso[2] == 6); test(iso[3] == 5); test(lso.size() == 6); test(lso[0] == 10); test(lso[1] == 30); test(lso[2] == 20); test(lso[3] == 10); test(lso[4] == 30); test(lso[5] == 20); test(rso.size() == 3); test(rso[0] == 10); test(rso[1] == 30); test(rso[2] == 20); } { Test::FloatS fsi; Test::DoubleS dsi; fsi.push_back(Ice::Float(3.14)); fsi.push_back(Ice::Float(1.11)); dsi.push_back(Ice::Double(1.1E10)); dsi.push_back(Ice::Double(1.2E10)); dsi.push_back(Ice::Double(1.3E10)); Test::FloatS fso; Test::DoubleS dso; Test::DoubleS rso; rso = p->opFloatDoubleS(fsi, dsi, fso, dso); test(fso.size() == 2); test(fso[0] == ::Ice::Float(3.14)); test(fso[1] == ::Ice::Float(1.11)); test(dso.size() == 3); test(dso[0] == ::Ice::Double(1.3E10)); test(dso[1] == ::Ice::Double(1.2E10)); test(dso[2] == ::Ice::Double(1.1E10)); test(rso.size() == 5); test(rso[0] == ::Ice::Double(1.1E10)); test(rso[1] == ::Ice::Double(1.2E10)); test(rso[2] == ::Ice::Double(1.3E10)); test(::Ice::Float(rso[3]) == ::Ice::Float(3.14)); test(::Ice::Float(rso[4]) == ::Ice::Float(1.11)); } { Test::StringS ssi1; Test::StringS ssi2; ssi1.push_back("abc"); ssi1.push_back("de"); ssi1.push_back("fghi"); ssi2.push_back("xyz"); Test::StringS sso; Test::StringS rso; rso = p->opStringS(ssi1, ssi2, sso); test(sso.size() == 4); test(sso[0] == "abc"); test(sso[1] == "de"); test(sso[2] == "fghi"); test(sso[3] == "xyz"); test(rso.size() == 3); test(rso[0] == "fghi"); test(rso[1] == "de"); test(rso[2] == "abc"); } { Test::ByteSS bsi1; bsi1.resize(2); Test::ByteSS bsi2; bsi2.resize(2); bsi1[0].push_back(Ice::Byte(0x01)); bsi1[0].push_back(Ice::Byte(0x11)); bsi1[0].push_back(Ice::Byte(0x12)); bsi1[1].push_back(Ice::Byte(0xff)); bsi2[0].push_back(Ice::Byte(0x0e)); bsi2[1].push_back(Ice::Byte(0xf2)); bsi2[1].push_back(Ice::Byte(0xf1)); Test::ByteSS bso; Test::ByteSS rso; rso = p->opByteSS(bsi1, bsi2, bso); test(bso.size() == 2); test(bso[0].size() == 1); test(bso[0][0] == Ice::Byte(0xff)); test(bso[1].size() == 3); test(bso[1][0] == Ice::Byte(0x01)); test(bso[1][1] == Ice::Byte(0x11)); test(bso[1][2] == Ice::Byte(0x12)); test(rso.size() == 4); test(rso[0].size() == 3); test(rso[0][0] == Ice::Byte(0x01)); test(rso[0][1] == Ice::Byte(0x11)); test(rso[0][2] == Ice::Byte(0x12)); test(rso[1].size() == 1); test(rso[1][0] == Ice::Byte(0xff)); test(rso[2].size() == 1); test(rso[2][0] == Ice::Byte(0x0e)); test(rso[3].size() == 2); test(rso[3][0] == Ice::Byte(0xf2)); test(rso[3][1] == Ice::Byte(0xf1)); } { Test::FloatSS fsi; fsi.resize(3); Test::DoubleSS dsi; dsi.resize(1); fsi[0].push_back(Ice::Float(3.14)); fsi[1].push_back(Ice::Float(1.11)); dsi[0].push_back(Ice::Double(1.1E10)); dsi[0].push_back(Ice::Double(1.2E10)); dsi[0].push_back(Ice::Double(1.3E10)); Test::FloatSS fso; Test::DoubleSS dso; Test::DoubleSS rso; rso = p->opFloatDoubleSS(fsi, dsi, fso, dso); test(fso.size() == 3); test(fso[0].size() == 1); test(fso[0][0] == ::Ice::Float(3.14)); test(fso[1].size() == 1); test(fso[1][0] == ::Ice::Float(1.11)); test(fso[2].size() == 0); test(dso.size() == 1); test(dso[0].size() == 3); test(dso[0][0] == ::Ice::Double(1.1E10)); test(dso[0][1] == ::Ice::Double(1.2E10)); test(dso[0][2] == ::Ice::Double(1.3E10)); test(rso.size() == 2); test(rso[0].size() == 3); test(rso[0][0] == ::Ice::Double(1.1E10)); test(rso[0][1] == ::Ice::Double(1.2E10)); test(rso[0][2] == ::Ice::Double(1.3E10)); test(rso[1].size() == 3); test(rso[1][0] == ::Ice::Double(1.1E10)); test(rso[1][1] == ::Ice::Double(1.2E10)); test(rso[1][2] == ::Ice::Double(1.3E10)); } { Test::StringSS ssi1; ssi1.resize(2); Test::StringSS ssi2; ssi2.resize(3); ssi1[0].push_back("abc"); ssi1[1].push_back("de"); ssi1[1].push_back("fghi"); ssi2[2].push_back("xyz"); Test::StringSS sso; Test::StringSS rso; rso = p->opStringSS(ssi1, ssi2, sso); test(sso.size() == 5); test(sso[0].size() == 1); test(sso[0][0] == "abc"); test(sso[1].size() == 2); test(sso[1][0] == "de"); test(sso[1][1] == "fghi"); test(sso[2].size() == 0); test(sso[3].size() == 0); test(sso[4].size() == 1); test(sso[4][0] == "xyz"); test(rso.size() == 3); test(rso[0].size() == 1); test(rso[0][0] == "xyz"); test(rso[1].size() == 0); test(rso[2].size() == 0); } { Test::StringSSS sssi1; sssi1.resize(2); sssi1[0].resize(2); sssi1[0][0].push_back("abc"); sssi1[0][0].push_back("de"); sssi1[0][1].push_back("xyz"); sssi1[1].resize(1); sssi1[1][0].push_back("hello"); Test::StringSSS sssi2; sssi2.resize(3); sssi2[0].resize(2); sssi2[0][0].push_back(""); sssi2[0][0].push_back(""); sssi2[0][1].push_back("abcd"); sssi2[1].resize(1); sssi2[1][0].push_back(""); Test::StringSSS ssso; Test::StringSSS rsso; rsso = p->opStringSSS(sssi1, sssi2, ssso); test(ssso.size() == 5); test(ssso[0].size() == 2); test(ssso[0][0].size() == 2); test(ssso[0][1].size() == 1); test(ssso[1].size() == 1); test(ssso[1][0].size() == 1); test(ssso[2].size() == 2); test(ssso[2][0].size() == 2); test(ssso[2][1].size() == 1); test(ssso[3].size() == 1); test(ssso[3][0].size() == 1); test(ssso[4].size() == 0); test(ssso[0][0][0] == "abc"); test(ssso[0][0][1] == "de"); test(ssso[0][1][0] == "xyz"); test(ssso[1][0][0] == "hello"); test(ssso[2][0][0] == ""); test(ssso[2][0][1] == ""); test(ssso[2][1][0] == "abcd"); test(ssso[3][0][0] == ""); test(rsso.size() == 3); test(rsso[0].size() == 0); test(rsso[1].size() == 1); test(rsso[1][0].size() == 1); test(rsso[2].size() == 2); test(rsso[2][0].size() == 2); test(rsso[2][1].size() == 1); test(rsso[1][0][0] == ""); test(rsso[2][0][0] == ""); test(rsso[2][0][1] == ""); test(rsso[2][1][0] == "abcd"); } { Test::ByteBoolD di1; di1[10] = true; di1[100] = false; Test::ByteBoolD di2; di2[10] = true; di2[11] = false; di2[101] = true; Test::ByteBoolD _do; Test::ByteBoolD ro = p->opByteBoolD(di1, di2, _do); test(_do == di1); test(ro.size() == 4); test(ro[10] == true); test(ro[11] == false); test(ro[100] == false); test(ro[101] == true); } { Test::ShortIntD di1; di1[110] = -1; di1[1100] = 123123; Test::ShortIntD di2; di2[110] = -1; di2[111] = -100; di2[1101] = 0; Test::ShortIntD _do; Test::ShortIntD ro = p->opShortIntD(di1, di2, _do); test(_do == di1); test(ro.size() == 4); test(ro[110] == -1); test(ro[111] == -100); test(ro[1100] == 123123); test(ro[1101] == 0); } { Test::LongFloatD di1; di1[999999110] = Ice::Float(-1.1); di1[999999111] = Ice::Float(123123.2); Test::LongFloatD di2; di2[999999110] = Ice::Float(-1.1); di2[999999120] = Ice::Float(-100.4); di2[999999130] = Ice::Float(0.5); Test::LongFloatD _do; Test::LongFloatD ro = p->opLongFloatD(di1, di2, _do); test(_do == di1); test(ro.size() == 4); test(ro[999999110] == Ice::Float(-1.1)); test(ro[999999120] == Ice::Float(-100.4)); test(ro[999999111] == Ice::Float(123123.2)); test(ro[999999130] == Ice::Float(0.5)); } { Test::StringStringD di1; di1["foo"] = "abc -1.1"; di1["bar"] = "abc 123123.2"; Test::StringStringD di2; di2["foo"] = "abc -1.1"; di2["FOO"] = "abc -100.4"; di2["BAR"] = "abc 0.5"; Test::StringStringD _do; Test::StringStringD ro = p->opStringStringD(di1, di2, _do); test(_do == di1); test(ro.size() == 4); test(ro["foo"] == "abc -1.1"); test(ro["FOO"] == "abc -100.4"); test(ro["bar"] == "abc 123123.2"); test(ro["BAR"] == "abc 0.5"); } { Test::StringMyEnumD di1; di1["abc"] = Test::enum1; di1[""] = Test::enum2; Test::StringMyEnumD di2; di2["abc"] = Test::enum1; di2["qwerty"] = Test::enum3; di2["Hello!!"] = Test::enum2; Test::StringMyEnumD _do; Test::StringMyEnumD ro = p->opStringMyEnumD(di1, di2, _do); test(_do == di1); test(ro.size() == 4); test(ro["abc"] == Test::enum1); test(ro["qwerty"] == Test::enum3); test(ro[""] == Test::enum2); test(ro["Hello!!"] == Test::enum2); } { const int lengths[] = { 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 }; for(int l = 0; l != sizeof(lengths) / sizeof(*lengths); ++l) { Test::IntS s; for(int i = 0; i < lengths[l]; ++i) { s.push_back(i); } Test::IntS r = p->opIntS(s); test(r.size() == static_cast(lengths[l])); for(int j = 0; j < static_cast(r.size()); ++j) { test(r[j] == -j); } } } { Ice::Context ctx; ctx["one"] = "ONE"; ctx["two"] = "TWO"; ctx["three"] = "THREE"; { Test::StringStringD r = p->opContext(); test(p->ice_getContext().empty()); test(r != ctx); } { Test::StringStringD r = p->opContext(ctx); test(p->ice_getContext().empty()); test(r == ctx); } { Test::MyClassPrx p2 = Test::MyClassPrx::checkedCast(p->ice_context(ctx)); test(p2->ice_getContext() == ctx); Test::StringStringD r = p2->opContext(); test(r == ctx); r = p2->opContext(ctx); test(r == ctx); } { // // Test proxy context // string ref = communicator->getProperties()->getPropertyWithDefault( "Operations.Proxy", "test:default -p 12010 -t 10000"); Test::MyClassPrx c = Test::MyClassPrx::checkedCast(communicator->stringToProxy(ref)); Ice::Context dflt; dflt["a"] = "b"; Test::MyClassPrx c2 = Test::MyClassPrx::uncheckedCast(c->ice_context(dflt)); test(c2->opContext()["a"] == "b"); dflt.clear(); Test::MyClassPrx c3 = Test::MyClassPrx::uncheckedCast(c2->ice_context(dflt)); Ice::Context tmp = c3->opContext(); test(tmp.find("a") == tmp.end()); } } { Ice::Double d = 1278312346.0 / 13.0; Test::DoubleS ds(5, d); p->opDoubleMarshaling(d, ds); } } IceE-1.2.0/test/IceE/Makefile0000644000076400007640000000137210616553120015461 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../.. include $(top_srcdir)/config/Make.rules SUBDIRS = proxy \ operations \ exceptions \ inheritance \ facets \ faultTolerance \ location \ adapterDeactivation \ slicing \ custom \ retry \ thread \ uuid $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done IceE-1.2.0/test/IceE/exceptions/0000755000076400007640000000000010620544005016174 5ustar matthewmatthewIceE-1.2.0/test/IceE/exceptions/.depend0000644000076400007640000005441610616637156017465 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Collocated$(OBJEXT): Collocated.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/exceptions/TestI.cpp0000644000076400007640000000522110576536574017756 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace Test; ThrowerI::ThrowerI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter) { } void ThrowerI::shutdown(const Ice::Current&) { _adapter->getCommunicator()->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } bool ThrowerI::supportsUndeclaredExceptions(const Ice::Current&) { return true; } bool ThrowerI::supportsAssertException(const Ice::Current&) { return false; } void ThrowerI::throwAasA(Ice::Int a, const Ice::Current&) { A ex; ex.aMem = a; throw ex; } void ThrowerI::throwAorDasAorD(Ice::Int a, const Ice::Current&) { if(a > 0) { A ex; ex.aMem = a; throw ex; } else { D ex; ex.dMem = a; throw ex; } } void ThrowerI::throwBasA(Ice::Int a, Ice::Int b, const Ice::Current& current) { throwBasB(a, b, current); } void ThrowerI::throwCasA(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current& current) { throwCasC(a, b, c, current); } void ThrowerI::throwBasB(Ice::Int a, Ice::Int b, const Ice::Current&) { B ex; ex.aMem = a; ex.bMem = b; throw ex; } void ThrowerI::throwCasB(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current& current) { throwCasC(a, b, c, current); } void ThrowerI::throwCasC(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current&) { C ex; ex.aMem = a; ex.bMem = b; ex.cMem = c; throw ex; } void ThrowerI::throwModA(Ice::Int a, Ice::Int a2, const Ice::Current&) { Mod::A ex; ex.aMem = a; ex.a2Mem = a2; throw ex; } void ThrowerI::throwUndeclaredA(Ice::Int a, const Ice::Current&) { A ex; ex.aMem = a; throw ex; } void ThrowerI::throwUndeclaredB(Ice::Int a, Ice::Int b, const Ice::Current&) { B ex; ex.aMem = a; ex.bMem = b; throw ex; } void ThrowerI::throwUndeclaredC(Ice::Int a, Ice::Int b, Ice::Int c, const Ice::Current&) { C ex; ex.aMem = a; ex.bMem = b; ex.cMem = c; throw ex; } void ThrowerI::throwLocalException(const Ice::Current&) { throw Ice::TimeoutException(__FILE__, __LINE__); } void ThrowerI::throwNonIceException(const Ice::Current&) { throw int(12345); } void ThrowerI::throwAssertException(const Ice::Current&) { assert(false); // Not supported in C++. } IceE-1.2.0/test/IceE/exceptions/TestI.h0000644000076400007640000000325710576536574017432 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class ThrowerI : public Test::Thrower { public: ThrowerI(const Ice::ObjectAdapterPtr&); virtual void shutdown(const Ice::Current&); virtual bool supportsUndeclaredExceptions(const Ice::Current&); virtual bool supportsAssertException(const Ice::Current&); virtual void throwAasA(Ice::Int, const Ice::Current&); virtual void throwAorDasAorD(Ice::Int, const Ice::Current&); virtual void throwBasA(Ice::Int, Ice::Int, const Ice::Current&); virtual void throwCasA(Ice::Int, Ice::Int, Ice::Int, const Ice::Current&); virtual void throwBasB(Ice::Int, Ice::Int, const Ice::Current&); virtual void throwCasB(Ice::Int, Ice::Int, Ice::Int, const Ice::Current&); virtual void throwCasC(Ice::Int, Ice::Int, Ice::Int, const Ice::Current&); virtual void throwModA(Ice::Int, Ice::Int, const Ice::Current&); virtual void throwUndeclaredA(Ice::Int, const Ice::Current&); virtual void throwUndeclaredB(Ice::Int, Ice::Int, const Ice::Current&); virtual void throwUndeclaredC(Ice::Int, Ice::Int, Ice::Int, const Ice::Current&); virtual void throwLocalException(const Ice::Current&); virtual void throwNonIceException(const Ice::Current&); virtual void throwAssertException(const Ice::Current&); private: Ice::ObjectAdapterPtr _adapter; }; #endif IceE-1.2.0/test/IceE/exceptions/Makefile.mak0000644000076400007640000000345110614411625020412 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ Server.obj COLOBJS = Test.obj \ TestI.obj \ Collocated.obj \ AllTests.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) \ $(COLOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) $(LINK) $(LDFLAGS) $(COPDBFLAGS) $(COLOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/exceptions/AllTests.cpp0000644000076400007640000002122510577401770020451 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class EmptyI : virtual public Empty { }; class CallbackBase : public IceUtil::Monitor { public: CallbackBase() : _called(false) { } virtual ~CallbackBase() { } bool check() { IceUtil::Monitor::Lock sync(*this); while(!_called) { if(!timedWait(IceUtil::Time::seconds(5))) { return false; } } _called = false; return true; } protected: void called() { IceUtil::Monitor::Lock sync(*this); assert(!_called); _called = true; notify(); } private: bool _called; }; ThrowerPrx allTests(const Ice::CommunicatorPtr& communicator) { tprintf("testing toString()/what()... "); { A a; string aMsg = "Test::A"; Ice::UnknownLocalException ule("thisFile", 99); string uleMsg = "thisFile:99: Ice::UnknownLocalException:\nunknown local exception"; // // Test toString(). // test(a.toString() == aMsg); test(ule.toString() == uleMsg); // // Test what(). (Called twice because of lazy initialization in what().) // test(aMsg == a.what()); test(aMsg == a.what()); test(uleMsg == ule.what()); test(uleMsg == ule.what()); } tprintf("ok\n"); tprintf("testing object adapter registration exceptions... "); { Ice::ObjectAdapterPtr first = communicator->createObjectAdapter("TestAdapter0"); try { Ice::ObjectAdapterPtr second = communicator->createObjectAdapter("TestAdapter0"); test(false); } catch(const Ice::AlreadyRegisteredException&) { // Expected } communicator->getProperties()->setProperty("TestAdapter0.Endpoints", ""); try { Ice::ObjectAdapterPtr second = communicator->createObjectAdapterWithEndpoints("TestAdapter0", "ssl -h foo -p 12011 -t 10000"); test(false); } catch(const Ice::AlreadyRegisteredException&) { // Expected. } // // Properties must remain unaffected if an exception occurs. // test(communicator->getProperties()->getProperty("TestAdapter0.Endpoints") == ""); first->deactivate(); } tprintf("ok\n"); tprintf("testing servant registration exceptions..."); { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter1"); Ice::ObjectPtr obj = new EmptyI; adapter->add(obj, communicator->stringToIdentity("x")); try { adapter->add(obj, communicator->stringToIdentity("x")); test(false); } catch(const Ice::AlreadyRegisteredException&) { } adapter->remove(communicator->stringToIdentity("x")); try { adapter->remove(communicator->stringToIdentity("x")); test(false); } catch(const Ice::NotRegisteredException&) { } adapter->deactivate(); } tprintf("ok\n"); tprintf("testing stringToProxy..."); string ref = communicator->getProperties()->getPropertyWithDefault( "Exception.Proxy", "thrower:default -p 12010 -t 10000"); Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); tprintf("ok\n"); tprintf("testing checked cast..."); ThrowerPrx thrower = ThrowerPrx::checkedCast(base); test(thrower); test(thrower == base); tprintf("ok\n"); tprintf("catching exact types..."); try { thrower->throwAasA(1); test(false); } catch(const A& ex) { test(ex.aMem == 1); } catch(const Ice::Exception& ex) { tprintf("%s\n", ex.toString().c_str()); test(false); } catch(...) { test(false); } try { thrower->throwAorDasAorD(1); test(false); } catch(const A& ex) { test(ex.aMem == 1); } catch(...) { test(false); } try { thrower->throwAorDasAorD(-1); test(false); } catch(const D& ex) { test(ex.dMem == -1); } catch(...) { test(false); } try { thrower->throwBasB(1, 2); test(false); } catch(const B& ex) { test(ex.aMem == 1); test(ex.bMem == 2); } catch(...) { test(false); } try { thrower->throwCasC(1, 2, 3); test(false); } catch(const C& ex) { test(ex.aMem == 1); test(ex.bMem == 2); test(ex.cMem == 3); } catch(...) { test(false); } #if (!defined(_MSC_VER) || _MSC_VER >= 1300) // // With VC6 SP5, there is no way to call ::A::__write from ::Mod::A // try { thrower->throwModA(1, 2); test(false); } catch(const Mod::A& ex) { test(ex.aMem == 1); test(ex.a2Mem == 2); } catch(const Ice::OperationNotExistException&) { // // This operation is not supported in Java. // } catch(...) { test(false); } #endif tprintf("ok\n"); tprintf("catching base types..."); try { thrower->throwBasB(1, 2); test(false); } catch(const A& ex) { test(ex.aMem == 1); } catch(...) { test(false); } try { thrower->throwCasC(1, 2, 3); test(false); } catch(const B& ex) { test(ex.aMem == 1); test(ex.bMem == 2); } catch(...) { test(false); } #if (!defined(_MSC_VER) || _MSC_VER >= 1300) // // With VC6 SP5, there is no way to call ::A::__write from ::Mod::A // try { thrower->throwModA(1, 2); test(false); } catch(const A& ex) { test(ex.aMem == 1); } catch(const Ice::OperationNotExistException&) { // // This operation is not supported in Java. // } catch(...) { test(false); } #endif tprintf("ok\n"); tprintf("catching derived types..."); try { thrower->throwBasA(1, 2); test(false); } catch(const B& ex) { test(ex.aMem == 1); test(ex.bMem == 2); } catch(...) { test(false); } try { thrower->throwCasA(1, 2, 3); test(false); } catch(const C& ex) { test(ex.aMem == 1); test(ex.bMem == 2); test(ex.cMem == 3); } catch(...) { test(false); } try { thrower->throwCasB(1, 2, 3); test(false); } catch(const C& ex) { test(ex.aMem == 1); test(ex.bMem == 2); test(ex.cMem == 3); } catch(...) { test(false); } tprintf("ok\n"); if(thrower->supportsUndeclaredExceptions()) { tprintf("catching unknown user exception..."); try { thrower->throwUndeclaredA(1); test(false); } catch(const Ice::UnknownUserException&) { } catch(...) { test(false); } try { thrower->throwUndeclaredB(1, 2); test(false); } catch(const Ice::UnknownUserException&) { } catch(...) { test(false); } try { thrower->throwUndeclaredC(1, 2, 3); test(false); } catch(const Ice::UnknownUserException&) { } catch(...) { test(false); } tprintf("ok\n"); } tprintf("catching object not exist exception..."); Ice::Identity id = communicator->stringToIdentity("does not exist"); try { ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower->ice_identity(id)); thrower2->throwAasA(1); // thrower2->ice_ping(); test(false); } catch(const Ice::ObjectNotExistException& ex) { test(ex.id == id); } catch(...) { test(false); } tprintf("ok\n"); tprintf("catching facet not exist exception..."); ThrowerPrx thrower2 = ThrowerPrx::uncheckedCast(thrower, "no such facet"); try { thrower2->ice_ping(); test(false); } catch(const Ice::FacetNotExistException& ex) { test(ex.facet == "no such facet"); } tprintf("ok\n"); tprintf("catching operation not exist exception..."); try { WrongOperationPrx thrower2 = WrongOperationPrx::uncheckedCast(thrower); thrower2->noSuchOperation(); test(false); } catch(const Ice::OperationNotExistException& ex) { test(ex.operation == "noSuchOperation"); } catch(...) { test(false); } tprintf("ok\n"); tprintf("catching unknown local exception..."); try { thrower->throwLocalException(); test(false); } catch(const Ice::UnknownLocalException&) { } catch(...) { test(false); } tprintf("ok\n"); tprintf("catching unknown non-Ice exception..."); try { thrower->throwNonIceException(); test(false); } catch(const Ice::UnknownException&) { } catch(...) { assert(false); } tprintf("ok\n"); return thrower; } IceE-1.2.0/test/IceE/exceptions/Server.cpp0000644000076400007640000000325210616652361020162 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; class ExceptionsTestApplication : public TestApplication { public: ExceptionsTestApplication() : TestApplication("exceptions server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("Ice.Warn.Dispatch", "0"); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new ThrowerI(adapter); adapter->add(object, communicator()->stringToIdentity("thrower")); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { ExceptionsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { ExceptionsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/exceptions/run.py0000755000076400007640000000155210576536574017406 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "exceptions") print "tests with regular server." TestUtil.clientServerTest(name) print "tests with collocated server." TestUtil.collocatedTest(name) sys.exit(0) IceE-1.2.0/test/IceE/exceptions/Makefile0000644000076400007640000000205210576536574017661 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server COLLOCATED = collocated TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.o \ Client.o \ AllTests.o SOBJS = Test.o \ TestI.o \ Server.o COLOBJS = Test.o \ TestI.o \ Collocated.o \ AllTests.o SRCS = $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) \ $(COLOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(TESTLIBS) $(SERVER): $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(TESTLIBS) $(COLLOCATED): $(COLOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COLOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/exceptions/Test.ice0000644000076400007640000000264310576536574017630 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { interface Empty { }; interface Thrower; exception A { int aMem; }; exception B extends A { int bMem; }; exception C extends B { int cMem; }; exception D { int dMem; }; module Mod { exception A extends ::Test::A { int a2Mem; }; }; interface Thrower { void shutdown(); bool supportsUndeclaredExceptions(); bool supportsAssertException(); void throwAasA(int a) throws A; void throwAorDasAorD(int a) throws A, D; void throwBasA(int a, int b) throws A; void throwCasA(int a, int b, int c) throws A; void throwBasB(int a, int b) throws B; void throwCasB(int a, int b, int c) throws B; void throwCasC(int a, int b, int c) throws C; void throwModA(int a, int a2) throws Mod::A; void throwUndeclaredA(int a); void throwUndeclaredB(int a, int b); void throwUndeclaredC(int a, int b, int c); void throwLocalException(); void throwNonIceException(); void throwAssertException(); }; interface WrongOperation { void noSuchOperation(); }; }; #endif IceE-1.2.0/test/IceE/exceptions/Client.cpp0000644000076400007640000000256610576536574020155 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class ExceptionsTestApplication : public TestApplication { public: ExceptionsTestApplication() : TestApplication("exceptions client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); ThrowerPrx allTests(const Ice::CommunicatorPtr&); ThrowerPrx thrower = allTests(communicator()); thrower->shutdown(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { ExceptionsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { ExceptionsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/exceptions/Collocated.cpp0000644000076400007640000000333510576536574021003 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class ExceptionsTestApplication : public TestApplication { public: ExceptionsTestApplication() : TestApplication("exceptions collocated") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); initData.properties->setProperty("Ice.Warn.Dispatch", "0"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new ThrowerI(adapter); adapter->add(object, communicator()->stringToIdentity("thrower")); adapter->activate(); ThrowerPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator()); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { ExceptionsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { ExceptionsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/retry/0000755000076400007640000000000010620544012015156 5ustar matthewmatthewIceE-1.2.0/test/IceE/retry/.depend0000644000076400007640000003006710616637156016445 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h ../../include/TestApplication.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h ../../include/TestApplication.h TestI.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/retry/TestI.cpp0000644000076400007640000000134310576536574016743 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include void RetryI::op(bool kill, const Ice::Current& current) { if(kill) { current.con->close(true); } } void RetryI::shutdown(const Ice::Current& current) { current.adapter->getCommunicator()->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } IceE-1.2.0/test/IceE/retry/TestI.h0000644000076400007640000000103510576536574016406 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class RetryI : public Test::Retry { virtual void op(bool, const Ice::Current&); virtual void shutdown(const Ice::Current&); }; #endif IceE-1.2.0/test/IceE/retry/Makefile.mak0000644000076400007640000000256010614106575017403 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ Server.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/retry/AllTests.cpp0000644000076400007640000000303610576536574017447 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; RetryPrx allTests(const Ice::CommunicatorPtr& communicator) { tprintf("testing stringToProxy... "); string ref = communicator->getProperties()->getPropertyWithDefault( "Retry.Proxy", "retry:default -p 12010 -t 10000"); Ice::ObjectPrx base1 = communicator->stringToProxy(ref); test(base1); Ice::ObjectPrx base2 = communicator->stringToProxy(ref); test(base2); tprintf("ok\n"); tprintf("testing checked cast... "); RetryPrx retry1 = RetryPrx::checkedCast(base1); test(retry1); test(retry1 == base1); RetryPrx retry2 = RetryPrx::checkedCast(base2); test(retry2); test(retry2 == base2); tprintf("ok\n"); tprintf("calling regular operation with first proxy... "); retry1->op(false); tprintf("ok\n"); tprintf("calling operation to kill connection with second proxy... "); try { retry2->op(true); test(false); } catch(Ice::ConnectionLostException) { tprintf("ok\n"); } tprintf("calling regular operation with first proxy again... "); retry1->op(false); tprintf("ok\n"); return retry1; } IceE-1.2.0/test/IceE/retry/Server.cpp0000644000076400007640000000331710576536574017164 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class RetryTestApplication : public TestApplication { public: RetryTestApplication() : TestApplication("retry server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); //initData.properties->setProperty("Ice.Trace.Network", "5"); //initData.properties->setProperty("Ice.Trace.Protocol", "5"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new RetryI; adapter->add(object, communicator()->stringToIdentity("retry")); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { RetryTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { RetryTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/retry/run.py0000755000076400007640000000137610576536574016376 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "retry") TestUtil.clientServerTest(name) sys.exit(0) IceE-1.2.0/test/IceE/retry/Makefile0000644000076400007640000000152110576536574016645 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) COBJS = Test.o \ Client.o \ AllTests.o SOBJS = Test.o \ TestI.o \ Server.o SRCS = $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(TESTLIBS) $(SERVER): $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/retry/Test.ice0000644000076400007640000000073010576536574016607 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { interface Retry { void op(bool kill); void shutdown(); }; }; #endif IceE-1.2.0/test/IceE/retry/Client.cpp0000644000076400007640000000333410576536574017133 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class RetryTestApplication : public TestApplication { public: RetryTestApplication() : TestApplication("retry client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); //initData.properties->setProperty("Ice.Trace.Network", "5"); //initData.properties->setProperty("Ice.Trace.Protocol", "5"); loadConfig(initData.properties); // // For this test, we want to disable retries. // initData.properties->setProperty("Ice.RetryIntervals", "-1"); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); // // This test kills connections, so we don't want warnings. // communicator()->getProperties()->setProperty("Ice.Warn.Connections", "0"); Test::RetryPrx allTests(const Ice::CommunicatorPtr&); Test::RetryPrx retry = allTests(communicator()); retry->shutdown(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { RetryTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { RetryTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/faultTolerance/0000755000076400007640000000000010620544006016764 5ustar matthewmatthewIceE-1.2.0/test/IceE/faultTolerance/.depend0000644000076400007640000002502610616637156020247 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/DisableWarnings.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h Server$(OBJEXT): Server.cpp ../../../include/IceE/DisableWarnings.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/faultTolerance/TestI.cpp0000644000076400007640000000147410576536574020553 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include TestI::TestI(const Ice::ObjectAdapterPtr& adapter) : _adapter(adapter) { } void TestI::shutdown(const Ice::Current&) { _adapter->getCommunicator()->shutdown(); } void TestI::abort(const Ice::Current&) { exit(0); } void TestI::idempotentAbort(const Ice::Current&) { exit(0); } Ice::Int TestI::pid(const Ice::Current&) { #if defined(_WIN32) return _getpid(); #else return getpid(); #endif } IceE-1.2.0/test/IceE/faultTolerance/TestI.h0000644000076400007640000000134410576536574020214 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class TestI : public Test::TestIntf { public: TestI(const Ice::ObjectAdapterPtr&); virtual void shutdown(const Ice::Current&); virtual void abort(const Ice::Current&); virtual void idempotentAbort(const Ice::Current&); virtual Ice::Int pid(const Ice::Current&); private: Ice::ObjectAdapterPtr _adapter; }; #endif IceE-1.2.0/test/IceE/faultTolerance/Makefile.mak0000644000076400007640000000256010614106575021206 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ Server.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/faultTolerance/AllTests.cpp0000644000076400007640000000551310576536574021254 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace Test; class CallbackBase : public IceUtil::Monitor { public: CallbackBase() : _called(false) { } virtual ~CallbackBase() { } bool check() { IceUtil::Monitor::Lock sync(*this); while(!_called) { if(!timedWait(IceUtil::Time::seconds(30))) { return false; } } _called = false; return true; } protected: void called() { IceUtil::Monitor::Lock sync(*this); assert(!_called); _called = true; notify(); } private: bool _called; }; void allTests(const Ice::CommunicatorPtr& communicator, const vector& ports) { tprintf("testing stringToProxy..."); string ref("test"); char buf[32]; for(vector::const_iterator p = ports.begin(); p != ports.end(); ++p) { sprintf(buf, ":default -t 60000 -p %d", *p); ref += buf; } Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); tprintf("ok\n"); tprintf("testing checked cast..."); TestIntfPrx obj = TestIntfPrx::checkedCast(base); test(obj); test(obj == base); tprintf("ok\n"); int oldPid = 0; for(unsigned int i = 1, j = 0; i <= ports.size(); ++i, ++j) { if(j > 3) { j = 0; } tprintf("testing server #%d...", i); int pid = obj->pid(); test(pid != oldPid); tprintf("ok\n"); oldPid = pid; if(j == 0) { tprintf("shutting down server #%d...", i); obj->shutdown(); tprintf("ok\n"); } else if(j == 1 || i + 1 > ports.size()) { tprintf("aborting server #%d...", i); try { obj->abort(); test(false); } catch(const Ice::ConnectionLostException&) { tprintf("ok\n"); } catch(const Ice::ConnectFailedException&) { tprintf("ok\n"); } } else if(j == 2 || j == 3) { tprintf("aborting server #%d and #%d with idempotent call...", i, i + 1); try { obj->idempotentAbort(); test(false); } catch(const Ice::ConnectionLostException&) { tprintf("ok\n"); } catch(const Ice::ConnectFailedException&) { tprintf("ok\n"); } ++i; } else { assert(false); } } tprintf("testing whether all servers are gone..."); try { obj->ice_ping(); test(false); } catch(const Ice::LocalException&) { tprintf("ok\n"); } } IceE-1.2.0/test/IceE/faultTolerance/Server.cpp0000644000076400007640000000413610576536574020767 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; void usage(const char* n) { tprintf("Usage: %s port\n", n); } class FaultToleranceTestApplication : public TestApplication { public: FaultToleranceTestApplication() : TestApplication("fault server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); int port = 0; for(int i = 1; i < argc; ++i) { if(argv[i][0] == '-') { tprintf("%s: unknown option `%s'\n", argv[0], argv[i]); usage(argv[0]); return EXIT_FAILURE; } if(port > 0) { tprintf("%s: only one port can be specified\n", argv[0]); usage(argv[0]); return EXIT_FAILURE; } port = atoi(argv[i]); } if(port <= 0) { tprintf("%s: no port specified\n", argv[0]); usage(argv[0]); return EXIT_FAILURE; } char buf[32]; sprintf(buf, "default -p %d", port); communicator()->getProperties()->setProperty("TestAdapter.Endpoints", buf); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI(adapter); adapter->add(object, communicator()->stringToIdentity("test")); adapter->activate(); communicator()->waitForShutdown(); return EXIT_SUCCESS; } }; int main(int argc, char** argv) { FaultToleranceTestApplication app; return app.main(argc, argv); } IceE-1.2.0/test/IceE/faultTolerance/run.py0000755000076400007640000000415010576536574020172 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "faultTolerance") testdir = os.path.join(toplevel, "test", name) server = os.path.join(testdir, "server") client = os.path.join(testdir, "client") num = 12 base = 12340 serverPipes = { } for i in range(0, num): print "starting server #%d..." % (i + 1), serverPipes[i] = os.popen(server + TestUtil.serverOptions + " %d" % (base + i) + " 2>&1") TestUtil.getServerPid(serverPipes[i]) TestUtil.getAdapterReady(serverPipes[i]) print "ok" ports = "" for i in range(0, num): ports = "%s %d" % (ports, base + i) print "starting client...", clientPipe = os.popen(client + TestUtil.clientOptions + " " + ports + " 2>&1") print "ok" TestUtil.printOutputFromPipe(clientPipe) clientStatus = clientPipe.close() serverStatus = None for i in range(0, num): serverStatus = serverStatus or serverPipes[i].close() if clientStatus: TestUtil.killServers() sys.exit(1) # # Exit with status 0 even though some servers failed to shutdown # properly. There's a problem which is occuring on Linux dual-processor # machines, and which cause some servers to # segfault and abort. It's not clear what the problem is, and it's # almost impossible to debug with the very poor information we get # from the core file (ulimit -c unlimited to enable core files on # Linux). # if serverStatus: TestUtil.killServers() sys.exit(1) # if TestUtil.isWin32(): # sys.exit(1) # else: # sys.exit(0) sys.exit(0) IceE-1.2.0/test/IceE/faultTolerance/Makefile0000644000076400007640000000157710576536574020463 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Test.o \ COBJS = Client.o \ AllTests.o SOBJS = TestI.o \ Server.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(TESTLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/faultTolerance/Test.ice0000644000076400007640000000102610576536574020411 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { interface TestIntf { void shutdown(); void abort(); idempotent void idempotentAbort(); idempotent int pid(); }; }; #endif IceE-1.2.0/test/IceE/faultTolerance/Client.cpp0000644000076400007640000000351510576536574020737 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; void usage(const char* n) { tprintf("Usage: %s port...\n", n); } class FaultTestApplication : public TestApplication { public: FaultTestApplication() : TestApplication("fault client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); loadConfig(initData.properties); // // This test aborts servers, so we don't want warnings. // setCommunicator(Ice::initialize(argc, argv, initData)); communicator()->getProperties()->setProperty("Ice.Warn.Connections", "0"); vector ports; for(int i = 1; i < argc; ++i) { if(argv[i][0] == '-') { tprintf("%s: unknown option `%s'\n", argv[0], argv[i]); usage(argv[0]); return EXIT_FAILURE; } ports.push_back(atoi(argv[i])); } if(ports.empty()) { tprintf("%s: no ports specified\n", argv[0]); usage(argv[0]); return EXIT_FAILURE; } try { void allTests(const Ice::CommunicatorPtr&, const vector&); allTests(communicator(), ports); } catch(const Ice::Exception& ex) { tprintf("%s\n", ex.toString().c_str()); test(false); } return EXIT_SUCCESS; } }; int main(int argc, char** argv) { FaultTestApplication app; return app.main(argc, argv); } IceE-1.2.0/test/IceE/adapterDeactivation/0000755000076400007640000000000010620544004017765 5ustar matthewmatthewIceE-1.2.0/test/IceE/adapterDeactivation/.depend0000644000076400007640000004177610616637156021264 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h TestI.h Test.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h TestI.h Test.h Collocated$(OBJEXT): Collocated.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/adapterDeactivation/TestI.cpp0000644000076400007640000000162210604226663021534 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Ice; void TestI::transient(const Current& current) { CommunicatorPtr communicator = current.adapter->getCommunicator(); ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -p 9999"); adapter->activate(); adapter->deactivate(); adapter->waitForDeactivate(); } void TestI::deactivate(const Current& current) { current.adapter->deactivate(); IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); } IceE-1.2.0/test/IceE/adapterDeactivation/TestI.h0000644000076400007640000000105310604226663021177 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class TestI : public Test::TestIntf { public: virtual void transient(const Ice::Current&); virtual void deactivate(const Ice::Current&); }; #endif IceE-1.2.0/test/IceE/adapterDeactivation/Makefile.mak0000644000076400007640000000345110614106575022211 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ Server.obj COLOBJS = Test.obj \ TestI.obj \ Collocated.obj \ AllTests.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) \ $(COLOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) $(LINK) $(LDFLAGS) $(COPDBFLAGS) $(COLOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/adapterDeactivation/AllTests.cpp0000644000076400007640000000367510576536574022266 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Ice; using namespace Test; TestIntfPrx allTests(const CommunicatorPtr& communicator) { printf("testing stringToProxy..."); string ref = communicator->getProperties()->getPropertyWithDefault("Test.Proxy", "test:default -p 12010 -t 10000"); ObjectPrx base = communicator->stringToProxy(ref); test(base); printf("ok\n"); printf("testing checked cast..."); TestIntfPrx obj = TestIntfPrx::checkedCast(base); test(obj); test(obj == base); printf("ok\n"); { printf("creating/destroying/recreating object adapter..."); ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -p 9999"); try { communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -p 9998"); test(false); } catch(const AlreadyRegisteredException&) { } adapter->destroy(); adapter = communicator->createObjectAdapterWithEndpoints("TransientTestAdapter", "default -p 9999"); adapter->destroy(); printf("ok\n"); } printf("creating/activating/deactivating object adapter in one operation..."); obj->transient(); printf("ok\n"); printf("deactivating object adapter in the server..."); obj->deactivate(); printf("ok\n"); printf("testing whether server is gone..."); try { obj->ice_ping(); test(false); } catch(const LocalException&) { printf("ok\n"); } return obj; } IceE-1.2.0/test/IceE/adapterDeactivation/Server.cpp0000644000076400007640000000323610576536574021772 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Ice; using namespace Test; class AdapterDeactivationTestApplication : public TestApplication { public: AdapterDeactivationTestApplication() : TestApplication("adapter deactivation server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI; adapter->add(object, communicator()->stringToIdentity("test")); adapter->activate(); adapter->waitForDeactivate(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { AdapterDeactivationTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { AdapterDeactivationTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/adapterDeactivation/run.py0000755000076400007640000000145210576536574021177 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "adapterDeactivation") TestUtil.clientServerTest(name) TestUtil.collocatedTest(name) sys.exit(0) IceE-1.2.0/test/IceE/adapterDeactivation/Makefile0000644000076400007640000000213310576536574021453 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server COLLOCATED = collocated TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) OBJS = Test.o \ COBJS = Client.o \ AllTests.o SOBJS = TestI.o \ Server.o COLOBJS = TestI.o \ Collocated.o \ AllTests.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) \ $(COLOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(TESTLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(TESTLIBS) $(COLLOCATED): $(OBJS) $(COLOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/adapterDeactivation/Test.ice0000644000076400007640000000073410604226663021404 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { interface TestIntf { void transient(); void deactivate(); }; }; #endif IceE-1.2.0/test/IceE/adapterDeactivation/Client.cpp0000644000076400007640000000261210576536574021737 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Ice; using namespace Test; class AdapterDeactivationTestApplication : public TestApplication { public: AdapterDeactivationTestApplication() : TestApplication("adapter deactivation client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); TestIntfPrx allTests(const CommunicatorPtr&); TestIntfPrx obj = allTests(communicator()); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { AdapterDeactivationTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { AdapterDeactivationTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/adapterDeactivation/Collocated.cpp0000644000076400007640000000336510576536574022600 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Ice; using namespace Test; class AdapterDeactivationTestApplication : public TestApplication { public: AdapterDeactivationTestApplication() : TestApplication("adapter deactivation collocated") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr object = new TestI; adapter->add(object, communicator()->stringToIdentity("test")); adapter->activate(); TestIntfPrx allTests(const CommunicatorPtr&); allTests(communicator()); adapter->waitForDeactivate(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { AdapterDeactivationTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { AdapterDeactivationTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/facets/0000755000076400007640000000000010620544006015261 5ustar matthewmatthewIceE-1.2.0/test/IceE/facets/.depend0000644000076400007640000004206410616637156016545 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h TestI$(OBJEXT): TestI.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h TestI.h Test.h Collocated$(OBJEXT): Collocated.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestI.h Test.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h Test.h Test.cpp: Test.ice IceE-1.2.0/test/IceE/facets/TestI.cpp0000644000076400007640000000236610576536574017051 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include std::string AI::callA(const Ice::Current&) { return "A"; } std::string BI::callB(const Ice::Current&) { return "B"; } std::string CI::callC(const Ice::Current&) { return "C"; } std::string DI::callD(const Ice::Current&) { return "D"; } std::string EI::callE(const Ice::Current&) { return "E"; } std::string FI::callF(const Ice::Current&) { return "F"; } GI::GI(const Ice::CommunicatorPtr& communicator) : _communicator(communicator) { } void GI::shutdown(const Ice::Current&) { _communicator->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } std::string GI::callG(const Ice::Current&) { return "G"; } HI::HI(const Ice::CommunicatorPtr& communicator) : GI(communicator) { } std::string HI::callH(const Ice::Current&) { return "H"; } IceE-1.2.0/test/IceE/facets/TestI.h0000644000076400007640000000273410576536574016515 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class AI : virtual public Test::A { public: virtual std::string callA(const Ice::Current&); }; class BI : virtual public Test::B, virtual public AI { public: virtual std::string callB(const Ice::Current&); }; class CI : virtual public Test::C, virtual public AI { public: virtual std::string callC(const Ice::Current&); }; class DI : virtual public Test::D, virtual public BI, virtual public CI { public: virtual std::string callD(const Ice::Current&); }; class EI : virtual public Test::E { public: virtual std::string callE(const Ice::Current&); }; class FI : virtual public Test::F, virtual public EI { public: virtual std::string callF(const Ice::Current&); }; class GI : virtual public Test::G { public: GI(const Ice::CommunicatorPtr&); virtual void shutdown(const Ice::Current&); virtual std::string callG(const Ice::Current&); private: Ice::CommunicatorPtr _communicator; }; class HI : virtual public Test::H, virtual public GI { public: HI(const Ice::CommunicatorPtr&); virtual std::string callH(const Ice::Current&); }; #endif IceE-1.2.0/test/IceE/facets/Makefile.mak0000644000076400007640000000345110614106575017503 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.obj \ Client.obj \ AllTests.obj SOBJS = Test.obj \ TestI.obj \ Server.obj COLOBJS = Test.obj \ TestI.obj \ Collocated.obj \ AllTests.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) \ $(COLOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) $(LINK) $(LDFLAGS) $(COPDBFLAGS) $(COLOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h !include .depend IceE-1.2.0/test/IceE/facets/AllTests.cpp0000644000076400007640000000726310576536574017555 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class EmptyI : virtual public Empty { }; GPrx allTests(const Ice::CommunicatorPtr& communicator) { tprintf("testing facet registration exceptions..."); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("FacetExceptionTestAdapter"); Ice::ObjectPtr obj = new EmptyI; adapter->add(obj, communicator->stringToIdentity("d")); adapter->addFacet(obj, communicator->stringToIdentity("d"), "facetABCD"); try { adapter->addFacet(obj, communicator->stringToIdentity("d"), "facetABCD"); test(false); } catch(Ice::AlreadyRegisteredException&) { } adapter->removeFacet(communicator->stringToIdentity("d"), "facetABCD"); try { adapter->removeFacet(communicator->stringToIdentity("d"), "facetABCD"); test(false); } catch(Ice::NotRegisteredException&) { } tprintf("ok\n"); tprintf("testing removeAllFacets..."); Ice::ObjectPtr obj1 = new EmptyI; Ice::ObjectPtr obj2 = new EmptyI; adapter->addFacet(obj1, communicator->stringToIdentity("id1"), "f1"); adapter->addFacet(obj2, communicator->stringToIdentity("id1"), "f2"); Ice::ObjectPtr obj3 = new EmptyI; adapter->addFacet(obj1, communicator->stringToIdentity("id2"), "f1"); adapter->addFacet(obj2, communicator->stringToIdentity("id2"), "f2"); adapter->addFacet(obj3, communicator->stringToIdentity("id2"), ""); Ice::FacetMap fm = adapter->removeAllFacets(communicator->stringToIdentity("id1")); test(fm.size() == 2); test(fm["f1"] == obj1); test(fm["f2"] == obj2); try { adapter->removeAllFacets(communicator->stringToIdentity("id1")); test(false); } catch(Ice::NotRegisteredException&) { } fm = adapter->removeAllFacets(communicator->stringToIdentity("id2")); test(fm.size() == 3); test(fm["f1"] == obj1); test(fm["f2"] == obj2); test(fm[""] == obj3); tprintf("ok\n"); adapter->deactivate(); tprintf("testing stringToProxy..."); string ref = communicator->getProperties()->getPropertyWithDefault("Facets.Proxy", "d:default -p 12010 -t 10000"); Ice::ObjectPrx db = communicator->stringToProxy(ref); test(db); tprintf("ok\n"); tprintf("testing checked cast..."); DPrx d = DPrx::checkedCast(db); test(d); test(d == db); tprintf("ok\n"); tprintf("testing non-facets A, B, C, and D..."); test(d->callA() == "A"); test(d->callB() == "B"); test(d->callC() == "C"); test(d->callD() == "D"); tprintf("ok\n"); tprintf("testing facets A, B, C, and D..."); DPrx df = DPrx::checkedCast(d, "facetABCD"); test(df); test(df->callA() == "A"); test(df->callB() == "B"); test(df->callC() == "C"); test(df->callD() == "D"); tprintf("ok\n"); tprintf("testing facets E and F..."); FPrx ff = FPrx::checkedCast(d, "facetEF"); test(ff); test(ff->callE() == "E"); test(ff->callF() == "F"); tprintf("ok\n"); tprintf("testing facet G..."); GPrx gf = GPrx::checkedCast(ff, "facetGH"); test(gf); test(gf->callG() == "G"); tprintf("ok\n"); tprintf("testing whether casting preserves the facet..."); HPrx hf = HPrx::checkedCast(gf); test(hf); test(hf->callG() == "G"); test(hf->callH() == "H"); tprintf("ok\n"); return gf; } IceE-1.2.0/test/IceE/facets/Server.cpp0000644000076400007640000000356610576536574017272 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; class FacetsTestApplication : public TestApplication { public: FacetsTestApplication() : TestApplication("facets server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr d = new DI; adapter->add(d, communicator()->stringToIdentity("d")); adapter->addFacet(d, communicator()->stringToIdentity("d"), "facetABCD"); Ice::ObjectPtr f = new FI; adapter->addFacet(f, communicator()->stringToIdentity("d"), "facetEF"); Ice::ObjectPtr h = new HI(communicator()); adapter->addFacet(h, communicator()->stringToIdentity("d"), "facetGH"); adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { FacetsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { FacetsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/facets/run.py0000755000076400007640000000143510576536574016472 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "facets") TestUtil.clientServerTest(name) TestUtil.collocatedTest(name) sys.exit(0) IceE-1.2.0/test/IceE/facets/Makefile0000644000076400007640000000213310576536574016745 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server COLLOCATED = collocated TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) OBJS = Test.o \ COBJS = Client.o \ AllTests.o SOBJS = TestI.o \ Server.o COLOBJS = TestI.o \ Collocated.o \ AllTests.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) \ $(COLOBJS:.o=.cpp) SLICE_SRCS = Test.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(TESTLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(TESTLIBS) $(COLLOCATED): $(OBJS) $(COLOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/facets/Test.ice0000644000076400007640000000144510576536574016713 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE module Test { interface Empty { }; interface A { string callA(); }; interface B extends A { string callB(); }; interface C extends A { string callC(); }; interface D extends B, C { string callD(); }; interface E { string callE(); }; interface F extends E { string callF(); }; interface G { void shutdown(); string callG(); }; interface H extends G { string callH(); }; }; #endif IceE-1.2.0/test/IceE/facets/Client.cpp0000644000076400007640000000251210576536574017230 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class FacetsTestApplication : public TestApplication { public: FacetsTestApplication() : TestApplication("facets client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); GPrx allTests(const Ice::CommunicatorPtr&); GPrx g = allTests(communicator()); g->shutdown(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { FacetsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { FacetsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/facets/Collocated.cpp0000644000076400007640000000364610576536574020074 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Test; class FacetsTestApplication : public TestApplication { public: FacetsTestApplication() : TestApplication("facets collocated") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); Ice::ObjectPtr d = new DI; adapter->add(d, communicator()->stringToIdentity("d")); adapter->addFacet(d, communicator()->stringToIdentity("d"), "facetABCD"); Ice::ObjectPtr f = new FI; adapter->addFacet(f, communicator()->stringToIdentity("d"), "facetEF"); Ice::ObjectPtr h = new HI(communicator()); adapter->addFacet(h, communicator()->stringToIdentity("d"), "facetGH"); adapter->activate(); GPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator()); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { FacetsTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { FacetsTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/thread/0000755000076400007640000000000010620544015015263 5ustar matthewmatthewIceE-1.2.0/test/IceE/thread/AliveTest.h0000644000076400007640000000101210576536574017353 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ALIVE_TEST_H #define ALIVE_TEST_H #include class AliveTest : public TestBase { public: AliveTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/thread/TestBase.cpp0000644000076400007640000000157510576536575017537 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; TestFailed::TestFailed(const std::string& n) : name(n) { } TestBase::TestBase(const std::string& n) : _name(n) { } string TestBase::name() const { return _name; } void TestBase::start() { tprintf("running %s test... ", _name.c_str()); try { run(); } catch(const IceUtil::Exception& e) { tprintf("%s failed\n", e.toString().c_str()); throw TestFailed(_name); } tprintf("ok\n"); } IceE-1.2.0/test/IceE/thread/.depend0000644000076400007640000005502410616637156016547 0ustar matthewmatthewTestBase$(OBJEXT): TestBase.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h TestBase.h ../../include/TestCommon.h CreateTest$(OBJEXT): CreateTest.cpp ../../../include/IceE/DisableWarnings.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h CreateTest.h TestBase.h ../../include/TestCommon.h AliveTest$(OBJEXT): AliveTest.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h AliveTest.h TestBase.h ../../include/TestCommon.h StartTest$(OBJEXT): StartTest.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h StartTest.h TestBase.h ../../include/TestCommon.h RecMutexTest$(OBJEXT): RecMutexTest.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h RecMutexTest.h TestBase.h ../../include/TestCommon.h StaticMutexTest$(OBJEXT): StaticMutexTest.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/StaticMutex.h StaticMutexTest.h TestBase.h ../../include/TestCommon.h MutexTest$(OBJEXT): MutexTest.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h MutexTest.h TestBase.h ../../include/TestCommon.h MonitorMutexTest$(OBJEXT): MonitorMutexTest.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h MonitorMutexTest.h TestBase.h ../../include/TestCommon.h MonitorRecMutexTest$(OBJEXT): MonitorRecMutexTest.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h MonitorRecMutexTest.h TestBase.h ../../include/TestCommon.h TestSuite$(OBJEXT): TestSuite.cpp TestSuite.h TestBase.h ../../../include/IceE/Shared.h ../../../include/IceE/Config.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h MutexTest.h RecMutexTest.h StaticMutexTest.h CreateTest.h AliveTest.h StartTest.h MonitorMutexTest.h MonitorRecMutexTest.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestApplication.h ../../include/TestCommon.h TestSuite.h TestBase.h IceE-1.2.0/test/IceE/thread/RecMutexTest.h0000644000076400007640000000103010576536574020047 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef REC_MUTEX_TEST_H #define REC_MUTEX_TEST_H #include class RecMutexTest : public TestBase { public: RecMutexTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/thread/MutexTest.h0000644000076400007640000000101210576536574017415 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef MUTEX_TEST_H #define MUTEX_TEST_H #include class MutexTest : public TestBase { public: MutexTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/thread/MonitorMutexTest.cpp0000644000076400007640000000713010576536574021327 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace IceUtil; class MonitorMutexTestThread : public Thread { public: MonitorMutexTestThread(Monitor& m) : _monitor(m), _tryLock(false) { } virtual void run() { Monitor::TryLock tlock(_monitor); test(!tlock.acquired()); { Mutex::Lock lock(_tryLockMutex); _tryLock = true; } _tryLockCond.signal(); Monitor::Lock lock(_monitor); } void waitTryLock() { Mutex::Lock lock(_tryLockMutex); while(!_tryLock) { _tryLockCond.wait(lock); } } private: Monitor& _monitor; bool _tryLock; // // Use native Condition variable here, not Monitor. // Cond _tryLockCond; Mutex _tryLockMutex; }; typedef Handle MonitorMutexTestThreadPtr; class MonitorMutexTestThread2 : public Thread { public: MonitorMutexTestThread2(Monitor& monitor) : finished(false), _monitor(monitor) { } virtual void run() { Monitor::Lock lock(_monitor); _monitor.wait(); finished = true; } bool finished; private: Monitor& _monitor; }; typedef Handle MonitorMutexTestThread2Ptr; static const string monitorMutexTestName("monitor"); MonitorMutexTest::MonitorMutexTest() : TestBase(monitorMutexTestName) { } void MonitorMutexTest::run() { Monitor monitor; MonitorMutexTestThreadPtr t; MonitorMutexTestThread2Ptr t2; MonitorMutexTestThread2Ptr t3; ThreadControl control; ThreadControl control2; { Monitor::Lock lock(monitor); try { Monitor::TryLock tlock(monitor); test(!tlock.acquired()); } catch(const ThreadLockedException&) { } // TEST: Start thread, try to acquire the mutex. t = new MonitorMutexTestThread(monitor); control = t->start(); // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } // // TEST: Once the mutex has been released, the thread should // acquire the mutex and then terminate. // control.join(); // TEST: notify() wakes one consumer. t2 = new MonitorMutexTestThread2(monitor); control = t2->start(); t3 = new MonitorMutexTestThread2(monitor); control2 = t3->start(); // Give the thread time to start waiting. ThreadControl::sleep(Time::seconds(1)); { Monitor::Lock lock(monitor); monitor.notify(); } // Give one thread time to terminate ThreadControl::sleep(Time::seconds(1)); test((t2->finished && !t3->finished) || (t3->finished && !t2->finished)); { Monitor::Lock lock(monitor); monitor.notify(); } control.join(); control2.join(); // TEST: notifyAll() wakes one consumer. t2 = new MonitorMutexTestThread2(monitor); control = t2->start(); t3 = new MonitorMutexTestThread2(monitor); control2 = t3->start(); // Give the threads time to start waiting. ThreadControl::sleep(Time::seconds(1)); { Monitor::Lock lock(monitor); monitor.notifyAll(); } control.join(); control2.join(); // TEST: timedWait { Monitor::Lock lock(monitor); test(!monitor.timedWait(Time::milliSeconds(500))); } } IceE-1.2.0/test/IceE/thread/Makefile.mak0000644000076400007640000000220310616505646017503 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe TARGETS = $(CLIENT) OBJS = TestBase.obj \ CreateTest.obj \ AliveTest.obj \ StartTest.obj \ RecMutexTest.obj \ StaticMutexTest.obj \ MutexTest.obj \ MonitorMutexTest.obj \ MonitorRecMutexTest.obj \ TestSuite.obj \ Client.obj SRCS = $(OBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(LINK) $(LDFLAGS) $(PDBFLAGS) $(OBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest !include .depend IceE-1.2.0/test/IceE/thread/StartTest.cpp0000644000076400007640000000401710616652361017737 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace IceUtil; static const string createTestName("thread start"); static IceUtil::Mutex threadCountMutex; static int threadCount = 0; class StartTestThread : public Thread { public: StartTestThread() { } virtual void run() { IceUtil::Mutex::Lock sync(threadCountMutex); --threadCount; } }; typedef Handle StartTestThreadPtr; StartTest::StartTest() : TestBase(createTestName) { } void StartTest::run() { // // Check that calling start() more than once raises ThreadStartedException. // StartTestThreadPtr t = new StartTestThread(); ThreadControl control = t->start(); control.join(); try { t->start(); test(false); } catch(const ThreadStartedException&) { } threadCount = 0; // // Now let's create a bunch of short-lived threads // #ifdef _WIN32_WCE for(int i = 0; i < 50; i++) { for(int j = 0; j < 5; j++) { { IceUtil::Mutex::Lock sync(threadCountMutex); ++threadCount; } Thread* t = new StartTestThread; t->start().detach(); } // Wait for the threads to all terminate. I don't want to use // a monitor here, since monitor hasn't been tested yet. while(true) { { IceUtil::Mutex::Lock sync(threadCountMutex); if(threadCount == 0) { break; } } ThreadControl::sleep(Time::milliSeconds(5)); } } #else for(int i = 0; i < 50; i++) { for(int j = 0; j < 50; j++) { Thread* t = new StartTestThread; t->start().detach(); } ThreadControl::sleep(Time::milliSeconds(5)); } #endif } IceE-1.2.0/test/IceE/thread/TestSuite.cpp0000644000076400007640000000172710616505646017743 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include std::list allTests; void initializeTestSuite() { allTests.push_back(new MutexTest); allTests.push_back(new StartTest); allTests.push_back(new CreateTest); allTests.push_back(new AliveTest); allTests.push_back(new RecMutexTest); allTests.push_back(new StaticMutexTest); allTests.push_back(new MonitorMutexTest); allTests.push_back(new MonitorRecMutexTest); } IceE-1.2.0/test/IceE/thread/TestBase.h0000644000076400007640000000143510576536575017177 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_BASE_H #define TEST_BASE_H #include #include class TestFailed { public: TestFailed(const std::string&); const std::string name; }; class TestBase : public IceUtil::Shared { public: TestBase(const std::string&); std::string name() const; void start(); protected: virtual void run() = 0; const std::string _name; }; typedef IceUtil::Handle TestBasePtr; #endif IceE-1.2.0/test/IceE/thread/StaticMutexTest.cpp0000644000076400007640000000507010576536575021131 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace IceUtil; static const string mutexTestName("static mutex"); static StaticMutex staticMutex = ICE_STATIC_MUTEX_INITIALIZER; class StaticMutexTestThread : public Thread { public: StaticMutexTestThread() : _tryLock(false) { } virtual void run() { StaticMutex::TryLock tlock(staticMutex); test(!tlock.acquired()); { Mutex::Lock lock(_tryLockMutex); _tryLock = true; } _tryLockCond.signal(); StaticMutex::Lock lock(staticMutex); } void waitTryLock() { Mutex::Lock lock(_tryLockMutex); while(!_tryLock) { _tryLockCond.wait(lock); } } private: bool _tryLock; // // Use native Condition variable here, not Monitor. // Cond _tryLockCond; Mutex _tryLockMutex; }; typedef Handle StaticMutexTestThreadPtr; StaticMutexTest::StaticMutexTest() : TestBase(mutexTestName) { } void StaticMutexTest::run() { StaticMutexTestThreadPtr t; ThreadControl control; { StaticMutex::Lock lock(staticMutex); // LockT testing: // test(lock.acquired()); try { lock.acquire(); test(false); } catch(const ThreadLockedException&) { // Expected } try { lock.tryAcquire(); test(false); } catch(const ThreadLockedException&) { // Expected } test(lock.acquired()); lock.release(); test(!lock.acquired()); try { lock.release(); test(false); } catch(const ThreadLockedException&) { // Expected } StaticMutex::TryLock lock2(staticMutex); // // Under WinCE tryAcquire() does not do recursion checks. // #ifndef _WIN32_WCE try { test(lock.tryAcquire() == false); } catch(const IceUtil::ThreadLockedException&) { } lock2.release(); test(lock.tryAcquire() == true); test(lock.acquired()); #endif // TEST: Start thread, try to acquire the mutex. t = new StaticMutexTestThread; control = t->start(); // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } // // TEST: Once the mutex has been released, the thread should // acquire the mutex and then terminate. // control.join(); } IceE-1.2.0/test/IceE/thread/StartTest.h0000644000076400007640000000101210576536575017411 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef START_TEST_H #define START_TEST_H #include class StartTest : public TestBase { public: StartTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/thread/StaticMutexTest.h0000644000076400007640000000104410576536575020573 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef STATIC_MUTEX_TEST_H #define STATIC_MUTEX_TEST_H #include class StaticMutexTest : public TestBase { public: StaticMutexTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/thread/TestSuite.h0000644000076400007640000000077010576536575017417 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_SUITE_H #define TEST_SUITE_H #include #include extern std::list allTests; void initializeTestSuite(); #endif IceE-1.2.0/test/IceE/thread/RecMutexTest.cpp0000644000076400007640000000361110576536574020411 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace IceUtil; static const string recMutexTestName("recursive mutex"); class RecMutexTestThread : public Thread { public: RecMutexTestThread(RecMutex& m) : _mutex(m), _tryLock(false) { } virtual void run() { RecMutex::TryLock tlock(_mutex); test(!tlock.acquired()); { Mutex::Lock lock(_tryLockMutex); _tryLock = true; } _tryLockCond.signal(); RecMutex::Lock lock(_mutex); } void waitTryLock() { Mutex::Lock lock(_tryLockMutex); while(!_tryLock) { _tryLockCond.wait(lock); } } private: RecMutex& _mutex; bool _tryLock; // // Use native Condition variable here, not Monitor. // Cond _tryLockCond; Mutex _tryLockMutex; }; typedef Handle RecMutexTestThreadPtr; RecMutexTest::RecMutexTest() : TestBase(recMutexTestName) { } void RecMutexTest::run() { RecMutex mutex; RecMutexTestThreadPtr t; ThreadControl control; { RecMutex::Lock lock(mutex); // TEST: lock twice RecMutex::Lock lock2(mutex); // TEST: TryLock RecMutex::TryLock lock3(mutex); test(lock3.acquired()); // TEST: Start thread, try to acquire the mutex. t = new RecMutexTestThread(mutex); control = t->start(); // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } // // TEST: Once the recursive mutex has been released, the thread // should acquire the mutex and then terminate. // control.join(); } IceE-1.2.0/test/IceE/thread/run.py0000755000076400007640000000205310576536575016472 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "thread") testdir = os.path.join(toplevel, "test", name) client = os.path.join(testdir, "client") clientOptions = ' ' + testdir; print "starting client...", clientPipe = os.popen(client + clientOptions + " 2>&1") print "ok" TestUtil.printOutputFromPipe(clientPipe); clientStatus = clientPipe.close() if clientStatus: sys.exit(1) sys.exit(0) IceE-1.2.0/test/IceE/thread/CreateTest.cpp0000644000076400007640000000266210616652361020051 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include using namespace std; using namespace IceUtil; static const string createTestName("thread create"); class CreateTestThread : public Thread { public: CreateTestThread() : threadran(false) { } virtual void run() { threadran = true; } bool threadran; }; typedef Handle CreateTestThreadPtr; CreateTest::CreateTest() : TestBase(createTestName) { } void CreateTest::run() { int nthreads = 4096; #ifdef _WIN32_WCE // // 4096 threads takes forever to start on the WinCe emulator. // nthreads = 512; #endif for(int i = 0; i < nthreads ; ++i) { CreateTestThreadPtr t = new CreateTestThread(); ThreadControl control = t->start(); control.join(); test(t->threadran); #ifdef _WIN32_WCE if((i % 32) == 0) { tprintf("."); } #else if((i % 256) == 0) { char buf[5]; sprintf(buf, "%04d", i); tprintf("%s", buf); } #endif } #ifndef _WIN32_WCE tprintf(" "); #endif } IceE-1.2.0/test/IceE/thread/Makefile0000644000076400007640000000147210616505646016743 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client TARGETS = $(CLIENT) OBJS = TestBase.o \ CreateTest.o \ AliveTest.o \ StartTest.o \ RecMutexTest.o \ StaticMutexTest.o \ MutexTest.o \ MonitorMutexTest.o \ MonitorRecMutexTest.o \ TestSuite.o \ Client.o SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) $(CLIENT): $(OBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/thread/Client.cpp0000644000076400007640000000235710576536574017241 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; class ThreadTestApplication : public TestApplication { public: ThreadTestApplication() : TestApplication("thread test") { } virtual int run(int argc, char* argv[]) { try { initializeTestSuite(); for(list::const_iterator p = allTests.begin(); p != allTests.end(); ++p) { (*p)->start(); } } catch(const TestFailed& e) { tprintf("test %s failed\n", e.name.c_str()); return EXIT_FAILURE; } return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { ThreadTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { ThreadTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/thread/AliveTest.cpp0000644000076400007640000000347710576536574017727 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace IceUtil; static const string createTestName("thread alive"); class CondVar : public IceUtil::Monitor { public: CondVar() : _done(false) { } void waitForSignal() { IceUtil::Monitor::Lock lock(*this); while(!_done) { wait(); } } void signal() { IceUtil::Monitor::Lock lock(*this); _done = true; notify(); } private: bool _done; }; class AliveTestThread : public Thread { public: AliveTestThread(CondVar& childCreated, CondVar& parentReady) : _childCreated(childCreated), _parentReady(parentReady) { } virtual void run() { try { _childCreated.signal(); _parentReady.waitForSignal(); } catch(IceUtil::ThreadLockedException &) { } } private: CondVar& _childCreated; CondVar& _parentReady; }; typedef Handle AliveTestThreadPtr; AliveTest::AliveTest() : TestBase(createTestName) { } void AliveTest::run() { // // Check that calling isAlive() returns the correct result for alive and // and dead threads. // CondVar childCreated; CondVar parentReady; AliveTestThreadPtr t = new AliveTestThread(childCreated, parentReady); IceUtil::ThreadControl c = t->start(); childCreated.waitForSignal(); test(t->isAlive()); parentReady.signal(); c.join(); test(!t->isAlive()); } IceE-1.2.0/test/IceE/thread/CreateTest.h0000644000076400007640000000101610576536574017522 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CREATE_TEST_H #define CREATE_TEST_H #include class CreateTest : public TestBase { public: CreateTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/thread/MutexTest.cpp0000644000076400007640000000500110576536574017752 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace IceUtil; static const string mutexTestName("mutex"); class MutexTestThread : public Thread { public: MutexTestThread(Mutex& m) : _mutex(m), _tryLock(false) { } virtual void run() { Mutex::TryLock tlock(_mutex); test(!tlock.acquired()); { Mutex::Lock lock(_tryLockMutex); _tryLock = true; } _tryLockCond.signal(); Mutex::Lock lock(_mutex); } void waitTryLock() { Mutex::Lock lock(_tryLockMutex); while(!_tryLock) { _tryLockCond.wait(lock); } } private: Mutex& _mutex; bool _tryLock; // // Use native Condition variable here, not Monitor. // Cond _tryLockCond; Mutex _tryLockMutex; }; typedef Handle MutexTestThreadPtr; MutexTest::MutexTest() : TestBase(mutexTestName) { } void MutexTest::run() { Mutex mutex; MutexTestThreadPtr t; ThreadControl control; { Mutex::Lock lock(mutex); // LockT testing: // test(lock.acquired()); try { lock.acquire(); test(false); } catch(const ThreadLockedException&) { // Expected } try { lock.tryAcquire(); test(false); } catch(const ThreadLockedException&) { // Expected } test(lock.acquired()); lock.release(); test(!lock.acquired()); try { lock.release(); test(false); } catch(const ThreadLockedException&) { // Expected } Mutex::TryLock lock2(mutex); try { test(lock.tryAcquire() == false); } catch(const IceUtil::ThreadLockedException&) { } lock2.release(); test(lock.tryAcquire() == true); test(lock.acquired()); // Deadlock testing // #if !defined(NDEBUG) && !defined(_WIN32) try { Mutex::Lock lock3(mutex); test(false); } catch(const ThreadLockedException&) { } #endif // TEST: Start thread, try to acquire the mutex. t = new MutexTestThread(mutex); control = t->start(); // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } // // TEST: Once the mutex has been released, the thread should // acquire the mutex and then terminate. // control.join(); } IceE-1.2.0/test/IceE/thread/MonitorRecMutexTest.h0000644000076400007640000000106610576536574021430 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef MONITOR_REC_MUTEX_TEST_H #define MONITOR_REC_MUTEX_TEST_H #include class MonitorRecMutexTest : public TestBase { public: MonitorRecMutexTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/thread/MonitorRecMutexTest.cpp0000644000076400007640000000737310576536574021772 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace IceUtil; class MonitorRecMutexTestThread : public Thread { public: MonitorRecMutexTestThread(Monitor& m) : _monitor(m), _tryLock(false) { } virtual void run() { Monitor::TryLock tlock(_monitor); test(!tlock.acquired()); { Mutex::Lock lock(_tryLockMutex); _tryLock = true; } _tryLockCond.signal(); Monitor::Lock lock(_monitor); } void waitTryLock() { Mutex::Lock lock(_tryLockMutex); while(!_tryLock) { _tryLockCond.wait(lock); } } private: Monitor& _monitor; bool _tryLock; // // Use native Condition variable here, not Monitor. // Cond _tryLockCond; Mutex _tryLockMutex; }; typedef Handle MonitorRecMutexTestThreadPtr; class MonitorRecMutexTestThread2 : public Thread, public Monitor { public: MonitorRecMutexTestThread2(Monitor& monitor) : finished(false), _monitor(monitor) { } virtual void run() { Monitor::Lock lock(_monitor); _monitor.wait(); finished = true; } bool finished; private: Monitor& _monitor; }; typedef Handle MonitorRecMutexTestThread2Ptr; static const string monitorRecMutexTestName("monitor"); MonitorRecMutexTest::MonitorRecMutexTest() : TestBase(monitorRecMutexTestName) { } void MonitorRecMutexTest::run() { Monitor monitor; MonitorRecMutexTestThreadPtr t; MonitorRecMutexTestThread2Ptr t2; MonitorRecMutexTestThread2Ptr t3; ThreadControl control; ThreadControl control2; { Monitor::Lock lock(monitor); Monitor::TryLock lock2(monitor); test(lock2.acquired()); // TEST: TryLock Monitor::TryLock tlock(monitor); test(tlock.acquired()); // TEST: Start thread, try to acquire the mutex. t = new MonitorRecMutexTestThread(monitor); control = t->start(); // TEST: Wait until the tryLock has been tested. t->waitTryLock(); } // // TEST: Once the mutex has been released, the thread should // acquire the mutex and then terminate. // control.join(); // TEST: notify() wakes one consumer. t2 = new MonitorRecMutexTestThread2(monitor); control = t2->start(); t3 = new MonitorRecMutexTestThread2(monitor); control2 = t3->start(); // Give the thread time to start waiting. ThreadControl::sleep(Time::seconds(1)); { Monitor::Lock lock(monitor); monitor.notify(); } // Give one thread time to terminate ThreadControl::sleep(Time::seconds(1)); test((t2->finished && !t3->finished) || (t3->finished && !t2->finished)); { Monitor::Lock lock(monitor); monitor.notify(); } control.join(); control2.join(); // TEST: notifyAll() wakes one consumer. t2 = new MonitorRecMutexTestThread2(monitor); control = t2->start(); t3 = new MonitorRecMutexTestThread2(monitor); control2 = t3->start(); // Give the threads time to start waiting. ThreadControl::sleep(Time::seconds(1)); { Monitor::Lock lock(monitor); monitor.notifyAll(); } control.join(); control2.join(); // TEST: timedWait { Monitor::Lock lock(monitor); test(!monitor.timedWait(Time::milliSeconds(500))); } } IceE-1.2.0/test/IceE/thread/MonitorMutexTest.h0000644000076400007640000000105010576536574020767 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef MONITOR_MUTEX_TEST_H #define MONITOR_MUTEX_TEST_H #include class MonitorMutexTest : public TestBase { public: MonitorMutexTest(); private: virtual void run(); }; #endif IceE-1.2.0/test/IceE/custom/0000755000076400007640000000000010620544005015325 5ustar matthewmatthewIceE-1.2.0/test/IceE/custom/MyByteSeq.cpp0000755000076400007640000000330210607423042017716 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include MyByteSeq::MyByteSeq() : _size(0), _data(0) { } MyByteSeq::MyByteSeq(size_t size) : _size(size), _data(0) { if(_size != 0) { _data = (Ice::Byte*)malloc(_size); } } MyByteSeq::MyByteSeq(const MyByteSeq& seq) { _size = seq._size; if(_size != 0) { _data = (Ice::Byte*)malloc(_size); memcpy(_data, seq._data, _size); } else { _data = 0; } } MyByteSeq::~MyByteSeq() { if(_data != 0) { free(_data); } } size_t MyByteSeq::size() const { return _size; } void MyByteSeq::swap(MyByteSeq& seq) { size_t tmpSize = seq._size; Ice::Byte* tmpData = seq._data; seq._size = _size; seq._data = _data; _size = tmpSize; _data = tmpData; } MyByteSeq::const_iterator MyByteSeq::begin() const { return _data; } MyByteSeq::const_iterator MyByteSeq::end() const { return _data + _size; } void MyByteSeq::operator=(const MyByteSeq& rhs) { if(_data != 0) { free(_data); _data = 0; } _size = rhs._size; if(_size != 0) { _data = (Ice::Byte*)malloc(_size); memcpy(_data, rhs._data, _size); } } bool MyByteSeq::operator==(const MyByteSeq& rhs) const { if(_size != rhs._size) { return _size == rhs._size; } return memcmp(_data, rhs._data, _size) == 0; } IceE-1.2.0/test/IceE/custom/.depend0000644000076400007640000007704610616637156016622 0ustar matthewmatthewTest$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Wstring$(OBJEXT): Wstring.cpp Wstring.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h ../../include/TestApplication.h Test.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h StringConverterI.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h Test.h MyByteSeq.h Wstring.h MyByteSeq$(OBJEXT): MyByteSeq.cpp MyByteSeq.h ../../../include/IceE/Config.h StringConverterI$(OBJEXT): StringConverterI.cpp ../../../include/IceE/Config.h StringConverterI.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Exception.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Handle.h ../../../include/IceE/Shared.h ../../../include/IceE/Unicode.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp TestI.h Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h ../../include/TestCommon.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h Wstring$(OBJEXT): Wstring.cpp Wstring.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h WstringI$(OBJEXT): WstringI.cpp ../../../include/IceE/Config.h WstringI.h Wstring.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h ../../include/TestApplication.h TestI.h Test.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h WstringI.h Wstring.h ../../../include/IceE/UserExceptionFactory.h StringConverterI.h MyByteSeq$(OBJEXT): MyByteSeq.cpp MyByteSeq.h ../../../include/IceE/Config.h StringConverterI$(OBJEXT): StringConverterI.cpp ../../../include/IceE/Config.h StringConverterI.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Exception.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Handle.h ../../../include/IceE/Shared.h ../../../include/IceE/Unicode.h Test$(OBJEXT): Test.cpp Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h TestI$(OBJEXT): TestI.cpp TestI.h Test.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h ../../include/TestCommon.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h Wstring$(OBJEXT): Wstring.cpp Wstring.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h WstringI$(OBJEXT): WstringI.cpp ../../../include/IceE/Config.h WstringI.h Wstring.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Collocated$(OBJEXT): Collocated.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../include/TestCommon.h ../../include/TestApplication.h TestI.h Test.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h MyByteSeq.h WstringI.h Wstring.h ../../../include/IceE/UserExceptionFactory.h AllTests$(OBJEXT): AllTests.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/Locator.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../include/TestCommon.h Test.h MyByteSeq.h Wstring.h MyByteSeq$(OBJEXT): MyByteSeq.cpp MyByteSeq.h ../../../include/IceE/Config.h StringConverterI$(OBJEXT): StringConverterI.cpp ../../../include/IceE/Config.h StringConverterI.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Exception.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Handle.h ../../../include/IceE/Shared.h ../../../include/IceE/Unicode.h Test.cpp: Test.ice Wstring.cpp: Wstring.ice IceE-1.2.0/test/IceE/custom/WstringI.cpp0000644000076400007640000000276710616161100017607 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_WSTRING #include ::std::wstring Test1::WstringClassI::opString(const ::std::wstring& s1, ::std::wstring& s2, const Ice::Current& current) { s2 = s1; return s1; } ::Test1::WstringStruct Test1::WstringClassI::opStruct(const ::Test1::WstringStruct& s1, ::Test1::WstringStruct& s2, const Ice::Current& current) { s2 = s1; return s1; } void Test1::WstringClassI::throwExcept(const ::std::wstring& reason, const Ice::Current& current) { Test1::WstringException ex; ex.reason = reason; throw ex; } ::std::wstring Test2::WstringClassI::opString(const ::std::wstring& s1, ::std::wstring& s2, const Ice::Current& current) { s2 = s1; return s1; } ::Test2::WstringStruct Test2::WstringClassI::opStruct(const ::Test2::WstringStruct& s1, ::Test2::WstringStruct& s2, const Ice::Current& current) { s2 = s1; return s1; } void Test2::WstringClassI::throwExcept(const ::std::wstring& reason, const Ice::Current& current) { Test2::WstringException ex; ex.reason = reason; throw ex; } #endif IceE-1.2.0/test/IceE/custom/TestI.cpp0000644000076400007640000001547110576536574017117 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include TestIntfI::TestIntfI(const Ice::CommunicatorPtr& communicator) : _communicator(communicator) { } Test::BoolSeq TestIntfI::opBoolArray(const std::pair& inSeq, Test::BoolSeq& outSeq, const Ice::Current& current) { Test::BoolSeq(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::ByteList TestIntfI::opByteArray(const std::pair& inSeq, Test::ByteList& outSeq, const Ice::Current& current) { Test::ByteList(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::VariableList TestIntfI::opVariableArray(const std::pair& inSeq, Test::VariableList& outSeq, const Ice::Current& current) { Test::VariableList(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::BoolSeq TestIntfI::opBoolRange(const std::pair& inSeq, Test::BoolSeq& outSeq, const Ice::Current&) { Test::BoolSeq(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::ByteList TestIntfI::opByteRange(const std::pair& inSeq, Test::ByteList& outSeq, const Ice::Current&) { Test::ByteList(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::VariableList TestIntfI::opVariableRange( const std::pair& inSeq, Test::VariableList& outSeq, const Ice::Current&) { Test::VariableList(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::BoolSeq TestIntfI::opBoolRangeType(const std::pair& inSeq, Test::BoolSeq& outSeq, const Ice::Current&) { Test::BoolSeq(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::ByteList TestIntfI::opByteRangeType(const std::pair& inSeq, Test::ByteList& outSeq, const Ice::Current&) { Test::ByteList(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } Test::VariableList TestIntfI::opVariableRangeType( const std::pair::const_iterator, std::deque::const_iterator>& inSeq, Test::VariableList& outSeq, const Ice::Current&) { Test::VariableList(inSeq.first, inSeq.second).swap(outSeq); return outSeq; } std::deque TestIntfI::opBoolSeq(const std::deque& inSeq, std::deque& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list TestIntfI::opBoolList(const std::list& inSeq, std::list& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::deque< ::Ice::Byte> TestIntfI::opByteSeq(const std::deque< ::Ice::Byte>& inSeq, std::deque< ::Ice::Byte>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list< ::Ice::Byte> TestIntfI::opByteList(const std::list< ::Ice::Byte>& inSeq, std::list< ::Ice::Byte>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } MyByteSeq TestIntfI::opMyByteSeq(const MyByteSeq& inSeq, MyByteSeq& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::deque< ::std::string> TestIntfI::opStringSeq(const std::deque< ::std::string>& inSeq, std::deque< ::std::string>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list< ::std::string> TestIntfI::opStringList(const std::list< ::std::string>& inSeq, std::list< ::std::string>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::deque< ::Test::Fixed> TestIntfI::opFixedSeq(const std::deque< ::Test::Fixed>& inSeq, std::deque< ::Test::Fixed>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list< ::Test::Fixed> TestIntfI::opFixedList(const std::list< ::Test::Fixed>& inSeq, std::list< ::Test::Fixed>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::deque< ::Test::Variable> TestIntfI::opVariableSeq(const std::deque< ::Test::Variable>& inSeq, std::deque< ::Test::Variable>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list< ::Test::Variable> TestIntfI::opVariableList(const std::list< ::Test::Variable>& inSeq, std::list< ::Test::Variable>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::deque< ::Test::StringStringDict> TestIntfI::opStringStringDictSeq(const std::deque< ::Test::StringStringDict>& inSeq, std::deque< ::Test::StringStringDict>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list< ::Test::StringStringDict> TestIntfI::opStringStringDictList(const std::list< ::Test::StringStringDict>& inSeq, std::list< ::Test::StringStringDict>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::deque< ::Test::E> TestIntfI::opESeq(const std::deque< ::Test::E>& inSeq, std::deque< ::Test::E>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list< ::Test::E> TestIntfI::opEList(const std::list< ::Test::E>& inSeq, std::list< ::Test::E>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::deque< ::Test::CPrx> TestIntfI::opCPrxSeq(const std::deque< ::Test::CPrx>& inSeq, std::deque< ::Test::CPrx>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } std::list< ::Test::CPrx> TestIntfI::opCPrxList(const std::list< ::Test::CPrx>& inSeq, std::list< ::Test::CPrx>& outSeq, const Ice::Current& current) { outSeq = inSeq; return inSeq; } void TestIntfI::shutdown(const Ice::Current& current) { _communicator->shutdown(); #ifdef _WIN32_WCE tprintf("The server has shutdown, close the window to terminate the server."); #endif } IceE-1.2.0/test/IceE/custom/TestI.h0000644000076400007640000001245510576536574016563 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_I_H #define TEST_I_H #include class TestIntfI : virtual public Test::TestIntf { public: TestIntfI(const Ice::CommunicatorPtr&); virtual Test::BoolSeq opBoolArray(const std::pair&, Test::BoolSeq&, const Ice::Current&); virtual Test::ByteList opByteArray(const std::pair&, Test::ByteList&, const Ice::Current&); virtual Test::VariableList opVariableArray(const std::pair&, Test::VariableList&, const Ice::Current&); virtual Test::BoolSeq opBoolRange(const std::pair&, Test::BoolSeq&, const Ice::Current&); virtual Test::ByteList opByteRange(const std::pair&, Test::ByteList&, const Ice::Current&); virtual Test::VariableList opVariableRange(const std::pair&, Test::VariableList&, const Ice::Current&); virtual Test::BoolSeq opBoolRangeType(const std::pair&, Test::BoolSeq&, const Ice::Current&); virtual Test::ByteList opByteRangeType(const std::pair&, Test::ByteList&, const Ice::Current&); virtual Test::VariableList opVariableRangeType(const std::pair::const_iterator, std::deque::const_iterator>&, Test::VariableList&, const Ice::Current&); virtual std::deque opBoolSeq(const std::deque&, std::deque&, const Ice::Current&); virtual std::list opBoolList(const std::list&, std::list&, const Ice::Current&); virtual std::deque< ::Ice::Byte> opByteSeq(const std::deque< ::Ice::Byte>&, std::deque< ::Ice::Byte>&, const Ice::Current&); virtual std::list< ::Ice::Byte> opByteList(const std::list< ::Ice::Byte>&, std::list< ::Ice::Byte>&, const Ice::Current&); virtual MyByteSeq opMyByteSeq(const MyByteSeq&, MyByteSeq&, const Ice::Current&); virtual std::deque< ::std::string> opStringSeq(const std::deque< ::std::string>&, std::deque< ::std::string>&, const Ice::Current&); virtual std::list< ::std::string> opStringList(const std::list< ::std::string>&, std::list< ::std::string>&, const Ice::Current&); virtual std::deque< ::Test::Fixed> opFixedSeq(const std::deque< ::Test::Fixed>&, std::deque< ::Test::Fixed>&, const Ice::Current&); virtual std::list< ::Test::Fixed> opFixedList(const std::list< ::Test::Fixed>&, std::list< ::Test::Fixed>&, const Ice::Current&); virtual std::deque< ::Test::Variable> opVariableSeq(const std::deque< ::Test::Variable>&, std::deque< ::Test::Variable>&, const Ice::Current&); virtual std::list< ::Test::Variable> opVariableList(const std::list< ::Test::Variable>&, std::list< ::Test::Variable>&, const Ice::Current&); virtual std::deque< ::Test::StringStringDict> opStringStringDictSeq(const std::deque< ::Test::StringStringDict>&, std::deque< ::Test::StringStringDict>&, const Ice::Current&); virtual std::list< ::Test::StringStringDict> opStringStringDictList(const std::list< ::Test::StringStringDict>&, std::list< ::Test::StringStringDict>&, const Ice::Current&); virtual std::deque< ::Test::E> opESeq(const std::deque< ::Test::E>&, std::deque< ::Test::E>&, const Ice::Current&); virtual std::list< ::Test::E> opEList(const std::list< ::Test::E>&, std::list< ::Test::E>&, const Ice::Current&); virtual std::deque< ::Test::CPrx> opCPrxSeq(const std::deque< ::Test::CPrx>&, std::deque< ::Test::CPrx>&, const Ice::Current&); virtual std::list< ::Test::CPrx> opCPrxList(const std::list< ::Test::CPrx>&, std::list< ::Test::CPrx>&, const Ice::Current&); virtual void shutdown(const Ice::Current&); private: Ice::CommunicatorPtr _communicator; }; #endif IceE-1.2.0/test/IceE/custom/Makefile.mak0000644000076400007640000000416410616161100017535 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe COLLOCATED = collocated.exe TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.obj \ Wstring.obj \ Client.obj \ AllTests.obj \ MyByteSeq.obj \ StringConverterI.obj SOBJS = Test.obj \ Wstring.obj \ TestI.obj \ WstringI.obj \ Server.obj \ MyByteSeq.obj \ StringConverterI.obj COLOBJS = Test.obj \ Wstring.obj \ TestI.obj \ WstringI.obj \ Collocated.obj \ AllTests.obj \ MyByteSeq.obj \ StringConverterI.obj SRCS = $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) \ $(COLOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. -I../../include $(CPPFLAGS) -WX -Zm200 -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) COPDBFLAGS = /pdb:$(COLLOCATED:.exe=.pdb) !endif $(CLIENT): $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(COBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(SOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(COLLOCATED): $(COLOBJS) $(LINK) $(LDFLAGS) $(COPDBFLAGS) $(COLOBJS) /out:$@ $(TESTLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Test.cpp Test.h del /q Wstring.cpp Wstring.h del /q WstringAMD.cpp WstringAMD.h !include .depend IceE-1.2.0/test/IceE/custom/AllTests.cpp0000644000076400007640000002743310616161100017571 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include using namespace std; Test::TestIntfPrx allTests(const Ice::CommunicatorPtr& communicator) { tprintf("testing stringToProxy... "); string ref = communicator->getProperties()->getPropertyWithDefault( "Custom.Proxy", "test:default -p 12010 -t 10000"); Ice::ObjectPrx base = communicator->stringToProxy(ref); test(base); tprintf("ok\n"); tprintf("testing checked cast... "); Test::TestIntfPrx t = Test::TestIntfPrx::checkedCast(base); test(t); test(t == base); tprintf("ok\n"); tprintf("testing alternate sequences... "); { Test::BoolSeq in(5); in[0] = false; in[1] = true; in[2] = true; in[3] = false; in[4] = true; bool inArray[5]; for(int i = 0; i < 5; ++i) { inArray[i] = in[i]; } pair inPair(inArray, inArray + 5); Test::BoolSeq out; Test::BoolSeq ret = t->opBoolArray(inPair, out); test(out == in); test(ret == in); } { Test::ByteList in; Ice::Byte inArray[5]; inArray[0] = '1'; in.push_back(inArray[0]); inArray[1] = '2'; in.push_back(inArray[1]); inArray[2] = '3'; in.push_back(inArray[2]); inArray[3] = '4'; in.push_back(inArray[3]); inArray[4] = '5'; in.push_back(inArray[4]); pair inPair(inArray, inArray + 5); Test::ByteList out; Test::ByteList ret = t->opByteArray(inPair, out); test(out == in); test(ret == in); } { Test::VariableList in; Test::Variable inArray[5]; inArray[0].s = "These"; in.push_back(inArray[0]); inArray[1].s = "are"; in.push_back(inArray[1]); inArray[2].s = "five"; in.push_back(inArray[2]); inArray[3].s = "short"; in.push_back(inArray[3]); inArray[4].s = "strings."; in.push_back(inArray[4]); pair inPair(inArray, inArray + 5); Test::VariableList out; Test::VariableList ret = t->opVariableArray(inPair, out); test(out == in); test(ret == in); } { Test::BoolSeq in(5); in[0] = false; in[1] = true; in[2] = true; in[3] = false; in[4] = true; pair inPair(in.begin(), in.end()); Test::BoolSeq out; Test::BoolSeq ret = t->opBoolRange(inPair, out); test(out == in); test(ret == in); } { Test::ByteList in; in.push_back('1'); in.push_back('2'); in.push_back('3'); in.push_back('4'); in.push_back('5'); pair inPair(in.begin(), in.end()); Test::ByteList out; Test::ByteList ret = t->opByteRange(inPair, out); test(out == in); test(ret == in); } { Test::VariableList in; Test::Variable v; v.s = "These"; in.push_back(v); v.s = "are"; in.push_back(v); v.s = "five"; in.push_back(v); v.s = "short"; in.push_back(v); v.s = "strings."; in.push_back(v); pair inPair(in.begin(), in.end()); Test::VariableList out; Test::VariableList ret = t->opVariableRange(inPair, out); test(out == in); test(ret == in); } { Test::BoolSeq in(5); in[0] = false; in[1] = true; in[2] = true; in[3] = false; in[4] = true; bool inArray[5]; for(int i = 0; i < 5; ++i) { inArray[i] = in[i]; } pair inPair(inArray, inArray + 5); Test::BoolSeq out; Test::BoolSeq ret = t->opBoolRangeType(inPair, out); test(out == in); test(ret == in); } { Test::ByteList in; in.push_back('1'); in.push_back('2'); in.push_back('3'); in.push_back('4'); in.push_back('5'); pair inPair(in.begin(), in.end()); Test::ByteList out; Test::ByteList ret = t->opByteRangeType(inPair, out); test(out == in); test(ret == in); } { Test::VariableList in; deque inSeq; Test::Variable v; v.s = "These"; in.push_back(v); inSeq.push_back(v); v.s = "are"; in.push_back(v); inSeq.push_back(v); v.s = "five"; in.push_back(v); inSeq.push_back(v); v.s = "short"; in.push_back(v); inSeq.push_back(v); v.s = "strings."; in.push_back(v); inSeq.push_back(v); pair::const_iterator, deque::const_iterator> inPair(inSeq.begin(), inSeq.end()); Test::VariableList out; Test::VariableList ret = t->opVariableRangeType(inPair, out); test(out == in); test(ret == in); } { deque in(5); in[0] = false; in[1] = true; in[2] = true; in[3] = false; in[4] = true; deque out; deque ret = t->opBoolSeq(in, out); test(out == in); test(ret == in); } { list in; in.push_back(false); in.push_back(true); in.push_back(true); in.push_back(false); in.push_back(true); list out; list ret = t->opBoolList(in, out); test(out == in); test(ret == in); } { deque< ::Ice::Byte> in(5); in[0] = '1'; in[1] = '2'; in[2] = '3'; in[3] = '4'; in[4] = '5'; deque< ::Ice::Byte> out; deque< ::Ice::Byte> ret = t->opByteSeq(in, out); test(out == in); test(ret == in); } { list< ::Ice::Byte> in; in.push_back('1'); in.push_back('2'); in.push_back('3'); in.push_back('4'); in.push_back('5'); list< ::Ice::Byte> out; list< ::Ice::Byte> ret = t->opByteList(in, out); test(out == in); test(ret == in); } { MyByteSeq in(5); int i = 0; for(MyByteSeq::iterator p = in.begin(); p != in.end(); ++p) { *p = '1' + i++; } MyByteSeq out; MyByteSeq ret = t->opMyByteSeq(in, out); test(out == in); test(ret == in); } { deque in(5); in[0] = "These"; in[1] = "are"; in[2] = "five"; in[3] = "short"; in[4] = "strings."; deque out; deque ret = t->opStringSeq(in, out); test(out == in); test(ret == in); } { list in; in.push_back("These"); in.push_back("are"); in.push_back("five"); in.push_back("short"); in.push_back("strings."); list out; list ret = t->opStringList(in, out); test(out == in); test(ret == in); } { deque in(5); in[0].s = 1; in[1].s = 2; in[2].s = 3; in[3].s = 4; in[4].s = 5; deque out; deque ret = t->opFixedSeq(in, out); test(out == in); test(ret == in); } { list in(5); short num = 1; for(list::iterator p = in.begin(); p != in.end(); ++p) { (*p).s = num++; } list out; list ret = t->opFixedList(in, out); test(out == in); test(ret == in); } { deque in(5); in[0].s = "These"; in[1].s = "are"; in[2].s = "five"; in[3].s = "short"; in[4].s = "strings."; deque out; deque ret = t->opVariableSeq(in, out); test(out == in); test(ret == in); } { list in; Test::Variable v; v.s = "These"; in.push_back(v); v.s = "are"; in.push_back(v); v.s = "five"; in.push_back(v); v.s = "short"; in.push_back(v); v.s = "strings."; in.push_back(v); list out; list ret = t->opVariableList(in, out); test(out == in); test(ret == in); } { deque in(5); in[0]["A"] = "a"; in[1]["B"] = "b"; in[2]["C"] = "c"; in[3]["D"] = "d"; in[4]["E"] = "e"; deque out; deque ret = t->opStringStringDictSeq(in, out); test(out == in); test(ret == in); } { list in; Test::StringStringDict ssd; ssd["A"] = "a"; in.push_back(ssd); ssd["B"] = "b"; in.push_back(ssd); ssd["C"] = "c"; in.push_back(ssd); ssd["D"] = "d"; in.push_back(ssd); ssd["E"] = "e"; in.push_back(ssd); list out; list ret = t->opStringStringDictList(in, out); test(out == in); test(ret == in); } { deque in(5); in[0] = Test::E1; in[1] = Test::E2; in[2] = Test::E3; in[3] = Test::E1; in[4] = Test::E3; deque out; deque ret = t->opESeq(in, out); test(out == in); test(ret == in); } { list in; in.push_back(Test::E1); in.push_back(Test::E2); in.push_back(Test::E3); in.push_back(Test::E1); in.push_back(Test::E3); list out; list ret = t->opEList(in, out); test(out == in); test(ret == in); } { deque in(5); in[0] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000")); in[1] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001")); in[2] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002")); in[3] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003")); in[4] = Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004")); deque out; deque ret = t->opCPrxSeq(in, out); test(out == in); test(ret == in); } { list in; in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C1:default -p 12010 -t 10000"))); in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C2:default -p 12010 -t 10001"))); in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C3:default -p 12010 -t 10002"))); in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C4:default -p 12010 -t 10003"))); in.push_back(Test::CPrx::uncheckedCast(communicator->stringToProxy("C5:default -p 12010 -t 10004"))); list out; list ret = t->opCPrxList(in, out); test(out == in); test(ret == in); } tprintf("ok\n"); #ifdef ICEE_HAS_WSTRING tprintf("testing wstring... "); Test1::WstringSeq wseq1; wseq1.push_back(L"Wide String"); Test2::WstringSeq wseq2; wseq2 = wseq1; Test1::WstringWStringDict wdict1; wdict1[L"Key"] = L"Value"; Test2::WstringWStringDict wdict2; wdict2 = wdict1; ref = communicator->getProperties()->getPropertyWithDefault( "Custom.WstringProxy1", "wstring1:default -p 12010 -t 10000"); base = communicator->stringToProxy(ref); test(base); Test1::WstringClassPrx wsc1 = Test1::WstringClassPrx::checkedCast(base); test(t); ref = communicator->getProperties()->getPropertyWithDefault( "Custom.WstringProxy2", "wstring2:default -p 12010 -t 10000"); base = communicator->stringToProxy(ref); test(base); Test2::WstringClassPrx wsc2 = Test2::WstringClassPrx::checkedCast(base); test(t); wstring wstr = L"A Wide String"; wstring out; wstring ret = wsc1->opString(wstr, out); test(out == wstr); test(ret == wstr); ret = wsc2->opString(wstr, out); test(out == wstr); test(ret == wstr); Test1::WstringStruct wss1; wss1.s = wstr; Test1::WstringStruct wss1out; Test1::WstringStruct wss1ret = wsc1->opStruct(wss1, wss1out); test(wss1out == wss1); test(wss1ret == wss1); Test2::WstringStruct wss2; wss2.s = wstr; Test2::WstringStruct wss2out; Test2::WstringStruct wss2ret = wsc2->opStruct(wss2, wss2out); test(wss2out == wss2); test(wss2ret == wss2); try { wsc1->throwExcept(wstr); } catch(const Test1::WstringException& ex) { test(ex.reason == wstr); } try { wsc2->throwExcept(wstr); } catch(const Test2::WstringException& ex) { test(ex.reason == wstr); } tprintf("ok\n"); #endif return t; } IceE-1.2.0/test/IceE/custom/StringConverterI.h0000644000076400007640000000222710616161100020744 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef STRING_CONVERTER_I_H #define STRING_CONVERTER_I_H #include #ifdef ICEE_HAS_WSTRING #include // // Simple contrived string converters which simply reverse the order of the // characters being sent. // namespace Test { class StringConverterI : public Ice::StringConverter { public: virtual Ice::Byte* toUTF8(const char*, const char*, Ice::UTF8Buffer&) const; virtual void fromUTF8(const Ice::Byte* sourceStart, const Ice::Byte* sourceEnd, std::string& target) const; }; class WstringConverterI : public Ice::WstringConverter { public: virtual Ice::Byte* toUTF8(const wchar_t*, const wchar_t*, Ice::UTF8Buffer&) const; virtual void fromUTF8(const Ice::Byte* sourceStart, const Ice::Byte* sourceEnd, std::wstring& target) const; }; } #endif #endif IceE-1.2.0/test/IceE/custom/Server.cpp0000644000076400007640000000412710616161100017277 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include using namespace std; class CustomTestApplication : public TestApplication { public: CustomTestApplication() : TestApplication("custom server") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); #ifdef ICEE_HAS_WSTRING initData.stringConverter = new Test::StringConverterI(); initData.wstringConverter = new Test::WstringConverterI(); #endif initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); //initData.properties->setProperty("Ice.Trace.Network", "5"); //initData.properties->setProperty("Ice.Trace.Protocol", "5"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); adapter->add(new TestIntfI(communicator()), communicator()->stringToIdentity("test")); #ifdef ICEE_HAS_WSTRING adapter->add(new Test1::WstringClassI, communicator()->stringToIdentity("wstring1")); adapter->add(new Test2::WstringClassI, communicator()->stringToIdentity("wstring2")); #endif adapter->activate(); #ifndef _WIN32_WCE communicator()->waitForShutdown(); #endif return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { CustomTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { CustomTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/custom/MyByteSeq.h0000644000076400007640000000156110576536574017411 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_MY_BYTE_SEQ_H #define TEST_MY_BYTE_SEQ_H #include class MyByteSeq { public: typedef Ice::Byte* iterator; typedef Ice::Byte* const_iterator; MyByteSeq(); MyByteSeq(size_t); MyByteSeq(const MyByteSeq&); ~MyByteSeq(); size_t size() const; void swap(MyByteSeq&); const_iterator begin() const; const_iterator end() const; void operator=(const MyByteSeq&); bool operator==(const MyByteSeq&) const; private: size_t _size; Ice::Byte* _data; }; #endif IceE-1.2.0/test/IceE/custom/run.py0000755000076400007640000000154610576536574016542 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" sys.path.append(os.path.join(toplevel, "config")) import TestUtil name = os.path.join("IceE", "custom") print "tests with regular server." TestUtil.clientServerTest(name) print "tests with collocated server." TestUtil.collocatedTest(name) sys.exit(0) IceE-1.2.0/test/IceE/custom/WstringI.h0000644000076400007640000000245310616161100017244 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef WSTRING_I_H #define WSTRING_I_H #include #ifdef ICEE_HAS_WSTRING #include namespace Test1 { class WstringClassI : virtual public WstringClass { public: virtual ::std::wstring opString(const ::std::wstring&, ::std::wstring&, const Ice::Current&); virtual ::Test1::WstringStruct opStruct(const ::Test1::WstringStruct&, ::Test1::WstringStruct&, const Ice::Current&); virtual void throwExcept(const ::std::wstring&, const Ice::Current&); }; } namespace Test2 { class WstringClassI : virtual public WstringClass { public: virtual ::std::wstring opString(const ::std::wstring&, ::std::wstring&, const Ice::Current&); virtual ::Test2::WstringStruct opStruct(const ::Test2::WstringStruct&, ::Test2::WstringStruct&, const Ice::Current&); virtual void throwExcept(const ::std::wstring&, const Ice::Current&); }; } #endif #endif IceE-1.2.0/test/IceE/custom/Makefile0000644000076400007640000000246010616161100016763 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server COLLOCATED = collocated TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED) COBJS = Test.o \ Wstring.o \ Client.o \ AllTests.o \ MyByteSeq.o \ StringConverterI.o SOBJS = Test.o \ TestI.o \ Wstring.o \ WstringI.o \ Server.o \ MyByteSeq.o \ StringConverterI.o COLOBJS = Test.o \ TestI.o \ Wstring.o \ WstringI.o \ Collocated.o \ AllTests.o \ MyByteSeq.o \ StringConverterI.o SRCS = $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) \ $(COLOBJS:.o=.cpp) SLICE_SRCS = Test.ice Wstring.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. -I../../include $(CPPFLAGS) SLICE2CPPEFLAGS := $(SLICE2CPPFLAGS) $(CLIENT): $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(TESTLIBS) $(SERVER): $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(TESTLIBS) $(COLLOCATED): $(COLOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(COLOBJS) $(TESTLIBS) include .depend IceE-1.2.0/test/IceE/custom/Test.ice0000644000076400007640000001403210576536574016754 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef TEST_ICE #define TEST_ICE [["cpp:include:deque", "cpp:include:list", "cpp:include:MyByteSeq.h"]] module Test { sequence BoolSeq; ["cpp:type:std::list"] sequence BoolList; ["cpp:type:std::list< ::Test::BoolList>"] sequence BoolListList; sequence BoolListSeq; ["cpp:type:std::list< ::Test::BoolSeq>"] sequence BoolSeqList; sequence ByteSeq; ["cpp:type:std::list< ::Ice::Byte>"] sequence ByteList; ["cpp:type:std::list< ::Test::ByteList>"] sequence ByteListList; sequence ByteListSeq; ["cpp:type:std::list< ::Test::ByteSeq>"] sequence ByteSeqList; sequence StringSeq; ["cpp:type:std::list"] sequence StringList; ["cpp:type:std::list< ::Test::StringList>"] sequence StringListList; sequence StringListSeq; ["cpp:type:std::list< ::Test::StringSeq>"] sequence StringSeqList; struct Fixed { short s; }; sequence FixedSeq; ["cpp:type:std::list< ::Test::Fixed>"] sequence FixedList; ["cpp:type:std::list< ::Test::FixedList>"] sequence FixedListList; sequence FixedListSeq; ["cpp:type:std::list< ::Test::FixedSeq>"] sequence FixedSeqList; struct Variable { string s; BoolList bl; ["cpp:type:std::list"] StringSeq ss; }; sequence VariableSeq; ["cpp:type:std::list< ::Test::Variable>"] sequence VariableList; ["cpp:type:std::list< ::Test::VariableList>"] sequence VariableListList; sequence VariableListSeq; ["cpp:type:std::list< ::Test::VariableSeq>"] sequence VariableSeqList; dictionary StringStringDict; sequence StringStringDictSeq; ["cpp:type:std::list< ::Test::StringStringDict>"] sequence StringStringDictList; ["cpp:type:std::list< ::Test::StringStringDictList>"] sequence StringStringDictListList; sequence StringStringDictListSeq; ["cpp:type:std::list< ::Test::StringStringDictSeq>"] sequence StringStringDictSeqList; enum E { E1, E2, E3 }; sequence ESeq; ["cpp:type:std::list< ::Test::E>"] sequence EList; ["cpp:type:std::list< ::Test::EList>"] sequence EListList; sequence EListSeq; ["cpp:type:std::list< ::Test::ESeq>"] sequence ESeqList; class C {}; sequence CPrxSeq; ["cpp:type:std::list< ::Test::CPrx>"] sequence CPrxList; ["cpp:type:std::list< ::Test::CPrxList>"] sequence CPrxListList; sequence CPrxListSeq; ["cpp:type:std::list< ::Test::CPrxSeq>"] sequence CPrxSeqList; class TestIntf { BoolSeq opBoolArray(["cpp:array"] BoolSeq inSeq, out BoolSeq outSeq); ByteList opByteArray(["cpp:array"] ByteList inSeq, out ByteList outSeq); VariableList opVariableArray(["cpp:array"] VariableList inSeq, out VariableList outSeq); BoolSeq opBoolRange(["cpp:range"] BoolSeq inSeq, out BoolSeq outSeq); ByteList opByteRange(["cpp:range"] ByteList inSeq, out ByteList outSeq); VariableList opVariableRange(["cpp:range"] VariableList inSeq, out VariableList outSeq); BoolSeq opBoolRangeType(["cpp:range:array"] BoolSeq inSeq, out BoolSeq outSeq); ByteList opByteRangeType(["cpp:range:::Test::ByteList"] ByteList inSeq, out ByteList outSeq); VariableList opVariableRangeType(["cpp:range:std::deque< ::Test::Variable>"] VariableList inSeq, out VariableList outSeq); ["cpp:type:std::deque"] BoolSeq opBoolSeq(["cpp:type:std::deque"] BoolSeq inSeq, out ["cpp:type:std::deque"]BoolSeq outSeq); BoolList opBoolList(BoolList inSeq, out BoolList outSeq); ["cpp:type:std::deque< ::Ice::Byte>"] ByteSeq opByteSeq(["cpp:type:std::deque< ::Ice::Byte>"] ByteSeq inSeq, out ["cpp:type:std::deque< ::Ice::Byte>"] ByteSeq outSeq); ByteList opByteList(ByteList inSeq, out ByteList outSeq); ["cpp:type:MyByteSeq"] ByteSeq opMyByteSeq(["cpp:type:MyByteSeq"] ByteSeq inSeq, out ["cpp:type:MyByteSeq"] ByteSeq outSeq); ["cpp:type:std::deque"] StringSeq opStringSeq(["cpp:type:std::deque"] StringSeq inSeq, out ["cpp:type:std::deque"] StringSeq outSeq); StringList opStringList(StringList inSeq, out StringList outSeq); ["cpp:type:std::deque< ::Test::Fixed>"] FixedSeq opFixedSeq(["cpp:type:std::deque< ::Test::Fixed>"] FixedSeq inSeq, out ["cpp:type:std::deque< ::Test::Fixed>"] FixedSeq outSeq); FixedList opFixedList(FixedList inSeq, out FixedList outSeq); ["cpp:type:std::deque< ::Test::Variable>"] VariableSeq opVariableSeq(["cpp:type:std::deque< ::Test::Variable>"] VariableSeq inSeq, out ["cpp:type:std::deque< ::Test::Variable>"] VariableSeq outSeq); VariableList opVariableList(VariableList inSeq, out VariableList outSeq); ["cpp:type:std::deque< ::Test::StringStringDict>"] StringStringDictSeq opStringStringDictSeq(["cpp:type:std::deque< ::Test::StringStringDict>"] StringStringDictSeq inSeq, out ["cpp:type:std::deque< ::Test::StringStringDict>"] StringStringDictSeq outSeq); StringStringDictList opStringStringDictList(StringStringDictList inSeq, out StringStringDictList outSeq); ["cpp:type:std::deque< ::Test::E>"] ESeq opESeq(["cpp:type:std::deque< ::Test::E>"] ESeq inSeq, out ["cpp:type:std::deque< ::Test::E>"] ESeq outSeq); EList opEList(EList inSeq, out EList outSeq); ["cpp:type:std::deque< ::Test::CPrx>"] CPrxSeq opCPrxSeq(["cpp:type:std::deque< ::Test::CPrx>"] CPrxSeq inSeq, out ["cpp:type:std::deque< ::Test::CPrx>"] CPrxSeq outSeq); CPrxList opCPrxList(CPrxList inSeq, out CPrxList outSeq); void shutdown(); }; }; #endif IceE-1.2.0/test/IceE/custom/Client.cpp0000644000076400007640000000303010616161100017237 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include using namespace std; class CustomTestApplication : public TestApplication { public: CustomTestApplication() : TestApplication("custom client") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); #ifdef ICEE_HAS_WSTRING initData.stringConverter = new Test::StringConverterI(); initData.wstringConverter = new Test::WstringConverterI(); #endif loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Test::TestIntfPrx allTests(const Ice::CommunicatorPtr&); Test::TestIntfPrx test = allTests(communicator()); test->shutdown(); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { CustomTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { CustomTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/custom/StringConverterI.cpp0000644000076400007640000000417210616161100021300 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_WSTRING #include #include using namespace std; Ice::Byte* Test::StringConverterI::toUTF8(const char* sourceStart, const char* sourceEnd, Ice::UTF8Buffer& buffer) const { size_t size = static_cast(sourceEnd - sourceStart); Ice::Byte* targetStart = buffer.getMoreBytes(size, 0); Ice::Byte* targetEnd = targetStart + size; unsigned int j = size; for(unsigned int i = 0; i < size; ++i) { targetStart[i] = sourceStart[--j]; } return targetEnd; } void Test::StringConverterI::fromUTF8(const Ice::Byte* sourceStart, const Ice::Byte* sourceEnd, string& target) const { size_t size = static_cast(sourceEnd - sourceStart); target.resize(size); unsigned int j = size; for(unsigned int i = 0; i < size; ++i) { target[i] = sourceStart[--j]; } } Ice::Byte* Test::WstringConverterI::toUTF8(const wchar_t* sourceStart, const wchar_t* sourceEnd, Ice::UTF8Buffer& buffer) const { wstring ws(sourceStart, sourceEnd); string s = IceUtil::wstringToString(ws); size_t size = s.size(); Ice::Byte* targetStart = buffer.getMoreBytes(size, 0); Ice::Byte* targetEnd = targetStart + size; unsigned int j = size; for(unsigned int i = 0; i < size; ++i) { targetStart[i] = static_cast(s[--j]); } return targetEnd; } void Test::WstringConverterI::fromUTF8(const Ice::Byte* sourceStart, const Ice::Byte* sourceEnd, wstring& target) const { size_t size = static_cast(sourceEnd - sourceStart); string s; s.resize(size); unsigned int j = size; for(unsigned int i = 0; i < size; ++i) { s[i] = sourceStart[--j]; } target = IceUtil::stringToWstring(s); } #endif IceE-1.2.0/test/IceE/custom/Collocated.cpp0000644000076400007640000000367610616161100020112 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include using namespace std; class CustomTestApplication : public TestApplication { public: CustomTestApplication() : TestApplication("custom collocated") { } virtual int run(int argc, char* argv[]) { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->setProperty("TestAdapter.Endpoints", "default -p 12010 -t 10000"); //initData.properties->setProperty("Ice.Trace.Network", "5"); //initData.properties->setProperty("Ice.Trace.Protocol", "5"); loadConfig(initData.properties); initData.logger = getLogger(); setCommunicator(Ice::initialize(argc, argv, initData)); Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("TestAdapter"); adapter->add(new TestIntfI(communicator()), communicator()->stringToIdentity("test")); #ifdef ICEE_HAS_WSTRING adapter->add(new Test1::WstringClassI, communicator()->stringToIdentity("wstring1")); adapter->add(new Test2::WstringClassI, communicator()->stringToIdentity("wstring2")); #endif adapter->activate(); Test::TestIntfPrx allTests(const Ice::CommunicatorPtr&); allTests(communicator()); return EXIT_SUCCESS; } }; #ifdef _WIN32_WCE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { CustomTestApplication app; return app.main(hInstance); } #else int main(int argc, char** argv) { CustomTestApplication app; return app.main(argc, argv); } #endif IceE-1.2.0/test/IceE/custom/Wstring.ice0000644000076400007640000000253510576536574017477 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef WSTRING_ICE #define WSTRING_ICE ["cpp:type:wstring"] module Test1 { sequence WstringSeq; dictionary WstringWStringDict; struct WstringStruct { string s; }; exception WstringException { string reason; }; class WstringClass { string opString(string s1, out string s2); WstringStruct opStruct(WstringStruct s1, out WstringStruct s2); void throwExcept(string reason) throws WstringException; string s; }; }; module Test2 { sequence<["cpp:type:wstring"] string> WstringSeq; dictionary<["cpp:type:wstring"] string, ["cpp:type:wstring"] string> WstringWStringDict; ["cpp:type:wstring"] struct WstringStruct { string s; }; ["cpp:type:wstring"] exception WstringException { string reason; }; ["cpp:type:wstring"] class WstringClass { string opString(string s1, out string s2); WstringStruct opStruct(WstringStruct s1, out WstringStruct s2); void throwExcept(string reason) throws WstringException; string s; }; }; #endif IceE-1.2.0/INSTALL.WINCE0000644000076400007640000000700710620544016014132 0ustar matthewmatthew====================================================================== Requirements ====================================================================== Windows version ---------------` Ice-E has been extensively tested on: - Windows Mobile 2003 (ARMV4) - Windows Mobile 5.0 (ARMV4I) - Windows Mobile 6 (ARMV4I) C++ compiler ------------ The following Microsoft Visual C++ compiler is supported: - Microsoft Visual C++ 2005 with Smart Device support Slice-to-Embedded-C++ translator -------------------------------- You will need the Slice-to-Embedded-C++ translator (slice2cppe) and preprocessor (icecpp). You can download a binary distribution from the ZeroC web site, or you can build the Slice-to-Embedded-C++ translator yourself. Binary and source distributions for the supported platforms are available at http://www.zeroc.com/icee/download.html The directory containing the translator executables must be added to your PATH. For example, if the translator distribution is installed in C:\IceE-1.2.0, you must add C:\IceE-1.2.0\bin to your PATH. ====================================================================== Installing and Configuring Microsoft Visual C++ 2005 ====================================================================== - Install Visual Studio 2005, making sure to include the Smart Device support (Language Tools->Visual C++->Smart Device Support) to install the Windows Mobile 2003 SDKs. - If you plan on building for Windows Mobile 5.0 you will have to download the SDKs for Pocket PC and Smartphone separately at the following locations: http://www.microsoft.com/downloads/details.aspx?FamilyID=83a52af2-f524-4ec5-9155-717cbe5d25ed&DisplayLang=en http://www.microsoft.com/downloads/details.aspx?familyid=DC6C00CB-738A-4B97-8910-5CD29AB5F8D9&displaylang=en - If you plan on building for Windows Mobile 6 you will have to download the SDKs for Pocket PC, Pocket PC Phone and Smartphone at the following location: http://www.microsoft.com/downloads/details.aspx?familyid=06111A3A-A651-4745-88EF-3D48091A390B&displaylang=en - Add the location of the slice2cppe compiler to your "Executable files" list in Tools->Options->Projects and Solutions->VC++ Directories. ====================================================================== Compilation and Testing ====================================================================== Using your favorite Zip tool, unzip the Ice-E archive anywhere you like. Open a Visual Studio 2005 command prompt and change the working directory to IceE-1.2.0. For example: > cd C:\IceE-1.2.0 Edit config\Make.rules.mak to establish your build configuration. The comments in the file provide more information. In particular, you must set CPP_COMPILER to VC80 and set EMBEDDED_DEVICE and EMBEDDED_OS to the appropriate target and os settings. Now you're ready to build Ice-E: > nmake /f Makefile.mak In order to run the test suite, you must build all of the tests, and then manually run the server followed by the client. Any failures will be reported. ====================================================================== Installation ====================================================================== Simply run "nmake /f Makefile.mak install". This will install Ice-E in the directory specified by the "prefix" variable in the file config\Make.rules.mak. After installation, make sure to add the include directory to the Visual C++ "Include files" and the lib directory to the "Library files" in the IDE (Tools->Options->Projects and Solutions->VC++ Directories). IceE-1.2.0/Makefile.mak0000755000076400007640000000200710620347541014446 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = . !include $(top_srcdir)/config/Make.rules.mak SUBDIRS = src include test demo slice INSTALL_SUBDIRS = $(install_bindir) $(install_libdir) $(install_includedir) $(install_slicedir) $(install_docdir) install:: createdir createdir:: @if not exist $(prefix) \ @echo "Creating $(prefix)..." & \ mkdir $(prefix) @for %i in ( $(INSTALL_SUBDIRS) ) do \ @if not exist %i \ @echo "Creating %i..." & \ mkdir %i $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 install:: copy ICEE_LICENSE $(prefix) copy LICENSE $(prefix) test:: @python $(top_srcdir)/allTests.py IceE-1.2.0/config/0000755000076400007640000000000010620544016013476 5ustar matthewmatthewIceE-1.2.0/config/Make.rules0000644000076400007640000001406310620544016015433 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** # # Select an installation base directory. The directory will be created # if it does not exist. # prefix = /opt/IceE-$(VERSION) # # Define OPTIMIZE_SIZE as yes if you want to build with minimal size. # Define OPTIMIZE_SPEED as yes if you want to build with maximum speed. # These options are mutually exclusive. # If neither is set, IceE is built with debug information. # #OPTIMIZE_SIZE = yes #OPTIMIZE_SPEED = yes # # Define STATICLIBS as yes if you want to build with static libraries. # Otherwise IceE is built with dynamic libraries. # #STATICLIBS = yes # # Define LP64 as yes or no if you want force a 32 or 64 bit. The default # is platform-dependent # #LP64 := yes # # The values below can be overridden by defining them as environment # variables. For example, if you are using a bourne shell or # compatible, you can override the location of STLport like this: # # export STLPORT_HOME=/usr/local/STLport-4.5 # # # If you want to use STLport, set STLPORT_HOME to the STLport # installation directory. If STLPORT_HOME is undefined or empty, # STLport is not used. # #STLPORT_HOME ?= /opt/STLport # ---------------------------------------------------------------------- # Don't change anything below this line! # ---------------------------------------------------------------------- SHELL = /bin/sh VERSION = 1.2.0 SOVERSION = 12 bindir = $(top_srcdir)/bin libdir = $(top_srcdir)/lib includedir = $(top_srcdir)/include slicedir = $(top_srcdir)/slice install_bindir = $(prefix)/bin install_includedir = $(prefix)/include install_slicedir = $(prefix)/slice install_schemadir = $(prefix)/schema install_docdir = $(prefix)/doc INSTALL = cp -fp INSTALL_PROGRAM = ${INSTALL} INSTALL_LIBRARY = ${INSTALL} INSTALL_DATA = ${INSTALL} OBJEXT = .o UNAME := $(shell uname) ifeq ($(OPTIMIZE_SPEED),yes) OPTIMIZE = yes endif ifeq ($(OPTIMIZE_SIZE),yes) OPTIMIZE = yes endif # # Platform specific definitions # include $(top_srcdir)/config/Make.rules.$(UNAME) ifeq ($(LP64),yes) install_libdir := $(prefix)/lib$(lp64suffix) libsubdir := lib$(lp64suffix) else install_libdir := $(prefix)/lib libsubdir := lib endif ifneq ($(STLPORT_HOME),) STLPORT_FLAGS = -I$(STLPORT_HOME)/include/stlport ifeq ($(OPTIMIZE),yes) STLPORT_LIBS = -L$(STLPORT_HOME)/$(libsubdir) -lstlport_gcc else STLPORT_LIBS = -L$(STLPORT_HOME)/$(libsubdir) -lstlport_gcc_stldebug endif else STLPORT_FLAGS = STLPORT_LIBS = endif CPPFLAGS = -I$(includedir) $(STLPORT_FLAGS) ICECPPFLAGS = -I$(slicedir) SLICE2CPPEFLAGS = $(ICECPPFLAGS) LDFLAGS = $(LDPLATFORMFLAGS) $(CXXFLAGS) -L$(libdir) ifeq ($(FLEX_NOLINE),yes) FLEXFLAGS := -L else FLEXFLAGS := endif ifeq ($(BISON_NOLINE),yes) BISONFLAGS := -dvtl else BISONFLAGS := -dvt endif # # Default functions for shared library names # ifeq ($(mklibfilename),) mklibfilename = $(if $(2),lib$(1).so.$(2),lib$(1).so) endif ifeq ($(mksoname),) mksoname = $(if $(2),lib$(1).so.$(2),lib$(1).so) endif ifeq ($(mklibname),) ifeq ($(STATICLIBS),yes) mklibname = lib$(1).a else mklibname = lib$(1).so endif endif ifndef mklibtargets ifeq ($(STATICLIBS),yes) mklibtargets = $(3) else mklibtargets = $(1) $(2) $(3) endif endif ifeq ($(mkshlib),) $(error You need to define mkshlib in Make.rules.$(UNAME)) endif ifeq ($(mklib),) $(error You need to define mklib in Make.rules.$(UNAME)) endif ifeq ($(installlib),) ifeq ($(STATICLIBS),yes) installlib = $(INSTALL) $(2)/$(5) $(1); \ chmod a+rx $(1)/$(5) else installlib = $(INSTALL) $(2)/$(3) $(1); \ rm -f $(1)/$(4); ln -s $(3) $(1)/$(4); \ rm -f $(1)/$(5); ln -s $(4) $(1)/$(5); \ chmod a+rx $(1)/$(3) endif endif ifeq ($(installdata),) installdata = $(INSTALL_DATA) $(1) $(2); \ chmod a+r $(2)/$(notdir $(1)) endif ifeq ($(installprogram),) installprogram = $(INSTALL_PROGRAM) $(1) $(2); \ chmod a+rx $(2)/$(notdir $(1)) endif ifeq ($(mkdir),) mkdir = mkdir $(1) ; \ chmod a+rx $(1) endif SLICE2CPPE = slice2cppe EVERYTHING = all depend clean install .SUFFIXES: .SUFFIXES: .cpp .c .o .cpp.o: $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) $< $(HDIR)/%F.h: $(SDIR)/%F.ice rm -f $(HDIR)/$(*F)F.h $(*F)F.cpp $(SLICE2CPPE) $(SLICE2CPPEFLAGS) $< mv $(*F)F.h $(HDIR) rm -f $(*F)F.cpp $(HDIR)/%.h %.cpp: $(SDIR)/%.ice rm -f $(HDIR)/$(*F).h $(*F).cpp $(SLICE2CPPE) $(SLICE2CPPEFLAGS) $< mv $(*F).h $(HDIR) %.h %.cpp: %.ice rm -f $(*F).h $(*F).cpp $(SLICE2CPPE) $(SLICE2CPPEFLAGS) $(*F).ice #%.h %.cpp: %.y # rm -f $(*F).h $(*F).cpp # bison $(BISONFLAGS) $< # mv $(*F).tab.c $(*F).cpp # mv $(*F).tab.h $(*F).h # rm -f $(*F).output #%.cpp: %.l # flex $(FLEXFLAGS) $< # rm -f $@ # echo '#include ' > $@ # cat lex.yy.c >> $@ # rm -f lex.yy.c all:: $(SRCS) $(TARGETS) depend:: $(SRCS) $(patsubst $(SDIR)/%.ice,$(HDIR)/%.h,$(wildcard $(SDIR)/*F.ice)) $(SLICE_SRCS) -rm -f .depend if test -n "$(SRCS)" ; then \ $(CXX) -DMAKEDEPEND -M $(CXXFLAGS) $(CPPFLAGS) $(SRCS) | \ $(top_srcdir)/config/makedepend.py >> .depend; \ fi if test -n "$(SLICE_SRCS)" ; then \ $(SLICE2CPPE) --depend $(SLICE2CPPEFLAGS) $(SLICE_SRCS) | \ $(top_srcdir)/config/makedepend.py >> .depend; \ fi clean:: -rm -f $(TARGETS) -rm -f core *.o *.bak ifneq ($(SLICE_SRCS),) clean:: rm -f $(addsuffix .cpp, $(basename $(notdir $(SLICE_SRCS)))) rm -f $(addsuffix .h, $(basename $(notdir $(SLICE_SRCS)))) endif ifneq ($(HDIR),) clean:: rm -f $(addprefix $(HDIR), $(addsuffix .h, $(basename $(subst $(SDIR),, \ $(filter $(SDIR)/%.ice, $(SLICE_SRCS)))))) endif ifneq ($(TEMPLATE_REPOSITORY),) clean:: rm -fr $(TEMPLATE_REPOSITORY) endif install:: IceE-1.2.0/config/Make.rules.Linux0000644000076400007640000000520610620152550016526 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** # # This file is included by Make.rules when uname is Linux. # USE_SPARC_ASM = irrelevant MACHINE = $(shell uname -m) # # Default compiler is c++ (aka g++). # ifeq ($(CXX),) CXX = c++ endif ifeq ($(CXX),g++) CXX = c++ endif ifeq ($(AR),) AR = ar endif ifeq ($(MACHINE),x86_64) # # Default build on x86_64 is 64-bit. # ifeq ($(LP64),) LP64 = yes endif endif ifeq ($(MACHINE),sparc64) # # We are an ultra, at least, and so have the atomic instructions # USE_SPARC_ASM = yes CXXARCHFLAGS = -mcpu=ultrasparc -pipe -Wno-deprecated -DUSE_SPARC_ASM endif ifeq ($(MACHINE),sparc) # # We are a sun4m or sun4c # On sun4m, there is a bug in some CPU/kernel/gcc configurations which # prevents us from using '-mcpu=v8'. # USE_SPARC_ASM = no CXXARCHFLAGS = -mtune=v8 -pipe -Wno-deprecated -DICE_USE_MUTEX_SHARED endif ifeq ($(MACHINE),x86_64) ifeq ($(LP64),yes) CXXARCHFLAGS = -m64 else CXXARCHFLAGS = -m32 endif lp64suffix = 64 endif CXXFLAGS = $(CXXARCHFLAGS) -ftemplate-depth-128 -Wall -D_REENTRANT ifeq ($(STATICLIBS),) CXXFLAGS += -fPIC endif OPT_FLAGS = ifeq ($(OPTIMIZE_SPEED),yes) OPT_FLAGS = -O3 endif ifeq ($(OPTIMIZE_SIZE),yes) # # -Os does not work well with GCC 3.4.6 on x86_64 # ifeq ($(LP64),yes) OPT_FLAGS = -O2 else OPT_FLAGS = -Os endif endif ifeq ($(OPTIMIZE),yes) CXXFLAGS += $(OPT_FLAGS) -DNDEBUG else CXXFLAGS += -g endif ifeq ($(USE_SPARC_ASM),yes) CFLAGS = $(OPT_FLAGS) -mcpu=ultrasparc -pipe -DNDEBUG -DUSE_SPARC_ASM ifeq ($(STATICLIBS),) CFLAGS += -fPIC endif endif ifeq ($(USE_SPARC_ASM),no) CFLAGS = $(OPT_FLAGS) -mcpu=v8 -pipe -DNDEBUG -DICE_USE_MUTEX_SHARED ifeq ($(STATICLIBS),) CFLAGS += -fPIC endif endif # # C++ run-time libraries, necessary for linking some shared libraries. # CXXLIBS = mkshlib = $(CXX) -shared $(LDFLAGS) -o $(1) -Wl,-h,$(2) $(3) $(4) -lpthread mklib = $(AR) cr $(1) $(2) LDPLATFORMFLAGS = -Wl,--enable-new-dtags -Wl,-rpath,$(install_libdir) BASELIBS = $(STLPORT_LIBS) -lpthread LIBS = -lIceE $(BASELIBS) MINLIBS = -lIceEC $(BASELIBS) TESTLIBS = -lTestCommon $(LIBS) ICEUTIL_OS_LIBS = ICE_OS_LIBS = -ldl PLATFORM_HAS_READLINE = yes export LD_LIBRARY_PATH := $(libdir):$(LD_LIBRARY_PATH) IceE-1.2.0/config/TestUtil.py0000644000076400007640000002043210614412013015620 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** # # Set blocking to 1 in case you want to run the tests in # blocking mode. # blocking = 0 #blocking = 1 # # If you don't set "host" below, then the IceE library will try to find # out the IP address of this host. For the IceE test suite, it's best # to set the IP address explicitly to 127.0.0.1. This avoid problems # with incorrect DNS or hostname setups. # host = "127.0.0.1" # # Don't change anything below this line! # import sys, os, re, getopt def usage(): print "usage: " + sys.argv[0] + " --host host --blocking" sys.exit(2) try: opts, args = getopt.getopt(sys.argv[1:], "", ["host=", "blocking"]) except getopt.GetoptError: usage() for o, a in opts: if o == "--blocking": blocking = 1 if o == "--host": host = a def getIceVersion(): config = open(os.path.join(toplevel, "include", "IceE", "Config.h"), "r") return re.search("ICE_STRING_VERSION \"([0-9\.]*)\"", config.read()).group(1) def getIceSoVersion(): config = open(os.path.join(toplevel, "include", "IceE", "Config.h"), "r") intVersion = int(re.search("ICE_INT_VERSION ([0-9]*)", config.read()).group(1)) majorVersion = intVersion / 10000 minorVersion = intVersion / 100 - 100 * majorVersion return '%d' % (majorVersion * 10 + minorVersion) def isCygwin(): # The substring on sys.platform is required because some cygwin # versions return variations like "cygwin_nt-4.01". if sys.platform[:6] == "cygwin": return 1 else: return 0 def isWin32(): if sys.platform == "win32" or isCygwin(): return 1 else: return 0 def isWin9x(): if isWin32(): if os.environ.has_key("OS") and os.environ["OS"] == "Windows_NT": return 0 return 1 else: return 0 def isSolaris(): if sys.platform == "sunos5": return 1 else: return 0 def isHpUx(): if sys.platform == "hp-ux11": return 1 else: return 0 def isAIX(): if sys.platform in ['aix4', 'aix5']: return 1 else: return 0 def isDarwin(): if sys.platform == "darwin": return 1 else: return 0 serverPids = [] def killServers(): global serverPids if isCygwin(): print "killServers(): not implemented for cygwin python." return for pid in serverPids: if isWin32(): try: import win32api handle = win32api.OpenProcess(1, 0, pid) win32api.TerminateProcess(handle, 0) except: pass # Ignore errors, such as non-existing processes. else: try: os.kill(pid, 9) except: pass # Ignore errors, such as non-existing processes. serverPids = [] def getServerPid(serverPipe): output = serverPipe.readline().strip() if not output: print "failed!" killServers() sys.exit(1) serverPids.append(int(output)) def getAdapterReady(serverPipe): output = serverPipe.readline().strip() if not output: print "failed!" killServers() sys.exit(1) def waitServiceReady(pipe, token): while 1: output = pipe.readline().strip() if not output: print "failed!" sys.exit(1) if output == token + " ready": break def printOutputFromPipe(pipe): while 1: c = pipe.read(1) if c == "": break os.write(1, c) for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" if isWin32(): if isCygwin(): os.environ["PATH"] = os.path.join(toplevel, "bin") + ":" + os.getenv("PATH", "") else: os.environ["PATH"] = os.path.join(toplevel, "bin") + ";" + os.getenv("PATH", "") elif isHpUx(): os.environ["SHLIB_PATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("SHLIB_PATH", "") elif isDarwin(): os.environ["DYLD_LIBRARY_PATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("DYLD_LIBRRARY_PATH", "") elif isAIX(): os.environ["LIBPATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LIBPATH", "") else: os.environ["LD_LIBRARY_PATH"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LD_LIBRARY_PATH", "") os.environ["LD_LIBRARY_PATH_64"] = os.path.join(toplevel, "lib") + ":" + os.getenv("LD_LIBRARY_PATH_64", "") clientProtocol = "" serverProtocol = "" clientServerProtocol = "" if blocking: clientProtocol += " --Ice.Blocking" serverProtocol += " --Ice.Blocking" clientServerProtocol += " --Ice.Blocking" if host != "": defaultHost = " --Ice.Default.Host=" + host else: defaultHost = "" commonClientOptions = " --Ice.NullHandleAbort --Ice.Warn.Connections" commonServerOptions = " --Ice.PrintProcessId --Ice.PrintAdapterReady --Ice.NullHandleAbort" + \ " --Ice.Warn.Connections" clientOptions = clientProtocol + defaultHost + commonClientOptions serverOptions = serverProtocol + defaultHost + commonServerOptions clientServerOptions = clientServerProtocol + defaultHost + commonServerOptions collocatedOptions = clientServerProtocol + defaultHost def clientServerTestWithOptionsAndNames(name, additionalServerOptions, additionalClientOptions, \ serverName, clientName): testdir = os.path.join(toplevel, "test", name) server = os.path.join(testdir, serverName) client = os.path.join(testdir, clientName) print "starting " + serverName + "...", serverPipe = os.popen(server + serverOptions + additionalServerOptions + " 2>&1") getServerPid(serverPipe) getAdapterReady(serverPipe) print "ok" print "starting " + clientName + "...", clientPipe = os.popen(client + clientOptions + additionalClientOptions + " 2>&1") print "ok" printOutputFromPipe(clientPipe) clientStatus = clientPipe.close() serverStatus = serverPipe.close() if clientStatus or serverStatus: killServers() sys.exit(1) def clientServerTestWithOptions(name, additionalServerOptions, additionalClientOptions): clientServerTestWithOptionsAndNames(name, additionalServerOptions, additionalClientOptions, "server", "client") def clientServerTest(name): clientServerTestWithOptions(name, "", "") def mixedClientServerTestWithOptions(name, additionalServerOptions, additionalClientOptions): testdir = os.path.join(toplevel, "test", name) server = os.path.join(testdir, "server") client = os.path.join(testdir, "client") print "starting server...", serverPipe = os.popen(server + clientServerOptions + additionalServerOptions + " 2>&1") getServerPid(serverPipe) getAdapterReady(serverPipe) print "ok" print "starting client...", clientPipe = os.popen(client + clientServerOptions + additionalClientOptions + " 2>&1") getServerPid(clientPipe) getAdapterReady(clientPipe) print "ok" printOutputFromPipe(clientPipe) clientStatus = clientPipe.close() serverStatus = serverPipe.close() if clientStatus or serverStatus: killServers() sys.exit(1) def mixedClientServerTest(name): mixedClientServerTestWithOptions(name, "", "") def collocatedTestWithOptions(name, additionalOptions): testdir = os.path.join(toplevel, "test", name) collocated = os.path.join(testdir, "collocated") print "starting collocated...", collocatedPipe = os.popen(collocated + collocatedOptions + additionalOptions + " 2>&1") print "ok" printOutputFromPipe(collocatedPipe) collocatedStatus = collocatedPipe.close() if collocatedStatus: killServers() sys.exit(1) def collocatedTest(name): collocatedTestWithOptions(name, "") def cleanDbDir(path): files = os.listdir(path) for filename in files: if filename != "CVS" and filename != ".dummy": fullpath = os.path.join(path, filename); os.remove(fullpath) IceE-1.2.0/config/Make.rules.msvc0000755000076400007640000001274610620352135016412 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** # # This file is included by Make.rules.mak when using Microsoft VC++ # # # Verify valid embedded settings # !if "$(EMBEDDED_DEVICE)" != "" !if "$(EMBEDDED_DEVICE)" != "PocketPC" & "$(EMBEDDED_DEVICE)" != "Smartphone" !error Invalid setting for EMBEDDED_DEVICE: "$(EMBEDDED_DEVICE)" !elseif "$(EMBEDDED_OS)" != "WindowsMobile2003" & "$(EMBEDDED_OS)" != "WindowsMobile5.0" & "$(EMBEDDED_OS)" != "WindowsMobile6" !error Invalid setting for EMBEDDED_OS: "$(EMBEDDED_OS)" !endif !endif !if "$(EMBEDDED_DEVICE)" != "" CXX = "$(VSINSTALLDIR)\VC\ce\bin\x86_arm\cl.exe" CC = "$(VSINSTALLDIR)\VC\ce\bin\x86_arm\cl.exe" LINK = "$(VSINSTALLDIR)\VC\ce\bin\x86_arm\link.exe" AR = "$(VSINSTALLDIR)\VC\ce\bin\x86_arm\lib.exe" RC = rc.exe /i "$(VSINSTALLDIR)\VC\ce\atlmfc\include" !if "$(EMBEDDED_OS)" == "WindowsMobile2003" RC = $(RC) /d "UNDER_CE=0x420" /d "_WIN32_WCE=0x420" !elseif "$(EMBEDDED_OS)" == "WindowsMobile5.0" RC = $(RC) /d "UNDER_CE=0x501" /d "_WIN32_WCE=0x501" !else RC = $(RC) /d "UNDER_CE=0x502" /d "_WIN32_WCE=0x502" !endif !else CXX = cl.exe CC = cl.exe LINK = link.exe AR = lib.exe RC = rc.exe !endif CPPFLAGS = -nologo -W3 -GR -EHsc -FD -D_CONSOLE # # Add options for WinCE support # !if "$(EMBEDDED_DEVICE)" != "" !if "$(EMBEDDED_OS)" == "WindowsMobile2003" !if "$(EMBEDDED_DEVICE)" == "PocketPC" SDK_DIR = $(VSINSTALLDIR)\SmartDevices\SDK\PocketPC2003 !else SDK_DIR = $(VSINSTALLDIR)\SmartDevices\SDK\Smartphone2003 !endif INCLUDE_SUBDIR = LIB_SUBDIR = \ArmV4 CPPFLAGS = /D "_WIN32_WCE=0x420" /D "UNDER_CE=0x420" $(CPPFLAGS) LDFLAGS = /MACHINE:ARM !elseif "$(EMBEDDED_OS)" == "WindowsMobile5.0" !if "$(EMBEDDED_DEVICE)" == "PocketPC" SDK_DIR = C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK !else SDK_DIR = C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK !endif INCLUDE_SUBDIR = \ArmV4i LIB_SUBDIR = \ArmV4i CPPFLAGS = /D "_WIN32_WCE=0x501" /D "UNDER_CE=0x501" $(CPPFLAGS) LDFLAGS = /MACHINE:THUMB !else !if "$(EMBEDDED_DEVICE)" == "PocketPC" SDK_DIR = C:\Program Files\Windows Mobile 6 SDK\PocketPC !else SDK_DIR = C:\Program Files\Windows Mobile 6 SDK\Smartphone !endif INCLUDE_SUBDIR = \ArmV4i LIB_SUBDIR = \ArmV4i CPPFLAGS = /D "_WIN32_WCE=0x502" /D "UNDER_CE=0x502" $(CPPFLAGS) LDFLAGS = /MACHINE:THUMB !endif CPPFLAGS = -QRarch4 -I"$(VSINSTALLDIR)\VC\ce\Include" -I"$(SDK_DIR)\Include$(INCLUDE_SUBDIR)" -fp:fast -TP $(CPPFLAGS) /D "ARM" /D "_ARM_" /D "ARMV4" /D "UNICODE" /D "_UNICODE" !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPPFLAGS = $(CPPFLAGS) -GS- !endif LDFLAGS = /LIBPATH:"$(VSINSTALLDIR)\VC\ce\Lib$(LIB_SUBDIR)" /LIBPATH:"$(SDK_DIR)\Lib$(LIB_SUBDIR)" -nodefaultlib:"kernel32.lib" -nodefaultlib:"oldnames.lib" /STACK:65536,4096 $(LDFLAGS) !if "$(EMBEDDED_DEVICE)" == "PocketPC" CPPFLAGS = $(CPPFLAGS) /D "WIN32_PLATFORM_PSPC" !elseif "$(EMBEDDED_DEVICE)" == "Smartphone" CPPFLAGS = $(CPPFLAGS) /D "WIN32_PLATFORM_WFSP" !endif !endif # # Add options for static library support # !if "$(STATICLIBS)" == "yes" CPPFLAGS = $(CPPFLAGS) -DICEE_STATIC_LIBS !endif # # Add release vs debug options # !if "$(OPTIMIZE_SPEED)" == "yes" # Optimize Speed !if "$(EMBEDDED_DEVICE)" != "" & "$(STATICLIBS)" == "yes" CPPFLAGS = $(CPPFLAGS) -MT !else CPPFLAGS = $(CPPFLAGS) -MD !endif CPPFLAGS = $(CPPFLAGS) -O2 -DNDEBUG -GL !elseif "$(OPTIMIZE_SIZE)" == "yes" # Optimize size !if "$(EMBEDDED_DEVICE)" != "" & "$(STATICLIBS)" == "yes" CPPFLAGS = $(CPPFLAGS) -MT !else CPPFLAGS = $(CPPFLAGS) -MD !endif CPPFLAGS = $(CPPFLAGS) -O1 -DNDEBUG -GL -GF !else # Debug !if "$(EMBEDDED_DEVICE)" != "" & "$(STATICLIBS)" == "yes" CPPFLAGS = $(CPPFLAGS) -MTd !else CPPFLAGS = $(CPPFLAGS) -MDd !endif CPPFLAGS = $(CPPFLAGS) -Zi -Gm -Od -D_DEBUG !if "$(EMBEDDED_DEVICE)" == "" CPPFLAGS = $(CPPFLAGS) -RTC1 !endif !endif # # Linker flags # LDFLAGS = $(LDFLAGS) /LIBPATH:"$(libdir)" /nologo !if "$(EMBEDDED_DEVICE)" != "" LDFLAGS = $(LDFLAGS) /subsystem:windowsce -manifest:no !endif !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" LDFLAGS = $(LDFLAGS) /debug /fixed:no /incremental:yes !else LDFLAGS = $(LDFLAGS) /OPT:REF /incremental:no /OPT:NOWIN98 /LTCG !endif ARFLAGS = /nologo !if "$(OPTIMIZE_SPEED)" == "yes" | "$(OPTIMIZE_SIZE)" == "yes" ARFLAGS = $(ARFLAGS) /LTCG !endif # # MFC specific flags # !if "$(EMBEDDED_DEVICE)" != "" MFC_CPPFLAGS = -I"$(VSINSTALLDIR)\VC\ce\atlmfc\include" MFC_LDFLAGS = /LIBPATH:"$(VSINSTALLDIR)\VC\ce\atlmfc\lib$(LIB_SUBDIR)" !else MFC_LDFLAGS = /subsystem:windows !endif !if "$(STATICLIBS)" == "yes" LIBSUFFIX = _static$(LIBSUFFIX) !endif !if "$(EMBEDDED_DEVICE)" != "" !if "$(EMBEDDED_OS)" == "WindowsMobile2003" BASELIBS = coredll.lib ccrtrtti.lib ws2.lib !else BASELIBS = coredll.lib corelibc.lib ws2.lib !endif !if "$(STATICLIBS)" == "yes" BASELIBS = $(BASELIBS) !endif !else BASELIBS = rpcrt4.lib advapi32.lib ws2_32.lib !endif LIBS = icee$(LIBSUFFIX).lib MINLIBS = iceec$(LIBSUFFIX).lib !if "$(STATICLIBS)" == "yes" | "$(EMBEDDED_DEVICE)" != "" LIBS = $(LIBS) $(BASELIBS) MINLIBS = $(MINLIBS) $(BASELIBS) !endif TESTLIBS = testcommon$(LIBSUFFIX).lib $(LIBS) IceE-1.2.0/config/Make.rules.mak0000755000076400007640000000670710620352135016212 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** # # Select an installation base directory. The directory will be created # if it does not exist. # prefix = C:\IceE-$(VERSION) # # Define OPTIMIZE_SIZE as yes if you want to build with minimal size. # Define OPTIMIZE_SPEED as yes if you want to build with maximum speed. # These options are mutually exclusive. # If neither is set, IceE is built with debug information. # #OPTIMIZE_SIZE = yes #OPTIMIZE_SPEED = yes # # Specify your C++ compiler. Supported values are # VC80 or VC80_EXPRESS # !if "$(CPP_COMPILER)" == "" CPP_COMPILER = VC80 !endif # # Define STATICLIBS as yes if you want to build with static libraries. # Otherwise IceE is built with dynamic libraries. # #STATICLIBS = yes # # If building for an Windows CE/Mobile embedded device with VS2005 set # the following two settting to the desired device and OS. # # Supported options for EMBEDDED_OS are "WindowsMobile2003", # "WindowsMobile5.0" and "WindowsMobile6". # # Supported options for EMBEDDED_DEVICE are "PocketPC" and "Smartphone" # #EMBEDDED_OS = WindowsMobile2003 #EMBEDDED_DEVICE = PocketPC # # For VC80 and VC80 Express it is necessary to set the location of the # manifest tool. This must be the 6.x version of mt.exe, not the 5.x # version! # # For VC80 Express mt.exe 6.x is provided by the Windows Platform SDK. # It is necessary to set the location of the Platform SDK through the # PDK_HOME environment variable (see INSTALL.WINDOWS for details). # !if "$(CPP_COMPILER)" == "VC80" MT = "$(VS80COMNTOOLS)bin\mt.exe" !elseif "$(CPP_COMPILER)" == "VC80_EXPRESS" MT = "$(PDK_HOME)\bin\mt.exe" !endif # ---------------------------------------------------------------------- # Don't change anything below this line! # ---------------------------------------------------------------------- SHELL = /bin/sh VERSION = 1.2.0 SOVERSION = 12 bindir = $(top_srcdir)\bin libdir = $(top_srcdir)\lib includedir = $(top_srcdir)\include slicedir = $(top_srcdir)\slice install_bindir = $(prefix)\bin install_includedir = $(prefix)\include install_slicedir = $(prefix)\slice install_schemadir = $(prefix)\schema install_docdir = $(prefix)\doc INSTALL = copy INSTALL_PROGRAM = $(INSTALL) INSTALL_LIBRARY = $(INSTALL) INSTALL_DATA = $(INSTALL) OBJEXT = .obj !include $(top_srcdir)/config/Make.rules.msvc install_libdir = $(prefix)\lib libsubdir = lib !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" LIBSUFFIX = $(LIBSUFFIX)d !endif CPPFLAGS = $(CPPFLAGS) -I$(includedir) ICECPPFLAGS = -I$(slicedir) SLICE2CPPEFLAGS = $(ICECPPFLAGS) LDFLAGS = $(LDFLAGS) $(LDPLATFORMFLAGS) $(CXXFLAGS) SLICE2CPP = slice2cppe.exe EVERYTHING = all clean install .SUFFIXES: .SUFFIXES: .ice .cpp .c .obj .cpp.obj:: $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) $< .c.obj: $(CC) /c $(CPPFLAGS) $(CFLAGS) $< {$(SDIR)\}.ice{$(HDIR)}.h: del /q $(HDIR)\$(*F).h $(*F).cpp $(SLICE2CPP) $(SLICE2CPPEFLAGS) $< move $(*F).h $(HDIR) .ice.cpp: del /q $(*F).h $(*F).cpp $(SLICE2CPP) $(SLICE2CPPEFLAGS) $(*F).ice all:: $(SRCS) $(TARGETS) !if "$(TARGETS)" != "" clean:: -del /q $(TARGETS) !endif clean:: -del /q *.obj *.bak *.ilk *.exp *.pdb install:: IceE-1.2.0/config/makedepend.py0000755000076400007640000000147710576536574016205 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import fileinput, re, string previous = "" for line in fileinput.input(): line = line.strip() if re.compile("^#").search(line, 0): continue; line = string.replace(line, ".o:", "$(OBJEXT):") if(previous): line = previous + " " + line if(line[-1] == "\\"): previous = line[:-2] continue else: previous = "" for s in line.split(): if(s[0] != "/"): print s, print IceE-1.2.0/config/Make.rules.Darwin0000644000076400007640000000245610576536574016705 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** # # This file is included by Make.rules when uname is Darwin. # CXX = c++ CXXFLAGS = -ftemplate-depth-128 -Wall -D_REENTRANT ifeq ($(OPTIMIZE),yes) CXXFLAGS := -O2 -DNDEBUG $(CXXFLAGS) else CXXFLAGS := -g $(CXXFLAGS) endif # # C++ run-time libraries, necessary for linking some shared libraries. # CXXLIBS = shlibldflags = $(CXXFLAGS) -L$(libdir) mklibfilename = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib) mksoname = $(if $(2),lib$(1).$(2).dylib,lib$(1).dylib) mklibname = lib$(1).dylib mkshlib = $(CXX) -single_module -dynamiclib $(shlibldflags) -o $(1) -install_name $(install_libdir)/$(2) $(3) $(4) mklib = ar cr $(1) $(2) BASELIBS = -lpthread LIBS = -lIceE $(BASELIBS) MINLIBS = -lIceEC $(BASELIBS) TESTLIBS = -lTestCommon $(LIBS) ICEUTIL_OS_LIBS = -lpthread ICE_OS_LIBS = -ldl PLATFORM_HAS_READLINE := no export DYLD_LIBRARY_PATH := $(libdir):$(DYLD_LIBRARY_PATH) IceE-1.2.0/CHANGES0000644000076400007640000002225510616637156013247 0ustar matthewmatthewChanges since version 1.1.0 --------------------------- - Added ice_secure/ice_isSecure, ice_datagram/ice_isDatagram, ice_batchDatagram/ice_isBatchDatagram proxy methods. - Added Communicator::propertyToProxy() which creates a proxy from a set of properties. This operation allows you to set various local proxy settings, such as the locator, which cannot be set using stringToProxy(). - Trailing characters past the adapter id in a stringified proxy will now raise a ProxyParseException. - Added ice_getAdapterId/ice_adapterId proxy methods. - Removed most specializations of the Ice::ProtocolException local exception to reduce code size. Only the following specializations were kept: Ice::CloseConnectionException Ice::ForcedCloseConnectionException Ice::MarshalException Ice::MemoryLimitException The reason for the protocol error is now provided in the 'reason' member of Ice::ProtocolException. - Attempts to change the attributes of a fixed proxy now result in a FixedProxyException rather than just ignoring the change request and returning the same proxy. Also, attempts to marshal a fixed proxy now result in a FixedProxyException rather than a MarshalException. - Removed default context support. - Removed support for local interfaces in Slice. - Added what() member to IceUtil::Exception, so a single catch handler can be used for Ice exceptions: try { // Call something that may throw an Ice exception } catch(const ::std::exception& ex) { cerr << ex.what() << endl; // Works for any ::std::exception, // including Ice exceptions } what() is implemented in terms of toString(), so overriding toString() also changes the string returned by what(). - Message batches are now automatically flushed when the total size of the batch reaches the message size maximum. This feature can be controlled using the Ice.BatchAutoFlush property, which is on by default. - Added destroy() operation to the ObjectAdapter interface. This operation must be called in order to reclaim the adapter's resources and be able to recreate a new adapter with the same name. Destroying a communicator automatically calls destroy on all of its adapters. - If a proxy does not specify a hostname (via -h HOST), the client only attempts to connect to the loopback interface (127.0.0.1). - All Ice exceptions now derive from std::exception. - Fixed a bug where proxy operator< could return an incorrect result for proxies of different types (e.g., direct vs. indirect proxies). - For object adapters without endpoints, Ice.Trace.Network >= 2 now prints a trace message. - The Slice keyword 'nonmutating' is now deprecated; 'idempotent' should be used instead. A new metadata directive is supported for backward-compatibility (see below). - New Slice metadata for operations: - ["cpp:const"] generates a const member function on the corresponding servant base class. - ["nonmutating"] provides backward compatibility for idempotent operations that were previously declared using the deprecated 'nonmutating' keyword. You can replace the 'nonmutating' keyword with '["nonmutating"] idempotent' to maintain compatibility with objects implemented using earlier versions. - Added new overload of Ice::initialize() that accepts a StringSeq as the first argument. - The ice_name() member function of exceptions derived from Ice::Exception (and, hence, IceUtil::Exception) now returns a non-const string instead of a const string: const ::std::string ice_name() const; // Old signature ::std::string ice_name() const; // New signature - For non-abstract Slice classes, the C++ code generated now adds a protected destructor. This prevents accidental allocation of class instances on the stack or as static variables. For the implementation of abstract Slice classes and for servant classes applications can do the same thing and add a protected destructor to prevent non-heap allocation. - Removed getDefaultProperties() functions, and the global default properties. If you need global properties, you can easily create your own global variable. - The signature of createProperties(argc, argv) is now: PropertiesPtr createProperties(int* argc, char* argv[], const PropertiesPtr& defaults = 0, const StringConverterPtr& conv = 0); where "defaults" represents an optional set of default properties used to initialize the new Properties object. Ice properties defined on the command line and properties defined in a configuration file override these default properties. - Moved identityToString and stringToIdentity to the Communicator interface. - Added operators <=, > and >= for slice classes, proxies and structures. - Fixed an assert that could occur when a proxy received over the wire contained an unknown endpoint. - Added new operation Communicator::createObjectAdapterWithRouter(), which creates a routed object adapter. An object adapter may now be associated with at most one router, which is defined using this operation or by setting the .Router property. Also as a result of this change, the ObjectAdapter::addRouter() and ObjectAdapter::removeRouter() operations have been removed. - Added communicator initialize functions that take an argument of type Ice::InitializationData. This structure contains communicator members that may only be set during communicator initialization. Currently included are Properties, Logger and string converters. The initializeWithXXX functions have been deprecated and the setLogger() operation has been removed. - Added ability to configure user-defined string and wstring converters that are used during marshalling/unmarshalling to convert between UTF8 (as required by the Ice protocol) and the user's character set. - Added support for new Slice metadata ("cpp:type:wstring") that generates code to use std::wstring instead of std::string. See the Ice manual for more details. - Added requestId to Current. Changes since version 1.0.0 --------------------------- - Added support for the Visual C++ 2005 compiler. - Removed the Ice.Warn.Leaks property. - If several proxies share the same connection, and an operation call on one of the proxies causes a failure and the shared connection to be closed, then subsequent calls on the other proxies will try to establish a new connection instead of throwing an exception, even if retries are disabled. - Added blocking client side concurrency model. The use of this model is controlled by the Ice.Blocking property. - If a proxy is not configured with the -h parameter, Ice will now attempt to connect using all local interfaces. The loopback interface (127.0.0.1) will only be tried if it is the only local interface present. - Fixed the marshalling of doubles on ARM/Linux. - Added the ability to specify alternate mappings for Slice sequences other than std::vector. Please see the README file for more information. - Fixed a bug in slice2cpp that caused one-shot constructors for classes to incorrectly initialize base classes for class hierarchies three or more levels deep. - Fixed a bug in the Slice parser that caused problems if an included file contained white space in the file name. - Fixed a deadlock during shutdown that could happen with bi-directional connections. - Removed ice_default() method from proxies. - Connection::close(false) (i.e., graceful connection shutdown) now waits until all outstanding requests have completed. - Ice will now listen on all local interfaces if no -h parameter is present in the endpoint configuration and no default host has been set. It will also listen to all interfaces if the -h parameter is set to 0.0.0.0. In such configurations the endpoints published in proxies will not contain the loopback interface (127.0.0.1) unless it is the only local interface present. - Added object adapter property .ReplicaGroupId which allows adapters to be replicated. See the IceGrid chapter in the manual for more information. - slice2cppe now provides the --add-header option. It adds a #include directive for the specified header at the beginning of the generated source file. For example: slice2cppe --add-header=precompiled.h x.ice adds "#include " to the beginning of x.cpp (before any other include directives). You can specify an optional guard, for example: slice2cppe --add-header=precompiled.h,__PRECOMPILED_H__ x.ice With this, the beginning of x.cpp contains: #ifndef __PRECOMPILED_H__ #define __PRECOMPILED_H__ #include #endif You can repeat the --add-header option to include several headers in the generated source. - Ice::Communicator::createObjectAdapter() throws Ice::AlreadyRegisteredException if it is called with the name of an object adapter that already exists. - Added Communicator::isShutdown() and ObjectAdapter::isDeactivated() to allow applications to determine whether a communicator has been shutdown or an object adapter has been deactivated, respectively. - Ice-E now uses -Os rather than -O3 for optimized GCC builds. - EVC++ release builds now use "Optimize Size". IceE-1.2.0/lib/0000755000076400007640000000000010620544016012777 5ustar matthewmatthewIceE-1.2.0/LICENSE0000644000076400007640000004313710524134276013254 0ustar matthewmatthew GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. IceE-1.2.0/include/0000755000076400007640000000000010620543770013662 5ustar matthewmatthewIceE-1.2.0/include/Makefile.mak0000755000076400007640000000106110600254657016073 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. !include $(top_srcdir)/config/Make.rules.mak SUBDIRS = IceE $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/include/Makefile0000644000076400007640000000105210576536574015336 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. include $(top_srcdir)/config/Make.rules SUBDIRS = IceE $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done IceE-1.2.0/include/IceE/0000755000076400007640000000000010620543774014473 5ustar matthewmatthewIceE-1.2.0/include/IceE/DisableWarnings.h0000644000076400007640000000204510576536574017733 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_DISABLEWARNINGS_H #define ICEE_DISABLEWARNINGS_H // // This header file disables various annoying compiler warnings that // we don't want. // // IMPORTANT: Do *not* include this header file in another public header file! // Doing this may potentially disable the warnings in the source // code of our customers, which would be bad. Only include this // header file in Ice *source* files! // #if defined(_MSC_VER) && _MSC_VER >= 1400 # define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '' was declared deprecated/ #endif #if defined(_MSC_VER) && _MSC_VER >= 1300 # pragma warning( 4 : 4996 ) // C4996 'std::' was declared deprecated #endif #endif IceE-1.2.0/include/IceE/DispatchStatus.h0000644000076400007640000000126710576536574017627 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_DISPATCH_STATUS_H #define ICEE_DISPATCH_STATUS_H namespace IceInternal { enum DispatchStatus { DispatchOK, DispatchUserException, DispatchObjectNotExist, DispatchFacetNotExist, DispatchOperationNotExist, DispatchUnknownLocalException, DispatchUnknownUserException, DispatchUnknownException }; } #endif IceE-1.2.0/include/IceE/UserExceptionFactoryF.h0000644000076400007640000000111410576536574021106 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_USER_EXCEPTION_FACTORYF_H #define ICEE_USER_EXCEPTION_FACTORYF_H #include namespace IceInternal { class UserExceptionFactory; typedef ::IceUtil::Handle UserExceptionFactoryPtr; }; #endif IceE-1.2.0/include/IceE/Monitor.h0000644000076400007640000001053410576536574016310 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_MONITOR_H #define ICEE_MONITOR_H #include #include #include namespace IceUtil { // // This monitor implements the Mesa monitor semantics. That is any // calls to notify() or notifyAll() are delayed until the monitor is // unlocked. // template class Monitor { public: typedef LockT > Lock; typedef TryLockT > TryLock; Monitor(); ~Monitor(); // // Note that lock/tryLock & unlock in general should not be used // directly. Instead use Lock & TryLock. // void lock() const; void unlock() const; bool tryLock() const; void wait() const; bool timedWait(const Time&) const; void notify(); void notifyAll(); private: // noncopyable Monitor(const Monitor&); void operator=(const Monitor&); void notifyImpl(int) const; mutable Cond _cond; T _mutex; mutable int _nnotify; }; } // End namespace Ice // // Since this monitor implements the Mesa monitor semantics calls to // notify() or notifyAll() are delayed until the monitor is // unlocked. This can happen either due to a call to unlock(), or a // call to wait(). The _nnotify flag keeps track of the number of // pending notification calls. -1 indicates a broadcast, a positive // number indicates calls to notify(). The _nnotify flag is reset // upon initial acquisition of the monitor lock (either through a call // to lock(), or a return from wait(). // template inline IceUtil::Monitor::Monitor() : _nnotify(0) { } template inline IceUtil::Monitor::~Monitor() { } template inline void IceUtil::Monitor::lock() const { _mutex.lock(); if(_mutex.willUnlock()) { // // On the first mutex acquisition reset the number pending // notifications. // _nnotify = 0; } } template inline void IceUtil::Monitor::unlock() const { if(_mutex.willUnlock()) { // // Perform any pending notifications. // if(_nnotify != 0) { notifyImpl(_nnotify); } } _mutex.unlock(); /* int nnotify = _nnotify; if(_mutex.unlock()) { // // Perform any pending notifications. // if(nnotify != 0) { notifyImpl(nnotify); } } */ } template inline bool IceUtil::Monitor::tryLock() const { bool result = _mutex.tryLock(); if(result && _mutex.willUnlock()) { // // On the first mutex acquisition reset the number pending // notifications. // _nnotify = 0; } return result; } template inline void IceUtil::Monitor::wait() const { // // Perform any pending notifies // if(_nnotify != 0) { notifyImpl(_nnotify); } // // Wait for a notification // try { _cond.waitImpl(_mutex); // // Reset the nnotify count once wait() returns. // } catch(...) { _nnotify = 0; throw; } _nnotify = 0; } template inline bool IceUtil::Monitor::timedWait(const Time& timeout) const { // // Perform any pending notifies. // if(_nnotify != 0) { notifyImpl(_nnotify); } bool rc; // // Wait for a notification. // try { rc = _cond.timedWaitImpl(_mutex, timeout); // // Reset the nnotify count once wait() returns. // } catch(...) { _nnotify = 0; throw; } _nnotify = 0; return rc; } template inline void IceUtil::Monitor::notify() { // // Increment the _nnotify flag, unless a broadcast has already // been requested. // if(_nnotify != -1) { ++_nnotify; } } template inline void IceUtil::Monitor::notifyAll() { // // -1 (indicates broadcast) // _nnotify = -1; } template inline void IceUtil::Monitor::notifyImpl(int nnotify) const { // // -1 means notifyAll. // if(nnotify == -1) { _cond.broadcast(); return; } else { // // Otherwise notify n times. // while(nnotify > 0) { _cond.signal(); --nnotify; } } } #endif IceE-1.2.0/include/IceE/ObjectF.h0000644000076400007640000000117210602152305016143 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OBJECT_F_H #define ICEE_OBJECT_F_H #include #include namespace Ice { class Object; } namespace IceInternal { ICE_API IceUtil::Shared* upCast(::Ice::Object*); } namespace Ice { typedef IceInternal::Handle< Object > ObjectPtr; } #endif IceE-1.2.0/include/IceE/Proxy.h0000644000076400007640000003330110620302647015755 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROXY_H #define ICEE_PROXY_H #include #include #include #include #include //#include // Can't include RouterF.h here, otherwise we have cyclic includes //#include // Can't include RouterF.h here, otherwise we have cyclic includes #include #include #include #include #include #ifdef ICEE_HAS_ROUTER namespace IceProxy { namespace Ice { class Router; } } namespace IceInternal { class LocalExceptionWrapper; } namespace Ice { typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Router> RouterPrx; } #endif // ICEE_HAS_ROUTER #ifdef ICEE_HAS_LOCATOR namespace IceProxy { namespace Ice { class Locator; } } namespace Ice { typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Locator> LocatorPrx; } #endif // ICEE_HAS_LOCATOR namespace Ice { class LocalException; typedef ::std::map< ::std::string, ::std::string> Context; class __U__Context { }; ICE_API void __write(::IceInternal::BasicStream*, const Context&, __U__Context); ICE_API void __read(::IceInternal::BasicStream*, Context&, __U__Context); } namespace IceProxy { namespace Ice { #if defined(_MSC_VER) && (_MSC_VER == 1310) // Work around for VC++ 7.1 bug typedef ::std::map< ::std::string, ::std::string> Context; #endif class Object : public ::IceUtil::Shared, private ::IceUtil::Mutex { public: ICE_API bool operator==(const Object&) const; ICE_API bool operator<(const Object&) const; ICE_DEPRECATED_API ::Ice::Int ice_hash() const { return ice_getHash(); } ICE_API ::Ice::Int ice_getHash() const; ICE_DEPRECATED_API ::Ice::CommunicatorPtr ice_communicator() const { return ice_getCommunicator(); } ICE_API ::Ice::CommunicatorPtr ice_getCommunicator() const; ICE_API ::std::string ice_toString() const; bool ice_isA(const ::std::string& typeId) { return ice_isA(typeId, 0); } bool ice_isA(const ::std::string& typeId, const ::Ice::Context& context) { return ice_isA(typeId, &context); } void ice_ping() { ice_ping(0); } void ice_ping(const ::Ice::Context& context) { ice_ping(&context); } ::std::vector< ::std::string> ice_ids() { return ice_ids(0); } ::std::vector< ::std::string> ice_ids(const ::Ice::Context& context) { return ice_ids(&context); } ::std::string ice_id() { return ice_id(0); } ::std::string ice_id(const ::Ice::Context& context) { return ice_id(&context); } ICE_API ::Ice::Identity ice_getIdentity() const; ICE_DEPRECATED_API ::Ice::ObjectPrx ice_newIdentity(const ::Ice::Identity& id) const { return ice_identity(id); } ICE_API ::Ice::ObjectPrx ice_identity(const ::Ice::Identity&) const; ICE_API ::Ice::Context ice_getContext() const; ICE_DEPRECATED_API ::Ice::ObjectPrx ice_newContext(const ::Ice::Context& ctx) const { return ice_context(ctx); } ICE_API ::Ice::ObjectPrx ice_context(const ::Ice::Context&) const; ICE_API const ::std::string& ice_getFacet() const; ICE_DEPRECATED_API ::Ice::ObjectPrx ice_newFacet(const ::std::string& facet) const { return ice_facet(facet); } ICE_API ::Ice::ObjectPrx ice_facet(const ::std::string&) const; #ifdef ICEE_HAS_ROUTER ICE_API ::Ice::ObjectPrx ice_router(const ::Ice::RouterPrx&) const; ICE_API ::Ice::RouterPrx ice_getRouter() const; #endif #ifdef ICEE_HAS_LOCATOR ICE_API ::Ice::ObjectPrx ice_adapterId(const std::string&) const; ICE_API std::string ice_getAdapterId() const; ICE_API ::Ice::ObjectPrx ice_locator(const ::Ice::LocatorPrx&) const; ICE_API ::Ice::LocatorPrx ice_getLocator() const; #endif ICE_API bool ice_isSecure() const; ICE_API ::Ice::ObjectPrx ice_secure(bool) const; ::Ice::ObjectPrx ice_twoway() const { return changeMode(IceInternal::ReferenceModeTwoway); } bool ice_isTwoway() const { return getMode() == IceInternal::ReferenceModeTwoway; } ::Ice::ObjectPrx ice_oneway() const { return changeMode(IceInternal::ReferenceModeOneway); } bool ice_isOneway() const { return getMode() == IceInternal::ReferenceModeOneway; } ::Ice::ObjectPrx ice_datagram() const { return changeMode(IceInternal::ReferenceModeDatagram); } bool ice_isDatagram() const { return getMode() == IceInternal::ReferenceModeDatagram; } ::Ice::ObjectPrx ice_batchOneway() const { return changeMode(IceInternal::ReferenceModeBatchOneway); } bool ice_isBatchOneway() const { return getMode() == IceInternal::ReferenceModeBatchOneway; } ::Ice::ObjectPrx ice_batchDatagram() const { return changeMode(IceInternal::ReferenceModeBatchDatagram); } bool ice_isBatchDatagram() const { return getMode() == IceInternal::ReferenceModeBatchDatagram; } ICE_API ::Ice::ObjectPrx ice_timeout(int) const; ICE_DEPRECATED_API ::Ice::ConnectionPtr ice_connection() { return ice_getConnection(); } ICE_API ::Ice::ConnectionPtr ice_getConnection(); ICE_API ::Ice::ConnectionPtr ice_getCachedConnection() const; ::IceInternal::ReferencePtr __reference() const { return _reference; } ICE_API void __copyFrom(const ::Ice::ObjectPrx&); ICE_API void __handleException(const ::Ice::ConnectionPtr&, const ::Ice::LocalException&, int&); ICE_API void __handleExceptionWrapper(const ::Ice::ConnectionPtr&, const ::IceInternal::LocalExceptionWrapper&); ICE_API void __handleExceptionWrapperRelaxed(const ::Ice::ConnectionPtr&, const ::IceInternal::LocalExceptionWrapper&, int&); ICE_API void __checkTwowayOnly(const char*) const; protected: ::IceInternal::ReferencePtr _reference; private: ICE_API bool ice_isA(const ::std::string&, const ::Ice::Context*); ICE_API void ice_ping(const ::Ice::Context*); ICE_API ::std::vector< ::std::string> ice_ids(const ::Ice::Context*); ICE_API ::std::string ice_id(const ::Ice::Context*); ICE_API IceInternal::ReferenceMode getMode() const; ICE_API ::Ice::ObjectPrx changeMode(IceInternal::ReferenceMode) const; void setup(const ::IceInternal::ReferencePtr& ref) { // // No need to synchronize "*this", as this operation is only // called upon initialization. // assert(!_reference); assert(!_connection); _reference = ref; } friend class ::IceInternal::ProxyFactory; ::Ice::ConnectionPtr _connection; }; } } namespace Ice { ICE_API bool proxyIdentityLess(const ObjectPrx&, const ObjectPrx&); ICE_API bool proxyIdentityEqual(const ObjectPrx&, const ObjectPrx&); ICE_API bool proxyIdentityAndFacetLess(const ObjectPrx&, const ObjectPrx&); ICE_API bool proxyIdentityAndFacetEqual(const ObjectPrx&, const ObjectPrx&); struct ProxyIdentityLess : std::binary_function { bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const { return proxyIdentityLess(lhs, rhs); } }; struct ProxyIdentityEqual : std::binary_function { bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const { return proxyIdentityEqual(lhs, rhs); } }; struct ProxyIdentityAndFacetLess : std::binary_function { bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const { return proxyIdentityAndFacetLess(lhs, rhs); } }; struct ProxyIdentityAndFacetEqual : std::binary_function { bool operator()(const ObjectPrx& lhs, const ObjectPrx& rhs) const { return proxyIdentityAndFacetEqual(lhs, rhs); } }; } namespace IceInternal { // // Inline comparison functions for proxies // template inline bool operator==(const ProxyHandle& lhs, const ProxyHandle& rhs) { ::IceProxy::Ice::Object* l = lhs.__upCast(); ::IceProxy::Ice::Object* r = rhs.__upCast(); if(l && r) { return *l == *r; } else { return !l && !r; } } template inline bool operator!=(const ProxyHandle& lhs, const ProxyHandle& rhs) { return !operator==(lhs, rhs); } template inline bool operator<(const ProxyHandle& lhs, const ProxyHandle& rhs) { ::IceProxy::Ice::Object* l = lhs.__upCast(); ::IceProxy::Ice::Object* r = rhs.__upCast(); if(l && r) { return *l < *r; } else { return !l && r; } } template inline bool operator<=(const ProxyHandle& lhs, const ProxyHandle& rhs) { return lhs < rhs || lhs == rhs; } template inline bool operator>(const ProxyHandle& lhs, const ProxyHandle& rhs) { return !(lhs < rhs || lhs == rhs); } template inline bool operator>=(const ProxyHandle& lhs, const ProxyHandle& rhs) { return !(lhs < rhs); } // // checkedCast and uncheckedCast functions without facet: // // // Out of line implementations // template P checkedCastImpl(const ::Ice::ObjectPrx& b) { P d = 0; if(b.get()) { typedef typename P::element_type T; d = dynamic_cast(b.get()); if(!d && b->ice_isA(T::ice_staticId())) { d = new T; d->__copyFrom(b); } } return d; } template P checkedCastImpl(const ::Ice::ObjectPrx& b, const ::Ice::Context& ctx) { P d = 0; if(b.get()) { typedef typename P::element_type T; d = dynamic_cast(b.get()); if(!d && b->ice_isA(T::ice_staticId(), ctx)) { d = new T; d->__copyFrom(b); } } return d; } template P uncheckedCastImpl(const ::Ice::ObjectPrx& b) { P d = 0; if(b) { typedef typename P::element_type T; d = dynamic_cast(b.get()); if(!d) { d = new T; d->__copyFrom(b); } } return d; } // // checkedCast and uncheckedCast with facet: // // // Helper with type ID. // ICE_API ::Ice::ObjectPrx checkedCastImpl(const ::Ice::ObjectPrx&, const std::string&, const std::string&); ICE_API ::Ice::ObjectPrx checkedCastImpl(const ::Ice::ObjectPrx&, const std::string&, const std::string&, const ::Ice::Context&); // // Specializations for P = ::Ice::ObjectPrx // We have to use inline functions for broken compilers such as VC7. // template<> inline ::Ice::ObjectPrx checkedCastImpl< ::Ice::ObjectPrx>(const ::Ice::ObjectPrx& b, const std::string& f) { return checkedCastImpl(b, f, "::Ice::Object"); } template<> inline ::Ice::ObjectPrx checkedCastImpl< ::Ice::ObjectPrx>(const ::Ice::ObjectPrx& b, const std::string& f, const ::Ice::Context& ctx) { return checkedCastImpl(b, f, "::Ice::Object", ctx); } template<> inline ::Ice::ObjectPrx uncheckedCastImpl< ::Ice::ObjectPrx>(const ::Ice::ObjectPrx& b, const std::string& f) { ::Ice::ObjectPrx d = 0; if(b) { d = b->ice_facet(f); } return d; } template P checkedCastImpl(const ::Ice::ObjectPrx& b, const std::string& f) { P d = 0; typedef typename P::element_type T; ::Ice::ObjectPrx bb = checkedCastImpl(b, f, T::ice_staticId()); if(bb) { d = new T; d->__copyFrom(bb); } return d; } template P checkedCastImpl(const ::Ice::ObjectPrx& b, const std::string& f, const ::Ice::Context& ctx) { P d = 0; typedef typename P::element_type T; ::Ice::ObjectPrx bb = checkedCastImpl(b, f, T::ice_staticId(), ctx); if(bb) { d = new T; d->__copyFrom(bb); } return d; } template P uncheckedCastImpl(const ::Ice::ObjectPrx& b, const std::string& f) { P d = 0; if(b) { typedef typename P::element_type T; ::Ice::ObjectPrx bb = b->ice_facet(f); d = new T; d->__copyFrom(bb); } return d; } } // // checkedCast and uncheckedCast functions provided in the global namespace // template inline P checkedCast(const ::IceInternal::ProxyHandle& b) { Y* tag = 0; #if defined(_MSC_VER) && (_MSC_VER < 1300) return ::IceInternal::checkedCastHelper(b, tag); #else return ::IceInternal::checkedCastHelper(b, tag); #endif } template inline P checkedCast(const ::IceInternal::ProxyHandle& b, const ::Ice::Context& ctx) { Y* tag = 0; #if defined(_MSC_VER) && (_MSC_VER < 1300) return ::IceInternal::checkedCastHelper(b, tag, ctx); #else return ::IceInternal::checkedCastHelper(b, tag, ctx); #endif } template inline P uncheckedCast(const ::IceInternal::ProxyHandle& b) { Y* tag = 0; #if defined(_MSC_VER) && (_MSC_VER < 1300) return ::IceInternal::uncheckedCastHelper(b, tag); #else return ::IceInternal::uncheckedCastHelper(b, tag); #endif } template inline P checkedCast(const ::Ice::ObjectPrx& b, const std::string& f) { return ::IceInternal::checkedCastImpl

(b, f); } template inline P checkedCast(const ::Ice::ObjectPrx& b, const std::string& f, const ::Ice::Context& ctx) { return ::IceInternal::checkedCastImpl

(b, f, ctx); } template inline P uncheckedCast(const ::Ice::ObjectPrx& b, const std::string& f) { return ::IceInternal::checkedCastImpl

(b, f); } #endif IceE-1.2.0/include/IceE/ProxyFactoryF.h0000644000076400007640000000114510602152305017406 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROXY_FACTORY_F_H #define ICEE_PROXY_FACTORY_F_H #include #include namespace IceInternal { class ProxyFactory; IceUtil::Shared* upCast(ProxyFactory*); typedef IceInternal::Handle ProxyFactoryPtr; } #endif IceE-1.2.0/include/IceE/Mutex.h0000644000076400007640000001477410576536574015775 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_MUTEX_H #define ICEE_MUTEX_H #include #include #include namespace IceUtil { // // Forward declaration for friend. // class Cond; // // Simple non-recursive Mutex implementation. // // Don't use noncopyable otherwise you end up with warnings like this: // // In file included from Connection.cpp:20: // ../../include/IceE/Outgoing.h:88: warning: direct base // `IceUtil::noncopyable' inaccessible in `IceInternal::Outgoing' due // to ambiguity // class Mutex { public: // // Lock & TryLock typedefs. // typedef LockT Lock; typedef TryLockT TryLock; inline Mutex(); ~Mutex(); // // Note that lock/tryLock & unlock in general should not be used // directly. Instead use Lock & TryLock. // void lock() const; // // Returns true if the lock was acquired, and false otherwise. // bool tryLock() const; void unlock() const; // // Returns true if the mutex will unlock when calling unlock() // (false otherwise). For non-recursive mutexes, this will always // return true. // This function is used by the Monitor implementation to know whether // the Mutex has been locked for the first time, or unlocked for the // last time (that is another thread is able to acquire the mutex). // Pre-condition: the mutex must be locked. // bool willUnlock() const; private: // noncopyable Mutex(const Mutex&); void operator=(const Mutex&); // // LockState and the lock/unlock variations are for use by the // Condition variable implementation. // #ifdef _WIN32 struct LockState { }; #else struct LockState { pthread_mutex_t* mutex; }; #endif void unlock(LockState&) const; void lock(LockState&) const; friend class Cond; #ifdef _WIN32 # if !defined(_WIN32_WCE) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400 mutable CRITICAL_SECTION _mutex; # else mutable HANDLE _mutex; mutable int _recursionCount; # endif #else mutable pthread_mutex_t _mutex; #endif }; // // For performance reasons the following functions are inlined. // #ifdef _WIN32 # if !defined(_WIN32_WCE) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400 inline Mutex::Mutex() { InitializeCriticalSection(&_mutex); } inline Mutex::~Mutex() { DeleteCriticalSection(&_mutex); } inline void Mutex::lock() const { EnterCriticalSection(&_mutex); assert(_mutex.RecursionCount == 1); } inline bool Mutex::tryLock() const { if(!TryEnterCriticalSection(&_mutex)) { return false; } if(_mutex.RecursionCount > 1) { LeaveCriticalSection(&_mutex); throw ThreadLockedException(__FILE__, __LINE__); } return true; } inline void Mutex::unlock() const { assert(_mutex.RecursionCount == 1); LeaveCriticalSection(&_mutex); } inline void Mutex::unlock(LockState&) const { LeaveCriticalSection(&_mutex); } inline void Mutex::lock(LockState&) const { EnterCriticalSection(&_mutex); } # else inline Mutex::Mutex() : _recursionCount(0) { _mutex = CreateMutex(0, false, 0); if(_mutex == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } inline Mutex::~Mutex() { BOOL rc = CloseHandle(_mutex); if(rc == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } inline void Mutex::lock() const { DWORD rc = WaitForSingleObject(_mutex, INFINITE); if(rc != WAIT_OBJECT_0) { if(rc == WAIT_FAILED) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } else { throw ThreadSyscallException(__FILE__, __LINE__, 0); } } _recursionCount++; } inline bool Mutex::tryLock() const { DWORD rc = WaitForSingleObject(_mutex, 0); if(rc != WAIT_OBJECT_0) { return false; } else if(_recursionCount == 1) { _recursionCount++; unlock(); throw ThreadLockedException(__FILE__, __LINE__); } else { _recursionCount++; return true; } } inline void Mutex::unlock() const { _recursionCount--; BOOL rc = ReleaseMutex(_mutex); if(rc == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } inline void Mutex::unlock(LockState& state) const { unlock(); } inline void Mutex::lock(LockState&) const { lock(); } # endif #else inline Mutex::Mutex() { #ifdef NDEBUG int rc = pthread_mutex_init(&_mutex, 0); #else int rc; #if defined(__linux) && !defined(__USE_UNIX98) const pthread_mutexattr_t attr = { PTHREAD_MUTEX_ERRORCHECK_NP }; #else pthread_mutexattr_t attr; rc = pthread_mutexattr_init(&attr); assert(rc == 0); rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); assert(rc == 0); #endif rc = pthread_mutex_init(&_mutex, &attr); #if defined(__linux) && !defined(__USE_UNIX98) // Nothing to do #else rc = pthread_mutexattr_destroy(&attr); assert(rc == 0); #endif #endif if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } inline Mutex::~Mutex() { int rc = 0; rc = pthread_mutex_destroy(&_mutex); assert(rc == 0); } inline void Mutex::lock() const { int rc = pthread_mutex_lock(&_mutex); if(rc != 0) { if(rc == EDEADLK) { throw ThreadLockedException(__FILE__, __LINE__); } else { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } } inline bool Mutex::tryLock() const { int rc = pthread_mutex_trylock(&_mutex); if(rc != 0 && rc != EBUSY) { if(rc == EDEADLK) { throw ThreadLockedException(__FILE__, __LINE__); } else { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } return (rc == 0); } inline void Mutex::unlock() const { int rc = pthread_mutex_unlock(&_mutex); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } inline void Mutex::unlock(LockState& state) const { state.mutex = &_mutex; } inline void Mutex::lock(LockState&) const { } #endif inline bool Mutex::willUnlock() const { return true; } } // End namespace IceUtil #endif IceE-1.2.0/include/IceE/EndpointF.h0000644000076400007640000000112310602152305016511 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ENDPOINT_F_H #define ICEE_ENDPOINT_F_H #include #include namespace IceInternal { class Endpoint; ICE_API IceUtil::Shared* upCast(Endpoint*); typedef IceInternal::Handle EndpointPtr; } #endif IceE-1.2.0/include/IceE/Connection.h0000755000076400007640000001344210576536574016764 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_CONNECTION_H #define ICEE_CONNECTION_H #include #include #include #include #include #include #include #ifndef ICEE_PURE_CLIENT # include # include # include # include #endif #include #include #include #include // For ThreadPerConnection. #include #include namespace IceInternal { class Outgoing; } namespace Ice { class LocalException; class ICE_API Connection : public IceUtil::Monitor, public IceUtil::Shared { public: void waitForValidation(); enum DestructionReason { #ifndef ICEE_PURE_CLIENT ObjectAdapterDeactivated, #endif CommunicatorDestroyed }; void activate(); #ifndef ICEE_PURE_CLIENT void hold(); #endif void destroy(DestructionReason); void close(bool); // From Connection. bool isDestroyed() const; bool isFinished() const; void throwException() const; // Throws the connection exception if destroyed. #ifndef ICEE_PURE_CLIENT void waitUntilHolding() const; #endif void waitUntilFinished(); // Not const, as this might close the connection upon timeout. void sendRequest(IceInternal::BasicStream*, IceInternal::Outgoing*); #ifdef ICEE_HAS_BATCH void prepareBatchRequest(IceInternal::BasicStream*); void finishBatchRequest(IceInternal::BasicStream*); void abortBatchRequest(); void flushBatchRequests(); // From Connection. #endif #ifndef ICEE_PURE_CLIENT void sendResponse(IceInternal::BasicStream*); void sendNoResponse(); #endif IceInternal::EndpointPtr endpoint() const; #ifndef ICEE_PURE_CLIENT void setAdapter(const ObjectAdapterPtr&); // From Connection. ObjectAdapterPtr getAdapter() const; // From Connection. ObjectPrx createProxy(const Identity&) const; // From Connection. #endif std::string type() const; // From Connection. Ice::Int timeout() const; // From Connection. std::string toString() const; // From Connection private: #ifndef ICEE_PURE_CLIENT Connection(const IceInternal::InstancePtr&, const IceInternal::TransceiverPtr&, const IceInternal::EndpointPtr&, const ObjectAdapterPtr&); #else Connection(const IceInternal::InstancePtr&, const IceInternal::TransceiverPtr&, const IceInternal::EndpointPtr&); #endif ~Connection(); #ifndef ICEE_PURE_CLIENT friend class IceInternal::IncomingConnectionFactory; #endif friend class IceInternal::OutgoingConnectionFactory; enum State { StateNotValidated, StateActive, #ifndef ICEE_PURE_CLIENT StateHolding, #endif StateClosing, StateClosed }; void validate(); void setState(State, const LocalException&); void setState(State); void initiateShutdown() const; #ifndef ICEE_PURE_CLIENT void readStreamAndParseMessage(IceInternal::BasicStream&, Int&, Int&); #else void readStreamAndParseMessage(IceInternal::BasicStream&, Int&); #endif #ifdef ICEE_HAS_BATCH void flushBatchRequestsInternal(bool); void resetBatch(bool); #endif #ifndef ICEE_PURE_BLOCKING_CLIENT void run(); class ThreadPerConnection : public IceUtil::Thread { public: ThreadPerConnection(const ConnectionPtr&); virtual void run(); private: ConnectionPtr _connection; }; friend class ThreadPerConnection; // Defined as mutable because "isFinished() const" sets this to 0. mutable IceUtil::ThreadPtr _threadPerConnection; #endif const IceInternal::InstancePtr _instance; IceInternal::TransceiverPtr _transceiver; const std::string _desc; const std::string _type; const IceInternal::EndpointPtr _endpoint; const LoggerPtr _logger; const IceInternal::TraceLevelsPtr _traceLevels; const bool _warn; #ifndef ICEE_PURE_CLIENT IceInternal::Incoming _in; #endif #ifndef ICEE_PURE_BLOCKING_CLIENT IceInternal::BasicStream _stream; #endif #ifdef ICEE_HAS_BATCH const bool _batchAutoFlush; IceInternal::BasicStream _batchStream; bool _batchStreamInUse; int _batchRequestNum; size_t _batchMarker; #endif #if !defined(ICEE_PURE_BLOCKING_CLIENT) bool _blocking; #endif std::auto_ptr _exception; // // Technically this isn't necessary for PURE_CLIENT, but its a // pain to get rid of. // int _dispatchCount; State _state; // The current state. IceUtil::Time _stateTime; // The last time when the state was changed. // // We have a separate monitor for sending, so that we don't block // the whole connection when we do a blocking send. The monitor is // also used by outgoing calls to wait for replies when thread per // connection is used. The _nextRequestId, _requests and // _requestsHint attributes are also protected by this monitor. // Calls on the (non thread-safe) Outgoing objects should also // only be made with this monitor locked. // // Finally, it's safe to lock the _sendMonitor with the connection // already locked. The contrary isn't permitted. // IceUtil::Monitor _sendMonitor; Int _nextRequestId; #ifndef ICEE_PURE_BLOCKING_CLIENT std::map _requests; std::map::iterator _requestsHint; #endif }; } #endif IceE-1.2.0/include/IceE/UserExceptionFactory.h0000644000076400007640000000133710576536574021007 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_USER_EXCEPTION_FACTORY_H #define ICEE_USER_EXCEPTION_FACTORY_H #include #include namespace IceInternal { class ICE_API UserExceptionFactory : public IceUtil::Shared { public: virtual void createAndThrow() = 0; virtual ~UserExceptionFactory() {} }; typedef ::IceUtil::Handle UserExceptionFactoryPtr; }; #endif IceE-1.2.0/include/IceE/Object.h0000644000076400007640000000432310602152305016036 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OBJECT_H #define ICEE_OBJECT_H #include #include #include namespace IceInternal { class Incoming; class BasicStream; } namespace Ice { class ICE_API Object : public IceUtil::Shared { public: virtual bool operator==(const Object&) const; virtual bool operator<(const Object&) const; virtual Int ice_hash() const; virtual bool ice_isA(const std::string&, const Current& = Current()) const; IceInternal::DispatchStatus ___ice_isA(IceInternal::Incoming&, const Current&); virtual void ice_ping(const Current& = Current()) const; IceInternal::DispatchStatus ___ice_ping(IceInternal::Incoming&, const Current&); virtual std::vector< std::string> ice_ids(const Current& = Current()) const; IceInternal::DispatchStatus ___ice_ids(IceInternal::Incoming&, const Current&); virtual const std::string& ice_id(const Current& = Current()) const; IceInternal::DispatchStatus ___ice_id(IceInternal::Incoming&, const Current&); static const std::string& ice_staticId(); virtual ObjectPtr ice_clone() const; static std::string __all[]; virtual IceInternal::DispatchStatus __dispatch(IceInternal::Incoming&, const Current&); protected: Object() {}; virtual ~Object() {} // This class is abstract. static void __checkMode(OperationMode expected, OperationMode received) // Inline for performance reasons. { if(expected != received) { __invalidMode(expected, received); // Not inlined. } } static void __invalidMode(OperationMode, OperationMode); }; class ICE_API Blobject : public Object { public: // Returns true if ok, false if user exception. virtual bool ice_invoke(const std::vector&, std::vector&, const Current&) = 0; virtual IceInternal::DispatchStatus __dispatch(IceInternal::Incoming&, const Current&); }; } #endif IceE-1.2.0/include/IceE/CommunicatorF.h0000755000076400007640000000154010616127727017416 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_COMMUNICATOR_F_H #define ICEE_COMMUNICATOR_F_H #include #include namespace Ice { class Communicator; inline bool operator==(const Communicator& l, const Communicator& r) { return &l == &r; } inline bool operator<(const Communicator& l, const Communicator& r) { return &l < &r; } } namespace IceInternal { ICE_API IceUtil::Shared* upCast(::Ice::Communicator*); } namespace Ice { typedef ::IceInternal::Handle< ::Ice::Communicator> CommunicatorPtr; } #endif IceE-1.2.0/include/IceE/LoggerF.h0000755000076400007640000000120210603224430016151 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOGGER_F_H #define ICEE_LOGGER_F_H #include #include namespace Ice { class Logger; } namespace IceInternal { ICE_API IceUtil::Shared* upCast(::Ice::Logger*); } namespace Ice { typedef ::IceInternal::Handle< ::Ice::Logger> LoggerPtr; } #endif IceE-1.2.0/include/IceE/RecMutex.h0000644000076400007640000000432610576536574016417 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_RMUTEX_H #define ICEE_RMUTEX_H #include #include #include namespace IceUtil { // // Forward declarations for friend. // class Cond; // // Recursive Mutex implementation. // class ICE_API RecMutex { public: // // Lock & TryLock typedefs. // typedef LockT Lock; typedef TryLockT TryLock; RecMutex(); ~RecMutex(); // // Note that lock/tryLock & unlock in general should not be used // directly. Instead use Lock & TryLock. // void lock() const; // // Returns true if the lock was acquired, and false otherwise. // bool tryLock() const; void unlock() const; // // Returns true if the mutex will unlock when calling unlock() // (false otherwise). For non-recursive mutexes, this will always // return true. // This function is used by the Monitor implementation to know whether // the Mutex has been locked for the first time, or unlocked for the // last time (that is another thread is able to acquire the mutex). // Pre-condition: the mutex must be locked. // bool willUnlock() const; private: // noncopyable RecMutex(const RecMutex&); void operator=(const RecMutex&); // // LockState and the lock/unlock variations are for use by the // Condition variable implementation. // #ifdef _WIN32 struct LockState { int count; }; #else struct LockState { pthread_mutex_t* mutex; int count; }; #endif void unlock(LockState&) const; void lock(LockState&) const; friend class Cond; #ifdef _WIN32 # if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400 mutable CRITICAL_SECTION _mutex; # else HANDLE _mutex; # endif #else mutable pthread_mutex_t _mutex; #endif mutable int _count; }; } // End namespace Ice #endif IceE-1.2.0/include/IceE/Cond.h0000644000076400007640000001216510576536574015546 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_COND_H #define ICEE_COND_H #include #include #ifdef _WIN32 # include #endif namespace IceUtil { // // Forward declaration (for friend declarations). // template class Monitor; class RecMutex; class Mutex; #ifdef _WIN32 // // Needed for implementation. // class Semaphore { public: Semaphore(long = 0); ~Semaphore(); void wait() const; bool timedWait(const Time&) const; void post(int = 1) const; private: mutable HANDLE _sem; }; #endif // // Condition variable implementation. Conforms to the same semantics // as a POSIX threads condition variable. // class Cond : private noncopyable { public: ICE_API Cond(); ICE_API ~Cond(); // // signal restarts one of the threads that are waiting on the // condition variable cond. If no threads are waiting on cond, // nothing happens. If several threads are waiting on cond, // exactly one is restarted, but it is not specified which. // ICE_API void signal(); // // broadcast restarts all the threads that are waiting on the // condition variable cond. Nothing happens if no threads are // waiting on cond. // ICE_API void broadcast(); // // MSVC doesn't support out-of-class definitions of member // templates. See KB Article Q241949 for details. // // // wait atomically unlocks the mutex and waits for the condition // variable to be signaled. Before returning to the calling thread // the mutex is reaquired. // template inline void wait(const Lock& lock) const { if(!lock.acquired()) { throw ThreadLockedException(__FILE__, __LINE__); } waitImpl(lock._mutex); } // // wait atomically unlocks the mutex and waits for the condition // variable to be signaled for up to the given timeout. Before // returning to the calling thread the mutex is reaquired. Returns // true if the condition variable was signaled, false on a // timeout. // template inline bool timedWait(const Lock& lock, const Time& timeout) const { if(!lock.acquired()) { throw ThreadLockedException(__FILE__, __LINE__); } return timedWaitImpl(lock._mutex, timeout); } private: friend class Monitor; friend class Monitor; // // The Monitor implementation uses waitImpl & timedWaitImpl. // #ifdef _WIN32 template void waitImpl(const M& mutex) const { preWait(); typedef typename M::LockState LockState; LockState state; mutex.unlock(state); try { dowait(); mutex.lock(state); } catch(...) { mutex.lock(state); throw; } } template bool timedWaitImpl(const M& mutex, const Time& timeout) const { preWait(); typedef typename M::LockState LockState; LockState state; mutex.unlock(state); try { bool rc = timedDowait(timeout); mutex.lock(state); return rc; } catch(...) { mutex.lock(state); throw; } } #else template void waitImpl(const M&) const; template bool timedWaitImpl(const M&, const Time&) const; #endif #ifdef _WIN32 ICE_API void wake(bool); ICE_API void preWait() const; ICE_API void postWait(bool) const; ICE_API bool timedDowait(const Time&) const; ICE_API void dowait() const; Mutex _internal; Semaphore _gate; Semaphore _queue; mutable long _blocked; mutable long _unblocked; mutable long _toUnblock; #else mutable pthread_cond_t _cond; #endif }; #ifndef _WIN32 template inline void Cond::waitImpl(const M& mutex) const { typedef typename M::LockState LockState; LockState state; mutex.unlock(state); int rc = pthread_cond_wait(&_cond, state.mutex); mutex.lock(state); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } template inline bool Cond::timedWaitImpl(const M& mutex, const Time& timeout) const { typedef typename M::LockState LockState; LockState state; mutex.unlock(state); timeval tv = Time::now() + timeout; timespec ts; ts.tv_sec = tv.tv_sec; ts.tv_nsec = tv.tv_usec * 1000; int rc = pthread_cond_timedwait(&_cond, state.mutex, &ts); mutex.lock(state); if(rc != 0) { // // pthread_cond_timedwait returns ETIMEOUT in the event of a // timeout. // if(rc != ETIMEDOUT) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } return false; } return true; } #endif } // End namespace Ice #endif IceE-1.2.0/include/IceE/ServantManagerF.h0000644000076400007640000000114410602152305017651 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_SERVANT_MANAGER_F_H #define ICEE_SERVANT_MANAGER_F_H #include #include namespace IceInternal { class ServantManager; IceUtil::Shared* upCast(ServantManager*); typedef Handle ServantManagerPtr; } #endif IceE-1.2.0/include/IceE/Protocol.h0000644000076400007640000000301610576536574016457 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROTOCOL_H #define ICEE_PROTOCOL_H #include namespace IceInternal { // // Size of the Ice protocol header // // Magic number (4 Bytes) // Protocol version major (Byte) // Protocol version minor (Byte) // Encoding version major (Byte) // Encoding version minor (Byte) // Message type (Byte) // Compression status (Byte) // Message size (Int) // const ::Ice::Int headerSize = 14; // // The magic number at the front of each message // extern const ::Ice::Byte magic[4]; // // The current Ice protocol and encoding version // const ::Ice::Byte protocolMajor = 1; const ::Ice::Byte protocolMinor = 0; const ::Ice::Byte encodingMajor = 1; const ::Ice::Byte encodingMinor = 0; // // The Ice protocol message types // const ::Ice::Byte requestMsg = 0; const ::Ice::Byte requestBatchMsg = 1; const ::Ice::Byte replyMsg = 2; const ::Ice::Byte validateConnectionMsg = 3; const ::Ice::Byte closeConnectionMsg = 4; // // The request header, batch request header and reply header. // extern const ::Ice::Byte requestHdr[headerSize + sizeof(Ice::Int)]; extern const ::Ice::Byte requestBatchHdr[headerSize + sizeof(Ice::Int)]; extern const ::Ice::Byte replyHdr[headerSize]; } #endif IceE-1.2.0/include/IceE/Outgoing.h0000644000076400007640000000440610614174175016441 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OUTGOING_H #define ICEE_OUTGOING_H #include #include #include #include namespace Ice { class LocalException; } namespace IceInternal { // // An exception wrapper, which is used for local exceptions that // require special retry considerations. // class ICE_API LocalExceptionWrapper { public: LocalExceptionWrapper(const Ice::LocalException&, bool); LocalExceptionWrapper(const LocalExceptionWrapper&); const Ice::LocalException* get() const; // // If true, always repeat the request. Don't take retry settings // or "at-most-once" guarantees into account. // // If false, only repeat the request if the retry settings allow // to do so, and if "at-most-once" does not need to be guaranteed. // bool retry() const; private: const LocalExceptionWrapper& operator=(const LocalExceptionWrapper&); std::auto_ptr _ex; bool _retry; }; class ICE_API Outgoing : private IceUtil::noncopyable { public: enum State { StateUnsent, StateInProgress, StateOK, StateUserException, StateLocalException }; Outgoing(Ice::Connection*, Reference*, const std::string&, Ice::OperationMode, const Ice::Context*); ~Outgoing() {} bool invoke(); // Returns true if ok, false if user exception. void abort(const Ice::LocalException&); void finished(BasicStream&); void finished(const Ice::LocalException&); // Inlined for speed optimization. BasicStream* stream() { return &_stream; } State state() { return _state; } protected: // // Optimization. The connection and the reference may not be // deleted while a stack-allocated Outgoing still holds it. // Ice::Connection* _connection; Reference* _reference; std::auto_ptr _exception; State _state; BasicStream _stream; }; } #endif IceE-1.2.0/include/IceE/BasicStream.h0000644000076400007640000004024010616505646017042 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_BASIC_STREAM_H #define ICEE_BASIC_STREAM_H #include #include #include #ifdef ICEE_HAS_WSTRING # include #endif namespace Ice { class UserException; ICE_API void throwUnmarshalOutOfBoundsException(const char*, int); ICE_API void throwNegativeSizeException(const char*, int); ICE_API void throwMemoryLimitException(const char*, int); ICE_API void throwUnsupportedEncodingException(const char*, int, ::Ice::Int, ::Ice::Int, ::Ice::Int, ::Ice::Int); } namespace IceInternal { class Instance; class BasicStream : public Buffer { public: #ifdef ICEE_HAS_WSTRING class StreamUTF8BufferI : public Ice::UTF8Buffer { public: StreamUTF8BufferI(BasicStream& stream) : _stream(stream) { } Ice::Byte* getMoreBytes(size_t howMany, Ice::Byte* firstUnused) { assert(howMany > 0); if(firstUnused != 0) { // // Return unused bytes // _stream.b.resize(firstUnused - _stream.b.begin()); } // // Index of first unused byte // Container::size_type pos = _stream.b.size(); // // Since resize may reallocate the buffer, when firstUnused != 0, the // return value can be != firstUnused // _stream.resize(pos + howMany); return &_stream.b[pos]; } private: BasicStream& _stream; }; #endif BasicStream(Instance* instance, int messageSizeMax, #ifdef ICEE_HAS_WSTRING const Ice::StringConverterPtr& stringConverter, const Ice::WstringConverterPtr& wstringConverter, #endif bool unlimited = false) : Buffer(messageSizeMax), _instance(instance), _currentReadEncaps(0), _currentWriteEncaps(0), _messageSizeMax(messageSizeMax), _unlimited(unlimited), #ifdef ICEE_HAS_WSTRING _stringConverter(stringConverter), _wstringConverter(wstringConverter), #endif _seqDataStack(0) { // Inlined for performance reasons. } ~BasicStream() { // Inlined for performance reasons. if(_currentReadEncaps != &_preAllocatedReadEncaps || _currentWriteEncaps != &_preAllocatedWriteEncaps || _seqDataStack) { clear(); // Not inlined. } } ICE_API void clear(); // // Must return Instance*, because we don't hold an InstancePtr for // optimization reasons (see comments below). // Instance* instance() const { return _instance; } // Inlined for performance reasons. ICE_API void swap(BasicStream&); void resize(Container::size_type sz) { if(!_unlimited && sz > _messageSizeMax) { Ice::throwMemoryLimitException(__FILE__, __LINE__); } b.resize(sz); } void reset() // Inlined for performance reasons. { b.reset(); i = b.begin(); } ICE_API void startSeq(int, int); void checkSeq() { checkSeq(static_cast(b.end() - i)); } void checkSeq(int bytesLeft) { // // Check, given the number of elements requested for this sequence, // that this sequence, plus the sum of the sizes of the remaining // number of elements of all enclosing sequences, would still fit // within the message. // int size = 0; SeqData* sd = _seqDataStack; do { size += (sd->numElements - 1) * sd->minSize; sd = sd->previous; } while(sd); if(size > bytesLeft) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } } ICE_API void checkFixedSeq(int, int); // For sequences of fixed-size types. void endElement() { assert(_seqDataStack); --_seqDataStack->numElements; } ICE_API void endSeq(int); void startWriteEncaps() { WriteEncaps* oldEncaps = _currentWriteEncaps; if(!oldEncaps) // First allocated encaps? { _currentWriteEncaps = &_preAllocatedWriteEncaps; } else { _currentWriteEncaps = new WriteEncaps(); _currentWriteEncaps->previous = oldEncaps; } _currentWriteEncaps->start = b.size(); write(Ice::Int(0)); // Placeholder for the encapsulation length. write(encodingMajor); write(encodingMinor); } void endWriteEncaps() { assert(_currentWriteEncaps); Container::size_type start = _currentWriteEncaps->start; Ice::Int sz = static_cast(b.size() - start); // Size includes size and version. Ice::Byte* dest = &(*(b.begin() + start)); #ifdef ICE_BIG_ENDIAN const Ice::Byte* src = reinterpret_cast(&sz) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Ice::Byte* src = reinterpret_cast(&sz); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif WriteEncaps* oldEncaps = _currentWriteEncaps; _currentWriteEncaps = _currentWriteEncaps->previous; if(oldEncaps == &_preAllocatedWriteEncaps) { oldEncaps->reset(); } else { delete oldEncaps; } } void startReadEncaps() { ReadEncaps* oldEncaps = _currentReadEncaps; if(!oldEncaps) // First allocated encaps? { _currentReadEncaps = &_preAllocatedReadEncaps; } else { _currentReadEncaps = new ReadEncaps(); _currentReadEncaps->previous = oldEncaps; } _currentReadEncaps->start = i - b.begin(); // // I don't use readSize() and writeSize() for encapsulations, // because when creating an encapsulation, I must know in advance // how many bytes the size information will require in the data // stream. If I use an Int, it is always 4 bytes. For // readSize()/writeSize(), it could be 1 or 5 bytes. // Ice::Int sz; read(sz); if(sz < 0) { Ice::throwNegativeSizeException(__FILE__, __LINE__); } if(i - sizeof(Ice::Int) + sz > b.end()) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } _currentReadEncaps->sz = sz; Ice::Byte eMajor; Ice::Byte eMinor; read(eMajor); read(eMinor); if(eMajor != encodingMajor || static_cast(eMinor) > static_cast(encodingMinor)) { Ice::throwUnsupportedEncodingException(__FILE__, __LINE__, eMajor, eMinor, encodingMajor, encodingMinor); } _currentReadEncaps->encodingMajor = eMajor; _currentReadEncaps->encodingMinor = eMinor; } void endReadEncaps() { assert(_currentReadEncaps); Container::size_type start = _currentReadEncaps->start; Ice::Int sz = _currentReadEncaps->sz; i = b.begin() + start + sz; ReadEncaps* oldEncaps = _currentReadEncaps; _currentReadEncaps = _currentReadEncaps->previous; if(oldEncaps == &_preAllocatedReadEncaps) { oldEncaps->reset(); } else { delete oldEncaps; } } ICE_API Ice::Int getReadEncapsSize(); ICE_API void skipEncaps(); ICE_API void startWriteSlice(); ICE_API void endWriteSlice(); ICE_API void startReadSlice(); ICE_API void endReadSlice(); ICE_API void skipSlice(); void writeSize(Ice::Int v) // Inlined for performance reasons. { assert(v >= 0); if(v > 254) { write(Ice::Byte(255)); write(v); } else { write(static_cast(v)); } } void rewriteSize(Ice::Int v, Container::iterator dest) { assert(v >= 0); if(v > 254) { *dest++ = Ice::Byte(255); #ifdef ICE_BIG_ENDIAN const Ice::Byte* src = reinterpret_cast(&v) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Ice::Byte* src = reinterpret_cast(&v); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } else { *dest = static_cast(v); } } void readSize(Ice::Int& v) // Inlined for performance reasons. { Ice::Byte byte; read(byte); unsigned val = static_cast(byte); if(val == 255) { read(v); if(v < 0) { Ice::throwNegativeSizeException(__FILE__, __LINE__); } } else { v = static_cast(static_cast(byte)); } } ICE_API void writeBlob(const std::vector&); ICE_API void readBlob(std::vector&, Ice::Int); void writeBlob(const Ice::Byte* v, Container::size_type sz) { if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz); memcpy(&b[pos], &v[0], sz); } } void readBlob(const Ice::Byte*& v, Container::size_type sz) { if(sz > 0) { v = i; if(static_cast(b.end() - i) < sz) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } i += sz; } else { v = i; } } void write(Ice::Byte v) // Inlined for performance reasons. { b.push_back(v); } void read(Ice::Byte& v) // Inlined for performance reasons. { if(i >= b.end()) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } v = *i++; } ICE_API void write(const Ice::Byte*, const Ice::Byte*); ICE_API void read(std::pair&); void write(bool v) // Inlined for performance reasons. { b.push_back(static_cast(v)); } ICE_API void write(const std::vector&); ICE_API void write(const bool*, const bool*); void read(bool& v) // Inlined for performance reasons. { if(i >= b.end()) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } v = *i++; } ICE_API void read(std::vector&); ICE_API bool* read(std::pair&); ICE_API void write(Ice::Short); ICE_API void read(Ice::Short&); ICE_API void write(const Ice::Short*, const Ice::Short*); ICE_API void read(std::vector&); ICE_API Ice::Short* read(std::pair&); void write(Ice::Int v) // Inlined for performance reasons. { Container::size_type pos = b.size(); resize(pos + sizeof(Ice::Int)); Ice::Byte* dest = &b[pos]; #ifdef ICE_BIG_ENDIAN const Ice::Byte* src = reinterpret_cast(&v) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Ice::Byte* src = reinterpret_cast(&v); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } void read(Ice::Int& v) // Inlined for performance reasons. { if(b.end() - i < static_cast(sizeof(Ice::Int))) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } const Ice::Byte* src = &(*i); i += sizeof(Ice::Int); #ifdef ICE_BIG_ENDIAN Ice::Byte* dest = reinterpret_cast(&v) + sizeof(Ice::Int) - 1; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest = *src; #else Ice::Byte* dest = reinterpret_cast(&v); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } ICE_API void write(const Ice::Int*, const Ice::Int*); ICE_API void read(std::vector&); ICE_API Ice::Int* read(std::pair&); ICE_API void write(Ice::Long); ICE_API void read(Ice::Long&); ICE_API void write(const Ice::Long*, const Ice::Long*); ICE_API void read(std::vector&); ICE_API Ice::Long* read(std::pair&); ICE_API void write(Ice::Float); ICE_API void read(Ice::Float&); ICE_API void write(const Ice::Float*, const Ice::Float*); ICE_API void read(std::vector&); ICE_API Ice::Float* read(std::pair&); ICE_API void write(Ice::Double); ICE_API void read(Ice::Double&); ICE_API void write(const Ice::Double*, const Ice::Double*); ICE_API void read(std::vector&); ICE_API Ice::Double* read(std::pair&); // // NOTE: This function is not implemented. It is declared here to // catch programming errors that assume a call such as write("") // will invoke write(const std::string&), when in fact the compiler // will silently select a different overloading. A link error is the // intended result. // ICE_API void write(const char*); #ifdef ICEE_HAS_WSTRING ICE_API void writeConverted(const std::string& v); #endif void write(const std::string& v, bool convert = true) { Ice::Int sz = static_cast(v.size()); #ifdef ICEE_HAS_WSTRING if(convert && sz > 0 && _stringConverter != 0) { writeConverted(v); } else #endif { writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz); memcpy(&b[pos], v.data(), sz); } } } ICE_API void write(const std::string*, const std::string*, bool = true); void read(std::string& v, bool convert = true) { Ice::Int sz; readSize(sz); if(sz > 0) { if(b.end() - i < sz) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } #ifdef ICEE_HAS_WSTRING if(convert && _stringConverter != 0) { _stringConverter->fromUTF8(i, i + sz, v); } else #endif { std::string(reinterpret_cast(&*i), reinterpret_cast(&*i) + sz).swap(v); // v.assign(reinterpret_cast(&(*i)), sz); } i += sz; } else { v.clear(); } } ICE_API void read(std::vector&, bool = true); #ifdef ICEE_HAS_WSTRING ICE_API void write(const std::wstring& v); ICE_API void write(const std::wstring*, const std::wstring*); void read(std::wstring& v) { Ice::Int sz; readSize(sz); if(sz > 0) { if(b.end() - i < sz) { Ice::throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } _wstringConverter->fromUTF8(i, i + sz, v); i += sz; } else { v.clear(); } } ICE_API void read(std::vector&); #endif ICE_API void write(const Ice::ObjectPrx&); ICE_API void read(Ice::ObjectPrx&); ICE_API void write(const Ice::UserException&); ICE_API void throwException(); private: // // Optimization. The instance may not be deleted while a // stack-allocated BasicStream still holds it. // Instance* _instance; class ReadEncaps : private ::IceUtil::noncopyable { public: ReadEncaps() : previous(0) { } // Inlined for performance reasons. ~ReadEncaps() { } // Inlined for performance reasons. void reset() { previous = 0; } // Inlined for performance reasons. ICE_API void swap(ReadEncaps&); Container::size_type start; Ice::Int sz; Ice::Byte encodingMajor; Ice::Byte encodingMinor; ReadEncaps* previous; }; class WriteEncaps : private ::IceUtil::noncopyable { public: WriteEncaps() : writeIndex(0), previous(0) { } // Inlined for performance reasons. ~WriteEncaps() { } // Inlined for performance reasons. void reset() { writeIndex = 0; previous = 0; } // Inlined for performance reasons. ICE_API void swap(WriteEncaps&); Container::size_type start; Ice::Int writeIndex; WriteEncaps* previous; }; ReadEncaps* _currentReadEncaps; WriteEncaps* _currentWriteEncaps; ReadEncaps _preAllocatedReadEncaps; WriteEncaps _preAllocatedWriteEncaps; Container::size_type _readSlice; Container::size_type _writeSlice; const Container::size_type _messageSizeMax; bool _unlimited; #ifdef ICEE_HAS_WSTRING const Ice::StringConverterPtr& _stringConverter; const Ice::WstringConverterPtr& _wstringConverter; #endif struct SeqData { SeqData(int, int); int numElements; int minSize; SeqData* previous; }; SeqData* _seqDataStack; }; } // End namespace IceInternal #endif IceE-1.2.0/include/IceE/RouterInfoF.h0000644000076400007640000000136510602152305017035 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ROUTER_INFO_F_H #define ICEE_ROUTER_INFO_F_H #include #ifdef ICEE_HAS_ROUTER #include #include namespace IceInternal { class RouterManager; IceUtil::Shared* upCast(RouterManager*); typedef Handle RouterManagerPtr; class RouterInfo; IceUtil::Shared* upCast(RouterInfo*); typedef Handle RouterInfoPtr; } #endif #endif IceE-1.2.0/include/IceE/Makefile.mak0000755000076400007640000000120210600254657016675 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\.. !include $(top_srcdir)/config/Make.rules.mak install:: @if not exist $(install_includedir)\IceE \ @echo "Creating $(install_includedir)\IceE..." & \ mkdir $(install_includedir)\IceE @for %i in ( *.h ) do \ @echo Installing %i & \ copy %i $(install_includedir)\IceE IceE-1.2.0/include/IceE/ThreadException.h0000644000076400007640000000365610576536574017756 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_THREAD_EXCEPTION_H #define ICEE_THREAD_EXCEPTION_H #include namespace IceUtil { class ICE_API ThreadSyscallException : public Exception { public: ThreadSyscallException(const char*, int, int); virtual std::string ice_name() const; virtual std::string toString() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; int error() const; private: const int _error; static const char* _name; }; class ICE_API ThreadLockedException : public Exception { public: ThreadLockedException(const char*, int); virtual std::string ice_name() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; private: static const char* _name; }; class ICE_API ThreadStartedException : public Exception { public: ThreadStartedException(const char*, int); virtual std::string ice_name() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; private: static const char* _name; }; class ICE_API ThreadNotStartedException : public Exception { public: ThreadNotStartedException(const char*, int); virtual std::string ice_name() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; private: static const char* _name; }; class ICE_API BadThreadControlException : public Exception { public: BadThreadControlException(const char*, int); virtual std::string ice_name() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; private: static const char* _name; }; } #endif IceE-1.2.0/include/IceE/Logger.h0000755000076400007640000000133210616652361016063 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOGGER_H #define ICEE_LOGGER_H #include namespace Ice { class ICE_API Logger : public ::IceUtil::Shared { public: virtual void print(const ::std::string&) = 0; virtual void trace(const ::std::string&, const ::std::string&) = 0; virtual void warning(const ::std::string&) = 0; virtual void error(const ::std::string&) = 0; }; } #endif IceE-1.2.0/include/IceE/TransceiverF.h0000644000076400007640000000113010602152305017214 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_TRANSCEIVER_F_H #define ICEE_TRANSCEIVER_F_H #include #include namespace IceInternal { class Transceiver; ICE_API IceUtil::Shared* upCast(Transceiver*); typedef Handle TransceiverPtr; } #endif IceE-1.2.0/include/IceE/Buffer.h0000644000076400007640000000652010616076057016060 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_BUFFER_H #define ICEE_BUFFER_H #include #include #define ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION #define ICE_BUFFER_FIXED_SIZE 64 namespace IceInternal { class Buffer : private IceUtil::noncopyable { public: Buffer(size_t maxCapacity) : b(maxCapacity), i(b.begin()) { } virtual ~Buffer() { } ICE_API void swap(Buffer&); class Container : private IceUtil::noncopyable { public: // // Standard vector-like operations. // typedef Ice::Byte value_type; typedef Ice::Byte* iterator; typedef const Ice::Byte* const_iterator; typedef Ice::Byte& reference; typedef const Ice::Byte& const_reference; typedef Ice::Byte* pointer; typedef int difference_type; typedef size_t size_type; #ifdef ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION Container(size_type maxCapacity) : _buf(_fixed), _size(0), _capacity(ICE_BUFFER_FIXED_SIZE), _maxCapacity(maxCapacity) { } #else Container(size_type maxCapacity) : _buf(0), _size(0), _capacity(0), _maxCapacity(maxCapacity) { } #endif ~Container() { #ifdef ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION if(_buf != _fixed) { free(_buf); } #else free(_buf); #endif } iterator begin() { return _buf; } const_iterator begin() const { return _buf; } iterator end() { return _buf + _size; } const_iterator end() const { return _buf + _size; } size_type size() const { return _size; } bool empty() const { return !_size; } ICE_API void swap(Container&); ICE_API void clear(); void resize(size_type n) // Inlined for performance reasons. { if(n == 0) { clear(); } else if(n > _capacity) { reserve(n); } _size = n; } void reset() { if(_size > 0 && _size * 2 < _capacity) { // // If the current buffer size is smaller than the // buffer capacity, we shrink the buffer memory to the // current size. This is to avoid holding on too much // memory if it's not needed anymore. // if(++_shrinkCounter > 2) { reserve(_size); _shrinkCounter = 0; } } else { _shrinkCounter = 0; } _size = 0; } void push_back(value_type v) { resize(_size + 1); _buf[_size - 1] = v; } reference operator[](size_type n) { assert(n < _size); return _buf[n]; } const_reference operator[](size_type n) const { assert(n < _size); return _buf[n]; } private: ICE_API Container(const Container&); ICE_API void operator=(const Container&); ICE_API void reserve(size_type); pointer _buf; size_type _size; size_type _capacity; size_type _maxCapacity; int _shrinkCounter; #ifdef ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION // // For small buffers, we stack-allocate the memory. Only when // a buffer size larger than _fixedSize is requested, we // allocate memory dynamically. // value_type _fixed[ICE_BUFFER_FIXED_SIZE]; #endif }; Container b; Container::iterator i; }; } #endif IceE-1.2.0/include/IceE/IceE.h0000644000076400007640000000164610616637156015463 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ICE_H #define ICEE_ICE_H #include #include #include #include #include #include #ifndef ICEE_PURE_CLIENT # include # include # include #endif #include #include #include #ifdef ICEE_HAS_WSTRING # include #endif #include #include #include #include #endif IceE-1.2.0/include/IceE/Shared.h0000644000076400007640000001243310576536574016067 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_SHARED_H #define ICEE_SHARED_H #include #if defined(ICE_USE_MUTEX_SHARED) # include #elif (defined(__linux) || defined(__FreeBSD__)) && (defined(__i386) || defined(__x86_64)) && !defined(__ICC) # define ICEE_HAS_ATOMIC_FUNCTIONS // __ICC: The inline assembler causes problems with shared libraries. // // Linux only. Unfortunately, asm/atomic.h builds non-SMP safe code // with non-SMP kernels. This means that executables compiled with a // non-SMP kernel would fail randomly due to concurrency errors with // reference counting on SMP hosts. Therefore the relevent pieces of // atomic.h are more-or-less duplicated. // /* * Make sure gcc doesn't try to be clever and move things around * on us. We need to use _exactly_ the address the user gave us, * not some alias that contains the same information. */ struct ice_atomic_t { volatile int counter; }; /* * ice_atomic_set - set ice_atomic variable * @v: pointer of type ice_atomic_t * @i: required value * * Atomically sets the value of @v to @i. Note that the guaranteed * useful range of an ice_atomic_t is only 24 bits. */ inline void ice_atomic_set(ice_atomic_t* v, int i) { v->counter = i; } /* * ice_atomic_inc - increment ice_atomic variable * @v: pointer of type ice_atomic_t * * Atomically increments @v by 1. Note that the guaranteed useful * range of an ice_atomic_t is only 24 bits. * * Inlined because this operation is performance critical. */ inline void ice_atomic_inc(ice_atomic_t *v) { __asm__ __volatile__( "lock ; incl %0" :"=m" (v->counter) :"m" (v->counter)); } /** * ice_atomic_dec_and_test - decrement and test * @v: pointer of type ice_atomic_t * * Atomically decrements @v by 1 and returns true if the result is 0, * or false for all other cases. Note that the guaranteed useful * range of an ice_atomic_t is only 24 bits. * * Inlined because this operation is performance critical. */ inline int ice_atomic_dec_and_test(ice_atomic_t *v) { unsigned char c; __asm__ __volatile__( "lock ; decl %0; sete %1" :"=m" (v->counter), "=qm" (c) :"m" (v->counter) : "memory"); return c != 0; } /** * ice_atomic_exchange_add - same as InterlockedExchangeAdd. This * didn't come from atomic.h (the code was derived from similar code * in /usr/include/asm/rwsem.h) * * Inlined because this operation is performance critical. */ inline int ice_atomic_exchange_add(int i, ice_atomic_t* v) { int tmp = i; __asm__ __volatile__( "lock ; xadd %0,(%2)" :"+r"(tmp), "=m"(v->counter) :"r"(v), "m"(v->counter) : "memory"); return tmp + i; } #elif defined(_WIN32) // Nothing to include #else // Use a simple mutex # include #endif // // Base classes for reference counted types. The IceUtil::Handle // template can be used for smart pointers to types derived from these // bases. // // IceUtil::SimpleShared // ===================== // // A non thread-safe base class for reference-counted types. // // IceUtil::Shared // =============== // // A thread-safe base class for reference-counted types. // namespace IceUtil { class ICE_API SimpleShared { public: SimpleShared(); SimpleShared(const SimpleShared&); virtual ~SimpleShared() { } SimpleShared& operator=(const SimpleShared&) { return *this; } void __incRef() { assert(_ref >= 0); ++_ref; } void __decRef() { assert(_ref > 0); if(--_ref == 0) { if(!_noDelete) { _noDelete = true; delete this; } } } int __getRef() const { return _ref; } void __setNoDelete(bool b) { _noDelete = b; } private: int _ref; bool _noDelete; }; class ICE_API Shared { public: Shared(); Shared(const Shared&); virtual ~Shared() { } Shared& operator=(const Shared&) { return *this; } void __incRef() { #if defined(_WIN32) assert(InterlockedExchangeAdd(&_ref, 0) >= 0); InterlockedIncrement(&_ref); #elif defined(ICEE_HAS_ATOMIC_FUNCTIONS) assert(ice_atomic_exchange_add(0, &_ref) >= 0); ice_atomic_inc(&_ref); #else _mutex.lock(); assert(_ref >= 0); ++_ref; _mutex.unlock(); #endif } void __decRef() { #if defined(_WIN32) assert(InterlockedExchangeAdd(&_ref, 0) > 0); if(InterlockedDecrement(&_ref) == 0 && !_noDelete) { _noDelete = true; delete this; } #elif defined(ICEE_HAS_ATOMIC_FUNCTIONS) assert(ice_atomic_exchange_add(0, &_ref) > 0); if(ice_atomic_dec_and_test(&_ref) && !_noDelete) { _noDelete = true; delete this; } #else _mutex.lock(); bool doDelete = false; assert(_ref > 0); if(--_ref == 0) { doDelete = !_noDelete; _noDelete = true; } _mutex.unlock(); if(doDelete) { delete this; } #endif } int __getRef() const; void __setNoDelete(bool); protected: #if defined(_WIN32) LONG _ref; #elif defined(ICEE_HAS_ATOMIC_FUNCTIONS) ice_atomic_t _ref; #else int _ref; Mutex _mutex; #endif bool _noDelete; }; } #endif IceE-1.2.0/include/IceE/OutgoingConnectionFactoryF.h0000644000076400007640000000127510602152305022104 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OUTGOING_CONNECTION_FACTORY_F_H #define ICEE_OUTGOING_CONNECTION_FACTORY_F_H #include #include namespace IceInternal { class OutgoingConnectionFactory; ICE_API IceUtil::Shared* upCast(OutgoingConnectionFactory*); typedef IceInternal::Handle OutgoingConnectionFactoryPtr; } #endif IceE-1.2.0/include/IceE/ObjectAdapterF.h0000755000076400007640000000155410616127727017472 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OBJECT_ADAPTER_F_H #define ICEE_OBJECT_ADAPTER_F_H #include #include namespace Ice { class ObjectAdapter; inline bool operator==(const ObjectAdapter& l, const ObjectAdapter& r) { return &l == &r; } inline bool operator<(const ObjectAdapter& l, const ObjectAdapter& r) { return &l < &r; } } namespace IceInternal { ICE_API IceUtil::Shared* upCast(::Ice::ObjectAdapter*); } namespace Ice { typedef ::IceInternal::Handle< ::Ice::ObjectAdapter> ObjectAdapterPtr; } #endif IceE-1.2.0/include/IceE/Lock.h0000644000076400007640000000453010576536574015550 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOCK_H #define ICEE_LOCK_H #include #include namespace IceUtil { // // Forward declarations. // class Cond; // LockT and TryLockT are the preferred construct to lock/tryLock/unlock // simple and recursive mutexes. You typically allocate them on the // stack to hold a lock on a mutex. // LockT and TryLockT are not recursive: you cannot acquire several times // in a row a lock with the same Lock or TryLock object. // // We must name this LockT instead of Lock, because otherwise some // compilers (such as Sun C++ 5.4) have problems with constructs // such as: // // class Foo // { // // ... // typedef Lock Lock; // } // template class LockT { public: LockT(const T& mutex) : _mutex(mutex) { _mutex.lock(); _acquired = true; } ~LockT() { if (_acquired) { _mutex.unlock(); } } void acquire() const { if (_acquired) { throw ThreadLockedException(__FILE__, __LINE__); } _mutex.lock(); _acquired = true; } bool tryAcquire() const { if (_acquired) { throw ThreadLockedException(__FILE__, __LINE__); } _acquired = _mutex.tryLock(); return _acquired; } void release() const { if (!_acquired) { throw ThreadLockedException(__FILE__, __LINE__); } _mutex.unlock(); _acquired = false; } bool acquired() const { return _acquired; } protected: // TryLockT's contructor LockT(const T& mutex, bool) : _mutex(mutex) { _acquired = _mutex.tryLock(); } private: // Not implemented; prevents accidental use. // LockT(const LockT&); LockT& operator=(const LockT&); const T& _mutex; mutable bool _acquired; friend class Cond; }; // // Must be name TryLockT, not TryLock. See the comment for LockT for // an explanation. // template class TryLockT : public LockT { public: TryLockT(const T& mutex) : LockT(mutex, true) {} }; } // End namespace Ice #endif IceE-1.2.0/include/IceE/Initialize.h0000644000076400007640000000452010616161100016726 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_INITIALIZE_H #define ICEE_INITIALIZE_H #include #include #include #include #include namespace Ice { ICE_API StringSeq argsToStringSeq(int, char*[]); // // This function assumes that the string sequence only contains // elements of the argument vector. The function shifts the // the argument vector elements so that the vector matches the // contents of the sequence. // ICE_API void stringSeqToArgs(const StringSeq&, int&, char*[]); ICE_API PropertiesPtr createProperties( #ifdef ICEE_HAS_WSTRING const StringConverterPtr& = 0 #endif ); ICE_API PropertiesPtr createProperties(StringSeq&, const PropertiesPtr& = 0 #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& = 0 #endif ); ICE_API PropertiesPtr createProperties(int&, char*[], const PropertiesPtr& = 0 #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& = 0 #endif ); struct InitializationData { PropertiesPtr properties; LoggerPtr logger; #ifdef ICEE_HAS_WSTRING StringConverterPtr stringConverter; WstringConverterPtr wstringConverter; #endif }; ICE_API CommunicatorPtr initialize(int&, char*[], const InitializationData& = InitializationData(), Int = ICEE_INT_VERSION); ICE_API CommunicatorPtr initialize(StringSeq&, const InitializationData& = InitializationData(), Int = ICEE_INT_VERSION); ICE_API CommunicatorPtr initialize(const InitializationData& = InitializationData(), Int = ICEE_INT_VERSION); } namespace IceInternal { // // Some Ice extensions need access to the Ice internal instance. Do // not use this operation for regular application code! It is intended // to be used by modules such as Freeze. // ICE_API InstancePtr getInstance(const ::Ice::CommunicatorPtr&); } #endif IceE-1.2.0/include/IceE/TraceLevelsF.h0000644000076400007640000000112210602152305017141 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_TRACE_LEVELS_F_H #define ICEE_TRACE_LEVELS_F_H #include #include namespace IceInternal { class TraceLevels; IceUtil::Shared* upCast(TraceLevels*); typedef Handle TraceLevelsPtr; } #endif IceE-1.2.0/include/IceE/OperationMode.h0000755000076400007640000000130410576536574017424 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OPERATION_MODE_H #define ICEE_OPERATION_MODE_H #include namespace IceInternal { class BasicStream; } namespace Ice { enum OperationMode { Normal, Nonmutating, Idempotent }; ICE_API void __write(::IceInternal::BasicStream*, OperationMode); ICE_API void __read(::IceInternal::BasicStream*, OperationMode&); } #endif IceE-1.2.0/include/IceE/PropertiesF.h0000755000076400007640000000123310602152305017072 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROPERTIES_F_H #define ICEE_PROPERTIES_F_H #include #include namespace Ice { class Properties; } namespace IceInternal { ICE_API IceUtil::Shared* upCast(::Ice::Properties*); } namespace Ice { typedef ::IceInternal::Handle< ::Ice::Properties> PropertiesPtr; } #endif IceE-1.2.0/include/IceE/Base64.h0000644000076400007640000000142510616561253015667 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_BASE_64_H #define ICEE_BASE_64_H #include #include #include namespace IceUtil { class Base64 { public: ICE_API static std::string encode(const std::vector&); ICE_API static std::vector decode(const std::string&); ICE_API static bool isBase64(char); private: static char encode(unsigned char); static unsigned char decode(char); }; } #endif IceE-1.2.0/include/IceE/Properties.h0000755000076400007640000000444710616161100016774 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROPERTIES_H #define ICEE_PROPERTIES_H #include #include #include #include namespace Ice { typedef ::std::map< ::std::string, ::std::string> PropertyDict; class ICE_API Properties : public IceUtil::Mutex, public ::IceUtil::Shared { public: std::string getProperty(const std::string&); std::string getPropertyWithDefault(const std::string&, const std::string&); Ice::Int getPropertyAsInt(const std::string&); Ice::Int getPropertyAsIntWithDefault(const std::string&, Ice::Int); PropertyDict getPropertiesForPrefix(const std::string&); void setProperty(const std::string&, const std::string&); StringSeq getCommandLineOptions(); StringSeq parseCommandLineOptions(const std::string&, const StringSeq&); StringSeq parseIceCommandLineOptions(const StringSeq&); void load(const std::string&); PropertiesPtr clone(); private: Properties(const Properties*); Properties( #ifdef ICEE_HAS_WSTRING const StringConverterPtr& #endif ); Properties(StringSeq&, const PropertiesPtr& #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& #endif ); friend ICE_API PropertiesPtr createProperties( #ifdef ICEE_HAS_WSTRING const StringConverterPtr& #endif ); friend ICE_API PropertiesPtr createProperties(StringSeq&, const PropertiesPtr& #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& #endif ); void parseLine(const std::string& #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& #endif ); void loadConfig(); std::map _properties; #ifdef ICEE_HAS_WSTRING const StringConverterPtr _converter; #endif }; } #endif IceE-1.2.0/include/IceE/Current.h0000755000076400007640000000165110576536574016306 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_CURRENT_H #define ICEE_CURRENT_H #include #include #include #include namespace Ice { struct Current { ::Ice::ObjectAdapter* adapter; ::Ice::Connection* con; ::Ice::Identity id; ::std::string facet; ::std::string operation; ::Ice::OperationMode mode; ::Ice::Context ctx; ::Ice::Int requestId; ICE_API bool operator==(const Current&) const; ICE_API bool operator!=(const Current&) const; ICE_API bool operator<(const Current&) const; }; } #endif IceE-1.2.0/include/IceE/ObjectAdapterFactoryF.h0000644000076400007640000000122710602152305020775 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OBJECT_ADAPTER_FACTORY_F_H #define ICEE_OBJECT_ADAPTER_FACTORY_F_H #include #include namespace IceInternal { class ObjectAdapterFactory; IceUtil::Shared* upCast(ObjectAdapterFactory*); typedef IceInternal::Handle ObjectAdapterFactoryPtr; } #endif IceE-1.2.0/include/IceE/Iterator.h0000644000076400007640000000160410576536574016450 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ITERATOR_H #define ICEE_ITERATOR_H #include // Work-around for a limitation in the standard library provided // with the Sun C++ 5.x compilers #if defined(__SUNPRO_CC) && defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) template inline typename ForwardIterator::difference_type ice_distance(ForwardIterator first, ForwardIterator last) { ForwardIterator::difference_type result = 0; std::distance(first, last, result); return result; } #else #define ice_distance(x,y) std::distance(x,y) #endif #endif IceE-1.2.0/include/IceE/StringConverter.h0000755000076400007640000000434210616161100017770 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_STRING_CONVERTER_H #define ICE_STRING_CONVERTER_H #include #ifdef ICEE_HAS_WSTRING #include #include #include #include namespace Ice { // // Provides bytes to toUTF8. Raises MemoryLimitException when too many // bytes are requested. // class ICE_API UTF8Buffer { public: virtual Byte* getMoreBytes(size_t howMany, Byte* firstUnused) = 0; virtual ~UTF8Buffer() {} }; // // A StringConverter converts narrow or wide-strings to and from UTF-8 byte sequences. // It's used by the communicator during marshaling (toUTF8) and unmarshaling (fromUTF8). // It report errors by raising StringConversionFailed or MemoryLimitException. // template class BasicStringConverter : public IceUtil::Shared { public: // // Returns a pointer to byte after the last written byte (which may be // past the last byte returned by getMoreBytes). // virtual Byte* toUTF8(const charT* sourceStart, const charT* sourceEnd, UTF8Buffer&) const = 0; // // Unmarshals a UTF-8 sequence into a basic_string // virtual void fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, std::basic_string& target) const = 0; }; typedef BasicStringConverter StringConverter; typedef IceUtil::Handle StringConverterPtr; typedef BasicStringConverter WstringConverter; typedef IceUtil::Handle WstringConverterPtr; // // Converts to and from UTF-16 or UTF-32 depending on sizeof(wchar_t) // class ICE_API UnicodeWstringConverter : public WstringConverter { public: virtual Byte* toUTF8(const wchar_t* sourceStart, const wchar_t* sourceEnd, UTF8Buffer&) const; virtual void fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, std::wstring& target) const; }; } #endif #endif IceE-1.2.0/include/IceE/ProxyF.h0000644000076400007640000000065610615432737016102 0ustar matthewmatthew // ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROXY_F_H #define ICEE_PROXY_F_H #include #endif IceE-1.2.0/include/IceE/Exception.h0000644000076400007640000000234510576536574016620 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_EXCEPTION_H #define ICEE_EXCEPTION_H #include #include namespace IceInternal { class BasicStream; } namespace Ice { typedef IceUtil::Exception Exception; class ICE_API LocalException : public IceUtil::Exception { public: LocalException(const char*, int); virtual ~LocalException() throw(); virtual std::string ice_name() const = 0; virtual Exception* ice_clone() const = 0; virtual void ice_throw() const = 0; }; class ICE_API UserException : public IceUtil::Exception { public: virtual std::string ice_name() const = 0; virtual Exception* ice_clone() const = 0; virtual void ice_throw() const = 0; virtual void __write(::IceInternal::BasicStream*) const = 0; virtual void __read(::IceInternal::BasicStream*, bool) = 0; }; typedef ::IceInternal::Handle UserExceptionPtr; } #endif IceE-1.2.0/include/IceE/Thread.h0000644000076400007640000000656210576536574016076 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_THREAD_H #define ICEE_THREAD_H #include #include #include namespace IceUtil { class Time; class ICE_API ThreadControl { public: // // Constructs a ThreadControl representing the current thread. // join and detach cannot be called on such ThreadControl object. // ThreadControl(); #ifdef _WIN32 ThreadControl(HANDLE, DWORD); #else explicit ThreadControl(pthread_t); #endif // // Default copy destructor, assignment operator and destructor OK // // // == and != are meaningful only before the thread is joined/detached, // or while the thread is still running. // bool operator==(const ThreadControl&) const; bool operator!=(const ThreadControl&) const; // // Wait until the controlled thread terminates. The call has POSIX // semantics. // // At most one thread can wait for the termination of a given // thread. Calling join on a thread on which another thread is // already waiting for termination results in undefined behaviour, // as does joining with a thread after having joined with it // previously, or joining with a detached thread. // void join(); // // Detach a thread. Once a thread is detached, it cannot be // detached again, nor can it be joined with. Every thread that // was created using the IceUtil::Thread class must either be // joined with or detached exactly once. Detaching a thread a // second time, or detaching a thread that was previously joined // with results in undefined behavior. // void detach(); // // id() returns the Thread ID on Windows and the underlying pthread_t // on POSIX platforms. // #ifdef _WIN32 typedef DWORD ID; #else typedef pthread_t ID; #endif ID id() const; static void sleep(const Time&); static void yield(); private: #ifdef _WIN32 HANDLE _handle; DWORD _id; #else pthread_t _thread; // // Used to prevent joining/detaching a ThreadControl constructed // with the default constructor. Only needed to enforce our // portable join/detach behavior. // bool _detachable; #endif }; class ICE_API Thread : virtual public IceUtil::Shared { public: Thread(); virtual ~Thread(); virtual void run() = 0; ThreadControl start(size_t = 0); ThreadControl getThreadControl() const; bool operator==(const Thread&) const; bool operator!=(const Thread&) const; bool operator<(const Thread&) const; // // Check whether a thread is still alive. // bool isAlive() const; // // This function is an implementation detail; // do not call it. // void _done(); protected: Mutex _stateMutex; bool _started; bool _running; #ifdef _WIN32 HANDLE _handle; DWORD _id; #else pthread_t _thread; #endif private: Thread(const Thread&); // Copying is forbidden void operator=(const Thread&); // Assignment is forbidden }; typedef Handle ThreadPtr; } #endif IceE-1.2.0/include/IceE/Makefile0000644000076400007640000000134710576536574016152 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../.. include $(top_srcdir)/config/Make.rules install:: @if test ! -d $(install_includedir)/IceE ; \ then \ echo "Creating $(install_includedir)/IceE..." ; \ $(call mkdir,$(install_includedir)/IceE) ; \ fi @for i in *.h ; \ do \ echo "Installing $$i" ; \ $(INSTALL_DATA) $$i $(install_includedir)/IceE/$$i ; \ chmod a+r $(install_includedir)/IceE/$$i ; \ done IceE-1.2.0/include/IceE/InstanceF.h0000644000076400007640000000112310602152305016475 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_INSTANCE_F_H #define ICEE_INSTANCE_F_H #include #include namespace IceInternal { class Instance; ICE_API IceUtil::Shared* upCast(Instance*); typedef IceInternal::Handle InstancePtr; } #endif IceE-1.2.0/include/IceE/SafeStdio.h0000755000076400007640000000120110576536574016534 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_SAFE_STDIO_H #define ICEE_SAFE_STDIO_H #include namespace Ice { // // This is for two reasons. // 1. snprintf is _snprintf under windows. // 2. This function ensures the buffer is null terminated. // ICE_API std::string printfToString(const char*, ...); } #endif IceE-1.2.0/include/IceE/ConnectionF.h0000755000076400007640000000151410616127727017056 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_CONNECTION_F_H #define ICEE_CONNECTION_F_H #include #include namespace Ice { class Connection; inline bool operator==(const Connection& l, const Connection& r) { return &l == &r; } inline bool operator<(const Connection& l, const Connection& r) { return &l < &r; } } namespace IceInternal { ICE_API IceUtil::Shared* upCast(::Ice::Connection*); } namespace Ice { typedef ::IceInternal::Handle< ::Ice::Connection> ConnectionPtr; } #endif IceE-1.2.0/include/IceE/ExceptionBase.h0000644000076400007640000000335310577401770017401 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_EXCEPTION_BASE_H #define ICEE_EXCEPTION_BASE_H #include namespace IceUtil { class ICE_API Exception : public std::exception { public: Exception(); Exception(const char*, int); virtual ~Exception() throw(); virtual std::string ice_name() const; virtual std::string toString() const; virtual const char* what() const throw(); virtual Exception* ice_clone() const; virtual void ice_throw() const; const char* ice_file() const; int ice_line() const; private: const char* _file; int _line; static const char* _name; mutable std::string _str; // Initialized lazily in what(). }; class ICE_API NullHandleException : public Exception { public: NullHandleException(const char*, int); virtual ~NullHandleException() throw(); virtual std::string ice_name() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; private: static const char* _name; }; class ICE_API IllegalArgumentException : public Exception { public: IllegalArgumentException(const char*, int); IllegalArgumentException(const char*, int, const std::string&); virtual ~IllegalArgumentException() throw(); virtual std::string ice_name() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; std::string reason; private: static const char* _name; }; } #endif IceE-1.2.0/include/IceE/ReferenceF.h0000644000076400007640000000301310616576164016651 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_REFERENCE_F_H #define ICEE_REFERENCE_F_H #include #include namespace IceInternal { // // The Reference mode enumeration is defined here rather than in // IceInternal::Reference to allow the proxy code to inline the // proxy mode methods. // enum ReferenceMode { ReferenceModeTwoway, ReferenceModeOneway, ReferenceModeBatchOneway, ReferenceModeDatagram, ReferenceModeBatchDatagram, ReferenceModeLast = ReferenceModeBatchDatagram }; class Reference; ICE_API IceUtil::Shared* upCast(Reference*); typedef IceInternal::Handle ReferencePtr; class FixedReference; ICE_API IceUtil::Shared* upCast(FixedReference*); typedef IceInternal::Handle FixedReferencePtr; class RoutableReference; ICE_API IceUtil::Shared* upCast(RoutableReference*); typedef IceInternal::Handle RoutableReferencePtr; class DirectReference; ICE_API IceUtil::Shared* upCast(DirectReference*); typedef IceInternal::Handle DirectReferencePtr; class IndirectReference; ICE_API IceUtil::Shared* upCast(IndirectReference*); typedef IceInternal::Handle IndirectReferencePtr; } #endif IceE-1.2.0/include/IceE/AbstractMutex.h0000644000076400007640000000365510576536574017455 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ABSTRACT_MUTEX_H #define ICEE_ABSTRACT_MUTEX_H #include #include namespace IceUtil { class AbstractMutex { public: typedef LockT Lock; typedef TryLockT TryLock; virtual void lock() const = 0; virtual void unlock() const = 0; virtual bool tryLock() const = 0; }; template class AbstractMutexI : public AbstractMutex, public T { public: typedef LockT Lock; typedef TryLockT TryLock; virtual void lock() const { T::lock(); } virtual void unlock() const { T::unlock(); } virtual bool tryLock() const { return T::tryLock(); } virtual ~AbstractMutexI() {} }; template class AbstractMutexReadI : public AbstractMutex, public T { public: typedef LockT Lock; typedef TryLockT TryLock; virtual void lock() const { T::readLock(); } virtual void unlock() const { T::unlock(); } virtual bool tryLock() const { return T::tryReadLock(); } virtual ~AbstractMutexReadI() {} }; template class AbstractMutexWriteI : public AbstractMutex, public T { public: typedef LockT Lock; typedef TryLockT TryLock; virtual void lock() const { T::writeLock(); } virtual void unlock() const { T::unlock(); } virtual bool tryLock() const { return T::tryWriteLock(); } virtual ~AbstractMutexWriteI() {} }; } #endif IceE-1.2.0/include/IceE/LocatorInfoF.h0000644000076400007640000000155310602152305017157 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOCATOR_INFO_F_H #define ICEE_LOCATOR_INFO_F_H #include #ifdef ICEE_HAS_LOCATOR #include #include namespace IceInternal { class LocatorManager; IceUtil::Shared* upCast(LocatorManager*); typedef Handle LocatorManagerPtr; class LocatorInfo; IceUtil::Shared* upCast(LocatorInfo*); typedef Handle LocatorInfoPtr; class LocatorTable; IceUtil::Shared* upCast(LocatorTable*); typedef Handle LocatorTablePtr; } #endif #endif IceE-1.2.0/include/IceE/UndefSysMacros.h0000644000076400007640000000147510576536574017572 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_UNDEF_SYS_MACROS_H #define ICEE_UNDEF_SYS_MACROS_H // // This header includes macros that can end up being dragged into // the generated code from system headers, such as major() or NDEBUG. // If a Slice symbol has the same name as a macro, the generated // code most likely won't compile (but, depending how the macro is // defined, may even compile). // // Here, we undefine symbols that cause such problems. // #undef major #undef minor #undef min #undef max #endif IceE-1.2.0/include/IceE/Handle.h0000644000076400007640000001603710602152305016030 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_HANDLE_H #define ICEE_HANDLE_H #include #include // This isn't needed, but the generated code depends on it. // // "Handle" or "smart pointer" class for classes derived from // IceUtil::Shared or IceUtil::SimpleShared. // namespace IceUtil { template class HandleBase { public: typedef T element_type; T* get() const { return _ptr; } T* operator->() const { if(!_ptr) { // // We don't throw directly NullHandleException here to // keep the code size of this method to a minimun (the // assembly code for throwing an exception is much bigger // than just a function call). This maximises the chances // of inlining by compiler optimization. // throwNullHandleException(__FILE__, __LINE__); } return _ptr; } T& operator*() const { if(!_ptr) { // // We don't throw directly NullHandleException here to // keep the code size of this method to a minimun (the // assembly code for throwing an exception is much bigger // than just a function call). This maximises the chances // of inlining by compiler optimization. // throwNullHandleException(__FILE__, __LINE__); } return *_ptr; } operator bool() const { return _ptr ? true : false; } void swap(HandleBase& other) { std::swap(_ptr, other._ptr); } T* _ptr; private: void throwNullHandleException(const char *, int) const; }; template void HandleBase::throwNullHandleException(const char* file, int line) const { throw NullHandleException(file, line); } template inline bool operator==(const HandleBase& lhs, const HandleBase& rhs) { T* l = lhs.get(); U* r = rhs.get(); if(l && r) { return *l == *r; } else { return !l && !r; } } template inline bool operator!=(const HandleBase& lhs, const HandleBase& rhs) { return !operator==(lhs, rhs); } template inline bool operator<(const HandleBase& lhs, const HandleBase& rhs) { T* l = lhs.get(); U* r = rhs.get(); if(l && r) { return *l < *r; } else { return !l && r; } } template inline bool operator<=(const HandleBase& lhs, const HandleBase& rhs) { return lhs < rhs || lhs == rhs; } template inline bool operator>(const HandleBase& lhs, const HandleBase& rhs) { return !(lhs < rhs || lhs == rhs); } template inline bool operator>=(const HandleBase& lhs, const HandleBase& rhs) { return !(lhs < rhs); } template class Handle : public HandleBase { public: Handle(T* p = 0) { this->_ptr = p; if(this->_ptr) { this->_ptr->__incRef(); } } template Handle(const Handle& r) { this->_ptr = r._ptr; if(this->_ptr) { this->_ptr->__incRef(); } } Handle(const Handle& r) { this->_ptr = r._ptr; if(this->_ptr) { this->_ptr->__incRef(); } } ~Handle() { if(this->_ptr) { this->_ptr->__decRef(); } } Handle& operator=(T* p) { if(this->_ptr != p) { if(p) { p->__incRef(); } T* ptr = this->_ptr; this->_ptr = p; if(ptr) { ptr->__decRef(); } } return *this; } template Handle& operator=(const Handle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { r._ptr->__incRef(); } T* ptr = this->_ptr; this->_ptr = r._ptr; if(ptr) { ptr->__decRef(); } } return *this; } Handle& operator=(const Handle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { r._ptr->__incRef(); } T* ptr = this->_ptr; this->_ptr = r._ptr; if(ptr) { ptr->__decRef(); } } return *this; } template static Handle dynamicCast(const HandleBase& r) { return Handle(dynamic_cast(r._ptr)); } template static Handle dynamicCast(Y* p) { return Handle(dynamic_cast(p)); } }; } // // "Handle" or "smart pointer" class for classes derived from // IceUtil::Shared, or IceUtil::SimpleShared. // // In constrast to IceUtil::Handle, IceInternal::Handle requires the // declaration of the one global operation IceInternal::upCast(T*). // The use of global operations allows this template to be used for // types which are declared but not defined, provided that the two // above mentioned operations are declared. // namespace IceInternal { template class Handle : public ::IceUtil::HandleBase { public: Handle(T* p = 0) { this->_ptr = p; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } template Handle(const Handle& r) { this->_ptr = r._ptr; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } template Handle(const ::IceUtil::Handle& r) { this->_ptr = r._ptr; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } Handle(const Handle& r) { this->_ptr = r._ptr; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } ~Handle() { if(this->_ptr) { upCast(this->_ptr)->__decRef(); } } Handle& operator=(T* p) { if(this->_ptr != p) { if(p) { upCast(p)->__incRef(); } T* ptr = this->_ptr; this->_ptr = p; if(ptr) { upCast(ptr)->__decRef(); } } return *this; } template Handle& operator=(const Handle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { upCast(r._ptr)->__incRef(); } T* ptr = this->_ptr; this->_ptr = r._ptr; if(ptr) { upCast(ptr)->__decRef(); } } return *this; } template Handle& operator=(const ::IceUtil::Handle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { upCast(r._ptr)->__incRef(); } T* ptr = this->_ptr; this->_ptr = r._ptr; if(ptr) { upCast(ptr)->__decRef(); } } return *this; } Handle& operator=(const Handle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { upCast(r._ptr)->__incRef(); } T* ptr = this->_ptr; this->_ptr = r._ptr; if(ptr) { upCast(ptr)->__decRef(); } } return *this; } template static Handle dynamicCast(const ::IceUtil::HandleBase& r) { return Handle(dynamic_cast(r._ptr)); } template static Handle dynamicCast(Y* p) { return Handle(dynamic_cast(p)); } }; } #endif IceE-1.2.0/include/IceE/FactoryTableDef.h0000644000076400007640000000255210576536574017660 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_FACTORY_TABLE_DEF_H #define ICEE_FACTORY_TABLE_DEF_H #include #include #include namespace IceInternal { class ICE_API FactoryTableDef : private IceUtil::noncopyable { public: void addExceptionFactory(const ::std::string&, const IceInternal::UserExceptionFactoryPtr&); IceInternal::UserExceptionFactoryPtr getExceptionFactory(const ::std::string&) const; void removeExceptionFactory(const ::std::string&); private: IceUtil::Mutex _m; typedef ::std::pair EFPair; typedef ::std::map< ::std::string, EFPair> EFTable; EFTable _eft; }; class ICE_API FactoryTableWrapper : private IceUtil::noncopyable { public: friend class FactoryTable; FactoryTableWrapper(); ~FactoryTableWrapper(); private: void initialize(); void finalize(); static IceUtil::StaticMutex _m; static int _initCount; }; extern ICE_API FactoryTableWrapper factoryTableWrapper; } #endif IceE-1.2.0/include/IceE/Time.h0000644000076400007640000000637310576536574015565 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_TIME_H #define ICEE_TIME_H #include namespace IceUtil { class ICE_API Time { public: Time(); // No copy constructor and assignment operator necessary. The // automatically generated copy constructor and assignment // operator do the right thing. static Time now(); static Time seconds(Int64); static Time milliSeconds(Int64); static Time microSeconds(Int64); #ifndef _WIN32 operator timeval() const; #endif Int64 toSeconds() const; Int64 toMilliSeconds() const; Int64 toMicroSeconds() const; double toSecondsDouble() const; double toMilliSecondsDouble() const; double toMicroSecondsDouble() const; Time operator-() const { return Time(-_usec); } Time operator-(const Time& rhs) const { return Time(_usec - rhs._usec); } Time operator+(const Time& rhs) const { return Time(_usec + rhs._usec); } Time& operator+=(const Time& rhs) { _usec += rhs._usec; return *this; } Time& operator-=(const Time& rhs) { _usec -= rhs._usec; return *this; } bool operator<(const Time& rhs) const { return _usec < rhs._usec; } bool operator<=(const Time& rhs) const { return _usec <= rhs._usec; } bool operator>(const Time& rhs) const { return _usec > rhs._usec; } bool operator>=(const Time& rhs) const { return _usec >= rhs._usec; } bool operator==(const Time& rhs) const { return _usec == rhs._usec; } bool operator!=(const Time& rhs) const { return _usec != rhs._usec; } double operator/(const Time& rhs) const { return (double)_usec / (double)rhs._usec; } Time& operator*=(int rhs) { _usec *= rhs; return *this; } Time operator*(int rhs) const { Time t; t._usec = _usec * rhs; return t; } Time& operator/=(int rhs) { _usec /= rhs; return *this; } Time operator/(int rhs) const { Time t; t._usec = _usec / rhs; return t; } Time& operator*=(Int64 rhs) { _usec *= rhs; return *this; } Time operator*(Int64 rhs) const { Time t; t._usec = _usec * rhs; return t; } Time& operator/=(Int64 rhs) { _usec /= rhs; return *this; } Time operator/(Int64 rhs) const { Time t; t._usec = _usec / rhs; return t; } Time& operator*=(double rhs) { _usec = static_cast(static_cast(_usec) * rhs); return *this; } Time operator*(double rhs) const { Time t; t._usec = static_cast(static_cast(_usec) * rhs); return t; } Time& operator/=(double rhs) { _usec = static_cast(static_cast(_usec) / rhs); return *this; } Time operator/(double rhs) const { Time t; t._usec = static_cast(static_cast(_usec) / rhs); return t; } private: Time(Int64); Int64 _usec; }; } // End namespace Ice #endif IceE-1.2.0/include/IceE/FactoryTable.h0000644000076400007640000000130110576536574017230 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_FACTORYTABLE_H #define ICEE_FACTORYTABLE_H #include namespace IceInternal { class ICE_API FactoryTable { public: FactoryTable(); ~FactoryTable(); }; static FactoryTable factoryTableInitializer; // Dummy variable to force initialization of factoryTable extern ICE_API FactoryTableDef* factoryTable; } #endif IceE-1.2.0/include/IceE/ScopedArray.h0000644000076400007640000000215010576536574017070 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_SCOPED_ARRAY_H #define ICEE_SCOPED_ARRAY_H #include namespace IceUtil { template class ScopedArray : private noncopyable { public: explicit ScopedArray(T* ptr = 0) : _ptr(ptr) { } ~ScopedArray() { if(_ptr != 0) { delete[] _ptr; } } void reset(T* ptr = 0) { assert(ptr == 0 || ptr != _ptr); if(_ptr != 0) { delete[] _ptr; } _ptr = ptr; } T& operator[](size_t i) const { assert(_ptr != 0); assert(i >= 0); return _ptr[i]; } T* get() const { return _ptr; } void swap(ScopedArray& a) { T* tmp = a._ptr; a._ptr = _ptr; _ptr = tmp; } private: T* _ptr; }; } // End of namespace IceUtil #endif IceE-1.2.0/include/IceE/StringUtil.h0000644000076400007640000000275110576536574016767 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_STRING_UTIL_H #define ICEE_STRING_UTIL_H #include namespace IceUtil { // // Add escape sequences (like "\n", or "\0xxx") to make a string // readable in ASCII. // ICE_API std::string escapeString(const std::string&, const std::string&); // // Remove escape sequences added by escapeString. // ICE_API bool unescapeString(const std::string&, std::string::size_type, std::string::size_type, std::string&); // // If a single or double quotation mark is found at the start // position, then the position of the matching closing quote is // returned. If no quotation mark is found at the start position, then // 0 is returned. If no matching closing quote is found, then // std::string::npos is returned. // ICE_API std::string::size_type checkQuote(const std::string&, std::string::size_type = 0); // // Match `s' against the pattern `pat'. A * in the pattern acts // as a wildcard: it matches any non-empty sequence of characters // other than a period (`.'). We match by hand here because // it's portable across platforms (whereas regex() isn't). // ICE_API bool match(const std::string&, const std::string&, bool = false); } #endif IceE-1.2.0/include/IceE/Config.h0000644000076400007640000002117410620455717016055 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_CONFIG_H #define ICEE_CONFIG_H // // Comment this out if you want to build without Router support. // #define ICEE_HAS_ROUTER // // Comment this out if you want to build without Locator support. // #define ICEE_HAS_LOCATOR // // Comment this out if you want to build without batch mode on the client side. // #define ICEE_HAS_BATCH // // Comment this out if you want to build without wstring and string converter // support. // #define ICEE_HAS_WSTRING // // Uncomment this if want the pure client library built with // only the blocking concurrency model. // If commented, both blocking and thread-per-connections support // will be included in client library. // //#define ICEE_PURE_BLOCKING_CLIENT // *********************************************************************** // // User should not change anything below this line! // // *********************************************************************** // // Unless we're building a pure client batch mode cannot be disabled. // #if !defined(ICEE_PURE_CLIENT) && !defined(ICEE_HAS_BATCH) # define ICEE_HAS_BATCH #endif // // Unless we are building a pure client we cannot build pure blocking // client. // #if !defined(ICEE_PURE_CLIENT) && defined(ICEE_PURE_BLOCKING_CLIENT) # undef ICEE_PURE_BLOCKING_CLIENT #endif // // Use poll()/WSAEventSelect for timeouts. // // Using WSAEventSelect for timeouts on Windows is necessary because // when a socket times out, it can't be re-used (and we need the // transceiver read() call to periodically timeout since it can't be // unblocked by shutting down the socket.) // // Also, on Windows CE, socket timeouts (SO_SNDTIMEO and SO_RCVTIMEO) // are not supported so we have to use WSAEventSelect to implement // timeouts. // // This macro can also be defined for non-Windows platforms to use // poll() for timeouts rather than using socket timeouts. // #if defined(_WIN32) # define ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS #endif // // Only supported/needed with VC6; Totally undocumented! And if you // set it lower than 512 bytes, the program crashes. Either leave at // 0x200 or 0x1000 // // I don't know whether this is necessary, or needed for VC7. // #if defined(_MSC_VER) && !defined(_WIN32_WCE) && (_MSC_VER < 1300) && defined(NDEBUG) # pragma comment(linker,"/FILEALIGN:0x200") #endif // // Endianness // // Most CPUs support only one endianness, with the notable exceptions // of Itanium (IA64) and MIPS. // #if defined(__i386) || defined(_M_IX86) || defined (__x86_64) || \ defined (_M_ARM) || defined(__MIPSEL__) || defined (__ARMEL__) # define ICE_LITTLE_ENDIAN #elif defined(__sparc) || defined(__sparc__) || defined(__hppa) || \ defined(__ppc__) || defined(_ARCH_COM) || defined(__MIPSEB__) # define ICE_BIG_ENDIAN #else # error "Unknown architecture" #endif // // 32 or 64 bit mode? // #if defined(__linux) && defined(__sparc__) // // We are a linux sparc, which forces 32 bit usr land, no matter the architecture // # define ICE_32 #elif defined(__sun) && defined(__sparcv9) || \ defined(__linux) && defined(__x86_64) || \ defined(__hppa) && defined(__LP64__) || \ defined(_ARCH_COM) && defined(__64BIT__) # define ICE_64 #else # define ICE_32 #endif // // Compiler extensions to export and import symbols: see the documentation // for Visual C++, Sun ONE Studio 8 and HP aC++. // // TODO: more macros to support IBM Visual Age _Export syntax as well. // #if ((defined(_MSC_VER) || defined(_WIN32_WCE)) && !defined(ICEE_STATIC_LIBS)) || (defined(__HP_aCC) && defined(__HP_WINDLL)) # define ICE_DECLSPEC_EXPORT __declspec(dllexport) # define ICE_DECLSPEC_IMPORT __declspec(dllimport) #elif defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x550) # define ICE_DECLSPEC_EXPORT __global # define ICE_DECLSPEC_IMPORT #else # define ICE_DECLSPEC_EXPORT /**/ # define ICE_DECLSPEC_IMPORT /**/ #endif #if defined(_MSC_VER) && (_MSC_VER >= 1300) # define ICE_DEPRECATED_API __declspec(deprecated) #elif defined(__GNUC__) # define ICE_DEPRECATED_API __attribute__((deprecated)) #else # define ICE_DEPRECATED_API /**/ #endif // // Let's use these extensions with IceE: // #ifdef ICE_API_EXPORTS # define ICE_API ICE_DECLSPEC_EXPORT #else # define ICE_API ICE_DECLSPEC_IMPORT #endif // // For STLport. If we compile in debug mode, we want to use the debug // STLport library. This is done by setting _STLP_DEBUG before any // STLport header files are included. // // TODO: figure out why IceE does not compile with _SLTP_DEBUG using // the Intel compiler. // #ifdef _WIN32_WCE # define _STLP_NO_IOSTREAMS #else # if !defined(NDEBUG) && !defined(_STLP_DEBUG) && !defined(__INTEL_COMPILER) # define _STLP_DEBUG # endif #endif #if defined(_WIN32) // // Comment out the following block if you want to run on Windows 9x // or Windows NT 3.51. // # ifndef _WIN32_WINNT // // Necessary for TryEnterCriticalSection. // # define _WIN32_WINNT 0x0400 # endif # include #if defined(_WIN32_WCE) && defined(_MSC_VER) // // return type for ... (ie; not a UDT or reference to a UDT. Will // produce errors if applied using infix notation) // # pragma warning( disable : 4284 ) #endif // '...' : forcing value to bool 'true' or 'false' (performance warning) # pragma warning( disable : 4800 ) // ... identifier was truncated to '255' characters in the debug information # pragma warning( disable : 4786 ) // 'this' : used in base member initializer list # pragma warning( disable : 4355 ) // class ... needs to have dll-interface to be used by clients of class ... # pragma warning( disable : 4251 ) // ... : inherits ... via dominance # pragma warning( disable : 4250 ) // non dll-interface class ... used as base for dll-interface class ... # pragma warning( disable : 4275 ) // ...: decorated name length exceeded, name was truncated # pragma warning( disable : 4503 ) #endif // // Some include files we need almost everywhere. // #include #include #ifndef _WIN32 # include # include #endif // // If we use Visual C++ 6.0 or Embedded Visual C++ 4.0, we must use STLport // #if defined(_MSC_VER) && (_MSC_VER < 1300) && !defined(_STLP_BEGIN_NAMESPACE) # error "IceE for Visual C++ 6.0 and Embedded Visual C++ 4.0 require STLport" #endif // // By deriving from this class, other classes are made non-copyable. // namespace IceUtil { // // TODO: Constructor and destructor should not be inlined, as they are // not performance critical. // // TODO: Naming conventions? // class noncopyable { protected: noncopyable() { } ~noncopyable() { } // May not be virtual! Classes without virtual operations also derive from noncopyable. private: noncopyable(const noncopyable&); const noncopyable& operator=(const noncopyable&); }; // // Int64 typedef // #if defined(__BCPLUSPLUS__) || defined(_MSC_VER) // // On Windows, long is always 32-bit // typedef __int64 Int64; #elif defined(ICE_64) typedef long Int64; #else typedef long long Int64; #endif } // // ICE_INT64: macro for Int64 literal values // #if defined(__BCPLUSPLUS__) || defined(_MSC_VER) # define ICE_INT64(n) n##i64 #elif defined(ICE_64) # define ICE_INT64(n) n##L #else # define ICE_INT64(n) n##LL #endif // // The Ice-E version. // #define ICEE_STRING_VERSION "1.2.0" // "A.B.C", with A=major, B=minor, C=patch #define ICEE_INT_VERSION 10200 // AABBCC, with AA=major, BB=minor, CC=patch // // Some include files we need almost everywhere // #if !defined(_WIN32_WCE) #include #endif #include #include #include #include #include #if !defined(_WIN32_WCE) # if defined(_WIN32) # include # else # include # include # endif #endif // // Define the IceInternal namespace, so that we can use the following // everywhere in our code: // // using namespace IceInternal; // namespace IceInternal { } namespace Ice { typedef unsigned char Byte; typedef short Short; typedef int Int; typedef IceUtil::Int64 Long; typedef float Float; typedef double Double; #ifdef ICEE_HAS_WSTRING typedef std::wstring Wstring; #else typedef std::string Wstring; #endif } // TODO: Should not be inline, this is not performance critical. #ifdef _WIN32 inline int getSystemErrno() { return GetLastError(); } #else inline int getSystemErrno() { return errno; } #endif #endif IceE-1.2.0/include/IceE/StaticMutex.h0000644000076400007640000001205610576536574017134 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_STATIC_MUTEX_H #define ICEE_STATIC_MUTEX_H #include #include #include #if defined(_MSC_VER) && (_MSC_VER < 1300) // // Old versions of the Platform SDK don't have InterlockedCompareExchangePointer // # ifndef InterlockedCompareExchangePointer # define InterlockedCompareExchangePointer(Destination, ExChange, Comperand) \ InterlockedCompareExchange(Destination, ExChange, Comperand) # endif #endif namespace IceUtil { // // Forward declaration for friend. // class Cond; // // Simple non-recursive Mutex implementation. // These mutexes are POD types (see ISO C++ 9(4) and 8.5.1) and must be // initialized statically using ICE_STATIC_MUTEX_INITIALIZER. // class StaticMutex { public: // // Lock & TryLock typedefs. // typedef LockT Lock; typedef TryLockT TryLock; // // Note that lock/tryLock & unlock in general should not be used // directly. Instead use Lock & TryLock. // void lock() const; // // Returns true if the lock was acquired, and false otherwise. // bool tryLock() const; void unlock() const; #ifdef _WIN32 # if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400 mutable CRITICAL_SECTION* _mutex; # else # error Ice-E for Windows requires fully functional critical sections # endif #else mutable pthread_mutex_t _mutex; #endif #ifndef _MSC_VER // COMPILERBUG // VC++ considers that aggregates should not have private members ... // even if it's just functions. private: #endif // // LockState and the lock/unlock variations are for use by the // Condition variable implementation. // #ifdef _WIN32 struct LockState { }; #else struct LockState { pthread_mutex_t* mutex; }; #endif void unlock(LockState&) const; void lock(LockState&) const; #ifdef _WIN32 inline bool initialized() const; ICE_API void initialize() const; #endif #ifndef _MSC_VER friend class Cond; #endif }; #ifdef _WIN32 # define ICE_STATIC_MUTEX_INITIALIZER { false } #else # define ICE_STATIC_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER } #endif // // A "shared" global mutex that can be used for very simple tasks // which should not lock any other mutexes. // extern ICE_API StaticMutex globalMutex; // // For performance reasons the following functions are inlined. // #ifdef _WIN32 inline bool StaticMutex::initialized() const { // // Read mutex and then inserts a memory barrier to ensure we can't // see tmp != 0 before we see the initialized object // void* tmp = _mutex; return InterlockedCompareExchangePointer(reinterpret_cast(&tmp), 0, 0) != 0; } inline void StaticMutex::lock() const { if(!initialized()) { initialize(); } EnterCriticalSection(_mutex); #ifndef _WIN32_WCE assert(_mutex->RecursionCount == 1); #endif } inline bool StaticMutex::tryLock() const { if(!initialized()) { initialize(); } if(!TryEnterCriticalSection(_mutex)) { return false; } #ifndef _WIN32_WCE if(_mutex->RecursionCount > 1) { LeaveCriticalSection(_mutex); throw ThreadLockedException(__FILE__, __LINE__); } #endif return true; } inline void StaticMutex::unlock() const { assert(_mutex != 0); #ifndef _WIN32_WCE assert(_mutex->RecursionCount == 1); #endif LeaveCriticalSection(_mutex); } inline void StaticMutex::unlock(LockState&) const { assert(_mutex != 0); #ifndef _WIN32_WCE assert(_mutex->RecursionCount == 1); #endif LeaveCriticalSection(_mutex); } inline void StaticMutex::lock(LockState&) const { if(!initialized()) { initialize(); } EnterCriticalSection(_mutex); } #else inline void StaticMutex::lock() const { int rc = pthread_mutex_lock(&_mutex); if(rc != 0) { if(rc == EDEADLK) { throw ThreadLockedException(__FILE__, __LINE__); } else { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } } inline bool StaticMutex::tryLock() const { int rc = pthread_mutex_trylock(&_mutex); if(rc != 0 && rc != EBUSY) { if(rc == EDEADLK) { throw ThreadLockedException(__FILE__, __LINE__); } else { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } return (rc == 0); } inline void StaticMutex::unlock() const { int rc = pthread_mutex_unlock(&_mutex); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } inline void StaticMutex::unlock(LockState& state) const { state.mutex = &_mutex; } inline void StaticMutex::lock(LockState&) const { } #endif } // End namespace Ice #endif IceE-1.2.0/include/IceE/Communicator.h0000755000076400007640000000450510616403646017311 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_COMMUNICATOR_H #define ICEE_COMMUNICATOR_H #include #include #include #include #include #include // For the friend declarations. namespace Ice { class ICE_API Communicator : public ::IceUtil::Shared { public: void destroy(); void shutdown(); void waitForShutdown(); bool isShutdown() const; ObjectPrx stringToProxy(const std::string&) const; std::string proxyToString(const ObjectPrx&) const; ObjectPrx propertyToProxy(const std::string&) const; Identity stringToIdentity(const std::string&) const; std::string identityToString(const Identity&) const; ObjectAdapterPtr createObjectAdapter(const std::string&); ObjectAdapterPtr createObjectAdapterWithEndpoints(const std::string&, const std::string&); #ifdef ICEE_HAS_ROUTER ObjectAdapterPtr createObjectAdapterWithRouter(const std::string&, const RouterPrx&); #endif PropertiesPtr getProperties() const; LoggerPtr getLogger() const; #ifdef ICEE_HAS_ROUTER RouterPrx getDefaultRouter() const; void setDefaultRouter(const RouterPrx&); #endif #ifdef ICEE_HAS_LOCATOR LocatorPrx getDefaultLocator() const; void setDefaultLocator(const LocatorPrx&); #endif #ifdef ICEE_HAS_BATCH void flushBatchRequests(); #endif private: Communicator(const InitializationData&); ~Communicator(); // // Certain initialization tasks need to be completed after the // constructor. // void finishSetup(int&, char*[]); friend ICE_API CommunicatorPtr initialize(int&, char*[], const InitializationData&, Int); friend ICE_API CommunicatorPtr initialize(StringSeq&, const InitializationData&, Int); friend ICE_API CommunicatorPtr initialize(const InitializationData&, Int); friend ICE_API ::IceInternal::InstancePtr IceInternal::getInstance(const ::Ice::CommunicatorPtr&); const ::IceInternal::InstancePtr _instance; }; } #endif IceE-1.2.0/include/IceE/Unicode.h0000644000076400007640000001011310616505646016227 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_UNICODE_H #define ICEE_UNICODE_H #include #include namespace IceUtil { #if defined(_MSC_VER) && (_MSC_VER >= 1300) // // With Visual C++ 7.x, wchar_t is either a typedef unsigned short or a // native type (when /Zc:wchar_t is used). // Since wstring is a typedef basic_string, its type is also // different depending on whether /Zc:wchar_t is used or not. // // With Visual C++ 7.x, the default is typedef; with Visual C++ 8.0, // the default is native type. // // Ice is always built with the default, but provides wstringToString() // and stringToWstring() implementations for both flavors of wstring. // # if defined(_NATIVE_WCHAR_T_DEFINED) ICE_API std::string wstringToString(const std::wstring&); # if _MSC_VER >= 1400 // // Building or using with VC8 // ICE_API std::wstring stringToWstring(const std::string&); ICE_API std::string wstringToString(const std::basic_string&); ICE_API std::basic_string stringToTypedefWstring(const std::string&); # else // // Using a VC7.x build with the non-default /Zc // ICE_API std::wstring stringToNativeWstring(const std::string&); inline std::wstring stringToWstring(const std::string& str) { return stringToNativeWstring(str); } # endif # else ICE_API std::string wstringToString(const std::wstring&); # if _MSC_VER < 1400 // // Building or using with VC7.x // ICE_API std::wstring stringToWstring(const std::string&); ICE_API std::string wstringToString(const std::basic_string<__wchar_t>&); ICE_API std::basic_string<__wchar_t> stringToNativeWstring(const std::string&); # else // // Using a VC8.x build the non-default /Zc // ICE_API std::wstring stringToTypedefWstring(const std::string&); inline std::wstring stringToWstring(const std::string& str) { return stringToTypedefWstring(str); } # endif # endif #else ICE_API std::string wstringToString(const std::wstring&); ICE_API std::wstring stringToWstring(const std::string&); #endif // // Converts UTF-8 byte-sequences to and from UTF-16 or UTF-32 (with native // endianness) depending on sizeof(wchar_t). // // These are thin wrappers over the UTF8/16/32 converters provided by // unicode.org // // // TODO: provide the same support for /Zc:wchar_t as the functions above // enum ConversionResult { conversionOK, /* conversion successful */ sourceExhausted, /* partial character in source, but hit end */ targetExhausted, /* insuff. room in target for conversion */ sourceIllegal /* source sequence is illegal/malformed */ }; enum ConversionFlags { strictConversion = 0, lenientConversion }; typedef unsigned char Byte; ICE_API bool isLegalUTF8Sequence(const Byte* source, const Byte* end); ICE_API ConversionResult convertUTFWstringToUTF8(const wchar_t*& sourceStart, const wchar_t* sourceEnd, Byte*& targetStart, Byte* targetEnd, ConversionFlags flags); ICE_API ConversionResult convertUTF8ToUTFWstring(const Byte*& sourceStart, const Byte* sourceEnd, wchar_t*& targetStart, wchar_t* targetEnd, ConversionFlags flags); ICE_API ConversionResult convertUTF8ToUTFWstring(const Byte*& sourceStart, const Byte* sourceEnd, std::wstring& target, ConversionFlags flags); // // UTFConversionException is raised by wstringToString() or stringToWstring() // to report a conversion error // class ICE_API UTFConversionException : public Exception { public: UTFConversionException(const char*, int, ConversionResult); virtual std::string ice_name() const; virtual std::string toString() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; ConversionResult conversionResult() const; private: const ConversionResult _conversionResult; static const char* _name; }; } #endif IceE-1.2.0/include/IceE/Functional.h0000644000076400007640000003651610576536574016773 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_FUNCTIONAL_H #define ICEE_FUNCTIONAL_H #include #include namespace IceUtilInternal { // ---------------------------------------------------------------------- // Various function objects that work with handles instead of plain // pointers. // ---------------------------------------------------------------------- template class MemFun : public std::unary_function { typedef R (T::*MemberFN)(void); MemberFN _mfn; public: explicit MemFun(MemberFN p) : _mfn(p) { } R operator()(H handle) const { return (handle.get() ->* _mfn)(); } }; template class MemFun1 : public std::binary_function { typedef R (T::*MemberFN)(A); MemberFN _mfn; public: explicit MemFun1(MemberFN p) : _mfn(p) { } R operator()(H handle, A arg) const { return (handle.get() ->* _mfn)(arg); } }; template class VoidMemFun : public std::unary_function { typedef void (T::*MemberFN)(void); MemberFN _mfn; public: explicit VoidMemFun(MemberFN p) : _mfn(p) { } void operator()(H handle) const { (handle.get() ->* _mfn)(); } }; template class VoidMemFun1 : public std::binary_function { typedef void (T::*MemberFN)(A); MemberFN _mfn; public: explicit VoidMemFun1(MemberFN p) : _mfn(p) { } void operator()(H handle, A arg) const { (handle.get() ->* _mfn)(arg); } }; template class SecondMemFun : public std::unary_function, R> { typedef R (T::*MemberFN)(void); MemberFN _mfn; public: explicit SecondMemFun(MemberFN p) : _mfn(p) { } R operator()(std::pair pair) const { return (pair.second.get() ->* _mfn)(); } }; template class SecondMemFun1 : public std::binary_function, A, R> { typedef R (T::*MemberFN)(A); MemberFN _mfn; public: explicit SecondMemFun1(MemberFN p) : _mfn(p) { } R operator()(std::pair pair, A arg) const { return (pair.second.get() ->* _mfn)(arg); } }; template class SecondVoidMemFun : public std::unary_function, void> { typedef void (T::*MemberFN)(void); MemberFN _mfn; public: explicit SecondVoidMemFun(MemberFN p) : _mfn(p) { } void operator()(std::pair pair) const { (pair.second.get() ->* _mfn)(); } }; template class SecondVoidMemFun1 : public std::binary_function, A, void> { typedef void (T::*MemberFN)(A); MemberFN _mfn; public: explicit SecondVoidMemFun1(MemberFN p) : _mfn(p) { } void operator()(std::pair pair, A arg) const { (pair.second.get() ->* _mfn)(arg); } }; template class ConstMemFun : public std::unary_function { typedef R (T::*MemberFN)(void) const; MemberFN _mfn; public: explicit ConstMemFun(MemberFN p) : _mfn(p) { } R operator()(H handle) const { return (handle.get() ->* _mfn)(); } }; template class ConstMemFun1 : public std::binary_function { typedef R (T::*MemberFN)(A) const; MemberFN _mfn; public: explicit ConstMemFun1(MemberFN p) : _mfn(p) { } R operator()(H handle, A arg) const { return (handle.get() ->* _mfn)(arg); } }; template class ConstVoidMemFun : public std::unary_function { typedef void (T::*MemberFN)(void) const; MemberFN _mfn; public: explicit ConstVoidMemFun(MemberFN p) : _mfn(p) { } void operator()(H handle) const { (handle.get() ->* _mfn)(); } }; template class ConstVoidMemFun1 : public std::binary_function { typedef void (T::*MemberFN)(A) const; MemberFN _mfn; public: explicit ConstVoidMemFun1(MemberFN p) : _mfn(p) { } void operator()(H handle, A arg) const { (handle.get() ->* _mfn)(arg); } }; template class SecondConstMemFun : public std::unary_function, R> { typedef R (T::*MemberFN)(void) const; MemberFN _mfn; public: explicit SecondConstMemFun(MemberFN p) : _mfn(p) { } R operator()(std::pair pair) const { return (pair.second.get() ->* _mfn)(); } }; template class SecondConstMemFun1 : public std::binary_function, A, R> { typedef R (T::*MemberFN)(A) const; MemberFN _mfn; public: explicit SecondConstMemFun1(MemberFN p) : _mfn(p) { } R operator()(std::pair pair, A arg) const { return (pair.second.get() ->* _mfn)(arg); } }; template class SecondConstVoidMemFun : public std::unary_function, void> { typedef void (T::*MemberFN)(void) const; MemberFN _mfn; public: explicit SecondConstVoidMemFun(MemberFN p) : _mfn(p) { } void operator()(std::pair pair) const { (pair.second.get() ->* _mfn)(); } }; template class SecondConstVoidMemFun1 : public std::binary_function, A, void> { typedef void (T::*MemberFN)(A) const; MemberFN _mfn; public: explicit SecondConstVoidMemFun1(MemberFN p) : _mfn(p) { } void operator()(std::pair pair, A arg) const { (pair.second.get() ->* _mfn)(arg); } }; } // ---------------------------------------------------------------------- // Inline functions that return function objects that work with // IceUtil::Handle // ---------------------------------------------------------------------- namespace IceUtil { template inline ::IceUtilInternal::MemFun > memFun(R (T::*p)(void)) { return ::IceUtilInternal::MemFun >(p); } template inline ::IceUtilInternal::MemFun1, A> memFun1(R (T::*p)(A)) { return ::IceUtilInternal::MemFun1, A>(p); } template inline ::IceUtilInternal::VoidMemFun > voidMemFun(void (T::*p)(void)) { return ::IceUtilInternal::VoidMemFun >(p); } template inline ::IceUtilInternal::VoidMemFun1, A> voidMemFun1(void (T::*p)(A)) { return ::IceUtilInternal::VoidMemFun1, A>(p); } template inline ::IceUtilInternal::SecondMemFun > secondMemFun(R (T::*p)(void)) { return ::IceUtilInternal::SecondMemFun >(p); } template inline ::IceUtilInternal::SecondMemFun1, A> secondMemFun1(R (T::*p)(A)) { return ::IceUtilInternal::SecondMemFun1, A>(p); } template inline ::IceUtilInternal::SecondVoidMemFun > secondVoidMemFun(void (T::*p)(void)) { return ::IceUtilInternal::SecondVoidMemFun >(p); } template inline ::IceUtilInternal::SecondVoidMemFun1, A> secondVoidMemFun1(void (T::*p)(A)) { return ::IceUtilInternal::SecondVoidMemFun1, A>(p); } template inline ::IceUtilInternal::ConstMemFun > constMemFun(R (T::*p)(void) const) { return ::IceUtilInternal::ConstMemFun >(p); } template inline ::IceUtilInternal::ConstMemFun1, A> constMemFun1(R (T::*p)(A) const) { return ::IceUtilInternal::ConstMemFun1, A>(p); } template inline ::IceUtilInternal::ConstVoidMemFun > constVoidMemFun(void (T::*p)(void) const) { return ::IceUtilInternal::ConstVoidMemFun >(p); } template inline ::IceUtilInternal::ConstVoidMemFun1, A> constVoidMemFun1(void (T::*p)(A) const) { return ::IceUtilInternal::ConstVoidMemFun1, A>(p); } template inline ::IceUtilInternal::SecondConstMemFun > secondConstMemFun(R (T::*p)(void) const) { return ::IceUtilInternal::SecondConstMemFun >(p); } template inline ::IceUtilInternal::SecondConstMemFun1, A> secondConstMemFun1(R (T::*p)(A) const) { return ::IceUtilInternal::SecondConstMemFun1, A>(p); } template inline ::IceUtilInternal::SecondConstVoidMemFun > secondConstVoidMemFun(void (T::*p)(void) const) { return ::IceUtilInternal::SecondConstVoidMemFun >(p); } template inline ::IceUtilInternal::SecondConstVoidMemFun1, A> secondConstVoidMemFun1(void (T::*p)(A) const) { return ::IceUtilInternal::SecondConstVoidMemFun1, A>(p); } } // ---------------------------------------------------------------------- // Extension for STLport: Special versions for bind1st and bind2nd for // operations that do not return anything (i.e., return void). Needed // for broken compilers, such as Visual C++ 6.0. // ---------------------------------------------------------------------- #ifdef _STLP_BEGIN_NAMESPACE _STLP_BEGIN_NAMESPACE template class voidbinder1st : public unary_function { protected: _Operation _M_op; typename _Operation::first_argument_type _M_value; public: voidbinder1st(const _Operation& __x, const typename _Operation::first_argument_type& __y) : _M_op(__x), _M_value(__y) {} typename _Operation::result_type operator()(const typename _Operation::second_argument_type& __x) const { _M_op(_M_value, __x); } }; template inline voidbinder1st<_Operation> voidbind1st(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::first_argument_type _Arg1_type; return voidbinder1st<_Operation>(__fn, _Arg1_type(__x)); } template class voidbinder2nd : public unary_function { protected: _Operation _M_op; typename _Operation::second_argument_type value; public: voidbinder2nd(const _Operation& __x, const typename _Operation::second_argument_type& __y) : _M_op(__x), value(__y) {} typename _Operation::result_type operator()(const typename _Operation::first_argument_type& __x) const { _M_op(__x, value); } }; template inline voidbinder2nd<_Operation> voidbind2nd(const _Operation& __fn, const _Tp& __x) { typedef typename _Operation::second_argument_type _Arg2_type; return voidbinder2nd<_Operation>(__fn, _Arg2_type(__x)); } _STLP_END_NAMESPACE #endif // ---------------------------------------------------------------------- // Inline functions that return function objects that work with // IceInternal::Handle // ---------------------------------------------------------------------- namespace Ice { template inline ::IceUtilInternal::MemFun > memFun(R (T::*p)(void)) { return ::IceUtilInternal::MemFun >(p); } template inline ::IceUtilInternal::MemFun1, A> memFun1(R (T::*p)(A)) { return ::IceUtilInternal::MemFun1, A>(p); } template inline ::IceUtilInternal::VoidMemFun > voidMemFun(void (T::*p)(void)) { return ::IceUtilInternal::VoidMemFun >(p); } template inline ::IceUtilInternal::VoidMemFun1, A> voidMemFun1(void (T::*p)(A)) { return ::IceUtilInternal::VoidMemFun1, A>(p); } template inline ::IceUtilInternal::SecondMemFun > secondMemFun(R (T::*p)(void)) { return ::IceUtilInternal::SecondMemFun >(p); } template inline ::IceUtilInternal::SecondMemFun1, A> secondMemFun1(R (T::*p)(A)) { return ::IceUtilInternal::SecondMemFun1, A>(p); } template inline ::IceUtilInternal::SecondVoidMemFun > secondVoidMemFun(void (T::*p)(void)) { return ::IceUtilInternal::SecondVoidMemFun >(p); } template inline ::IceUtilInternal::SecondVoidMemFun1, A> secondVoidMemFun1(void (T::*p)(A)) { return ::IceUtilInternal::SecondVoidMemFun1, A>(p); } template inline ::IceUtilInternal::ConstMemFun > constMemFun(R (T::*p)(void) const) { return ::IceUtilInternal::ConstMemFun >(p); } template inline ::IceUtilInternal::ConstMemFun1, A> constMemFun1(R (T::*p)(A) const) { return ::IceUtilInternal::ConstMemFun1, A>(p); } template inline ::IceUtilInternal::ConstVoidMemFun > constVoidMemFun(void (T::*p)(void) const) { return ::IceUtilInternal::ConstVoidMemFun >(p); } template inline ::IceUtilInternal::ConstVoidMemFun1, A> constVoidMemFun1(void (T::*p)(A) const) { return ::IceUtilInternal::ConstVoidMemFun1, A>(p); } template inline ::IceUtilInternal::SecondConstMemFun > secondConstMemFun(R (T::*p)(void) const) { return ::IceUtilInternal::SecondConstMemFun >(p); } template inline ::IceUtilInternal::SecondConstMemFun1, A> secondConstMemFun1(R (T::*p)(A) const) { return ::IceUtilInternal::SecondConstMemFun1, A>(p); } template inline ::IceUtilInternal::SecondConstVoidMemFun > secondConstVoidMemFun(void (T::*p)(void) const) { return ::IceUtilInternal::SecondConstVoidMemFun >(p); } template inline ::IceUtilInternal::SecondConstVoidMemFun1, A> secondConstVoidMemFun1(void (T::*p)(A) const) { return ::IceUtilInternal::SecondConstVoidMemFun1, A>(p); } } #endif IceE-1.2.0/include/IceE/IncomingConnectionFactoryF.h0000644000076400007640000000127510602152305022054 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_INCOMING_CONNECTION_FACTORY_F_H #define ICEE_INCOMING_CONNECTION_FACTORY_F_H #include #include namespace IceInternal { class IncomingConnectionFactory; ICE_API IceUtil::Shared* upCast(IncomingConnectionFactory*); typedef IceInternal::Handle IncomingConnectionFactoryPtr; } #endif IceE-1.2.0/include/IceE/LoggerUtil.h0000644000076400007640000000367210576536574016743 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOGGER_UTIL_H #define ICEE_LOGGER_UTIL_H #include namespace Ice { class ICE_API Print : private IceUtil::noncopyable { public: Print(const LoggerPtr&); ~Print(); void flush(); std::string& __str(); // For internal use only. Don't use in your code. private: LoggerPtr _logger; std::string _str; }; inline Print& operator<<(Print& out, const std::string& val) { out.__str() += val; return out; } class ICE_API Warning : private IceUtil::noncopyable { public: Warning(const LoggerPtr&); ~Warning(); void flush(); std::string& __str(); // For internal use only. Don't use in your code. private: LoggerPtr _logger; std::string _str; }; inline Warning& operator<<(Warning& out, const std::string& val) { out.__str() += val; return out; } class ICE_API Error : private IceUtil::noncopyable { public: Error(const LoggerPtr&); ~Error(); void flush(); std::string& __str(); // For internal use only. Don't use in your code. private: LoggerPtr _logger; std::string _str; }; inline Error& operator<<(Error& out, const std::string& val) { out.__str() += val; return out; } class ICE_API Trace : private IceUtil::noncopyable { public: Trace(const LoggerPtr&, const std::string&); ~Trace(); void flush(); std::string& __str(); // For internal use only. Don't use in your code. private: LoggerPtr _logger; std::string _category; std::string _str; }; inline Trace& operator<<(Trace& out, const std::string& val) { out.__str() += val; return out; } } #endif IceE-1.2.0/include/IceE/ObjectAdapter.h0000755000076400007640000001037310604226663017357 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OBJECT_ADAPTER_H #define ICEE_OBJECT_ADAPTER_H #include #include #include #include #include #include #include #include #include #ifdef ICEE_HAS_ROUTER # include # include #endif #ifdef ICEE_HAS_LOCATOR # include # include #endif #include #include #include #include #include #include namespace Ice { typedef ::std::map< ::std::string, ::Ice::ObjectPtr> FacetMap; class ICE_API ObjectAdapter : public IceUtil::Monitor, public ::IceUtil::Shared { public: std::string getName() const; CommunicatorPtr getCommunicator() const; void activate(); void hold(); void waitForHold(); void deactivate(); void waitForDeactivate(); bool isDeactivated() const; void destroy(); ObjectPrx add(const ObjectPtr&, const Identity&); ObjectPrx addFacet(const ObjectPtr&, const Identity&, const std::string&); ObjectPrx addWithUUID(const ObjectPtr&); ObjectPrx addFacetWithUUID(const ObjectPtr&, const std::string&); ObjectPtr remove(const Identity&); ObjectPtr removeFacet(const Identity&, const std::string&); FacetMap removeAllFacets(const Identity&); ObjectPtr find(const Identity&) const; ObjectPtr findFacet(const Identity&, const std::string&) const; FacetMap findAllFacets(const Identity&) const; ObjectPtr findByProxy(const ObjectPrx&) const; ObjectPrx createProxy(const Identity&) const; #ifdef ICEE_HAS_LOCATOR ObjectPrx createDirectProxy(const Identity&) const; ObjectPrx createIndirectProxy(const Identity&) const; #endif ObjectPrx createReverseProxy(const Identity&) const; #ifdef ICEE_HAS_LOCATOR void setLocator(const LocatorPrx&); #endif void flushBatchRequests(); void incDirectCount(); void decDirectCount(); IceInternal::ServantManagerPtr getServantManager() const; private: ObjectAdapter(const IceInternal::InstancePtr&, const CommunicatorPtr&, const IceInternal::ObjectAdapterFactoryPtr&, const std::string&, const std::string& #ifdef ICEE_HAS_ROUTER , const RouterPrx& #endif ); ~ObjectAdapter(); friend class IceInternal::ObjectAdapterFactory; ObjectPrx newProxy(const Identity&, const std::string&) const; ObjectPrx newDirectProxy(const Identity&, const std::string&) const; #ifdef ICEE_HAS_LOCATOR ObjectPrx newIndirectProxy(const Identity&, const std::string&, const std::string&) const; #endif void checkForDeactivation() const; static void checkIdentity(const Identity&); std::vector parseEndpoints(const std::string&) const; #ifdef ICEE_HAS_LOCATOR void updateLocatorRegistry(const IceInternal::LocatorInfoPtr&, const Ice::ObjectPrx&); #endif bool _deactivated; IceInternal::InstancePtr _instance; CommunicatorPtr _communicator; IceInternal::ObjectAdapterFactoryPtr _objectAdapterFactory; IceInternal::ServantManagerPtr _servantManager; bool _activateOneOffDone; const std::string _name; #ifdef ICEE_HAS_LOCATOR const std::string _id; const std::string _replicaGroupId; #endif std::vector _incomingConnectionFactories; #ifdef ICEE_HAS_ROUTER std::vector _routerEndpoints; IceInternal::RouterInfoPtr _routerInfo; #endif std::vector _publishedEndpoints; #ifdef ICEE_HAS_LOCATOR IceInternal::LocatorInfoPtr _locatorInfo; #endif int _directCount; // The number of direct proxies dispatching on this object adapter. bool _waitForActivate; bool _destroying; bool _destroyed; }; } #endif IceE-1.2.0/include/IceE/UUID.h0000644000076400007640000000137610576536574015433 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_UUID_H #define ICEE_UUID_H #include namespace IceUtil { class ICE_API UUIDGenerationException : public Exception { public: UUIDGenerationException(const char*, int); virtual std::string ice_name() const; virtual Exception* ice_clone() const; virtual void ice_throw() const; private: static const char* _name; }; ICE_API std::string generateUUID(); } #endif IceE-1.2.0/include/IceE/LocalException.h0000755000076400007640000004326610616576164017577 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOCAL_EXCEPTION_H #define ICEE_LOCAL_EXCEPTION_H #include #include #include namespace Ice { class ICE_API AlreadyRegisteredException : public ::Ice::LocalException { public: AlreadyRegisteredException(const char*, int); AlreadyRegisteredException(const char*, int, const ::std::string&, const ::std::string&); virtual ~AlreadyRegisteredException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string kindOfObject; ::std::string id; }; class ICE_API NotRegisteredException : public ::Ice::LocalException { public: NotRegisteredException(const char*, int); NotRegisteredException(const char*, int, const ::std::string&, const ::std::string&); virtual ~NotRegisteredException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string kindOfObject; ::std::string id; }; class ICE_API TwowayOnlyException : public ::Ice::LocalException { public: TwowayOnlyException(const char*, int); TwowayOnlyException(const char*, int, const ::std::string&); virtual ~TwowayOnlyException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string operation; }; class ICE_API CloneNotImplementedException : public ::Ice::LocalException { public: CloneNotImplementedException(const char*, int); virtual ~CloneNotImplementedException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API UnknownException : public ::Ice::LocalException { public: UnknownException(const char*, int); UnknownException(const char*, int, const ::std::string&); virtual ~UnknownException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string unknown; }; class ICE_API UnknownLocalException : public ::Ice::UnknownException { public: UnknownLocalException(const char*, int); UnknownLocalException(const char*, int, const ::std::string&); virtual ~UnknownLocalException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API UnknownUserException : public ::Ice::UnknownException { public: UnknownUserException(const char*, int); UnknownUserException(const char*, int, const ::std::string&); virtual ~UnknownUserException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API VersionMismatchException : public ::Ice::LocalException { public: VersionMismatchException(const char*, int); virtual ~VersionMismatchException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API CommunicatorDestroyedException : public ::Ice::LocalException { public: CommunicatorDestroyedException(const char*, int); virtual ~CommunicatorDestroyedException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; #ifndef ICEE_PURE_CLIENT class ICE_API ObjectAdapterDeactivatedException : public ::Ice::LocalException { public: ObjectAdapterDeactivatedException(const char*, int); ObjectAdapterDeactivatedException(const char*, int, const ::std::string&); virtual ~ObjectAdapterDeactivatedException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string name; }; class ICE_API ObjectAdapterIdInUseException : public ::Ice::LocalException { public: ObjectAdapterIdInUseException(const char*, int); ObjectAdapterIdInUseException(const char*, int, const ::std::string&); virtual ~ObjectAdapterIdInUseException()throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string id; }; #endif class ICE_API NoEndpointException : public ::Ice::LocalException { public: NoEndpointException(const char*, int); NoEndpointException(const char*, int, const ::std::string&); virtual ~NoEndpointException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string proxy; }; class ICE_API EndpointParseException : public ::Ice::LocalException { public: EndpointParseException(const char*, int); EndpointParseException(const char*, int, const ::std::string&); virtual ~EndpointParseException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string str; }; class ICE_API IdentityParseException : public ::Ice::LocalException { public: IdentityParseException(const char*, int); IdentityParseException(const char*, int, const ::std::string&); virtual ~IdentityParseException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string str; }; class ICE_API ProxyParseException : public ::Ice::LocalException { public: ProxyParseException(const char*, int); ProxyParseException(const char*, int, const ::std::string&); virtual ~ProxyParseException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string str; }; class ICE_API IllegalIdentityException : public ::Ice::LocalException { public: IllegalIdentityException(const char*, int); IllegalIdentityException(const char*, int, const ::Ice::Identity&); virtual ~IllegalIdentityException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::Ice::Identity id; }; class ICE_API RequestFailedException : public ::Ice::LocalException { public: RequestFailedException(const char*, int); RequestFailedException(const char*, int, const ::Ice::Identity&, const ::std::string&, const ::std::string&); virtual ~RequestFailedException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::Ice::Identity id; ::std::string facet; ::std::string operation; }; class ICE_API ObjectNotExistException : public ::Ice::RequestFailedException { public: ObjectNotExistException(const char*, int); ObjectNotExistException(const char*, int, const ::Ice::Identity&, const ::std::string&, const ::std::string&); virtual ~ObjectNotExistException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API FacetNotExistException : public ::Ice::RequestFailedException { public: FacetNotExistException(const char*, int); FacetNotExistException(const char*, int, const ::Ice::Identity&, const ::std::string&, const ::std::string&); virtual ~FacetNotExistException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API OperationNotExistException : public ::Ice::RequestFailedException { public: OperationNotExistException(const char*, int); OperationNotExistException(const char*, int, const ::Ice::Identity&, const ::std::string&, const ::std::string&); virtual ~OperationNotExistException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API SyscallException : public ::Ice::LocalException { public: SyscallException(const char*, int); SyscallException(const char*, int, ::Ice::Int); virtual ~SyscallException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::Ice::Int error; }; class ICE_API SocketException : public ::Ice::SyscallException { public: SocketException(const char*, int); SocketException(const char*, int, ::Ice::Int); virtual ~SocketException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API FileException : public ::Ice::SyscallException { public: FileException(const char*, int); FileException(const char*, int, ::Ice::Int, const ::std::string&); virtual ~FileException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string path; }; class ICE_API ConnectFailedException : public ::Ice::SocketException { public: ConnectFailedException(const char*, int); ConnectFailedException(const char*, int, ::Ice::Int); virtual ~ConnectFailedException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API ConnectionRefusedException : public ::Ice::ConnectFailedException { public: ConnectionRefusedException(const char*, int); ConnectionRefusedException(const char*, int, ::Ice::Int); virtual ~ConnectionRefusedException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API ConnectionLostException : public ::Ice::SocketException { public: ConnectionLostException(const char*, int); ConnectionLostException(const char*, int, ::Ice::Int); virtual ~ConnectionLostException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API DNSException : public ::Ice::LocalException { public: DNSException(const char*, int); DNSException(const char*, int, ::Ice::Int, const ::std::string&); virtual ~DNSException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::Ice::Int error; ::std::string host; }; class ICE_API TimeoutException : public ::Ice::LocalException { public: TimeoutException(const char*, int); virtual ~TimeoutException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API ConnectTimeoutException : public ::Ice::TimeoutException { public: ConnectTimeoutException(const char*, int); virtual ~ConnectTimeoutException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API CloseTimeoutException : public ::Ice::TimeoutException { public: CloseTimeoutException(const char*, int); virtual ~CloseTimeoutException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API ProtocolException : public ::Ice::LocalException { public: ProtocolException(const char*, int); ProtocolException(const char*, int, const ::std::string&); virtual ~ProtocolException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string reason; }; class ICE_API CloseConnectionException : public ::Ice::ProtocolException { public: CloseConnectionException(const char*, int); virtual ~CloseConnectionException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API ForcedCloseConnectionException : public ::Ice::ProtocolException { public: ForcedCloseConnectionException(const char*, int); virtual ~ForcedCloseConnectionException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; ICE_API void throwBadMagicException(const char*, int, const ::Ice::ByteSeq&); ICE_API void throwUnsupportedProtocolException(const char*, int, ::Ice::Int, ::Ice::Int, ::Ice::Int, ::Ice::Int); ICE_API void throwUnsupportedEncodingException(const char*, int, ::Ice::Int, ::Ice::Int, ::Ice::Int, ::Ice::Int); inline void throwUnknownMessageException(const char* file, int line) { throw ProtocolException(file, line, "unknown message type"); } inline void throwConnectionNotValidatedException(const char* file, int line) { throw ProtocolException(file, line, "received message over unvalidated connection"); } inline void throwUnknownRequestIdException(const char* file, int line) { throw ProtocolException(file, line, "unknown request id"); } inline void throwUnknownReplyStatusException(const char* file, int line) { throw ProtocolException(file, line, "unknown reply status"); } inline void throwIllegalMessageSizeException(const char* file, int line) { throw ProtocolException(file, line, "illegal message size"); } class ICE_API MarshalException : public ::Ice::ProtocolException { public: MarshalException(const char*, int); MarshalException(const char*, int, const ::std::string&); virtual ~MarshalException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; class ICE_API MemoryLimitException : public ::Ice::MarshalException { public: MemoryLimitException(const char*, int); MemoryLimitException(const char*, int, const ::std::string&); virtual ~MemoryLimitException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; ICE_API void throwMemoryLimitException(const char*, int); ICE_API void throwUnmarshalOutOfBoundsException(const char*, int); ICE_API void throwNegativeSizeException(const char*, int); inline void throwProxyUnmarshalException(const char* file, int line) { throw MarshalException(file, line, "inconsistent proxy data during unmarshaling"); } class ICE_API FeatureNotSupportedException : public ::Ice::LocalException { public: FeatureNotSupportedException(const char*, int); FeatureNotSupportedException(const char*, int, const std::string&); virtual ~FeatureNotSupportedException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; ::std::string unsupportedFeature; }; class ICE_API FixedProxyException : public ::Ice::LocalException { public: FixedProxyException(const char*, int); virtual ~FixedProxyException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; #ifdef ICEE_HAS_WSTRING class ICE_API StringConversionException : public ::Ice::MarshalException { public: StringConversionException(const char*, int); StringConversionException(const char*, int, const ::std::string&); virtual ~StringConversionException() throw(); virtual ::std::string ice_name() const; virtual ::std::string toString() const; virtual ::Ice::Exception* ice_clone() const; virtual void ice_throw() const; }; #endif } #endif IceE-1.2.0/include/IceE/Algorithm.h0000644000076400007640000000165010576536574016606 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ALGORITHM_H #define ICEE_ALGORITHM_H #include // Work-around for a limitation in the standard library provided // with the Sun C++ 5.x compilers #if defined(__SUNPRO_CC) && defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) template inline typename InputIterator::difference_type ice_count_if(InputIterator first, InputIterator last, Predicate pred) { InputIterator::difference_type result = 0; std::count_if(first, last, pred, result); return result; } #else #define ice_count_if(x,y,z) std::count_if(x,y,z) #endif #endif IceE-1.2.0/include/IceE/Incoming.h0000644000076400007640000000242410576536574016423 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_INCOMING_H #define ICEE_INCOMING_H #include #include #include #include #include namespace IceInternal { class ICE_API Incoming : private IceUtil::noncopyable { public: Incoming(Instance*, Ice::Connection*, BasicStream&, const Ice::ObjectAdapterPtr&); void setAdapter(const Ice::ObjectAdapterPtr&); const Ice::ObjectAdapterPtr& getAdapter() const { return _adapter; } void invoke(bool, Ice::Int); // Inlined for speed optimization. BasicStream* os() { return &_os; } BasicStream* is() { return &_is; } protected: void __warning(const Ice::Exception&) const; void __warning(const std::string&) const; BasicStream _os; BasicStream& _is; Ice::Connection* _connection; Ice::ObjectAdapterPtr _adapter; ServantManager* _servantManager; Ice::Current _current; }; } #endif IceE-1.2.0/include/IceE/ProxyHandle.h0000644000076400007640000001344210615432643017101 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROXY_HANDLE_H #define ICEE_PROXY_HANDLE_H #include #include namespace IceProxy { namespace Ice { class Object; } } namespace IceInternal { template class ProxyHandle; template class Handle; inline ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Object* o) { return o; } } namespace Ice { typedef ::IceInternal::ProxyHandle< ::IceProxy::Ice::Object> ObjectPrx; class ObjectAdapter; typedef ::IceInternal::Handle< ::Ice::ObjectAdapter> ObjectAdapterPtr; typedef ::std::map< ::std::string, ::std::string> Context; } namespace IceInternal { template P checkedCastImpl(const ::Ice::ObjectPrx&); template P checkedCastImpl(const ::Ice::ObjectPrx&, const std::string&); template P checkedCastImpl(const ::Ice::ObjectPrx&, const ::Ice::Context&); template P checkedCastImpl(const ::Ice::ObjectPrx&, const std::string&, const ::Ice::Context&); template P uncheckedCastImpl(const ::Ice::ObjectPrx&); template P uncheckedCastImpl(const ::Ice::ObjectPrx&, const std::string&); // // Upcast // template inline ProxyHandle checkedCastHelper(const ::IceInternal::ProxyHandle& b, T*) { return b; } template inline ProxyHandle checkedCastHelper(const ::IceInternal::ProxyHandle& b, T*, const ::Ice::Context&) { return b; } template inline ProxyHandle uncheckedCastHelper(const ::IceInternal::ProxyHandle& b, T*) { return b; } // // Downcast // template inline ProxyHandle checkedCastHelper(const ::IceInternal::ProxyHandle& b, void*) { return checkedCastImpl >(b); } template inline ProxyHandle checkedCastHelper(const ::IceInternal::ProxyHandle& b, const ::Ice::Context& ctx) { return checkedCastImpl >(b, ctx); } template inline ProxyHandle checkedCastHelper(const ::IceInternal::ProxyHandle& b, void*, const ::Ice::Context& ctx) { return checkedCastImpl >(b, ctx); } template inline ProxyHandle uncheckedCastHelper(const ::IceInternal::ProxyHandle& b, void*) { return uncheckedCastImpl >(b); } // // Like IceInternal::Handle, but specifically for proxies, with // support for checkedCast() and uncheckedCast() instead of // dynamicCast(). // template class ProxyHandle : public ::IceUtil::HandleBase { public: ProxyHandle(T* p = 0) { this->_ptr = p; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } template ProxyHandle(const ProxyHandle& r) { this->_ptr = r._ptr; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } template ProxyHandle(const ::IceUtil::Handle& r) { this->_ptr = r._ptr; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } ProxyHandle(const ProxyHandle& r) { this->_ptr = r._ptr; if(this->_ptr) { upCast(this->_ptr)->__incRef(); } } ~ProxyHandle() { if(this->_ptr) { upCast(this->_ptr)->__decRef(); } } ProxyHandle& operator=(T* p) { if(this->_ptr != p) { if(p) { upCast(p)->__incRef(); } if(this->_ptr) { upCast(this->_ptr)->__decRef(); } this->_ptr = p; } return *this; } template ProxyHandle& operator=(const ProxyHandle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { upCast(r._ptr)->__incRef(); } if(this->_ptr) { upCast(this->_ptr)->__decRef(); } this->_ptr = r._ptr; } return *this; } template ProxyHandle& operator=(const ::IceUtil::Handle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { upCast(r._ptr)->__incRef(); } if(this->_ptr) { upCast(this->_ptr)->__decRef(); } this->_ptr = r._ptr; } return *this; } ProxyHandle& operator=(const ProxyHandle& r) { if(this->_ptr != r._ptr) { if(r._ptr) { upCast(r._ptr)->__incRef(); } if(this->_ptr) { upCast(this->_ptr)->__decRef(); } this->_ptr = r._ptr; } return *this; } ::IceProxy::Ice::Object* __upCast() const { return upCast(this->_ptr); } template static ProxyHandle checkedCast(const ProxyHandle& r) { Y* tag = 0; return ::IceInternal::checkedCastHelper(r, tag); } template static ProxyHandle checkedCast(const ProxyHandle& r, const std::string& f) { return ::IceInternal::checkedCastImpl(r, f); } template static ProxyHandle checkedCast(const ProxyHandle& r, const ::Ice::Context& ctx) { return ::IceInternal::checkedCastHelper(r, ctx); } template static ProxyHandle checkedCast(const ProxyHandle& r, const std::string& f, const ::Ice::Context& ctx) { return ::IceInternal::checkedCastImpl(r, f, ctx); } template static ProxyHandle uncheckedCast(const ProxyHandle& r) { Y* tag = 0; return::IceInternal::uncheckedCastHelper(r, tag); } template static ProxyHandle uncheckedCast(const ProxyHandle& r, const std::string& f) { return ::IceInternal::uncheckedCastImpl(r, f); } }; } #endif IceE-1.2.0/demo/0000755000076400007640000000000010620544016013155 5ustar matthewmatthewIceE-1.2.0/demo/Makefile.mak0000755000076400007640000000106110600254657015374 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. !include $(top_srcdir)/config/Make.rules.mak SUBDIRS = IceE $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/demo/demo_CE.sln0000755000076400007640000030057410620410340015172 0ustar matthewmatthew Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcchatC", "IceE\chat\mfcchatC_CE.vcproj", "{916E6043-F906-42EE-B576-DF47C8A947B1}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "latencyC", "IceE\latency\latencyC_CE.vcproj", "{BF67D16A-1468-4CCC-BF84-B10DFB2F9444}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "latencyS", "IceE\latency\latencyS_CE.vcproj", "{4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfchelloC", "IceE\MFC\client\mfchelloC_CE.vcproj", "{6A154C76-ECFB-41BB-A5E4-FDA0271A528E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfchelloS", "IceE\MFC\server\mfchelloS_CE.vcproj", "{05184C1B-152E-4A63-87CD-BD4194C7A5DB}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minimalC", "IceE\minimal\minimalC_CE.vcproj", "{7694D780-4A0D-4377-8F9F-37E5157E1776}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minimalS", "IceE\minimal\minimalS_CE.vcproj", "{550CC63E-CC72-4BA4-954F-B1DE95A371D3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "throughputC", "IceE\throughput\throughputC_CE.vcproj", "{BA23E994-7F54-4144-89DB-47752673D5BF}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "throughputS", "IceE\throughput\throughputS_CE.vcproj", "{DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug Static|Pocket PC 2003 (ARMV4) = Debug Static|Pocket PC 2003 (ARMV4) Debug Static|Smartphone 2003 (ARMV4) = Debug Static|Smartphone 2003 (ARMV4) Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4) Debug|Smartphone 2003 (ARMV4) = Debug|Smartphone 2003 (ARMV4) Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I) Debug|Windows Mobile 6 Standard SDK (ARMV4I) = Debug|Windows Mobile 6 Standard SDK (ARMV4I) Release Static|Pocket PC 2003 (ARMV4) = Release Static|Pocket PC 2003 (ARMV4) Release Static|Smartphone 2003 (ARMV4) = Release Static|Smartphone 2003 (ARMV4) Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) Release Static|Windows Mobile 6 Professional SDK (ARMV4I) = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) Release Static|Windows Mobile 6 Standard SDK (ARMV4I) = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4) Release|Smartphone 2003 (ARMV4) = Release|Smartphone 2003 (ARMV4) Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I) Release|Windows Mobile 6 Standard SDK (ARMV4I) = Release|Windows Mobile 6 Standard SDK (ARMV4I) EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {916E6043-F906-42EE-B576-DF47C8A947B1}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {BF67D16A-1468-4CCC-BF84-B10DFB2F9444}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {4D7ED8C5-FC46-4529-A703-00EF10D7C1C9}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {6A154C76-ECFB-41BB-A5E4-FDA0271A528E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {05184C1B-152E-4A63-87CD-BD4194C7A5DB}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {7694D780-4A0D-4377-8F9F-37E5157E1776}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {550CC63E-CC72-4BA4-954F-B1DE95A371D3}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {BA23E994-7F54-4144-89DB-47752673D5BF}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Pocket PC 2003 (ARMV4).ActiveCfg = Debug Static|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Pocket PC 2003 (ARMV4).Build.0 = Debug Static|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Pocket PC 2003 (ARMV4).Deploy.0 = Debug Static|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Smartphone 2003 (ARMV4).ActiveCfg = Debug Static|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Smartphone 2003 (ARMV4).Build.0 = Debug Static|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Smartphone 2003 (ARMV4).Deploy.0 = Debug Static|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug Static|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Pocket PC 2003 (ARMV4).ActiveCfg = Release Static|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Pocket PC 2003 (ARMV4).Build.0 = Release Static|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Pocket PC 2003 (ARMV4).Deploy.0 = Release Static|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Smartphone 2003 (ARMV4).ActiveCfg = Release Static|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Smartphone 2003 (ARMV4).Build.0 = Release Static|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Smartphone 2003 (ARMV4).Deploy.0 = Release Static|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release Static|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release Static|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {DD36AD5E-95C8-41F8-89A9-1F4153CE45EE}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal IceE-1.2.0/demo/demo.sln0000755000076400007640000003465510620410340014627 0ustar matthewmatthew Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bidirC", "IceE\bidir\bidirC.vcproj", "{2F5A4969-D312-4BBA-986B-BEF3886C44BE}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bidirS", "IceE\bidir\bidirS.vcproj", "{38649949-0F61-4D9E-A90B-2C8354A447D7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "callbackC", "IceE\callback\callbackC.vcproj", "{5E0C0465-020A-45FC-B89D-5965186AB9BC}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "callbackS", "IceE\callback\callbackS.vcproj", "{B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chatC", "IceE\chat\chatC.vcproj", "{AF8893EF-8118-43BF-BEFF-B36E06CF1666}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "helloC", "IceE\hello\helloC.vcproj", "{DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "helloS", "IceE\hello\helloS.vcproj", "{FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "latencyC", "IceE\latency\latencyC.vcproj", "{A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "latencyS", "IceE\latency\latencyS.vcproj", "{16103271-F248-4829-A2B1-0478AC13012C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfcchatC", "IceE\chat\mfcchatC.vcproj", "{D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfchelloC", "IceE\MFC\client\mfchelloC.vcproj", "{B7B6CDA8-A3FF-456A-86B8-35254729E886}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mfchelloS", "IceE\MFC\server\mfchelloS.vcproj", "{33A35082-EA2A-409B-ADCA-7196324E6126}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minimalC", "IceE\minimal\minimalC.vcproj", "{58188B19-1537-4961-B72E-829A1E722AE9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minimalS", "IceE\minimal\minimalS.vcproj", "{C771A277-8F05-465B-9B28-4CA007C93C1E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "throughputC", "IceE\throughput\throughputC.vcproj", "{643F05C5-57B7-443F-A49F-2B03A124F3F9}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "throughputS", "IceE\throughput\throughputS.vcproj", "{0AC3C1EC-4C48-4A47-89D7-F34814739AA6}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "workqueue", "IceE\workqueue\workqueue.vcproj", "{8A125CB8-2D04-4202-9F8D-D813E4D63E0C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug Static|Win32 = Debug Static|Win32 Debug|Win32 = Debug|Win32 Release Static|Win32 = Release Static|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Debug Static|Win32.Build.0 = Debug Static|Win32 {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Debug|Win32.ActiveCfg = Debug|Win32 {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Debug|Win32.Build.0 = Debug|Win32 {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Release Static|Win32.ActiveCfg = Release Static|Win32 {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Release Static|Win32.Build.0 = Release Static|Win32 {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Release|Win32.ActiveCfg = Release|Win32 {2F5A4969-D312-4BBA-986B-BEF3886C44BE}.Release|Win32.Build.0 = Release|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Debug Static|Win32.Build.0 = Debug Static|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Debug|Win32.ActiveCfg = Debug|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Debug|Win32.Build.0 = Debug|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Release Static|Win32.ActiveCfg = Release Static|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Release Static|Win32.Build.0 = Release Static|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Release|Win32.ActiveCfg = Release|Win32 {38649949-0F61-4D9E-A90B-2C8354A447D7}.Release|Win32.Build.0 = Release|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Debug Static|Win32.Build.0 = Debug Static|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Debug|Win32.ActiveCfg = Debug|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Debug|Win32.Build.0 = Debug|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Release Static|Win32.ActiveCfg = Release Static|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Release Static|Win32.Build.0 = Release Static|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Release|Win32.ActiveCfg = Release|Win32 {5E0C0465-020A-45FC-B89D-5965186AB9BC}.Release|Win32.Build.0 = Release|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Debug Static|Win32.Build.0 = Debug Static|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Debug|Win32.ActiveCfg = Debug|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Debug|Win32.Build.0 = Debug|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Release Static|Win32.ActiveCfg = Release Static|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Release Static|Win32.Build.0 = Release Static|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Release|Win32.ActiveCfg = Release|Win32 {B7869F4F-5F4C-4F9E-AC60-6FCBE9E2B4ED}.Release|Win32.Build.0 = Release|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Debug Static|Win32.Build.0 = Debug Static|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Debug|Win32.ActiveCfg = Debug|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Debug|Win32.Build.0 = Debug|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Release Static|Win32.ActiveCfg = Release Static|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Release Static|Win32.Build.0 = Release Static|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Release|Win32.ActiveCfg = Release|Win32 {AF8893EF-8118-43BF-BEFF-B36E06CF1666}.Release|Win32.Build.0 = Release|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Debug Static|Win32.Build.0 = Debug Static|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Debug|Win32.ActiveCfg = Debug|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Debug|Win32.Build.0 = Debug|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Release Static|Win32.ActiveCfg = Release Static|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Release Static|Win32.Build.0 = Release Static|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Release|Win32.ActiveCfg = Release|Win32 {DBE3D5EC-2D1F-4378-9575-1A60A62CBAC9}.Release|Win32.Build.0 = Release|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Debug Static|Win32.Build.0 = Debug Static|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Debug|Win32.ActiveCfg = Debug|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Debug|Win32.Build.0 = Debug|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Release Static|Win32.ActiveCfg = Release Static|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Release Static|Win32.Build.0 = Release Static|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Release|Win32.ActiveCfg = Release|Win32 {FB0A09D9-BB54-442A-9449-40DF0DFFA9C4}.Release|Win32.Build.0 = Release|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Debug Static|Win32.Build.0 = Debug Static|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Debug|Win32.ActiveCfg = Debug|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Debug|Win32.Build.0 = Debug|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Release Static|Win32.ActiveCfg = Release Static|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Release Static|Win32.Build.0 = Release Static|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Release|Win32.ActiveCfg = Release|Win32 {A7DB97B8-FFD3-4D0D-9FDF-C487F9C30321}.Release|Win32.Build.0 = Release|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Debug Static|Win32.Build.0 = Debug Static|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Debug|Win32.ActiveCfg = Debug|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Debug|Win32.Build.0 = Debug|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Release Static|Win32.ActiveCfg = Release Static|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Release Static|Win32.Build.0 = Release Static|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Release|Win32.ActiveCfg = Release|Win32 {16103271-F248-4829-A2B1-0478AC13012C}.Release|Win32.Build.0 = Release|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Debug Static|Win32.Build.0 = Debug Static|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Debug|Win32.ActiveCfg = Debug|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Debug|Win32.Build.0 = Debug|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Release Static|Win32.ActiveCfg = Release Static|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Release Static|Win32.Build.0 = Release Static|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Release|Win32.ActiveCfg = Release|Win32 {D33F6B9C-35CA-42B0-8068-2A2A0DDB5141}.Release|Win32.Build.0 = Release|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Debug Static|Win32.Build.0 = Debug Static|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Debug|Win32.ActiveCfg = Debug|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Debug|Win32.Build.0 = Debug|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Release Static|Win32.ActiveCfg = Release Static|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Release Static|Win32.Build.0 = Release Static|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Release|Win32.ActiveCfg = Release|Win32 {B7B6CDA8-A3FF-456A-86B8-35254729E886}.Release|Win32.Build.0 = Release|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Debug Static|Win32.Build.0 = Debug Static|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Debug|Win32.ActiveCfg = Debug|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Debug|Win32.Build.0 = Debug|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Release Static|Win32.ActiveCfg = Release Static|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Release Static|Win32.Build.0 = Release Static|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Release|Win32.ActiveCfg = Release|Win32 {33A35082-EA2A-409B-ADCA-7196324E6126}.Release|Win32.Build.0 = Release|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Debug Static|Win32.Build.0 = Debug Static|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Debug|Win32.ActiveCfg = Debug|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Debug|Win32.Build.0 = Debug|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Release Static|Win32.ActiveCfg = Release Static|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Release Static|Win32.Build.0 = Release Static|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Release|Win32.ActiveCfg = Release|Win32 {58188B19-1537-4961-B72E-829A1E722AE9}.Release|Win32.Build.0 = Release|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Debug Static|Win32.Build.0 = Debug Static|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Debug|Win32.ActiveCfg = Debug|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Debug|Win32.Build.0 = Debug|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Release Static|Win32.ActiveCfg = Release Static|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Release Static|Win32.Build.0 = Release Static|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Release|Win32.ActiveCfg = Release|Win32 {C771A277-8F05-465B-9B28-4CA007C93C1E}.Release|Win32.Build.0 = Release|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Debug Static|Win32.Build.0 = Debug Static|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Debug|Win32.ActiveCfg = Debug|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Debug|Win32.Build.0 = Debug|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Release Static|Win32.ActiveCfg = Release Static|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Release Static|Win32.Build.0 = Release Static|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Release|Win32.ActiveCfg = Release|Win32 {643F05C5-57B7-443F-A49F-2B03A124F3F9}.Release|Win32.Build.0 = Release|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Debug Static|Win32.Build.0 = Debug Static|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Debug|Win32.ActiveCfg = Debug|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Debug|Win32.Build.0 = Debug|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Release Static|Win32.ActiveCfg = Release Static|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Release Static|Win32.Build.0 = Release Static|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Release|Win32.ActiveCfg = Release|Win32 {0AC3C1EC-4C48-4A47-89D7-F34814739AA6}.Release|Win32.Build.0 = Release|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Debug Static|Win32.ActiveCfg = Debug Static|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Debug Static|Win32.Build.0 = Debug Static|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Debug|Win32.ActiveCfg = Debug|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Debug|Win32.Build.0 = Debug|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Release Static|Win32.ActiveCfg = Release Static|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Release Static|Win32.Build.0 = Release Static|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Release|Win32.ActiveCfg = Release|Win32 {8A125CB8-2D04-4202-9F8D-D813E4D63E0C}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal IceE-1.2.0/demo/Makefile0000644000076400007640000000105210576536574014637 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. include $(top_srcdir)/config/Make.rules SUBDIRS = IceE $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done IceE-1.2.0/demo/README0000644000076400007640000000032410620544016014034 0ustar matthewmatthewThis directory contains demos for various Ice-E components. The demos are provided to introduce you to a particular feature or coding technique. See the README file in each subdirectory for details on the demos. IceE-1.2.0/demo/IceE/0000755000076400007640000000000010620544016013762 5ustar matthewmatthewIceE-1.2.0/demo/IceE/chat/0000755000076400007640000000000010620544016014701 5ustar matthewmatthewIceE-1.2.0/demo/IceE/chat/chatC.vcproj0000755000076400007640000004260010620372032017152 0ustar matthewmatthew IceE-1.2.0/demo/IceE/chat/mfcchatC.vcproj0000755000076400007640000005610210620372032017642 0ustar matthewmatthew IceE-1.2.0/demo/IceE/chat/.depend0000644000076400007640000002554610616637156016172 0ustar matthewmatthewClient$(OBJEXT): Client.cpp PingThread.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Router.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Router.h Session.h Chat.h Chat$(OBJEXT): Chat.cpp Chat.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h Session.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/Iterator.h ../../../include/IceE/DisableWarnings.h PingThread$(OBJEXT): PingThread.cpp PingThread.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Router.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Router.h Session.h Router$(OBJEXT): Router.cpp Router.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/Router.h ../../../include/IceE/BuiltinSequences.h Session.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/Iterator.h ../../../include/IceE/DisableWarnings.h Session$(OBJEXT): Session.cpp Session.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/UserExceptionFactory.h ../../../include/IceE/FactoryTable.h ../../../include/IceE/FactoryTableDef.h ../../../include/IceE/UserExceptionFactoryF.h ../../../include/IceE/StaticMutex.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/Iterator.h ../../../include/IceE/DisableWarnings.h Chat.cpp: Chat.ice Session.ice ../../../slice/IceE/BuiltinSequences.ice ../../../slice/IceE/Identity.ice Router.cpp: Router.ice ../../../slice/IceE/Router.ice ../../../slice/IceE/BuiltinSequences.ice Session.ice ../../../slice/IceE/Identity.ice Session.cpp: Session.ice ../../../slice/IceE/BuiltinSequences.ice ../../../slice/IceE/Identity.ice IceE-1.2.0/demo/IceE/chat/ChatClientDlg.cpp0000644000076400007640000002255510616652361020073 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #ifdef ICEE_HAS_ROUTER #ifdef _DEBUG #define new DEBUG_NEW #endif using namespace std; using namespace Demo; class ChatCallbackI : public ChatCallback { public: ChatCallbackI(const LogIPtr& log) : _log(log) { } virtual void message(const string& data, const Ice::Current&) { _log->message(data); } private: const LogIPtr _log; }; CChatClientDlg::CChatClientDlg(const Ice::CommunicatorPtr& communicator, const LogIPtr& log, CWnd* pParent /*=NULL*/) : CDialog(CChatClientDlg::IDD, pParent), _communicator(communicator), _chat(0), _log(log), //_user(""), // For ease of testing these can be filled in. //_password(""), //_host(""), _port("10005") { _hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } CChatClientDlg::~CChatClientDlg() { // // If the ping thread is still active, destroy it and wait for it // to terminate. // if(_ping) { _ping->destroy(); _ping->getThreadControl().join(); _ping = 0; } } void CChatClientDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } #ifndef _WIN32_WCE // // Under Windows pressing enter in the _edit CEdit sends IDOK to the // dialog. Under CE pressing enter on the keyboard causes the default // button to be pressed. // void CChatClientDlg::OnOK() { OnSend(); } #endif BEGIN_MESSAGE_MAP(CChatClientDlg, CDialog) ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_CONFIG, OnLogin) ON_BN_CLICKED(IDC_SEND, OnSend) ON_MESSAGE(WM_USER, OnLog) END_MESSAGE_MAP() void CChatClientDlg::setDialogState() { CWnd* sendWnd = GetDlgItem(IDC_SEND); CWnd* configWnd = GetDlgItem(IDC_CONFIG); CWnd* loginWnd = GetDlgItem(IDC_LOGIN); if(_chat == 0) { // // Logged out: Disable all except Login. // _edit->EnableWindow(FALSE); _display->EnableWindow(FALSE); sendWnd->EnableWindow(FALSE); #ifdef _WIN32_WCE configWnd->SetWindowText(L"Login"); #else configWnd->SetWindowText("Login"); #endif // // Set the focus to the login button // loginWnd->SetFocus(); // // Set the default button. // sendWnd->SendMessage(BM_SETSTYLE, (WPARAM)BS_PUSHBUTTON, (LPARAM)TRUE); SendMessage(DM_SETDEFID, (WPARAM)IDC_CONFIG, 0); configWnd->SendMessage(BM_SETSTYLE, (WPARAM)BS_DEFPUSHBUTTON, (LPARAM)TRUE); } else { // // Logged in: Enable all and change Login to Logout // _edit->EnableWindow(TRUE); _display->EnableWindow(TRUE); sendWnd->EnableWindow(TRUE); #ifdef _WIN32_WCE configWnd->SetWindowText(L"Logout"); #else configWnd->SetWindowText("Logout"); #endif _edit->SetFocus(); // // Set the default button. // configWnd->SendMessage(BM_SETSTYLE, (WPARAM)BS_PUSHBUTTON, (LPARAM)TRUE); SendMessage(DM_SETDEFID, (WPARAM)IDC_SEND, 0); sendWnd->SendMessage(BM_SETSTYLE, (WPARAM)BS_DEFPUSHBUTTON, (LPARAM)TRUE); } } BOOL CChatClientDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(_hIcon, TRUE); // Set big icon SetIcon(_hIcon, FALSE); // Set small icon // // Retrieve the text input edit control. // _edit = (CEdit*)GetDlgItem(IDC_LOG); // // Retrieve the chat display edit control for log output. // _display = (CEdit*)GetDlgItem(IDC_LOG2); // // Set the window handle on the logger. // _log->setHandle(m_hWnd); // // Disable the input, output and send as we are // not logged in yet. // setDialogState(); return FALSE; // return FALSE because we explicitly set the focus } void CChatClientDlg::OnCancel() { _log->setHandle(0); CDialog::OnCancel(); } // // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. // void CChatClientDlg::OnPaint() { #ifdef _WIN32_WCE CDialog::OnPaint(); #else if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, _hIcon); } else { CDialog::OnPaint(); } #endif } // // The system calls this function to obtain the cursor to display while the user drags // the minimized window. // HCURSOR CChatClientDlg::OnQueryDragIcon() { return static_cast(_hIcon); } void CChatClientDlg::OnSend() { // // Get text from the input edit box and forward it // on to the chat server. // CString text; _edit->GetWindowText(text); // // Trim the leading and trailing whitespace. If the text is empty, // then we're done. // text.TrimLeft(); text.TrimRight(); if(text.IsEmpty()) { return; } try { #ifdef _WIN32_WCE char buffer[256]; wcstombs(buffer, text, 256); _chat->say(buffer); #else _chat->say(string(text)); #endif } catch(const Ice::Exception& e) { AfxMessageBox(CString(e.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); _ping->destroy(); _ping->getThreadControl().join(); EndDialog(0); } // // Clear text input and reset focus. // _edit->SetWindowText(CString("")); _edit->SetFocus(); } void CChatClientDlg::OnLogin() { if(_chat == 0) { // // Login: Create and display login dialog. // CChatConfigDlg dlg(_user, _password, _host, _port); if(dlg.DoModal() == IDOK) { _user = dlg.getUser(); _password = dlg.getPassword(); _host = dlg.getHost(); _port = dlg.getPort(); string user; string password; string host; string port; #ifdef _WIN32_WCE char buffer[64]; wcstombs(buffer, _user, 64); user = buffer; wcstombs(buffer, _password, 64); password = buffer; wcstombs(buffer, _host, 64); host = buffer; wcstombs(buffer, _port, 64); port = buffer; #else user = _user; password = _password; host = _host; port = _port; #endif try { string routerStr = Ice::printfToString("DemoGlacier2/router:tcp -p %s -h %s", port.c_str(), host.c_str()); _router = Glacier2::RouterPrx::checkedCast(_communicator->stringToProxy(routerStr)); assert(_router); // // Now setup the new router. // _chat = ChatSessionPrx::uncheckedCast(_router->createSession(user, password)->ice_router(_router)); // // Create the OA. // _adapter = _communicator->createObjectAdapterWithRouter("Chat.Client", _router); _adapter->activate(); // // Create the callback object. This must have the // category as defined by the Glacier2 session. // string category = _router->getServerProxy()->ice_getIdentity().category; Ice::Identity callbackReceiverIdent; callbackReceiverIdent.name = "callbackReceiver"; callbackReceiverIdent.category = category; _callback = ChatCallbackPrx::uncheckedCast( _adapter->add(new ChatCallbackI(_log), callbackReceiverIdent)); _chat->setCallback(_callback); // // Create a ping thread to keep the session alive. // _ping = new SessionPingThread(_chat, (long)_router->getSessionTimeout() / 2); _ping->start(); } catch(const Glacier2::CannotCreateSessionException& ex) { AfxMessageBox(CString(ex.reason.c_str()), MB_OK|MB_ICONEXCLAMATION); } catch(const Ice::Exception& ex) { AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); _chat = 0; } } } else { // // Logout: Destroy session and stop ping thread. // assert(_callback); _adapter->remove(_callback->ice_getIdentity()); _callback = 0; assert(_chat); _chat = 0; // // Destroy the ping thread. // _ping->destroy(); _ping->getThreadControl().join(); _ping = 0; // // Clear the router. // assert(_router); try { _router->destroySession(); } catch(const Ice::ConnectionLostException&) { // // Expected: the router closed the connection. // } catch(const Ice::Exception& ex) { AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); } _adapter->destroy(); _router = 0; } // // Reset window state appropriate to logged in state. // setDialogState(); } LRESULT CChatClientDlg::OnLog(WPARAM wParam, LPARAM lParam) { char* text = (char*)lParam; _display->SetSel(-1, -1); _display->ReplaceSel(CString(text)); delete[] text; return 0; } #endif // ICEE_HAS_ROUTER IceE-1.2.0/demo/IceE/chat/Makefile.mak0000644000076400007640000000436010616662372017126 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. !if "$(EMBEDDED_DEVICE)" == "" CLIENT = client.exe !endif MFCCLIENT = mfcclient.exe !ifdef BUILD_MFC TARGETS = $(MFCCLIENT) !else TARGETS = $(CLIENT) !endif OBJS = Chat.obj \ PingThread.obj \ Router.obj \ Session.obj COBJS = Client.obj MOBJS = ChatClient.obj \ ChatClientDlg.obj \ ChatConfigDlg.obj \ LogI.obj \ stdafx.obj SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak SLICE2CPPEFLAGS = -I. --ice $(SLICE2CPPEFLAGS) CPPFLAGS = -I. $(CPPFLAGS) $(MFC_CPPFLAGS) !ifdef BUILD_MFC !if "$(EMBEDDED_DEVICE)" == "" | "$(STATICLIBS)" != "yes" CPPFLAGS = $(CPPFLAGS) -D_AFXDLL !endif !else CPPFLAGS = $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -WX !endif !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) MPDBFLAGS = /pdb:$(MFCCLIENT:.exe=.pdb) !endif !if "$(EMBEDDED_DEVICE)" == "" $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(OBJS) $(COBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest RESFILE = ChatClient.res ChatClient.res: ChatClient.rc $(RC) ChatClient.rc !else $(CLIENT):: RESFILE = ChatClientCE.res ChatClientCE.res: ChatClientCE.rc $(RC) ChatClientCE.rc !endif $(MFCCLIENT): $(OBJS) $(MOBJS) $(RESFILE) $(LINK) $(LDFLAGS) $(MFC_LDFLAGS) $(MPDBFLAGS) $(OBJS) $(MOBJS) $(RESFILE) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest !ifndef BUILD_MFC clean:: del /q Chat.cpp Chat.h del /q Router.cpp Router.h del /q Session.cpp Session.h del /q $(RESFILE) !if "$(CPP_COMPILER)" != "VC80_EXPRESS" $(EVERYTHING):: $(MAKE) -nologo /f Makefile.mak BUILD_MFC=1 $@ !endif !endif !include .depend IceE-1.2.0/demo/IceE/chat/config0000644000076400007640000000152110400605111016056 0ustar matthewmatthew# # The proxy to the Glacier2 router for all outgoing connections. This # must match the value of Glacier2.Client.Endpoints in config.glacier2. # Ice.Default.Router=DemoGlacier2/router:tcp -p 10005 -h 127.0.0.1 # # The proxy for the Glacier2 router, installed in the client's # object adapter named Chat.Client. This router proxy must # match the value of Glacier2.Client.Endpoints. # Chat.Client.Router=DemoGlacier2/router:tcp -p 10005 -h 127.0.0.1 # # We don't need any endpoints for the client if we use a # router. Incoming requests are received through connections # established from the client to the router. # Chat.Client.Endpoints= # # Connection retry is not possible with Glacier2. Connections must # remain established. # Ice.RetryIntervals=-1 # # Other settings. # #Ice.Trace.Network=1 #Ice.Trace.Protocol=1 #Ice.Warn.Connections=1 IceE-1.2.0/demo/IceE/chat/mfcchatC_CE.vcproj0000755000076400007640000044373110620410340020214 0ustar matthewmatthew IceE-1.2.0/demo/IceE/chat/PingThread.cpp0000644000076400007640000000174210576536574017462 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include using namespace std; SessionPingThread::SessionPingThread(const Glacier2::SessionPrx& session, long timeout) : _session(session), _timeout(IceUtil::Time::seconds(timeout)), _destroy(false) { } void SessionPingThread::run() { Lock sync(*this); while(!_destroy) { timedWait(_timeout); if(_destroy) { break; } try { _session->ice_ping(); } catch(const Ice::Exception&) { break; } } } void SessionPingThread::destroy() { Lock sync(*this); _destroy = true; notify(); } IceE-1.2.0/demo/IceE/chat/ChatConfigDlg.cpp0000644000076400007640000000716410576536574020075 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #ifdef ICEE_HAS_ROUTER #ifdef _DEBUG #define new DEBUG_NEW #endif using namespace std; CChatConfigDlg::CChatConfigDlg(const CString& user, const CString& password, const CString& host, const CString& port, CWnd* pParent /*=NULL*/) : CDialog(CChatConfigDlg::IDD, pParent), _user(user), _password(password), _host(host), _port(port) { _hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } CString CChatConfigDlg::getUser() const { return _user; } CString CChatConfigDlg::getPassword() const { return _password; } CString CChatConfigDlg::getHost() const { return _host; } CString CChatConfigDlg::getPort() const { return _port; } void CChatConfigDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CChatConfigDlg, CDialog) ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_LOGIN, OnLogin) END_MESSAGE_MAP() BOOL CChatConfigDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(_hIcon, TRUE); // Set big icon SetIcon(_hIcon, FALSE); // Set small icon // // Retrieve the text input edit control. // _useredit = (CEdit*)GetDlgItem(IDC_USER); _passedit = (CEdit*)GetDlgItem(IDC_PASSWORD); _hostedit = (CEdit*)GetDlgItem(IDC_HOST); _portedit = (CEdit*)GetDlgItem(IDC_PORT); // // Fill the windows with last info entered. // _useredit->SetWindowText(_user); _passedit->SetWindowText(_password); _hostedit->SetWindowText(_host); _portedit->SetWindowText(_port); // // Set the focus to the username input // _useredit->SetFocus(); return FALSE; // return FALSE because we explicitly set the focus } void CChatConfigDlg::OnCancel() { CDialog::OnCancel(); } // // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. // void CChatConfigDlg::OnPaint() { #ifdef _WIN32_WCE CDialog::OnPaint(); #else if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, _hIcon); } else { CDialog::OnPaint(); } #endif } // // The system calls this function to obtain the cursor to display while the user drags // the minimized window. // HCURSOR CChatConfigDlg::OnQueryDragIcon() { return static_cast(_hIcon); } void CChatConfigDlg::OnLogin() { // // Retrieve the entered info from the edit controls. // _useredit->GetWindowText(_user); _passedit->GetWindowText(_password); _hostedit->GetWindowText(_host); _portedit->GetWindowText(_port); EndDialog(IDOK); } #endif // ICEE_HAS_ROUTER IceE-1.2.0/demo/IceE/chat/PingThread.h0000644000076400007640000000151410616533266017112 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CHAT_PING_THREAD_H #define CHAT_PING_THREAD_H #include #include class SessionPingThread : public IceUtil::Thread, public IceUtil::Monitor { public: SessionPingThread(const Glacier2::SessionPrx& session, long timeout); virtual void run(); void destroy(); private: const Glacier2::SessionPrx _session; const IceUtil::Time _timeout; bool _destroy; }; typedef IceUtil::Handle SessionPingThreadPtr; #endif IceE-1.2.0/demo/IceE/chat/LogI.h0000644000076400007640000000153310616533266015720 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef LOG_I_H #define LOG_I_H #include class LogI : public Ice::Logger { public: LogI(); virtual void print(const std::string&); virtual void trace(const std::string&, const std::string&); virtual void warning(const std::string&); virtual void error(const std::string&); void message(const std::string&); void setHandle(HWND); private: void post(const std::string&); std::string _buffer; HWND _hwnd; }; typedef IceUtil::Handle LogIPtr; #endif IceE-1.2.0/demo/IceE/chat/Makefile0000644000076400007640000000142410576536574016366 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client TARGETS = $(CLIENT) OBJS = Client.o \ Chat.o \ PingThread.o \ Router.o \ Session.o SRCS = $(OBJS:.o=.cpp) SLICE_SRCS = Chat.ice \ Router.ice \ Session.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) SLICE2CPPEFLAGS := -I. --ice $(SLICE2CPPEFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS) include .depend IceE-1.2.0/demo/IceE/chat/ChatClientDlg.h0000644000076400007640000000276510576536574017555 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CHAT_CLIENT_DLG_H #define CHAT_CLIENT_DLG_H #pragma once #include #include #include class CChatClientDlg : public CDialog { public: CChatClientDlg(const Ice::CommunicatorPtr&, const LogIPtr&, CWnd* = NULL); ~CChatClientDlg(); enum { IDD = IDD_CHATCLIENT_DIALOG }; protected: virtual void DoDataExchange(CDataExchange*); // DDX/DDV support #ifndef _WIN32_WCE virtual void OnOK(); #endif protected: const Ice::CommunicatorPtr _communicator; Ice::ObjectAdapterPtr _adapter; Demo::ChatCallbackPrx _callback; Demo::ChatSessionPrx _chat; Glacier2::RouterPrx _router; const LogIPtr _log; SessionPingThreadPtr _ping; CEdit* _edit; CEdit* _display; HICON _hIcon; CString _user; CString _password; CString _host; CString _port; void setDialogState(); // Generated message map functions virtual BOOL OnInitDialog(); virtual void OnCancel(); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnLogin(); afx_msg void OnSend(); afx_msg LRESULT OnLog(WPARAM, LPARAM); DECLARE_MESSAGE_MAP() }; #endif IceE-1.2.0/demo/IceE/chat/Client.cpp0000755000076400007640000001074210576536574016656 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #ifdef ICEE_HAS_ROUTER using namespace std; using namespace Demo; class ChatCallbackI : public ChatCallback { public: virtual void message(const string& data, const Ice::Current&) { printf("%s\n", data.c_str()); } }; void menu() { printf("enter /quit to exit.\n"); } string trim(const string& s) { static const string delims = "\t\r\n "; string::size_type last = s.find_last_not_of(delims); if(last != string::npos) { return s.substr(s.find_first_not_of(delims), last+1); } return s; } int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::RouterPrx defaultRouter = communicator->getDefaultRouter(); if(!defaultRouter) { fprintf(stderr, "%s: no default router set\n", argv[0]); return EXIT_FAILURE; } Glacier2::RouterPrx router = Glacier2::RouterPrx::checkedCast(defaultRouter); { if(!router) { fprintf(stderr, "%s: configured router is not a Glacier2 router\n", argv[0]); return EXIT_FAILURE; } } char buffer[1024]; ChatSessionPrx session; while(true) { printf("This demo accepts any user-id / password combination.\n"); printf("user id: "); fgets(buffer, 1024, stdin); string id(buffer); id = trim(id); printf("password: "); fgets(buffer, 1024, stdin); string pw(buffer); pw = trim(pw); try { session = ChatSessionPrx::uncheckedCast(router->createSession(id, pw)); break; } catch(const Glacier2::PermissionDeniedException& ex) { fprintf(stderr, "permission denied:\n%s", ex.toString().c_str()); } } SessionPingThreadPtr ping = new SessionPingThread(session, (long)router->getSessionTimeout() / 2); ping->start(); string category = router->getServerProxy()->ice_getIdentity().category; Ice::Identity callbackReceiverIdent; callbackReceiverIdent.name = "callbackReceiver"; callbackReceiverIdent.category = category; Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Chat.Client"); ChatCallbackPrx callback = ChatCallbackPrx::uncheckedCast( adapter->add(new ChatCallbackI, callbackReceiverIdent)); adapter->activate(); session->setCallback(callback); menu(); try { do { printf("==> "); char* ret = fgets(buffer, 1024, stdin); if(ret == NULL) { break; } string s(buffer); s = trim(s); if(!s.empty()) { if(s[0] == '/') { if(s == "/quit") { break; } menu(); } else { session->say(s); } } } while(true); try { router->destroySession(); } catch(const Ice::ConnectionLostException&) { // // Expected: the router closed the connection. // } } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); ping->destroy(); ping->getThreadControl().join(); return EXIT_FAILURE; } ping->destroy(); ping->getThreadControl().join(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } #else int main(int argc, char* argv[]) { fprintf(stderr, "This demo requires Ice-E be built with router support enabled.\n"); return -1; } #endif IceE-1.2.0/demo/IceE/chat/README0000644000076400007640000000207310620544016015563 0ustar matthewmatthewThis demo provides two versions of a client that communicates with the Glacier2 chat demo provided in the full Ice distribution (demo/Glacier2/chat). You must build the Ice demo before you can run these clients. To run the demo, change to the Ice demo directory and start the chat server: $ server In a separate window, change to the Ice demo directory and modify the file config.glacier2 as follows: change the Glacier2.Client.Endpoints property to use a tcp endpoint. In addition, if the client is run outside the Glacier2 router's host, the router must also listen on a public interface instead of the loopback interface. For most configurations the property can be changed from: Glacier2.Client.Endpoints=ssl -p 10005 -h 127.0.0.1 to: Glacier2.Client.Endpoints=tcp -p 10005 Next, start the Glacier2 router: $ glacier2router --Ice.Config=config.glacier2 Finally, start an Ice-E client. To start the command-line client, run $ client To start the MFC client, run $ mfcclient Note: Ice-E must be built with router support enabled in order for this demo to work. IceE-1.2.0/demo/IceE/chat/ChatClient.rc0000755000076400007640000001231210576536574017273 0ustar matthewmatthew//Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END 2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE MOVEABLE PURE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#include ""res\\ChatClient.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\ChatClient.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_CHATCLIENT_DIALOG DIALOGEX 0, 0, 189, 156 STYLE WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "IceE Chat Client" FONT 8, "MS Sans Serif" BEGIN EDITTEXT IDC_LOG2,2,4,184,112,ES_MULTILINE | ES_READONLY | WS_VSCROLL EDITTEXT IDC_LOG,2,119,184,15 DEFPUSHBUTTON "Send",IDC_SEND,2,139,50,14 DEFPUSHBUTTON "Login",IDC_CONFIG,136,139,50,14 END IDD_CHATCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 137, 108 STYLE DS_MODALFRAME | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Chat Config" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "Login",IDC_LOGIN,41,81,50,14 EDITTEXT IDC_USER,53,14,73,13 EDITTEXT IDC_PASSWORD,53,30,73,13,ES_PASSWORD EDITTEXT IDC_HOST,53,46,73,13 EDITTEXT IDC_PORT,53,62,73,13,ES_NUMBER LTEXT "Username",IDC_STATIC,14,17,33,8 LTEXT "Password",IDC_STATIC,14,32,32,8 LTEXT "Host",IDC_STATIC,14,48,16,8 LTEXT "Port",IDC_STATIC,14,64,14,8 END #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceE Chat Client\0" VALUE "FileVersion", "1.0.0.1\0" VALUE "InternalName", "ChatClient.exe\0" VALUE "LegalCopyright", "Copyright (c) 2003 - 2007 ZeroC, Inc. All rights reserved.\0" VALUE "OriginalFilename", "ChatClient.exe\0" VALUE "ProductName", "IceE\0" VALUE "ProductVersion", "1.0.0.1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO MOVEABLE PURE BEGIN IDD_CHATCLIENT_DIALOG, DIALOG BEGIN LEFTMARGIN, 2 RIGHTMARGIN, 186 TOPMARGIN, 4 BOTTOMMARGIN, 153 END IDD_CHATCONFIG_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 130 TOPMARGIN, 7 BOTTOMMARGIN, 101 END END #endif // APSTUDIO_INVOKED #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE 9, 1 #pragma code_page(1252) #include "res\ChatClient.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED IceE-1.2.0/demo/IceE/chat/ChatClient.cpp0000644000076400007640000000440610576536574017453 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #ifdef _DEBUG #define new DEBUG_NEW #endif BEGIN_MESSAGE_MAP(CChatClientApp, CWinApp) END_MESSAGE_MAP() CChatClientApp::CChatClientApp() { // Place all significant initialization in InitInstance } // The one and only CChatClientApp object CChatClientApp theApp; #ifdef ICEE_HAS_ROUTER BOOL CChatClientApp::InitInstance() { // // InitCommonControls() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. // InitCommonControls(); CWinApp::InitInstance(); // // Create a communicator. // Ice::CommunicatorPtr communicator; LogIPtr log; try { Ice::InitializationData initData; log = new LogI; initData.logger = log; int argc = 0; communicator = Ice::initialize(argc, 0, initData); } catch(const Ice::Exception& ex) { AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); return FALSE; } // // Create the main dialog. // CChatClientDlg dlg(communicator, log); // // Show dialog and wait until it is closed. // m_pMainWnd = &dlg; dlg.DoModal(); // // Edit control no longer exists. // log->setHandle(0); // // Clean up. // try { communicator->destroy(); } catch(const Ice::Exception&) { } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } #else BOOL CChatClientApp::InitInstance() { InitCommonControls(); CWinApp::InitInstance(); AfxMessageBox(CString("This demo requires Ice-E built with router support."), MB_OK|MB_ICONEXCLAMATION); return FALSE; } #endif IceE-1.2.0/demo/IceE/chat/stdafx.cpp0000644000076400007640000000104410616652361016705 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** // stdafx.cpp : source file that includes just the standard includes // ChatClient.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" IceE-1.2.0/demo/IceE/chat/Chat.ice0000644000076400007640000000115010576536574016263 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CHAT_ICE #define CHAT_ICE #include module Demo { interface ChatCallback { void message(string data); }; interface ChatSession extends Glacier2::Session { void setCallback(ChatCallback* callback); void say(string data); }; }; #endif IceE-1.2.0/demo/IceE/chat/resource.h0000755000076400007640000000200210616652361016706 0ustar matthewmatthew//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by ChatClient.rc // #define IDD_CHATCLIENT_DIALOG 101 #define IDR_MAINFRAME 128 #define IDD_CHATCONFIG_DIALOG 130 #define IDC_SHUTDOWN 1001 #define IDC_SEND 1002 #define IDC_LOG 1003 #define IDC_LOG2 1004 #define ID_LOGIN 1004 #define IDC_LOGIN 1004 #define IDC_PASSWORD 1005 #define IDC_HOST 1006 #define IDC_PORT 1007 #define IDC_USER 1008 #define IDC_CONFIG 1009 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 131 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1010 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif IceE-1.2.0/demo/IceE/chat/ChatConfigDlg.h0000644000076400007640000000236010616652361017517 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CHAT_CONFIG_DLG_H #define CHAT_CONFIG_DLG_H #pragma once #include class CChatConfigDlg : public CDialog { public: CChatConfigDlg(const CString&, const CString&, const CString&, const CString&, CWnd* = NULL); enum { IDD = IDD_CHATCONFIG_DIALOG }; CString getUser() const; CString getPassword() const; CString getHost() const; CString getPort() const; protected: virtual void DoDataExchange(CDataExchange*); // DDX/DDV support protected: CEdit* _useredit; CEdit* _passedit; CEdit* _hostedit; CEdit* _portedit; CString _user; CString _password; CString _host; CString _port; HICON _hIcon; // Generated message map functions virtual BOOL OnInitDialog(); virtual void OnCancel(); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnLogin(); DECLARE_MESSAGE_MAP() }; #endif IceE-1.2.0/demo/IceE/chat/ChatClientCE.rc0000755000076400007640000001225610576536574017512 0ustar matthewmatthew//Microsoft eMbedded Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END 2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE MOVEABLE PURE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#include ""res\\ChatClient.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\ChatClient.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_CHATCLIENT_DIALOG DIALOGEX 0, 0, 134, 153 STYLE WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "IceE Chat Client" FONT 8, "System" BEGIN EDITTEXT IDC_LOG2,2,4,129,112,ES_MULTILINE | ES_READONLY | WS_VSCROLL EDITTEXT IDC_LOG,2,119,129,15 DEFPUSHBUTTON "Send",IDC_SEND,2,136,50,14 DEFPUSHBUTTON "Login",IDC_CONFIG,81,136,50,14 END IDD_CHATCONFIG_DIALOG DIALOG DISCARDABLE 0, 0, 137, 108 STYLE WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Chat Config" FONT 8, "System" BEGIN DEFPUSHBUTTON "Login",IDC_LOGIN,41,81,50,14 EDITTEXT IDC_USER,53,14,73,13 EDITTEXT IDC_PASSWORD,53,30,73,13,ES_PASSWORD EDITTEXT IDC_HOST,53,46,73,13 EDITTEXT IDC_PORT,53,62,73,13,ES_NUMBER LTEXT "Username",IDC_STATIC,14,17,33,8 LTEXT "Password",IDC_STATIC,14,32,32,8 LTEXT "Host",IDC_STATIC,14,48,16,8 LTEXT "Port",IDC_STATIC,14,64,14,8 END #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceE Chat Client\0" VALUE "FileVersion", "1.0.0.1\0" VALUE "InternalName", "ChatClient.exe\0" VALUE "LegalCopyright", "Copyright (c) 2003 - 2007 ZeroC, Inc. All rights reserved.\0" VALUE "OriginalFilename", "ChatClient.exe\0" VALUE "ProductName", "IceE\0" VALUE "ProductVersion", "1.0.0.1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO MOVEABLE PURE BEGIN IDD_CHATCLIENT_DIALOG, DIALOG BEGIN LEFTMARGIN, 2 RIGHTMARGIN, 131 TOPMARGIN, 4 BOTTOMMARGIN, 150 END IDD_CHATCONFIG_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 130 TOPMARGIN, 7 BOTTOMMARGIN, 101 END END #endif // APSTUDIO_INVOKED #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE 9, 1 #pragma code_page(1252) #include "res\ChatClient.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED IceE-1.2.0/demo/IceE/chat/LogI.cpp0000644000076400007640000000313710617617176016261 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; LogI::LogI() : _hwnd(0) { } void LogI::print(const string& msg) { string s = msg; string::size_type idx = 0; while((idx = s.find("\n", idx)) != string::npos) { s.replace(idx, 1, "\r\n "); idx += 3; } message(s); } void LogI::trace(const string& category, const string& msg) { string s = "[ " + category + ": " + msg + " ]"; string::size_type idx = 0; while((idx = s.find("\n", idx)) != string::npos) { s.replace(idx, 1, "\r\n "); idx += 3; } message(s); } void LogI::warning(const string& msg) { message("warning: " + msg); } void LogI::error(const string& msg) { message("error: " + msg); } void LogI::message(const string& msg) { string line = msg + "\r\n"; if(_hwnd) { post(line); } else { _buffer.append(line); } } void LogI::setHandle(HWND hwnd) { _hwnd = hwnd; if(_hwnd != 0 && !_buffer.empty()) { post(_buffer); _buffer.clear(); } } void LogI::post(const string& data) { assert(_hwnd != 0); char* text = new char[data.size()+1]; strcpy_s(text, data.size()+1, data.c_str()); ::PostMessage(_hwnd, WM_USER, (WPARAM)FALSE, (LPARAM)text); } IceE-1.2.0/demo/IceE/chat/Router.ice0000644000076400007640000000750410576536574016675 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef GLACIER2_ROUTER_ICE #define GLACIER2_ROUTER_ICE #include #include /** * * &Glacier2; is a firewall solution for Ice. &Glacier2; authenticates * and filters client requests and allows callbacks to the client in a * secure fashion. In combination with &IceSSL;, &Glacier2; provides a * security solution that is both non-intrusive and easy to configure. * **/ module Glacier2 { /** * * This exception is raised if a client is denied the ability to create * a session with the router. * * @see Router::createSession * **/ exception PermissionDeniedException { /** * * The reason why permission was denied. * **/ string reason; }; /** * * This exception is raised if a client tries to destroy a session * with a router, but no session exists for the client. * * @see Router::destroySession * **/ exception SessionNotExistException { }; /** * * The &Glacier2; specialization of the standard &Ice; router * interface. * **/ interface Router extends Ice::Router { /** * * This category must be used in the identities of all of the client's * callback objects. This is necessary in order for the router to * forward callback requests to the intended client. * * @return The category. * **/ ["cpp:const"] idempotent string getCategoryForClient(); /** * * Create a per-client session with the router. If a * [SessionManager] has been installed, a proxy to a [Session] * object is returned to the client. Otherwise, null is returned * and only an internal session (i.e., not visible to the client) * is created. * * If a session proxy is returned, it must be configured to route * through the router that created it. This will happen automatically * if the router is configured as the client's default router at the * time the session proxy is created in the client process, otherwise * the client must configure the session proxy explicitly. * * @see Session * @see SessionManager * @see PermissionsVerifier * * @return A proxy for the newly created session, or null if no * [SessionManager] has been installed. * * @param userId The user id for which to check the password. * * @param password The password for the given user id. * * @throws PermissionDeniedException Raised if the password for * the given user id is not correct, or if the user is not allowed * access. * * @throws CannotCreateSessionException Raised if the session * cannot be created. * **/ Session* createSession(string userId, string password) throws PermissionDeniedException, CannotCreateSessionException; /** * * Destroy the calling client's session with this router. * * @throws SessionNotExistException Raised if no session exists * for the calling client. * **/ void destroySession() throws SessionNotExistException; /** * * Get the value of the session timeout. Sessions are destroyed * if they see no activity for this period of time. * * @return The timeout (in seconds). * **/ ["cpp:const"] idempotent long getSessionTimeout(); }; /** * * The &Glacier2; administrative interface. This must only be * accessible from inside the firewall. * **/ interface Admin { /** * * Shut down the &Glacier2; router. * **/ idempotent void shutdown(); }; }; #endif IceE-1.2.0/demo/IceE/chat/ChatClient.h0000644000076400007640000000126610616652361017105 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CHAT_CLIENT_H #define CHAT_CLIENT_H #pragma once #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "Resource.h" class CChatClientApp : public CWinApp { public: CChatClientApp(); virtual BOOL InitInstance(); DECLARE_MESSAGE_MAP() }; extern CChatClientApp theApp; #endif IceE-1.2.0/demo/IceE/chat/res/0000755000076400007640000000000010620543755015503 5ustar matthewmatthewIceE-1.2.0/demo/IceE/chat/res/ChatClient.rc20000644000076400007640000000062110265251036020121 0ustar matthewmatthew// // ChatClient.RC2 - resources Microsoft Visual C++ does not edit directly // #ifdef APSTUDIO_INVOKED #error this file is not editable by Microsoft Visual C++ #endif //APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // Add manually edited resources here... ///////////////////////////////////////////////////////////////////////////// IceE-1.2.0/demo/IceE/chat/res/ChatClient.ico0000644000076400007640000005217610265251036020221 0ustar matthewmatthew 00h– èþ(æ 00¨ ¨¶h^"00¨Æ' ¨ nDhQ(0`€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿ×wwwwwwwwwwwwwwwwwwwwwwÝ׈ˆˆˆˆˆˆˆˆˆ‡øˆˆˆˆˆˆˆˆˆ‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøñø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøñø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øøøøø‡Ý×ÿ‡ÿ‡Ý×ÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿÿÿÿÿÿ÷Ý×wwwwwwwwwwwwwwwwwwwwwwÝÝxˆˆˆˆxˆˆˆˆˆˆˆˆˆˆxˆˆˆˆ}ÝÝ׈ˆˆˆøøøøøøøøøøxˆˆˆ‡ÝÝÝÝxˆˆˆˆxˆˆˆ}ÝÝÝÝ×wwwøñøøøñøøwwwwÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøøøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøøøøøøøøøø}ÝÝÝÝÝÝÝÝÝÝÝÝÿÿÿÿÿÿÿÿÿÿ}ÝÝÝÝÝÝÝÝÝÝÝÝwwwwwwwwwww}ÝÝÝÝÝÝÝÝÝÝÝÝ׈ˆˆˆˆˆˆˆˆ‡ÝÝÝÝÝÝÝÝÝÝÝÝÝÝxˆˆˆˆˆˆˆˆ}ÝÝÝÝÝÝÝÝÝÝÝÝÝÝ×wwwwwwwwÝÝÝÝÝÝÝÝ€€€€€€€€€€€€€€€€€€€€€€€Ààðø?ÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿø?ÿÿüÿÿþÿÿ( @€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿ×wwwwwwwwwwwwwwÝ׈ˆˆˆˆˆ‡øˆˆˆˆˆ‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øøø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøø‡øøø‡Ý×ÿ‡ÿ‡Ý×ÿÿÿÿÿÿ‡ÿÿÿÿÿÿ÷Ý×wwwwwwwwwwwwwwÝÝxˆˆˆˆˆˆˆˆxˆˆ}ÝÝ׈ˆøøøøøøxˆ‡ÝÝÝÝxˆˆxˆ}ÝÝÝÝ×wøññøwwÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøøñø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøøøøøø}ÝÝÝÝÝÝÝÝÿÿÿÿÿÿ}ÝÝÝÝÝÝÝÝwwwwwww}ÝÝÝÝÝÝÝÝ׈ˆˆˆˆ‡ÝÝÝÝÝÝÝÝÝÝxˆˆˆˆ}ÝÝÝÝÝÝÝÝÝÝ×wwwwÝÝÝÝÝÝ€€€€€€€€€€€€€€€Ààðø?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€ÿÿÀÿÿàÿ( €€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿwwwwwww}xˆˆ‡ˆˆˆ}xˆ‡ˆˆ}xˆ‡ˆ}x‡ˆˆ}xˆ‡ˆ}x‡ˆˆ}xˆˆ‡ˆˆˆ}wwwwwww}ׇˆˆˆ‡‡ÝÝwˆ‡}ÝÝ׈‡ÝÝÝׇÝÝÝׇÝÝÝ׈ˆˆ‡ÝÝÝ×wwwwÝ݇‡Ýøø‡ø‡Ý€‡Àà‡Ýàøàø‡àà‡Ý(0`ŽwXkqN]tno‰0-Š1-Œ6-Ë­ª´‰‚©ym¶Ž…À•ÏËÊ”C,“B,¯„w‚:"£o\œhP”]>Át©e=¼‡g»†gÀrÀŽlÀg¾ƒNÉ“bÑ›i²t5³u6Ë‘XÄŒVÛ°†ê̯À5ËŽIÙ¦nÚ§oä»åÀ™óÜÃÃ6dž:Ê‹=È‹Añغˌ=Ý­lÜ­pÞ±w彉ðÕ²üóçÊŒ7ΗFã¸{ïÒ¨øêÕúîÜÁ~ÈŠ'Û©]îÏ õÞ¸õà¾Ú¤JóÖ¡óبôÚ­óÛ°ôÝ´õâÂöæËÙ¡/ïÍŠïÏŽðÑ”ðÒ–ðÓšòÕŸò×¥ìÄmíÈzî˃é¼NëÀ]è¹:I™H–\¦OU—JI¡=c®Y\™UL†Gaœ]gŸcqªmj¶er¹ny»v‚¿n kQ‰OW‹V…Áƒ|¯zŠÂ‰Â…²„ÄŽ’Ç”“È•˜Êš›Ë–É™›ÌžœÌŸ¡Î¤¬Õ°»Ü¾¿Þ¤Щ°Ö´¶ÚºÇâÊËäÎÁßÅÝíßÔèØÑåÕL]áëäd¾‰n“çöî@‡b~ϧÑïà·æÐÄêØÚòçŒÖ¶ôûø˜ÝÃ>88+/ø÷÷÷÷÷h\^„ˆ‰}qq€’‘•”“—£[`//"QRT$1=>>8+2ø÷÷÷÷÷j\^‚„ˆ‰sccy‹’‘•”“£\`2/"OQ$%=>>*2ø÷÷÷÷÷i\^‚„ˆsccy‹Œ‘•”£\a//"NO66**L=>(2ø÷÷÷÷÷i\]~ƒ„rccyŽ‹Œ‘•£\a//"WNFTHI*++LL=(/ø÷÷÷÷÷h\^|~ƒrccsŠŽ‹Œ‘¡\`//'VWRFTHJCDKLL)2ø÷÷÷÷÷j\]x|~rccp~‹’¡\_//'VVQRFTHJCDKL(/ø÷÷÷÷÷i\^wx|~pcccccbŽ‹Œ¡\`//'UVOQRFGHJCDK(/ø÷÷÷÷÷i\]wwx|pcckrssŠŽ¡\a//0UUNOQRSGHIJD(2ø÷÷÷÷÷i\^vwwxpccr†…‰ŠŽ¡\`///YUWNOQRFTHIJ)/ø÷÷÷÷÷j\]uvwwmccp‚†‡‰ŠŽ¡\`//9YYVWNO5;*THI)2ø÷÷÷÷÷j\]uuvwmccp‚†…‰Šœ\a//9XYVVWNSTH)2ø÷÷÷÷÷i\]ouuvmccbbbbbs‰œ\a//@XX0RST)/ø÷÷÷÷÷i\]oouulefffggkt‡‰œ\`/2@ZXX:;NPRF(/ø÷÷÷÷÷h\]loouuvwwx|~‚†…œ\_2/@ZZXXYYUUUVWNOPQ(/ø÷÷÷÷÷i\]ffggkkqqqzzz{{{–\_//?MMMMEEEAAAA33452ø÷÷÷÷÷i\\\\\\\\\\\\\\\\\\\`//&&&&&--&&&&-&&&&./÷÷÷÷÷÷illlllllll›¤¤¤¤¤¤¤¤¤¤È##" ÷÷÷÷÷÷÷÷ï¢¢š ŸžžÁ®­®®®®¯®®­®­®­®®­­®­   ÷÷÷÷÷÷÷÷÷÷ï¢šš ŸžÀ®¾¥¥¦¦¦¥¥¥¥¥¥¦¥¥¦¦°­  ÷÷÷÷÷÷÷÷÷÷÷÷ïššš ŸÀ­êËÌÌÍÍÎÏп¿ÑÑ»¼¼º©­  ÷÷÷÷÷÷÷÷÷÷÷÷÷÷ïšš  À®êÊËÌÜÝÞÎÏпËÌÌÇÒ¿§­ ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ïïïïïÀ®êàÊËõôÍÎÏÐõõÑÇ¿§® ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä­éàÊÊõõÝõóÏõõÑ»¬§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®éÞßàõõÜõÎõõ¿Ñ¬©­òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÛÞàõõÜõâõõ¿¿¬§­ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÜÉÞõöõöõöõп´§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÙÜÉõôÐд§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä­îØÙÜõÓÓôÎϳª®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®îÖØÙõÖØõÎγ©®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À¯îÕרôöõ×ÖõöõÍι«®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À¯îÓÕÖõõÉßàÊõõÆÍ¹§®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­íÓÓÕõõÛÉßàõõÌÆ¹§®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®íÓÓÓóõóÙÜÉßóõóË̸«®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®íäÓÓÓÕרÙÛÝßàÊËË·«®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­ðééêêêääåååææçèèÕ°¯ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­ÂÃÂÂÃÂÃÃÃÃÃÂÂÂÃî¯òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Å­­®¯­­®­®­­­¯­®­­­®½ì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ëᨼ¼»º¿¬´³²¸¶¶±±µÅì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷켨¼¼»º¿¬´³²¸¶¶µÔì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ì¼¼¼Ç»º¿¬´³²¸¸âì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ìãâââââÚÚÚÚÔìì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ÿÿÿÿÿÿðàÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀà?ðøÿüÿþÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿð?ÿÿøÿÿüÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿ( @ŽnPh„ixðçèѶ¶Ò··¼•”Š1-Ŧ ­€vÁŸ—°…yÀ•Š¥uf¨bJÆŽÅœ—O1§aAœgO§`>©eD´„l™„¨d=¤iIÂŽpÈ¢ŽÖ·¦©d8£hEÁs³rHÂgè͹ˆXÁ†OດéȧÀ5çÄïØÀÄ„:Ê‹=ݰzçÁ”îÔ¶ËŒ=ÒšSÜ­n澋óÝ¿Î;Ò˜HÛ©^ä»êÈ—öäË÷èÓùìÚûòåÑ–;áµqðÓ¦òÙ²òÛ¸ôáÂÝ©L߯_óبñÖ©óÚ­ôÛ°õß¹Ù¢5îÍŠðÑ•ðÓšðÔŸìÃjîÌ…Ø é¼Lè¹3_s-G‘CˆB‡H–BvBuAuBvD‹7m3eH%0_J.M5>w+I4D2P‘=F‚9I¡=J¡=T©Gf¯[M„Ea³Yg±^o³g`œZfµ_r¸ld`y·t¹zuºqq¢n„¼„²‚€¿~…Áƒˆ¾†”ƔŎ˜È™ÊžœÌž–Ê™›Ìž›Ëž¢Î¥¦Ò©‚”ƒƒ•„´Ù··Úº»Ü¾ÇâÊ×êÙÛìݬԱÌäϺ׿éóë|ÁŽ‘Ê£‡ŠšÐ­ Ø·¬ÞùäÏ×ñäãõíÄêÚ†… ¨§Z›Ÿ7s‰8tŠ5u“X°û^µüd·ü3Zz²ÜÿÄäÿ#”÷$•ø$•÷8žù?¡úI¥úS«ú\²üb˜ÇŒÇý¦Ôþ¼àÿ*ì>–íZ¬ú~¿ý‘Æû›Íý×ëÿãñÿûýÿ#Šöêôÿ¹Óò¹ÒñÚëÿ#€õ$€õWpWoÊàþÐäþ/€õ3‚õ8†ö<‰öX—îe“رù”¾úœÃú Æû¦Éû®Îû·Ôý¸Õý¿Ùþ²Èè`™ödœöl¡÷s¦øt¨øy«øTr£‡´ùˆµùyØy׺úhözØ¡¸à@sÛGxÛv•Ñ6gÓDrÔKvÕNxÔUܤÕÌÕé8^Äj}¼!9´,£'“»»¾üüýýýýýýýýýýýýýüýýýýýýýýýýýýýüüüü ŠŠ‹ŠŠ‹‹Š‹ŠŠŠýýýüüü]ZZZZZZZZZZZWV-1---------1-ýüüü\g–™šš››œœŸŸmV2.AHBC5D;<<(-ýüüü^i†‰ƒz|“‘•kV2.P:#!!+=>(-ýüüü\e…„coŽ“‘kV239 $=(-ýüüü]e…{coŽ“kV73@ GJ'0<(-ýüüü^e~xco’ŒŽ“kV78@ OGJKD;*1ýüüü]d}~wca``€ŽkV78F OOGJKD*1ýüüü\dy}rch{ˆŒŽkV7EF MNOGIK/1ýüüü\buyrcj€‡‰’ŒkV?EE RR.#:I/-ýüüü[btuncfssv‚’kV?LE&%"9G41ýüüü]_ptqhhhjjˆkV?LTE@NO41ýüüü]_mptuy}~€„lV6SUTTQQQRRN91ýüüü[WXXXYXXYXYYWV-)))))))))),,ýüüü˜ž”’™—¢¥£££¤£©ÉÉÈÉÉâ$üüüüüûžžŸ´Á²²¦¦³§§¨¨¨§­ üüüüüüüûž´ÇÓÔÖרÚÊËÅ¿«¬ üüüüüüüüüûû¡æÆçÓõøòçãø÷Å«­ üüüüüüüüüüüüüæÆãçõîèøË·¬öýüüüüüüüüüüüüüüüüåÇÒãñîÜùøÊª¬íýüüüüüüüüüüüüüüüüæÇáÒðøÚª¬æýüüüüüüüüüüüüüüüüæÆßáïÜøøÙ¶®æýüüüüüüüüüüüüüüüüæÆÞßïùß÷úø×¶¬æýüüüüüüüüüüüüüüüüéÇÝÞïðãçøøÖ½­æýüüüüüüüüüüüüüüüüåÆÜÝëøìÒäøøÕ½­éýüüüüüüüüüüüüüüüüéÇÐÜÝÞàáÒÞßÔ¼­æýüüüüüüüüüüüüüüüüæÁÌÌÍÍÍÎÎÏÏÏÏ®æýüüüüüüüüüüüüüüüü󹺺²²±±±°°¯¯¸óüüüüüüüüüüüüüüüüüüêÀ¿¿Å«·¶½µ»ÐêüüüüüüüüüüüüüüüüüüüüôÀ¿¾«·¶µÑêüüüüüüüüüüüüüüüüüüüüüüôÄÃÄÃÃÃÛêüüüüüüüüüüüüüÀ€€€€€€€€€€€€€€€Ààð?þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿÿÿÿ€ÿÿÀÿ( uVh‘tz·Ž…Ô·¯Â™„ T,©d<Ú¼«Ê”rÊ”s©d6¨c6»YŠ`Ï›oˆUÖ¡qðÚÆÕ¡pÖ¢qݱ…øëÞÒ˜XÒ™YÔŸeÓžeÌIÓœYÒ™XÓšQÓ›QôâËȈ)ÈŒ7ëÈ”óݾЖ8Ñ—<Ò˜?èÇòÙ²ðÒŸõà»ñצ_s-CŠ<<==.ECK2LPV.$ E@J3MOU.  !D?H31IT.-,%B;G1JKS.( ) *E9A011R.&#++E/4678:."&' NQWhX^XXXe Šrpqƒt}~]mvŽŒ†\ˆl{‹…[‰iz„Z‰jy‡w‚€Y‰djklnoc‰sgba`_f|ux||||d}ca€ŽV7 GJ*1€üüÀdyðchðˆŒðV7ð ðOGð/1øüü(0` # # # # # # # #! # #! #! # # # # # # # #gdc # # #! # # # # # # # # # # # # # # # # #BuAuBvBvBvBvAuAuBvBvAuBuBvBvBvBvAuAuBv! #­o3²t5²t5²t5²t5²t5²t5²t5²t5²t6²t5²t5³u6²t5²t5²t5²t6²t5²t5²t5! #! #a„ZI—I–I–I—H–I—I–H–I–I–I–I–I–H–H–H–I–I—I–BvÊ‹=Ê‹=ËŒ=Ê‹=Ê‹=Ê‹=Ë‹=Ë‹=Ê‹=Ê‹=Ê‹=Ê‹=Ë‹=Ê‹=Ê‹=ËŒ=Ê‹=Ê‹=ËŒ=Ê‹=—lR! #a„YI—é»Hé½RΗF©d7©d8©d9©d<¨d=©e@ã¹vïÎðÑ”ðÒ™òÕ Ú§oË‹=—lR! #a„YH–è»Hé½Rê¿ZëÁ`ëÃiìÄníÇvíÇyîÊîˆïÎðÑ”ðÒ™Ú¦nÊ‹=˜lS! #b…ZH–=zBƒ2D„4E„9F…:H†?H†@K‡DLˆHNˆJQ‰OR‰OUŠSV‹UW‹WYŒZMŽ^I–BuÊ‹=ËŒ=Á~ØŸ!Ø *Ù¢6Ù¢;Ù£CÚ¥KÚ¦PÚ§WÛ¨ZÛª`ÛªcÛ¬jÝ­nÝ®qݰwÒ™`ËŒ=˜lR! #b„ZI–I—I–I—I—I–H–H–I—H–I—I—H–H–I—I—I—H–H–AuËŒ=ËŒ=À5Ã5À5À5À5À5€5À5Ã5À5Ã5À5Ã5Ã5À5À5dž:Ê‹=—lR! #~Œ€T>j§Zf§We¦Va¥S`¥Q]¤OZ¤LZ¤K@‡b;wi=ua=ua=ua=uanògž÷l¢÷q¥ø,¤Ž,£‚±øˆµùŒ·ù‘»ú,£Ž,£¦Éû«ÌûÏþ2¢ú#”÷4@egdc$sÕ$•ø;kñc›÷gžöm£ø,£Ž,¤°ù‚±ø‡µùŒ¸ù,£,£¡Æú¨ÊûšÌü1¢ú$•ø4@egdc%sÖ#•÷:jñ_™÷c›ögž÷"=´,£ 9´y«ø¯ù‚±ø‡µù!:´,£ 9´›Âú¢Çû–Êü1¢ù#•÷5@fgdc%tÖ$•ø8iñZ•ö_™÷cœ÷gžöm¢÷q¥øv©ø{¬ø¯ø„³ù‡´ùŽºú‘»ù˜ÀúœÂú“Çû1¡ù#”÷5Afgdc$sÕ$•ø0[ñFóHóLƒóQ†ôS‡ôY‹õ[õ_õa‘õe“öh•õj—öo›öqœöuŸöm¢÷.™ø#”÷5@egdc%sÖ$•÷$€õ$€õ#ô#€õ#€õ$€õ#€õ$€õ$€õ$€õ$€õ#€ô$€õ#€õ#€õ$€õ#ô#•÷$•ø5@fgdc8wÐ#”÷#•÷$•ø$•÷#•÷$•ø#”÷$•ø$•ø$•ø#•÷#”÷$•ø#”÷#•÷$•ø$•ø#”÷#”÷$•øXf‘\{Äéõÿéõÿéõÿáðÿ×ìÿÌæþÅâþ¹Ýÿ³Úÿ§Ôþ Ñþ–ÌýÇý†Ãü|¿ýv»ük¶ük¶üh€¸\{Äéõÿéõÿèôÿáðÿ×ëÿÌæÿÅâþ¹Ýÿ²Ùþ§Õÿ Ñþ–ÌýŒÇý†Ãüq¸üv»üh€¸\{ÄéõÿäòÿèôÿÞïÿ×ëÿÊåþÅâþ¹Ýþ²Ùþ§Õþ Òþ–ÌýŒÇý†Ãüh€¸\{Ä…£ØxÙxÙt›Ùt›Ùq™Ùo™Ùm—Øm—Ùk–Ùk–Ùk–Ùh€¸ÿÿÿÿÿÿðàÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀàðø?üþÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿð?ÿÿøÿÿüÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿ( @ # # # # # # # # # # # # #˜•“ # # # # # # # # # # # # #‚†…BL@BM@BM@BL@BL@BL@BL@BM@CMABM@BL@BL@ #w\Rv\Rw]Sw\Rw\Rw\Sv\Rv\Rw\Rw]Sw]Sw]StYQ1-/ #AuH–I–H–H–H–H–H–I—H–H–H–I–_s-Ê‹=ËŒ=Ë‹=Ê‹=Ê‹=ËŒ=Ê‹=Ë‹=Ê‹=ËŒ=ËŒ=Ê‹=²t6REE #BuI5|Á–Ò­ž×µ¡Ø¸©Ü¿®ßÅ·âͺåÐÃéÙÈëÞP¢F_s-Ó›Vݯ}ðÔ¦ñÕ©òÙ³òÛ·óÞ¿ôàÅõãÌ÷æÒøèØèÅ¥²t6RDD #AuP‘=›Ë¥Ò©œÊžq¢n„²‚ÇâÊÍåÏÙëÛÝíßêôëI¡<_s-ÓšTݰyðÔŸëɘÀŽkÀnÀrÀsïØÀùîÛüóåêʬ²t5REE #BvN‘8–ɘœÌžˆ½…0_O…HºÛ¾ÆâÊÍäÏÙëÛÝíßI¡=^s,ÒšQÝ®p彂§aA’L.£hE¤iJ™X7§bIêεùîÛéȧ²t5RDE #BvM6ŽÅŽ–Ê™„¼€0`L„D·Ú»ºÛ¾ÇâÊÍåÐ×êÚI¡=_s-Ò™MÛ«ká´qŠ1.ªfHóبô۰ດÃqîÔ¶øêÕèǤ³u6RDD #AuK2…Á„ÅŽ~¹y0_L„D¬Õ°´Ù¸»Ü¾ÇâÊËäÎI¡=_s-Ò™KÛ©_à²lŠ1.ªfFðÓœòبóÛ°õà»õâÁ÷æÊçÅŸÊ‹=REE #BvJ.€¿~…Á„y¶t0_3f6l6m•ԻܾÇâÊI¡=^s,Ò™Fܪ]à°bŠ1.¨dCðÒ—ðÓ›óØ©ôÛ¯õߺõáÁçěˌ=REE #AuIŽ+uºq€¾}r´j0_E5ƒ»€‰½†¢Î¥³Ø·ºÛ¾I¡=_s-Ñ—EÚ¦P߯]Š1-©eAîÍŠðÒ•ðÓœòبóÙ­õߺæÁ•Ê‹=SEE #BuHŽ'r¹muºqn²f0_G‚9“È”œÌž¥Ò©«Ô¯´Ù·I¡=_s-Ñ—>Ù¥IÞ¬Q‰0-©d=îʃî̇ޱxŠcëȘóÚ­æÀ’Ê‹=REE #BuG!f´_r¹mf¯[0_>w+^›Wa›\cœ_™Èš«Ô®I¡=^s,Ò—=Ù¢<ݪH“B,žT4Á†OˆX³rH§a?㸀óب彊ʋ=REE #BuFa²Xgµ_g°]B€.D3D4G‚8G‚:‰¿‡¡Î¤I¡=_s-Ñ–7Ù¡/é¼Há¯M¨c6©d8¨d;©e?äºvðÑ•ðӛ澊ˌ=SEE #BvCˆW®Hb³Yf´^p¸kuºq€¿}ƒ¿Å’Ç”›ÌžI¡<^s,Î;Ø ç¸2é¼Gë¿VëÀ_ìÃlíÆtî˃îˇïє廂ʋ=SEE #AuFB‡CˆCˆCˆCˆBˆCˆCˆB‡CˆG’_s-Ê‹=À5À5À5À5€5À5Ã5Ã5À5À5Ń8„;tcc #‡‰±Æ²º×¿®Ó¶œÍ«‘É¢Z›Ÿ5u“7tŠ7s‰7tŠ7tŠ7tŠ3ZzWoWpWpWpWoTr£ƒiw´„lÙ„È¡ŽÖ¶¥ä˼ä˼˜•“‡‰ãõíãõíÁéÖÁéÖ`—Æ#ŠöS¬úT®ûW°ûY°û[²û^´ü_´üc¶üc·üf¹ü]·ü$•øvWj¥ue°…zÁŸ—Ʀ¡Ö¶¥˜•“‡‰ãõíØñåÁéÖd˜È$€õ•¾úžÄú¥Èû®Îü¸Õþ¿ÙþÊàþÐãþÚêÿãïÿÆèÿ$•øpM\›gO¨zl¨}rÁ¦¥˜•“‡‰‡‰‡‰\±$€õºù”½ù6_Ç,£Uܹù‡³ù,£!9´ÚêþÁåÿ$•øXBe’cX«|t¨zl˜•“y×$€õ†´ùºù9\À;kÓiö,£Ðãþ¼áÿ#”÷4@e˜•“y×#€õ€°ø…´øNxÕŽ2cÒd™õ'ž,£Êàþ³Üÿ$•ø?Ru˜•“zØ$€õy«ø€°ùJvÔŽ,¤¾Ùý°Úÿ$•÷CXz˜•“y×#€õr¥øxªøGtÔŽa—õ,£,¤¹Öý¦Õþ$•øCXz˜•“y×$€õk¡÷r¦÷DrÔ(žt¦÷!:´“,£¯Ïü£Óþ#•÷CYz˜•“y×#€ôc›öl¡÷AoÔŽJvÔ‡µù‘¼ú,£,¤©ËûœÎü$•øCXz˜•“yœ×$€õ^˜öeœöAsÛ,£GxÛ‚±ø‡µù,£,£ Åú™Ëü#•÷BXz˜•“zØ#€õV“ö`™öe÷l¢÷t¨øy«øƒ²ùl¡÷s¦÷šÁû‘Æû#”÷CXz˜•“zØ$‹÷/ô0€õ3õ4ƒõ5ƒõ7…õ8†õ;ˆö<ˆö=ˆõ<‹ö$•øCY{˜•“©Ù=–í[¬úW«úT©úQ©úM§úH¥úE£ù?¡ù= ù8žù6ø+Žìs„­˜•“ ¸àêôÿÛîÿÛîÿÛîÿÄãÿ¼ßÿ¨ÕþœÏþŒÇý}¿ý}¿ý_ŠË˜•“ ¸àêôÿÛîÿÛîÿ×ëÿÂáþ¼ßÿ¨ÕþŒÇý}¿ý_ŠË˜•“ ¸à ¸à›²Ø›²Ø›²Ø›²Ø›²Ø›²Ø›²Ø˜•“À€€€€€€€€€€€€€€€Ààð?þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿÿÿÿ€ÿÿÀÿ( ³G—I¡=J¡=I¡=I¡=I¡=_s-ÌIÒ˜XÒ˜XÒ™YÒ˜XÒ™Y¦|Xfdc“¾d`¦Ñ©;w ÎåÐÜíÞËîà_s-ÔždëÈ”©d7©d6ðÛÇøëÞ«Zgec”¾‘]šU™Ëœ;w ¹Û½ÍåиãÎ_s-ÓœY¨c6¼Zݰ„Ê”rôâË«Zfdc”¾‘X˜O†Á„;w _s-LJ)Ñ–9Ò—<Ô›QÓœYÓže®ƒ\°®¬ÕÚÖƒ–…²Ô¹v¦ ,i»;z¯;z¯;z¯;z° #include module Ice { sequence IdentitySeq; }; module Glacier2 { /** * * This exception is raised if an attempt to create a new session * failed. * * @see Router::createSession * @see SessionManager::createSession * **/ exception CannotCreateSessionException { /** * * The reason why session creation has failed. * **/ string reason; }; /** * * A client-visible session object, which is tied to the lifecycle of * a [Router]. * * @see Router * @see SessionManager * **/ interface Session { /** * * Destroy the session. This is called automatically when the * [Router] is destroyed. * **/ void destroy(); }; /** * * An object for managing the set of identity constraints for specific * parts of object identity on a * [Session]. * * @see Session * @see SessionControl * **/ interface StringSet { /** * * Add a sequence of strings to this set of constraints. Order is * not preserved and duplicates are implicitly removed. * * @param additions The sequence of strings to be added. * **/ idempotent void add(Ice::StringSeq additions); /** * * Remove a sequence of strings from this set of constraints. No * errors are returned if an entry is not found. * * @param deletions The sequence of strings to be removed. * **/ idempotent void remove(Ice::StringSeq deletions); /** * * Returns a sequence of strings describing the constraints in this * set. * * @return The sequence of strings for this set. * **/ idempotent Ice::StringSeq get(); }; /** * * An object for managing the set of object identity constraints on a * [Session]. * * @see Session * @see SessionControl * **/ interface IdentitySet { /** * * Add a sequence of Ice identities to this set of constraints. Order is * not preserved and duplicates are implicitly removed. * * @param additions The sequence of Ice identities to be added. * **/ idempotent void add(Ice::IdentitySeq additions); /** * * Remove a sequence of identities from this set of constraints. No * errors are returned if an entry is not found. * * @param deletions The sequence of Ice identities to be removed. * **/ idempotent void remove(Ice::IdentitySeq deletions); /** * * Returns a sequence of identities describing the constraints in this * set. * * @return The sequence of Ice identities for this set. * **/ idempotent Ice::IdentitySeq get(); }; /** * * An administrative session control object, which is tied to the * lifecycle of a [Session]. * * @see Session * **/ interface SessionControl { /** * * Access the object that manages the allowable categories * for object identities for this session. * * @return A StringSet object * **/ StringSet* categories(); /** * * Access the object that manages the allowable adapter identities * for objects for this session. * * @return A StringSet object * **/ StringSet* adapterIds(); /** * * Access the object that manages the allowable object identities * for this session. * * @return An IdentitySet object * **/ IdentitySet* identities(); /** * * Destroy the associated session. * **/ void destroy(); }; /** * * The session manager for username/password authenticated users that * is responsible for managing [Session] objects. New session objects * are created by the [Router] object calling on an application-provided * session manager. If no session manager is provided by the application, * no client-visible sessions are passed to the client. * * @see Router * @see Session * **/ interface SessionManager { /** * * Create a new session. * * @param userId The user id for the session. * * @param control A proxy to the session control object. * * @return A proxy to the newly created session. * * @throws CannotCreateSessionException Raised if the session * cannot be created. * **/ Session* create(string userId, SessionControl* control) throws CannotCreateSessionException; }; }; #endif IceE-1.2.0/demo/IceE/chat/stdafx.h0000644000076400007640000000362310616652361016357 0ustar matthewmatthew// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_) #define AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #ifndef _WIN32_WCE #if !defined(NDEBUG) && !defined(_STLP_DEBUG) # define _STLP_DEBUG #endif #ifndef WINVER #define WINVER 0x0400 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif #else #if _MSC_VER >= 1400 # define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA # ifndef WINVER # define WINVER 0x0400 # endif #endif #if (_WIN32_WCE <= 200) #error : This project does not support MFCCE 2.00 or earlier, because it requires CControlBar, available only in MFCCE 2.01 or later #endif // // _STLP_USE_MFC must be defined. We don't use iostreams so lets turn // that off too. This must defined here since some of the AFX header // files include STLport headers. // #define _STLP_USE_MFC #define _STLP_NO_NEW_IOSTREAMS #define _STLP_NO_IOSTREAMS #endif // _WIN32_WCE #ifndef VC_EXTRALEAN #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif #include // MFC core and standard components #include // MFC extensions #if defined(_WIN32_WCE) && (_WIN32_WCE >= 211) && (_AFXDLL) #include // MFC support for Internet Explorer 4 Common Controls #endif #ifndef _AFX_NO_AFXCMN_SUPPORT #include // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include // MFC socket extensions //{{AFX_INSERT_LOCATION}} // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line. #include #endif // !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_) IceE-1.2.0/demo/IceE/callback/0000755000076400007640000000000010620544016015516 5ustar matthewmatthewIceE-1.2.0/demo/IceE/callback/.depend0000644000076400007640000002044310616637156016776 0ustar matthewmatthewCallback$(OBJEXT): Callback.cpp Callback.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Callback.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h CallbackSenderI.h Callback.h CallbackSenderI$(OBJEXT): CallbackSenderI.cpp CallbackSenderI.h Callback.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Callback.cpp: Callback.ice IceE-1.2.0/demo/IceE/callback/Makefile.mak0000644000076400007640000000260710614106575017741 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) OBJS = Callback.obj COBJS = Client.obj SOBJS = CallbackSenderI.obj \ Server.obj SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(OBJS) $(COBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(OBJS) $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Callback.cpp Callback.h !include .depend IceE-1.2.0/demo/IceE/callback/config0000644000076400007640000000027510267231724016720 0ustar matthewmatthewCallback.Client.CallbackServer=callback:tcp -p 10000 Callback.Client.Endpoints=tcp Callback.Server.Endpoints=tcp -p 10000 #Ice.Trace.Network=1 #Ice.Trace.Protocol=1 Ice.Warn.Connections=1 IceE-1.2.0/demo/IceE/callback/CallbackSenderI.cpp0000644000076400007640000000173110616533266021204 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; void CallbackSenderI::initiateCallback(const CallbackReceiverPrx& proxy, const Ice::Current& current) { printf("initiating callback\n"); try { proxy->callback(current.ctx); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); } } void CallbackSenderI::shutdown(const Ice::Current& c) { printf("shutting down...\n"); try { c.adapter->getCommunicator()->shutdown(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); } } IceE-1.2.0/demo/IceE/callback/CallbackSenderI.h0000644000076400007640000000115610576536574020664 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CALLBACK_I_H #define CALLBACK_I_H #include class CallbackSenderI : public Demo::CallbackSender { public: virtual void initiateCallback(const Demo::CallbackReceiverPrx&, const Ice::Current&); virtual void shutdown(const Ice::Current&); }; #endif IceE-1.2.0/demo/IceE/callback/Callback.ice0000644000076400007640000000107310576536574017721 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CALLBACK_ICE #define CALLBACK_ICE module Demo { interface CallbackReceiver { void callback(); }; interface CallbackSender { void initiateCallback(CallbackReceiver* proxy); void shutdown(); }; }; #endif IceE-1.2.0/demo/IceE/callback/Server.cpp0000644000076400007640000000302710576536574017516 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Callback.Server"); adapter->add(new CallbackSenderI, communicator->stringToIdentity("callback")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/callback/Makefile0000644000076400007640000000154610576536574017210 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Callback.o COBJS = Client.o SOBJS = Server.o \ CallbackSenderI.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Callback.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) include .depend IceE-1.2.0/demo/IceE/callback/Client.cpp0000644000076400007640000000736110576536574017473 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; class CallbackReceiverI : public CallbackReceiver { public: virtual void callback(const Ice::Current&) { printf("received callback\n"); } }; void menu() { printf("usage:\n"); printf("t: send callback as twoway\n"); printf("o: send callback as oneway\n"); printf("O: send callback as batch oneway\n"); printf("f: flush all batch requests\n"); printf("s: shutdown server\n"); printf("x: exit\n"); printf("?: help\n"); } int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); const char* proxyProperty = "Callback.Client.CallbackServer"; string proxy = properties->getProperty(proxyProperty); if(proxy.empty()) { fprintf(stderr, "%s: property `%s' not set\n", argv[0], proxyProperty); return EXIT_FAILURE; } Ice::ObjectPrx base = communicator->stringToProxy(proxy); CallbackSenderPrx twoway = CallbackSenderPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)); if(!twoway) { fprintf(stderr, "%s: invalid proxy\n", argv[0]); return EXIT_FAILURE; } CallbackSenderPrx oneway = CallbackSenderPrx::uncheckedCast(twoway->ice_oneway()); CallbackSenderPrx batchOneway = CallbackSenderPrx::uncheckedCast(twoway->ice_batchOneway()); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Callback.Client"); adapter->add(new CallbackReceiverI, communicator->stringToIdentity("callbackReceiver")); adapter->activate(); CallbackReceiverPrx twowayR = CallbackReceiverPrx::uncheckedCast( adapter->createProxy(communicator->stringToIdentity("callbackReceiver"))); CallbackReceiverPrx onewayR = CallbackReceiverPrx::uncheckedCast(twowayR->ice_oneway()); menu(); char c = EOF; do { try { printf("==> "); do { c = getchar(); } while(c != EOF && c == '\n'); if(c == 't') { twoway->initiateCallback(twowayR); } else if(c == 'o') { oneway->initiateCallback(onewayR); } else if(c == 'O') { batchOneway->initiateCallback(onewayR); } else if(c == 'f') { communicator->flushBatchRequests(); } else if(c == 's') { twoway->shutdown(); } else if(c == 'x') { // Nothing to do } else if(c == '?') { menu(); } else { printf("unknown command `%c'\n", c); menu(); } } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); } } while(c != EOF && c != 'x'); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/callback/README0000644000076400007640000000047010620544016016377 0ustar matthewmatthewA simple callback demo that illustrates how a client can pass a proxy to a server, invoke an operation in the server, and the server call back into an object provided by the client as part of that invocation. To run the demo, first start the server: $ server In a separate window, start the client: $ client IceE-1.2.0/demo/IceE/callback/callbackS.vcproj0000755000076400007640000003250710620372032020631 0ustar matthewmatthew IceE-1.2.0/demo/IceE/callback/callbackC.vcproj0000755000076400007640000003055510620372032020612 0ustar matthewmatthew IceE-1.2.0/demo/IceE/Makefile.mak0000755000076400007640000000143710616662372016214 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\.. !include $(top_srcdir)\config\Make.rules.mak SUBDIRS = minimal \ latency \ throughput \ chat !if "$(EMBEDDED_DEVICE)" == "" SUBDIRS = $(SUBDIRS) \ hello \ callback \ bidir \ workqueue !endif !if "$(CPP_COMPILER)" != "VC80_EXPRESS" SUBDIRS = $(SUBDIRS) MFC !endif $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/demo/IceE/hello/0000755000076400007640000000000010620544016015065 5ustar matthewmatthewIceE-1.2.0/demo/IceE/hello/Hello.ice0000644000076400007640000000100410576536574016631 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_ICE #define HELLO_ICE module Demo { interface Hello { ["cpp:const"] idempotent void sayHello(int delay); idempotent void shutdown(); }; }; #endif IceE-1.2.0/demo/IceE/hello/.depend0000644000076400007640000002034710616637156016350 0ustar matthewmatthewHello$(OBJEXT): Hello.cpp Hello.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Hello.h HelloI$(OBJEXT): HelloI.cpp HelloI.h Hello.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h HelloI.h Hello.h Hello.cpp: Hello.ice IceE-1.2.0/demo/IceE/hello/HelloI.h0000644000076400007640000000107210576536574016436 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_I_H #define HELLO_I_H #include class HelloI : public Demo::Hello { public: virtual void sayHello(int delay, const Ice::Current&) const; virtual void shutdown(const Ice::Current&); }; #endif IceE-1.2.0/demo/IceE/hello/Makefile.mak0000644000076400007640000000316010614106575017303 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) OBJS = Hello.obj COBJS = Client.obj SOBJS = HelloI.obj \ Server.obj SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) HelloC.obj $(COBJS) /out:$@ $(MINLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(OBJS) $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest Client.obj: Client.cpp $(CXX) /c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) Client.cpp HelloC.obj Hello.obj: Hello.cpp $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) Hello.cpp $(CXX) /c -DICEE_PURE_CLIENT /FoHelloC.obj $(CPPFLAGS) $(CXXFLAGS) Hello.cpp clean:: del /q Hello.cpp Hello.h !include .depend IceE-1.2.0/demo/IceE/hello/config0000644000076400007640000000122010534024537016255 0ustar matthewmatthew# # The client reads this property to create the reference to the # "hello" object in the server. # Hello.Proxy=hello:tcp -p 10000 # # The server creates one single object adapter with the name # "Hello". The following line sets the endpoints for this # adapter. # Hello.Endpoints=tcp -p 10000 # # Warn about connection exceptions # #Ice.Warn.Connections=1 # # Network Tracing # # 0 = no network tracing # 1 = trace connection establishment and closure # 2 = like 1, but more detailed # 3 = like 2, but also trace data transfer # Ice.Trace.Network=0 # # Protocol Tracing # # 0 = no protocol tracing # 1 = trace protocol messages # Ice.Trace.Protocol=0 IceE-1.2.0/demo/IceE/hello/HelloI.cpp0000644000076400007640000000134410576536574016773 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; void HelloI::sayHello(int delay, const Ice::Current&) const { if(delay != 0) { IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(delay)); } printf("Hello World!\n"); } void HelloI::shutdown(const Ice::Current& c) { printf("Shutting down...\n"); c.adapter->getCommunicator()->shutdown(); } IceE-1.2.0/demo/IceE/hello/helloS.vcproj0000755000076400007640000003234110620372032017543 0ustar matthewmatthew IceE-1.2.0/demo/IceE/hello/Server.cpp0000644000076400007640000000274510576536574017073 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Hello"); Ice::ObjectPtr object = new HelloI; adapter->add(object, communicator->stringToIdentity("hello")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); initData.properties->setProperty("Ice.Override.Timeout", "100"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/hello/Makefile0000644000076400007640000000206210576536574016551 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Hello.o COBJS = Client.o SOBJS = HelloI.o \ Server.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Hello.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ HelloC.o $(COBJS) $(MINLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) Client.o: Client.cpp $(CXX) -c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) $< HelloC.o Hello.o: Hello.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< $(CXX) -c -DICEE_PURE_CLIENT -o HelloC.o $(CPPFLAGS) $(CXXFLAGS) $< include .depend IceE-1.2.0/demo/IceE/hello/Client.cpp0000644000076400007640000000760610616652361017030 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; void menu() { printf("usage:\n"); printf("t: send greeting as twoway\n"); printf("o: send greeting as oneway\n"); #ifdef ICEE_HAS_BATCH printf("O: send greeting as batch oneway\n"); printf("f: flush all batch requests\n"); #endif printf("T: set a timeout\n"); printf("P: set a server delay\n"); printf("s: shutdown server\n"); printf("x: exit\n"); printf("?: help\n"); } int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); const char* proxyProperty = "Hello.Proxy"; string proxy = properties->getProperty(proxyProperty); if(proxy.empty()) { fprintf(stderr, "%s: property `%s' not set\n", argv[0], proxyProperty); return EXIT_FAILURE; } Ice::ObjectPrx base = communicator->stringToProxy(proxy); HelloPrx twoway = HelloPrx::checkedCast(base->ice_twoway()->ice_timeout(-1)); if(!twoway) { fprintf(stderr, "%s: invalid proxy\n", argv[0]); return EXIT_FAILURE; } HelloPrx oneway = HelloPrx::uncheckedCast(twoway->ice_oneway()); #ifdef ICEE_HAS_BATCH HelloPrx batchOneway = HelloPrx::uncheckedCast(twoway->ice_batchOneway()); #endif int timeout = -1; int delay = 0; menu(); char c = EOF; do { try { printf("==> "); do { c = getchar(); } while(c != EOF && c == '\n'); if(c == 't') { twoway->sayHello(delay); } else if(c == 'o') { oneway->sayHello(delay); } #ifdef ICEE_HAS_BATCH else if(c == 'O') { batchOneway->sayHello(delay); } else if(c == 'f') { communicator->flushBatchRequests(); } #endif else if(c == 'T') { if(timeout == -1) { timeout = 2000; } else { timeout = -1; } twoway = HelloPrx::uncheckedCast(twoway->ice_timeout(timeout)); oneway = HelloPrx::uncheckedCast(oneway->ice_timeout(timeout)); #ifdef ICEE_HAS_BATCH batchOneway = HelloPrx::uncheckedCast(batchOneway->ice_timeout(timeout)); #endif if(timeout == -1) { printf("timeout is now switched off\n"); } else { printf("timeout is now set to 2000ms\n"); } } else if(c == 'P') { if(delay == 0) { delay = 2500; } else { delay = 0; } if(delay == 0) { printf("server delay is now deactivated\n"); } else { printf("server delay is now set to 2500ms\n"); } } else if(c == 's') { twoway->shutdown(); } else if(c == 'x') { // Nothing to do } else if(c == '?') { menu(); } else { printf("unknown command `%c'\n", c); menu(); } } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); } } while(c != EOF && c != 'x'); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/hello/README0000644000076400007640000000125210620544016015745 0ustar matthewmatthewThis demo illustrates how to invoke ordinary (twoway) operations, as well as how to make oneway, datagram, secure, and batched invocations. To run the demo, first start the server: $ server In a separate window, start the client: $ client To test timeouts you can use 'T' to set a timeout on the client proxy and 'P' to set a delayed response in the server to cause a timeout. You will notice that two "Hello World!" messages will be printed by the server in this case. This is because the sayHello method is marked as idempotent in the slice, meaning that Ice does not need to follow the at-most-once retry semantics. See the manual for more information about retry behavior. IceE-1.2.0/demo/IceE/hello/helloC.vcproj0000755000076400007640000003060510620372032017524 0ustar matthewmatthew IceE-1.2.0/demo/IceE/MFC/0000755000076400007640000000000010620543742014374 5ustar matthewmatthewIceE-1.2.0/demo/IceE/MFC/server/0000755000076400007640000000000010620544016015675 5ustar matthewmatthewIceE-1.2.0/demo/IceE/MFC/server/HelloServerCE.rc0000755000076400007640000001064510576536574020722 0ustar matthewmatthew//Microsoft eMbedded Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END 2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE MOVEABLE PURE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#include ""res\\HelloServer.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\HelloServer.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_HELLOSERVER_DIALOG DIALOGEX 0, 0, 139, 155 STYLE WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "IceE Hello Server" FONT 8, "System" BEGIN EDITTEXT IDC_LOG,7,7,125,119,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL DEFPUSHBUTTON "Shutdown",IDC_SHUTDOWN,7,130,50,18 PUSHBUTTON "Clear",IDC_CLEAR,82,130,50,18 END #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceE Hello Server\0" VALUE "FileVersion", "1.0.0.1\0" VALUE "InternalName", "HelloServer.exe\0" VALUE "LegalCopyright", "Copyright (c) 2003 - 2007 ZeroC, Inc. All rights reserved.\0" VALUE "OriginalFilename", "HelloServer.exe\0" VALUE "ProductName", "IceE\0" VALUE "ProductVersion", "1.0.0.1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO MOVEABLE PURE BEGIN IDD_HELLOSERVER_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 132 TOPMARGIN, 7 BOTTOMMARGIN, 148 END END #endif // APSTUDIO_INVOKED #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE 9, 1 #pragma code_page(1252) #include "res\HelloServer.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED IceE-1.2.0/demo/IceE/MFC/server/HelloServer.h0000644000076400007640000000127310616652361020313 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_SERVER_H #define HELLO_SERVER_H #pragma once #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "Resource.h" class CHelloServerApp : public CWinApp { public: CHelloServerApp(); virtual BOOL InitInstance(); DECLARE_MESSAGE_MAP() }; extern CHelloServerApp theApp; #endif IceE-1.2.0/demo/IceE/MFC/server/Resource.h0000644000076400007640000000115710616652361017651 0ustar matthewmatthew//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. // Used by HelloServer.rc // #define IDD_HELLOSERVER_DIALOG 101 #define IDR_MAINFRAME 128 #define IDC_SHUTDOWN 1001 #define IDC_CLEAR 1002 #define IDC_LOG 1003 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 130 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1004 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif IceE-1.2.0/demo/IceE/MFC/server/Hello.ice0000644000076400007640000000077310576536574017455 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_ICE #define HELLO_ICE module Demo { interface Hello { ["cpp:const"] idempotent void sayHello(); idempotent void shutdown(); }; }; #endif IceE-1.2.0/demo/IceE/MFC/server/.depend0000755000076400007640000000005510600254657017147 0ustar matthewmatthewHello$(OBJEXT): Hello.h Hello.cpp: Hello.ice IceE-1.2.0/demo/IceE/MFC/server/HelloServer.cpp0000644000076400007640000000573210576536574020666 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include "stdafx.h" #include "HelloServer.h" #include "HelloServerDlg.h" #include "HelloI.h" #ifdef _DEBUG #define new DEBUG_NEW #endif using namespace std; BEGIN_MESSAGE_MAP(CHelloServerApp, CWinApp) END_MESSAGE_MAP() CHelloServerApp::CHelloServerApp() { // Place all significant initialization in InitInstance } // The one and only CHelloServerApp object CHelloServerApp theApp; BOOL CHelloServerApp::InitInstance() { // // InitCommonControls() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. // InitCommonControls(); CWinApp::InitInstance(); // // Create a communicator and object adapter. // Ice::CommunicatorPtr communicator; Ice::ObjectAdapterPtr adapter; LogIPtr log; try { int argc = 0; Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for Hello.Endpoints so that the demo // will run without a configuration file. // initData.properties->setProperty("Hello.Endpoints", "tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // #ifdef _WIN32_WCE string config = "config.txt"; #else string config = "config"; #endif try { initData.properties->load(config); } catch(const Ice::FileException&) { } log = new LogI; initData.logger = log; communicator = Ice::initialize(argc, 0, initData); adapter = communicator->createObjectAdapter("Hello"); } catch(const IceUtil::Exception& ex) { AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); return FALSE; } // // Create the dialog. // CHelloServerDlg dlg(communicator, log); // // Instantiate the servant. // Ice::ObjectPtr servant = new HelloI(log, &dlg); adapter->add(servant, communicator->stringToIdentity("hello")); adapter->activate(); log->message("Ready to receive requests."); // // Show dialog and wait until it is closed, or until the servant receives // a shutdown request. // m_pMainWnd = &dlg; dlg.DoModal(); // // Edit control no longer exists. // log->setHandle(0); // // Clean up. // try { communicator->destroy(); } catch(const Ice::Exception&) { } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } IceE-1.2.0/demo/IceE/MFC/server/HelloServerDlg.cpp0000644000076400007640000000631510616652361021277 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include "stdafx.h" #include "HelloServer.h" #include "HelloServerDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #endif CHelloServerDlg::CHelloServerDlg(const Ice::CommunicatorPtr& communicator, const LogIPtr& log, CWnd* pParent /*=NULL*/) : CDialog(CHelloServerDlg::IDD, pParent), _communicator(communicator), _log(log) { _hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CHelloServerDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CHelloServerDlg, CDialog) ON_WM_PAINT() ON_WM_QUERYDRAGICON() //}}AFX_MSG_MAP ON_BN_CLICKED(IDC_SHUTDOWN, OnShutdown) ON_BN_CLICKED(IDC_CLEAR, OnClear) ON_MESSAGE(WM_USER, OnLog) END_MESSAGE_MAP() BOOL CHelloServerDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(_hIcon, TRUE); // Set big icon SetIcon(_hIcon, FALSE); // Set small icon // // Retrieve the edit control. // _edit = (CEdit*)GetDlgItem(IDC_LOG); _log->setHandle(m_hWnd); // // Set the focus to the shutdown button, so that the text in the log // is not initially highlighted. // ((CButton*)GetDlgItem(IDC_SHUTDOWN))->SetFocus(); return FALSE; // return FALSE because we explicitly set the focus } void CHelloServerDlg::OnCancel() { _log->setHandle(0); CDialog::OnCancel(); } // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. void CHelloServerDlg::OnPaint() { #ifdef _WIN32_WCE CDialog::OnPaint(); #else if (IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, _hIcon); } else { CDialog::OnPaint(); } #endif } // The system calls this function to obtain the cursor to display while the user drags // the minimized window. HCURSOR CHelloServerDlg::OnQueryDragIcon() { return static_cast(_hIcon); } void CHelloServerDlg::OnShutdown() { EndDialog(0); } void CHelloServerDlg::OnClear() { _edit->SetWindowText(CString("")); } LRESULT CHelloServerDlg::OnLog(WPARAM wParam, LPARAM lParam) { char* text = (char*)lParam; _edit->SetSel(-1, -1); _edit->ReplaceSel(CString(text)); delete[] text; return 0; } IceE-1.2.0/demo/IceE/MFC/server/HelloI.h0000644000076400007640000000125310576536574017247 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_I_H #define HELLO_I_H #include #include class CDialog; class HelloI : public Demo::Hello { public: HelloI(const LogIPtr&, CDialog*); virtual void sayHello(const Ice::Current&) const; virtual void shutdown(const Ice::Current&); private: LogIPtr _log; CDialog* _dialog; }; #endif IceE-1.2.0/demo/IceE/MFC/server/Makefile.mak0000755000076400007640000000272410616662372020127 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\..\.. SERVER = server.exe TARGETS = $(SERVER) OBJS = Hello.obj \ HelloI.obj \ HelloServer.obj \ HelloServerDlg.obj \ LogI.obj \ stdafx.obj SRCS = $(OBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = $(MFC_CPPFLAGS) -I. $(CPPFLAGS) -DVC_EXTRALEAN !if "$(EMBEDDED_DEVICE)" == "" | "$(STATICLIBS)" != "yes" CPPFLAGS = $(CPPFLAGS) -D_AFXDLL !endif !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif !if "$(EMBEDDED_DEVICE)" == "" RESFILE = HelloServer.res HelloServer.res: HelloServer.rc $(RC) HelloServer.rc !else RESFILE = HelloServerCE.res HelloServerCE.res: HelloServerCE.rc $(RC) HelloServerCE.rc !endif $(SERVER): $(OBJS) $(COBJS) $(RESFILE) $(LINK) $(LDFLAGS) $(MFC_LDFLAGS) $(PDBFLAGS) $(OBJS) $(COBJS) $(RESFILE) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Hello.cpp Hello.h del /q HelloServer.res HelloServerCE.res !include .depend IceE-1.2.0/demo/IceE/MFC/server/config0000644000076400007640000000076710275701157017106 0ustar matthewmatthew# # The server creates one single object adapter with the name # "Hello". The following line sets the endpoints for this # adapter. # Hello.Endpoints=tcp -p 10000 # # Warn about connection exceptions # Ice.Warn.Connections=1 # # 0 = no network tracing # 1 = trace connection establishment and closure # 2 = like 1, but more detailed # 3 = like 2, but also trace data transfer # Ice.Trace.Network=0 # # Protocol Tracing # # 0 = no protocol tracing # 1 = trace protocol messages # Ice.Trace.Protocol=0 IceE-1.2.0/demo/IceE/MFC/server/HelloI.cpp0000644000076400007640000000136410576536574017605 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include "stdafx.h" #include using namespace std; HelloI::HelloI(const LogIPtr& log, CDialog* dialog) : _log(log), _dialog(dialog) { } void HelloI::sayHello(const Ice::Current&) const { _log->message("Hello World!"); } void HelloI::shutdown(const Ice::Current&) { if(_dialog) { _log->message("Shutting down..."); _dialog->EndDialog(0); _dialog = 0; } } IceE-1.2.0/demo/IceE/MFC/server/LogI.h0000644000076400007640000000153310616533266016714 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef LOG_I_H #define LOG_I_H #include class LogI : public Ice::Logger { public: LogI(); virtual void print(const std::string&); virtual void trace(const std::string&, const std::string&); virtual void warning(const std::string&); virtual void error(const std::string&); void message(const std::string&); void setHandle(HWND); private: void post(const std::string&); std::string _buffer; HWND _hwnd; }; typedef IceUtil::Handle LogIPtr; #endif IceE-1.2.0/demo/IceE/MFC/server/HelloServerDlg.h0000644000076400007640000000217310616652361020742 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_SERVER_DLG_H #define HELLO_SERVER_DLG_H #pragma once #include "LogI.h" #include class CHelloServerDlg : public CDialog { public: CHelloServerDlg(const Ice::CommunicatorPtr&, const LogIPtr&, CWnd* = NULL); enum { IDD = IDD_HELLOSERVER_DIALOG }; protected: virtual void DoDataExchange(CDataExchange*); // DDX/DDV support protected: Ice::CommunicatorPtr _communicator; LogIPtr _log; CEdit* _edit; CEdit* _display; HICON _hIcon; // Generated message map functions virtual BOOL OnInitDialog(); virtual void OnCancel(); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnShutdown(); afx_msg void OnClear(); afx_msg LRESULT OnLog(WPARAM, LPARAM); DECLARE_MESSAGE_MAP() }; #endif IceE-1.2.0/demo/IceE/MFC/server/mfchelloS.vcproj0000755000076400007640000004372410620372032021050 0ustar matthewmatthew IceE-1.2.0/demo/IceE/MFC/server/README0000644000076400007640000000140410620544016016554 0ustar matthewmatthewThe server-side portion of the MFC hello demo. Note that this demo can be used with the MFC client or any of the other hello clients (for example, the one in demo/Ice/hello). To run the demo, first start the server: $ server Then start the client: $ cd ../client $ client To test timeouts, enable the "Timeout" check box to set a timeout on the client proxy and the "Delay" check box to force the server to delay its response long enough to trigger the timeout in the client. You will notice that the server prints two "Hello World!" messages. These occur because the Slice operation sayHello is marked as idempotent, which allows the Ice run time to retry the operation in the case of a timeout failure. See the Ice manual for more information about retry behavior. IceE-1.2.0/demo/IceE/MFC/server/stdafx.cpp0000644000076400007640000000104510616652361017702 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** // stdafx.cpp : source file that includes just the standard includes // HelloServer.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" IceE-1.2.0/demo/IceE/MFC/server/HelloServer.rc0000644000076400007640000001071010576536574020500 0ustar matthewmatthew//Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END 2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE MOVEABLE PURE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#include ""res\\HelloServer.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\HelloServer.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_HELLOSERVER_DIALOG DIALOGEX 0, 0, 290, 198 STYLE DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "IceE Hello Server" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN EDITTEXT IDC_LOG,7,7,276,161,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL DEFPUSHBUTTON "Shutdown",IDC_SHUTDOWN,7,174,50,18 PUSHBUTTON "Clear",IDC_CLEAR,233,173,50,18 END #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceE Hello Server\0" VALUE "FileVersion", "1.0.0.1\0" VALUE "InternalName", "HelloServer.exe\0" VALUE "LegalCopyright", "Copyright (c) 2003 - 2007 ZeroC, Inc. All rights reserved.\0" VALUE "OriginalFilename", "HelloServer.exe\0" VALUE "ProductName", "IceE\0" VALUE "ProductVersion", "1.0.0.1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO MOVEABLE PURE BEGIN IDD_HELLOSERVER_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 283 TOPMARGIN, 7 BOTTOMMARGIN, 191 END END #endif // APSTUDIO_INVOKED #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE 9, 1 #pragma code_page(1252) #include "res\HelloServer.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED IceE-1.2.0/demo/IceE/MFC/server/LogI.cpp0000644000076400007640000000313710617617176017255 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; LogI::LogI() : _hwnd(0) { } void LogI::print(const string& msg) { string s = msg; string::size_type idx = 0; while((idx = s.find("\n", idx)) != string::npos) { s.replace(idx, 1, "\r\n "); idx += 3; } message(s); } void LogI::trace(const string& category, const string& msg) { string s = "[ " + category + ": " + msg + " ]"; string::size_type idx = 0; while((idx = s.find("\n", idx)) != string::npos) { s.replace(idx, 1, "\r\n "); idx += 3; } message(s); } void LogI::warning(const string& msg) { message("warning: " + msg); } void LogI::error(const string& msg) { message("error: " + msg); } void LogI::message(const string& msg) { string line = msg + "\r\n"; if(_hwnd) { post(line); } else { _buffer.append(line); } } void LogI::setHandle(HWND hwnd) { _hwnd = hwnd; if(_hwnd != 0 && !_buffer.empty()) { post(_buffer); _buffer.clear(); } } void LogI::post(const string& data) { assert(_hwnd != 0); char* text = new char[data.size()+1]; strcpy_s(text, data.size()+1, data.c_str()); ::PostMessage(_hwnd, WM_USER, (WPARAM)FALSE, (LPARAM)text); } IceE-1.2.0/demo/IceE/MFC/server/res/0000755000076400007640000000000010620543745016476 5ustar matthewmatthewIceE-1.2.0/demo/IceE/MFC/server/res/HelloServer.ico0000644000076400007640000005217610262465177021443 0ustar matthewmatthew 00h– èþ(æ 00¨ ¨¶h^"00¨Æ' ¨ nDhQ(0`€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿ×wwwwwwwwwwwwwwwwwwwwwwÝ׈ˆˆˆˆˆˆˆˆˆ‡øˆˆˆˆˆˆˆˆˆ‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøñø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøñø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øøøøø‡Ý×ÿ‡ÿ‡Ý×ÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿÿÿÿÿÿ÷Ý×wwwwwwwwwwwwwwwwwwwwwwÝÝxˆˆˆˆxˆˆˆˆˆˆˆˆˆˆxˆˆˆˆ}ÝÝ׈ˆˆˆøøøøøøøøøøxˆˆˆ‡ÝÝÝÝxˆˆˆˆxˆˆˆ}ÝÝÝÝ×wwwøñøøøñøøwwwwÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøøøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøøøøøøøøøø}ÝÝÝÝÝÝÝÝÝÝÝÝÿÿÿÿÿÿÿÿÿÿ}ÝÝÝÝÝÝÝÝÝÝÝÝwwwwwwwwwww}ÝÝÝÝÝÝÝÝÝÝÝÝ׈ˆˆˆˆˆˆˆˆ‡ÝÝÝÝÝÝÝÝÝÝÝÝÝÝxˆˆˆˆˆˆˆˆ}ÝÝÝÝÝÝÝÝÝÝÝÝÝÝ×wwwwwwwwÝÝÝÝÝÝÝÝ€€€€€€€€€€€€€€€€€€€€€€€Ààðø?ÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿø?ÿÿüÿÿþÿÿ( @€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿ×wwwwwwwwwwwwwwÝ׈ˆˆˆˆˆ‡øˆˆˆˆˆ‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øøø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøø‡øøø‡Ý×ÿ‡ÿ‡Ý×ÿÿÿÿÿÿ‡ÿÿÿÿÿÿ÷Ý×wwwwwwwwwwwwwwÝÝxˆˆˆˆˆˆˆˆxˆˆ}ÝÝ׈ˆøøøøøøxˆ‡ÝÝÝÝxˆˆxˆ}ÝÝÝÝ×wøññøwwÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøøñø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøøøøøø}ÝÝÝÝÝÝÝÝÿÿÿÿÿÿ}ÝÝÝÝÝÝÝÝwwwwwww}ÝÝÝÝÝÝÝÝ׈ˆˆˆˆ‡ÝÝÝÝÝÝÝÝÝÝxˆˆˆˆ}ÝÝÝÝÝÝÝÝÝÝ×wwwwÝÝÝÝÝÝ€€€€€€€€€€€€€€€Ààðø?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€ÿÿÀÿÿàÿ( €€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿwwwwwww}xˆˆ‡ˆˆˆ}xˆ‡ˆˆ}xˆ‡ˆ}x‡ˆˆ}xˆ‡ˆ}x‡ˆˆ}xˆˆ‡ˆˆˆ}wwwwwww}ׇˆˆˆ‡‡ÝÝwˆ‡}ÝÝ׈‡ÝÝÝׇÝÝÝׇÝÝÝ׈ˆˆ‡ÝÝÝ×wwwwÝ݇‡Ýøø‡ø‡Ý€‡Àà‡Ýàøàø‡àà‡Ý(0`ŽwXkqN]tno‰0-Š1-Œ6-Ë­ª´‰‚©ym¶Ž…À•ÏËÊ”C,“B,¯„w‚:"£o\œhP”]>Át©e=¼‡g»†gÀrÀŽlÀg¾ƒNÉ“bÑ›i²t5³u6Ë‘XÄŒVÛ°†ê̯À5ËŽIÙ¦nÚ§oä»åÀ™óÜÃÃ6dž:Ê‹=È‹Añغˌ=Ý­lÜ­pÞ±w彉ðÕ²üóçÊŒ7ΗFã¸{ïÒ¨øêÕúîÜÁ~ÈŠ'Û©]îÏ õÞ¸õà¾Ú¤JóÖ¡óبôÚ­óÛ°ôÝ´õâÂöæËÙ¡/ïÍŠïÏŽðÑ”ðÒ–ðÓšòÕŸò×¥ìÄmíÈzî˃é¼NëÀ]è¹:I™H–\¦OU—JI¡=c®Y\™UL†Gaœ]gŸcqªmj¶er¹ny»v‚¿n kQ‰OW‹V…Áƒ|¯zŠÂ‰Â…²„ÄŽ’Ç”“È•˜Êš›Ë–É™›ÌžœÌŸ¡Î¤¬Õ°»Ü¾¿Þ¤Щ°Ö´¶ÚºÇâÊËäÎÁßÅÝíßÔèØÑåÕL]áëäd¾‰n“çöî@‡b~ϧÑïà·æÐÄêØÚòçŒÖ¶ôûø˜ÝÃ>88+/ø÷÷÷÷÷h\^„ˆ‰}qq€’‘•”“—£[`//"QRT$1=>>8+2ø÷÷÷÷÷j\^‚„ˆ‰sccy‹’‘•”“£\`2/"OQ$%=>>*2ø÷÷÷÷÷i\^‚„ˆsccy‹Œ‘•”£\a//"NO66**L=>(2ø÷÷÷÷÷i\]~ƒ„rccyŽ‹Œ‘•£\a//"WNFTHI*++LL=(/ø÷÷÷÷÷h\^|~ƒrccsŠŽ‹Œ‘¡\`//'VWRFTHJCDKLL)2ø÷÷÷÷÷j\]x|~rccp~‹’¡\_//'VVQRFTHJCDKL(/ø÷÷÷÷÷i\^wx|~pcccccbŽ‹Œ¡\`//'UVOQRFGHJCDK(/ø÷÷÷÷÷i\]wwx|pcckrssŠŽ¡\a//0UUNOQRSGHIJD(2ø÷÷÷÷÷i\^vwwxpccr†…‰ŠŽ¡\`///YUWNOQRFTHIJ)/ø÷÷÷÷÷j\]uvwwmccp‚†‡‰ŠŽ¡\`//9YYVWNO5;*THI)2ø÷÷÷÷÷j\]uuvwmccp‚†…‰Šœ\a//9XYVVWNSTH)2ø÷÷÷÷÷i\]ouuvmccbbbbbs‰œ\a//@XX0RST)/ø÷÷÷÷÷i\]oouulefffggkt‡‰œ\`/2@ZXX:;NPRF(/ø÷÷÷÷÷h\]loouuvwwx|~‚†…œ\_2/@ZZXXYYUUUVWNOPQ(/ø÷÷÷÷÷i\]ffggkkqqqzzz{{{–\_//?MMMMEEEAAAA33452ø÷÷÷÷÷i\\\\\\\\\\\\\\\\\\\`//&&&&&--&&&&-&&&&./÷÷÷÷÷÷illlllllll›¤¤¤¤¤¤¤¤¤¤È##" ÷÷÷÷÷÷÷÷ï¢¢š ŸžžÁ®­®®®®¯®®­®­®­®®­­®­   ÷÷÷÷÷÷÷÷÷÷ï¢šš ŸžÀ®¾¥¥¦¦¦¥¥¥¥¥¥¦¥¥¦¦°­  ÷÷÷÷÷÷÷÷÷÷÷÷ïššš ŸÀ­êËÌÌÍÍÎÏп¿ÑÑ»¼¼º©­  ÷÷÷÷÷÷÷÷÷÷÷÷÷÷ïšš  À®êÊËÌÜÝÞÎÏпËÌÌÇÒ¿§­ ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ïïïïïÀ®êàÊËõôÍÎÏÐõõÑÇ¿§® ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä­éàÊÊõõÝõóÏõõÑ»¬§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®éÞßàõõÜõÎõõ¿Ñ¬©­òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÛÞàõõÜõâõõ¿¿¬§­ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÜÉÞõöõöõöõп´§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÙÜÉõôÐд§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä­îØÙÜõÓÓôÎϳª®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®îÖØÙõÖØõÎγ©®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À¯îÕרôöõ×ÖõöõÍι«®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À¯îÓÕÖõõÉßàÊõõÆÍ¹§®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­íÓÓÕõõÛÉßàõõÌÆ¹§®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®íÓÓÓóõóÙÜÉßóõóË̸«®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®íäÓÓÓÕרÙÛÝßàÊËË·«®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­ðééêêêääåååææçèèÕ°¯ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­ÂÃÂÂÃÂÃÃÃÃÃÂÂÂÃî¯òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Å­­®¯­­®­®­­­¯­®­­­®½ì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ëᨼ¼»º¿¬´³²¸¶¶±±µÅì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷켨¼¼»º¿¬´³²¸¶¶µÔì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ì¼¼¼Ç»º¿¬´³²¸¸âì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ìãâââââÚÚÚÚÔìì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ÿÿÿÿÿÿðàÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀà?ðøÿüÿþÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿð?ÿÿøÿÿüÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿ( @ŽnPh„ixðçèѶ¶Ò··¼•”Š1-Ŧ ­€vÁŸ—°…yÀ•Š¥uf¨bJÆŽÅœ—O1§aAœgO§`>©eD´„l™„¨d=¤iIÂŽpÈ¢ŽÖ·¦©d8£hEÁs³rHÂgè͹ˆXÁ†OດéȧÀ5çÄïØÀÄ„:Ê‹=ݰzçÁ”îÔ¶ËŒ=ÒšSÜ­n澋óÝ¿Î;Ò˜HÛ©^ä»êÈ—öäË÷èÓùìÚûòåÑ–;áµqðÓ¦òÙ²òÛ¸ôáÂÝ©L߯_óبñÖ©óÚ­ôÛ°õß¹Ù¢5îÍŠðÑ•ðÓšðÔŸìÃjîÌ…Ø é¼Lè¹3_s-G‘CˆB‡H–BvBuAuBvD‹7m3eH%0_J.M5>w+I4D2P‘=F‚9I¡=J¡=T©Gf¯[M„Ea³Yg±^o³g`œZfµ_r¸ld`y·t¹zuºqq¢n„¼„²‚€¿~…Áƒˆ¾†”ƔŎ˜È™ÊžœÌž–Ê™›Ìž›Ëž¢Î¥¦Ò©‚”ƒƒ•„´Ù··Úº»Ü¾ÇâÊ×êÙÛìݬԱÌäϺ׿éóë|ÁŽ‘Ê£‡ŠšÐ­ Ø·¬ÞùäÏ×ñäãõíÄêÚ†… ¨§Z›Ÿ7s‰8tŠ5u“X°û^µüd·ü3Zz²ÜÿÄäÿ#”÷$•ø$•÷8žù?¡úI¥úS«ú\²üb˜ÇŒÇý¦Ôþ¼àÿ*ì>–íZ¬ú~¿ý‘Æû›Íý×ëÿãñÿûýÿ#Šöêôÿ¹Óò¹ÒñÚëÿ#€õ$€õWpWoÊàþÐäþ/€õ3‚õ8†ö<‰öX—îe“رù”¾úœÃú Æû¦Éû®Îû·Ôý¸Õý¿Ùþ²Èè`™ödœöl¡÷s¦øt¨øy«øTr£‡´ùˆµùyØy׺úhözØ¡¸à@sÛGxÛv•Ñ6gÓDrÔKvÕNxÔUܤÕÌÕé8^Äj}¼!9´,£'“»»¾üüýýýýýýýýýýýýýüýýýýýýýýýýýýýüüüü ŠŠ‹ŠŠ‹‹Š‹ŠŠŠýýýüüü]ZZZZZZZZZZZWV-1---------1-ýüüü\g–™šš››œœŸŸmV2.AHBC5D;<<(-ýüüü^i†‰ƒz|“‘•kV2.P:#!!+=>(-ýüüü\e…„coŽ“‘kV239 $=(-ýüüü]e…{coŽ“kV73@ GJ'0<(-ýüüü^e~xco’ŒŽ“kV78@ OGJKD;*1ýüüü]d}~wca``€ŽkV78F OOGJKD*1ýüüü\dy}rch{ˆŒŽkV7EF MNOGIK/1ýüüü\buyrcj€‡‰’ŒkV?EE RR.#:I/-ýüüü[btuncfssv‚’kV?LE&%"9G41ýüüü]_ptqhhhjjˆkV?LTE@NO41ýüüü]_mptuy}~€„lV6SUTTQQQRRN91ýüüü[WXXXYXXYXYYWV-)))))))))),,ýüüü˜ž”’™—¢¥£££¤£©ÉÉÈÉÉâ$üüüüüûžžŸ´Á²²¦¦³§§¨¨¨§­ üüüüüüüûž´ÇÓÔÖרÚÊËÅ¿«¬ üüüüüüüüüûû¡æÆçÓõøòçãø÷Å«­ üüüüüüüüüüüüüæÆãçõîèøË·¬öýüüüüüüüüüüüüüüüüåÇÒãñîÜùøÊª¬íýüüüüüüüüüüüüüüüüæÇáÒðøÚª¬æýüüüüüüüüüüüüüüüüæÆßáïÜøøÙ¶®æýüüüüüüüüüüüüüüüüæÆÞßïùß÷úø×¶¬æýüüüüüüüüüüüüüüüüéÇÝÞïðãçøøÖ½­æýüüüüüüüüüüüüüüüüåÆÜÝëøìÒäøøÕ½­éýüüüüüüüüüüüüüüüüéÇÐÜÝÞàáÒÞßÔ¼­æýüüüüüüüüüüüüüüüüæÁÌÌÍÍÍÎÎÏÏÏÏ®æýüüüüüüüüüüüüüüüü󹺺²²±±±°°¯¯¸óüüüüüüüüüüüüüüüüüüêÀ¿¿Å«·¶½µ»ÐêüüüüüüüüüüüüüüüüüüüüôÀ¿¾«·¶µÑêüüüüüüüüüüüüüüüüüüüüüüôÄÃÄÃÃÃÛêüüüüüüüüüüüüüÀ€€€€€€€€€€€€€€€Ààð?þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿÿÿÿ€ÿÿÀÿ( uVh‘tz·Ž…Ô·¯Â™„ T,©d<Ú¼«Ê”rÊ”s©d6¨c6»YŠ`Ï›oˆUÖ¡qðÚÆÕ¡pÖ¢qݱ…øëÞÒ˜XÒ™YÔŸeÓžeÌIÓœYÒ™XÓšQÓ›QôâËȈ)ÈŒ7ëÈ”óݾЖ8Ñ—<Ò˜?èÇòÙ²ðÒŸõà»ñצ_s-CŠ<<==.ECK2LPV.$ E@J3MOU.  !D?H31IT.-,%B;G1JKS.( ) *E9A011R.&#++E/4678:."&' NQWhX^XXXe Šrpqƒt}~]mvŽŒ†\ˆl{‹…[‰iz„Z‰jy‡w‚€Y‰djklnoc‰sgba`_f|ux||||d}ca€ŽV7 GJ*1€üüÀdyðchðˆŒðV7ð ðOGð/1øüü(0` # # # # # # # #! # #! #! # # # # # # # #gdc # # #! # # # # # # # # # # # # # # # # #BuAuBvBvBvBvAuAuBvBvAuBuBvBvBvBvAuAuBv! #­o3²t5²t5²t5²t5²t5²t5²t5²t5²t6²t5²t5³u6²t5²t5²t5²t6²t5²t5²t5! #! #a„ZI—I–I–I—H–I—I–H–I–I–I–I–I–H–H–H–I–I—I–BvÊ‹=Ê‹=ËŒ=Ê‹=Ê‹=Ê‹=Ë‹=Ë‹=Ê‹=Ê‹=Ê‹=Ê‹=Ë‹=Ê‹=Ê‹=ËŒ=Ê‹=Ê‹=ËŒ=Ê‹=—lR! #a„YI—é»Hé½RΗF©d7©d8©d9©d<¨d=©e@ã¹vïÎðÑ”ðÒ™òÕ Ú§oË‹=—lR! #a„YH–è»Hé½Rê¿ZëÁ`ëÃiìÄníÇvíÇyîÊîˆïÎðÑ”ðÒ™Ú¦nÊ‹=˜lS! #b…ZH–=zBƒ2D„4E„9F…:H†?H†@K‡DLˆHNˆJQ‰OR‰OUŠSV‹UW‹WYŒZMŽ^I–BuÊ‹=ËŒ=Á~ØŸ!Ø *Ù¢6Ù¢;Ù£CÚ¥KÚ¦PÚ§WÛ¨ZÛª`ÛªcÛ¬jÝ­nÝ®qݰwÒ™`ËŒ=˜lR! #b„ZI–I—I–I—I—I–H–H–I—H–I—I—H–H–I—I—I—H–H–AuËŒ=ËŒ=À5Ã5À5À5À5À5€5À5Ã5À5Ã5À5Ã5Ã5À5À5dž:Ê‹=—lR! #~Œ€T>j§Zf§We¦Va¥S`¥Q]¤OZ¤LZ¤K@‡b;wi=ua=ua=ua=uanògž÷l¢÷q¥ø,¤Ž,£‚±øˆµùŒ·ù‘»ú,£Ž,£¦Éû«ÌûÏþ2¢ú#”÷4@egdc$sÕ$•ø;kñc›÷gžöm£ø,£Ž,¤°ù‚±ø‡µùŒ¸ù,£,£¡Æú¨ÊûšÌü1¢ú$•ø4@egdc%sÖ#•÷:jñ_™÷c›ögž÷"=´,£ 9´y«ø¯ù‚±ø‡µù!:´,£ 9´›Âú¢Çû–Êü1¢ù#•÷5@fgdc%tÖ$•ø8iñZ•ö_™÷cœ÷gžöm¢÷q¥øv©ø{¬ø¯ø„³ù‡´ùŽºú‘»ù˜ÀúœÂú“Çû1¡ù#”÷5Afgdc$sÕ$•ø0[ñFóHóLƒóQ†ôS‡ôY‹õ[õ_õa‘õe“öh•õj—öo›öqœöuŸöm¢÷.™ø#”÷5@egdc%sÖ$•÷$€õ$€õ#ô#€õ#€õ$€õ#€õ$€õ$€õ$€õ$€õ#€ô$€õ#€õ#€õ$€õ#ô#•÷$•ø5@fgdc8wÐ#”÷#•÷$•ø$•÷#•÷$•ø#”÷$•ø$•ø$•ø#•÷#”÷$•ø#”÷#•÷$•ø$•ø#”÷#”÷$•øXf‘\{Äéõÿéõÿéõÿáðÿ×ìÿÌæþÅâþ¹Ýÿ³Úÿ§Ôþ Ñþ–ÌýÇý†Ãü|¿ýv»ük¶ük¶üh€¸\{Äéõÿéõÿèôÿáðÿ×ëÿÌæÿÅâþ¹Ýÿ²Ùþ§Õÿ Ñþ–ÌýŒÇý†Ãüq¸üv»üh€¸\{ÄéõÿäòÿèôÿÞïÿ×ëÿÊåþÅâþ¹Ýþ²Ùþ§Õþ Òþ–ÌýŒÇý†Ãüh€¸\{Ä…£ØxÙxÙt›Ùt›Ùq™Ùo™Ùm—Øm—Ùk–Ùk–Ùk–Ùh€¸ÿÿÿÿÿÿðàÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀàðø?üþÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿð?ÿÿøÿÿüÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿ( @ # # # # # # # # # # # # #˜•“ # # # # # # # # # # # # #‚†…BL@BM@BM@BL@BL@BL@BL@BM@CMABM@BL@BL@ #w\Rv\Rw]Sw\Rw\Rw\Sv\Rv\Rw\Rw]Sw]Sw]StYQ1-/ #AuH–I–H–H–H–H–H–I—H–H–H–I–_s-Ê‹=ËŒ=Ë‹=Ê‹=Ê‹=ËŒ=Ê‹=Ë‹=Ê‹=ËŒ=ËŒ=Ê‹=²t6REE #BuI5|Á–Ò­ž×µ¡Ø¸©Ü¿®ßÅ·âͺåÐÃéÙÈëÞP¢F_s-Ó›Vݯ}ðÔ¦ñÕ©òÙ³òÛ·óÞ¿ôàÅõãÌ÷æÒøèØèÅ¥²t6RDD #AuP‘=›Ë¥Ò©œÊžq¢n„²‚ÇâÊÍåÏÙëÛÝíßêôëI¡<_s-ÓšTݰyðÔŸëɘÀŽkÀnÀrÀsïØÀùîÛüóåêʬ²t5REE #BvN‘8–ɘœÌžˆ½…0_O…HºÛ¾ÆâÊÍäÏÙëÛÝíßI¡=^s,ÒšQÝ®p彂§aA’L.£hE¤iJ™X7§bIêεùîÛéȧ²t5RDE #BvM6ŽÅŽ–Ê™„¼€0`L„D·Ú»ºÛ¾ÇâÊÍåÐ×êÚI¡=_s-Ò™MÛ«ká´qŠ1.ªfHóبô۰ດÃqîÔ¶øêÕèǤ³u6RDD #AuK2…Á„ÅŽ~¹y0_L„D¬Õ°´Ù¸»Ü¾ÇâÊËäÎI¡=_s-Ò™KÛ©_à²lŠ1.ªfFðÓœòبóÛ°õà»õâÁ÷æÊçÅŸÊ‹=REE #BvJ.€¿~…Á„y¶t0_3f6l6m•ԻܾÇâÊI¡=^s,Ò™Fܪ]à°bŠ1.¨dCðÒ—ðÓ›óØ©ôÛ¯õߺõáÁçěˌ=REE #AuIŽ+uºq€¾}r´j0_E5ƒ»€‰½†¢Î¥³Ø·ºÛ¾I¡=_s-Ñ—EÚ¦P߯]Š1-©eAîÍŠðÒ•ðÓœòبóÙ­õߺæÁ•Ê‹=SEE #BuHŽ'r¹muºqn²f0_G‚9“È”œÌž¥Ò©«Ô¯´Ù·I¡=_s-Ñ—>Ù¥IÞ¬Q‰0-©d=îʃî̇ޱxŠcëȘóÚ­æÀ’Ê‹=REE #BuG!f´_r¹mf¯[0_>w+^›Wa›\cœ_™Èš«Ô®I¡=^s,Ò—=Ù¢<ݪH“B,žT4Á†OˆX³rH§a?㸀óب彊ʋ=REE #BuFa²Xgµ_g°]B€.D3D4G‚8G‚:‰¿‡¡Î¤I¡=_s-Ñ–7Ù¡/é¼Há¯M¨c6©d8¨d;©e?äºvðÑ•ðӛ澊ˌ=SEE #BvCˆW®Hb³Yf´^p¸kuºq€¿}ƒ¿Å’Ç”›ÌžI¡<^s,Î;Ø ç¸2é¼Gë¿VëÀ_ìÃlíÆtî˃îˇïє廂ʋ=SEE #AuFB‡CˆCˆCˆCˆBˆCˆCˆB‡CˆG’_s-Ê‹=À5À5À5À5€5À5Ã5Ã5À5À5Ń8„;tcc #‡‰±Æ²º×¿®Ó¶œÍ«‘É¢Z›Ÿ5u“7tŠ7s‰7tŠ7tŠ7tŠ3ZzWoWpWpWpWoTr£ƒiw´„lÙ„È¡ŽÖ¶¥ä˼ä˼˜•“‡‰ãõíãõíÁéÖÁéÖ`—Æ#ŠöS¬úT®ûW°ûY°û[²û^´ü_´üc¶üc·üf¹ü]·ü$•øvWj¥ue°…zÁŸ—Ʀ¡Ö¶¥˜•“‡‰ãõíØñåÁéÖd˜È$€õ•¾úžÄú¥Èû®Îü¸Õþ¿ÙþÊàþÐãþÚêÿãïÿÆèÿ$•øpM\›gO¨zl¨}rÁ¦¥˜•“‡‰‡‰‡‰\±$€õºù”½ù6_Ç,£Uܹù‡³ù,£!9´ÚêþÁåÿ$•øXBe’cX«|t¨zl˜•“y×$€õ†´ùºù9\À;kÓiö,£Ðãþ¼áÿ#”÷4@e˜•“y×#€õ€°ø…´øNxÕŽ2cÒd™õ'ž,£Êàþ³Üÿ$•ø?Ru˜•“zØ$€õy«ø€°ùJvÔŽ,¤¾Ùý°Úÿ$•÷CXz˜•“y×#€õr¥øxªøGtÔŽa—õ,£,¤¹Öý¦Õþ$•øCXz˜•“y×$€õk¡÷r¦÷DrÔ(žt¦÷!:´“,£¯Ïü£Óþ#•÷CYz˜•“y×#€ôc›öl¡÷AoÔŽJvÔ‡µù‘¼ú,£,¤©ËûœÎü$•øCXz˜•“yœ×$€õ^˜öeœöAsÛ,£GxÛ‚±ø‡µù,£,£ Åú™Ëü#•÷BXz˜•“zØ#€õV“ö`™öe÷l¢÷t¨øy«øƒ²ùl¡÷s¦÷šÁû‘Æû#”÷CXz˜•“zØ$‹÷/ô0€õ3õ4ƒõ5ƒõ7…õ8†õ;ˆö<ˆö=ˆõ<‹ö$•øCY{˜•“©Ù=–í[¬úW«úT©úQ©úM§úH¥úE£ù?¡ù= ù8žù6ø+Žìs„­˜•“ ¸àêôÿÛîÿÛîÿÛîÿÄãÿ¼ßÿ¨ÕþœÏþŒÇý}¿ý}¿ý_ŠË˜•“ ¸àêôÿÛîÿÛîÿ×ëÿÂáþ¼ßÿ¨ÕþŒÇý}¿ý_ŠË˜•“ ¸à ¸à›²Ø›²Ø›²Ø›²Ø›²Ø›²Ø›²Ø˜•“À€€€€€€€€€€€€€€€Ààð?þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿÿÿÿ€ÿÿÀÿ( ³G—I¡=J¡=I¡=I¡=I¡=_s-ÌIÒ˜XÒ˜XÒ™YÒ˜XÒ™Y¦|Xfdc“¾d`¦Ñ©;w ÎåÐÜíÞËîà_s-ÔždëÈ”©d7©d6ðÛÇøëÞ«Zgec”¾‘]šU™Ëœ;w ¹Û½ÍåиãÎ_s-ÓœY¨c6¼Zݰ„Ê”rôâË«Zfdc”¾‘X˜O†Á„;w _s-LJ)Ñ–9Ò—<Ô›QÓœYÓže®ƒ\°®¬ÕÚÖƒ–…²Ô¹v¦ ,i»;z¯;z¯;z¯;z° IceE-1.2.0/demo/IceE/MFC/server/stdafx.h0000644000076400007640000000362310616652361017353 0ustar matthewmatthew// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_) #define AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #ifndef _WIN32_WCE #if !defined(NDEBUG) && !defined(_STLP_DEBUG) # define _STLP_DEBUG #endif #ifndef WINVER #define WINVER 0x0400 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif #else #if _MSC_VER >= 1400 # define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA # ifndef WINVER # define WINVER 0x0400 # endif #endif #if (_WIN32_WCE <= 200) #error : This project does not support MFCCE 2.00 or earlier, because it requires CControlBar, available only in MFCCE 2.01 or later #endif // // _STLP_USE_MFC must be defined. We don't use iostreams so lets turn // that off too. This must defined here since some of the AFX header // files include STLport headers. // #define _STLP_USE_MFC #define _STLP_NO_NEW_IOSTREAMS #define _STLP_NO_IOSTREAMS #endif // _WIN32_WCE #ifndef VC_EXTRALEAN #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif #include // MFC core and standard components #include // MFC extensions #if defined(_WIN32_WCE) && (_WIN32_WCE >= 211) && (_AFXDLL) #include // MFC support for Internet Explorer 4 Common Controls #endif #ifndef _AFX_NO_AFXCMN_SUPPORT #include // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include // MFC socket extensions //{{AFX_INSERT_LOCATION}} // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line. #include #endif // !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_) IceE-1.2.0/demo/IceE/MFC/Makefile.mak0000755000076400007640000000110610600254657016606 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. !include $(top_srcdir)\config\Make.rules.mak SUBDIRS = client \ server $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/demo/IceE/MFC/client/0000755000076400007640000000000010620544016015645 5ustar matthewmatthewIceE-1.2.0/demo/IceE/MFC/client/Resource.h0000644000076400007640000000151210616652361017614 0ustar matthewmatthew//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by HelloClient.rc // #define IDD_HELLOCLIENT_DIALOG 101 #define IDR_MAINFRAME 128 #define IDC_MODELABEL 1000 #define IDC_MODE 1001 #define IDC_SECURE 1002 #define IDC_TIMEOUT 1003 #define IDC_INVOKE 1004 #define IDC_FLUSH 1005 #define IDC_SHUTDOWN 1006 #define IDC_STATUSBAR 1007 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 130 #define _APS_NEXT_COMMAND_VALUE 32771 #define _APS_NEXT_CONTROL_VALUE 1009 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif IceE-1.2.0/demo/IceE/MFC/client/Hello.ice0000644000076400007640000000077310576536574017425 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_ICE #define HELLO_ICE module Demo { interface Hello { ["cpp:const"] idempotent void sayHello(); idempotent void shutdown(); }; }; #endif IceE-1.2.0/demo/IceE/MFC/client/.depend0000644000076400007640000000005510600254657017114 0ustar matthewmatthewHello$(OBJEXT): Hello.h Hello.cpp: Hello.ice IceE-1.2.0/demo/IceE/MFC/client/Makefile.mak0000755000076400007640000000272110616662372020074 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\..\.. CLIENT = client.exe TARGETS = $(CLIENT) OBJS = Hello.obj \ HelloClient.obj \ HelloClientDlg.obj \ stdafx.obj SRCS = $(OBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = $(MFC_CPPFLAGS) -I. $(CPPFLAGS) -DICEE_PURE_CLIENT -DVC_EXTRALEAN !if "$(EMBEDDED_DEVICE)" == "" | "$(STATICLIBS)" != "yes" CPPFLAGS = $(CPPFLAGS) -D_AFXDLL !endif !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) !endif !if "$(EMBEDDED_DEVICE)" == "" RESFILE = HelloClient.res HelloClient.res: HelloClient.rc $(RC) HelloClient.rc !else RESFILE = HelloClientCE.res HelloClientCE.res: HelloClientCE.rc $(RC) HelloClientCE.rc !endif $(CLIENT): $(OBJS) $(COBJS) $(RESFILE) $(LINK) $(LDFLAGS) $(MFC_LDFLAGS) $(PDBFLAGS) $(OBJS) $(COBJS) $(RESFILE) /out:$@ $(MINLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Hello.cpp Hello.h del /q HelloClient.res HelloClientCE.res !include .depend IceE-1.2.0/demo/IceE/MFC/client/config0000644000076400007640000000075310267231724017050 0ustar matthewmatthew# # The client reads this property to create the reference to the # "hello" object in the server. # Hello.Proxy=hello:tcp -p 10000 # # Warn about connection exceptions # Ice.Warn.Connections=1 # # Network Tracing # # 0 = no network tracing # 1 = trace connection establishment and closure # 2 = like 1, but more detailed # 3 = like 2, but also trace data transfer # Ice.Trace.Network=0 # # Protocol Tracing # # 0 = no protocol tracing # 1 = trace protocol messages # Ice.Trace.Protocol=0 IceE-1.2.0/demo/IceE/MFC/client/HelloClientDlg.h0000644000076400007640000000245710616652361020667 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_CLIENT_DLG_H #define HELLO_CLIENT_DLG_H #include "Hello.h" #include #pragma once class CHelloClientDlg : public CDialog { public: CHelloClientDlg(const Ice::CommunicatorPtr&, CWnd* = NULL); enum { IDD = IDD_HELLOCLIENT_DIALOG }; protected: virtual void DoDataExchange(CDataExchange*); // DDX/DDV support protected: Ice::CommunicatorPtr _communicator; CComboBox* _mode; CButton* _secure; CButton* _timeout; CStatic* _status; Demo::HelloPrx _proxy; Demo::HelloPrx _currentProxy; int _currentMode; bool _useSecure; bool _useTimeout; HICON _hIcon; // Generated message map functions virtual BOOL OnInitDialog(); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnSayHello(); afx_msg void OnFlush(); afx_msg void OnShutdown(); DECLARE_MESSAGE_MAP() void updateProxy(); void handleException(const IceUtil::Exception&); }; #endif IceE-1.2.0/demo/IceE/MFC/client/mfchelloC.vcproj0000755000076400007640000004022010620372032020764 0ustar matthewmatthew IceE-1.2.0/demo/IceE/MFC/client/mfchelloC_CE.vcproj0000755000076400007640000031646110620410340021343 0ustar matthewmatthew IceE-1.2.0/demo/IceE/MFC/client/HelloClient.h0000644000076400007640000000127310616652361020233 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_CLIENT_H #define HELLO_CLIENT_H #pragma once #ifndef __AFXWIN_H__ #error include 'stdafx.h' before including this file for PCH #endif #include "Resource.h" class CHelloClientApp : public CWinApp { public: CHelloClientApp(); virtual BOOL InitInstance(); DECLARE_MESSAGE_MAP() }; extern CHelloClientApp theApp; #endif IceE-1.2.0/demo/IceE/MFC/client/HelloClient.rc0000644000076400007640000001212010576536574020415 0ustar matthewmatthew//Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE MOVEABLE PURE BEGIN "resource.h\0" END 2 TEXTINCLUDE MOVEABLE PURE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE MOVEABLE PURE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#include ""res\\HelloClient.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON DISCARDABLE "res\\HelloClient.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_HELLOCLIENT_DIALOG DIALOGEX 0, 0, 234, 91 STYLE DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "IceE Hello Client" FONT 8, "MS Shell Dlg" BEGIN LTEXT "Mode",IDC_MODELABEL,7,18,19,8 COMBOBOX IDC_MODE,28,16,109,70,CBS_DROPDOWNLIST | WS_TABSTOP CONTROL "Timeout",IDC_TIMEOUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,147,17,41,10 DEFPUSHBUTTON "Say Hello",IDC_INVOKE,7,48,68,14 PUSHBUTTON "Flush Batch",IDC_FLUSH,83,48,68,14 PUSHBUTTON "Shutdown Server",IDC_SHUTDOWN,160,48,68,14 LTEXT "",IDC_STATUSBAR,0,78,234,12,SS_CENTERIMAGE | SS_ENDELLIPSIS,WS_EX_STATICEDGE END #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceE Hello Client\0" VALUE "FileVersion", "1.0.0.1\0" VALUE "InternalName", "HelloClient.exe\0" VALUE "LegalCopyright", "Copyright (c) 2003 - 2007 ZeroC, Inc. All rights reserved.\0" VALUE "OriginalFilename", "HelloClient.exe\0" VALUE "ProductName", "IceE\0" VALUE "ProductVersion", "1.0.0.1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO MOVEABLE PURE BEGIN IDD_HELLOCLIENT_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 227 TOPMARGIN, 7 BOTTOMMARGIN, 84 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Dialog Info // IDD_HELLOCLIENT_DIALOG DLGINIT BEGIN IDC_MODE, 0x403, 7, 0 0x7754, 0x776f, 0x7961, "\000" IDC_MODE, 0x403, 7, 0 0x6e4f, 0x7765, 0x7961, "\000" IDC_MODE, 0x403, 13, 0 0x6142, 0x6374, 0x2068, 0x6e4f, 0x7765, 0x7961, "\000" 0 END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE 9, 1 #pragma code_page(1252) #include "res\HelloClient.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED IceE-1.2.0/demo/IceE/MFC/client/README0000644000076400007640000000142010620544016016522 0ustar matthewmatthewThe client-side portion of the MFC hello demo. Note that this demo can be used with the MFC server, or any of the other hello servers (for example, the one contained in demo/Ice/hello). To run the demo, first start the server: $ cd ../server $ server Then start the client: $ client To test timeouts, enable the "Timeout" check box to set a timeout on the client proxy and the "Delay" check box to force the server to delay its response long enough to trigger the timeout in the client. You will notice that the server prints two "Hello World!" messages. These occur because the Slice operation sayHello is marked as idempotent, which allows the Ice run time to retry the operation in the case of a timeout failure. See the Ice manual for more information about retry behavior. IceE-1.2.0/demo/IceE/MFC/client/stdafx.cpp0000644000076400007640000000104510616652361017652 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** // stdafx.cpp : source file that includes just the standard includes // HelloClient.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" IceE-1.2.0/demo/IceE/MFC/client/HelloClientCE.rc0000644000076400007640000001162510615655577020635 0ustar matthewmatthew// Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" "LANGUAGE 9, 1\r\n" "#pragma code_page(1252)\r\n" "#include ""res\\HelloClient.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDR_MAINFRAME ICON "res\\HelloClient.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_HELLOCLIENT_DIALOG DIALOG 0, 0, 152, 131 STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "IceE Hello Client" FONT 8, "System" BEGIN LTEXT "Mode",IDC_MODELABEL,6,18,19,8 COMBOBOX IDC_MODE,28,18,56,70,CBS_DROPDOWNLIST | WS_TABSTOP CONTROL "Timeout",IDC_TIMEOUT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,92,19,41,10 DEFPUSHBUTTON "Say Hello",IDC_INVOKE,28,38,68,14 PUSHBUTTON "Flush Batch",IDC_FLUSH,28,59,68,14 PUSHBUTTON "Shutdown Server",IDC_SHUTDOWN,28,80,68,14 LTEXT "",IDC_STATUSBAR,6,103,124,12,SS_CENTERIMAGE,WS_EX_STATICEDGE END ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc." VALUE "FileDescription", "IceE Hello Client" VALUE "FileVersion", "1.0.0.1" VALUE "InternalName", "HelloClient.exe" VALUE "LegalCopyright", "Copyright (c) 2003 - 2007 ZeroC, Inc. All rights reserved." VALUE "OriginalFilename", "HelloClient.exe" VALUE "ProductName", "IceE" VALUE "ProductVersion", "1.0.0.1" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_HELLOCLIENT_DIALOG, DIALOG BEGIN LEFTMARGIN, 6 RIGHTMARGIN, 137 TOPMARGIN, 6 BOTTOMMARGIN, 115 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Dialog Info // IDD_HELLOCLIENT_DIALOG DLGINIT BEGIN IDC_MODE, 0x403, 7, 0 0x7754, 0x776f, 0x7961, "\000" IDC_MODE, 0x403, 7, 0 0x6e4f, 0x7765, 0x7961, "\000" IDC_MODE, 0x403, 13, 0 0x6142, 0x6374, 0x2068, 0x6e4f, 0x7765, 0x7961, "\000" 0 END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) LANGUAGE 9, 1 #pragma code_page(1252) #include "res\HelloClient.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED IceE-1.2.0/demo/IceE/MFC/client/HelloClient.cpp0000644000076400007640000000442210616652361020565 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include "stdafx.h" #include "HelloClient.h" #include "HelloClientDlg.h" //#ifdef _DEBUG //#define new DEBUG_NEW //#endif using namespace std; BEGIN_MESSAGE_MAP(CHelloClientApp, CWinApp) END_MESSAGE_MAP() CHelloClientApp::CHelloClientApp() { // Place all significant initialization in InitInstance } // The one and only CHelloClientApp object CHelloClientApp theApp; BOOL CHelloClientApp::InitInstance() { // InitCommonControls() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. InitCommonControls(); CWinApp::InitInstance(); // // Create a communicator. // Ice::CommunicatorPtr communicator; try { int argc = 0; Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for Hello.Proxy so that the demo will // run without a configuration file. // initData.properties->setProperty("Hello.Proxy", "hello:tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // #ifdef _WIN32_WCE string config = "config.txt"; #else string config = "config"; #endif try { initData.properties->load(config); } catch(const Ice::FileException&) { } communicator = Ice::initialize(argc, 0, initData); } catch(const Ice::Exception& ex) { AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); return FALSE; } CHelloClientDlg dlg(communicator); m_pMainWnd = &dlg; dlg.DoModal(); // // Clean up. // try { communicator->destroy(); } catch(const Ice::Exception&) { } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } IceE-1.2.0/demo/IceE/MFC/client/res/0000755000076400007640000000000010620543742016443 5ustar matthewmatthewIceE-1.2.0/demo/IceE/MFC/client/res/HelloClient.rc20000644000076400007640000000062210262465177021264 0ustar matthewmatthew// // HelloClient.RC2 - resources Microsoft Visual C++ does not edit directly // #ifdef APSTUDIO_INVOKED #error this file is not editable by Microsoft Visual C++ #endif //APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // Add manually edited resources here... ///////////////////////////////////////////////////////////////////////////// IceE-1.2.0/demo/IceE/MFC/client/res/HelloClient.ico0000644000076400007640000005217610262465177021363 0ustar matthewmatthew 00h– èþ(æ 00¨ ¨¶h^"00¨Æ' ¨ nDhQ(0`€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿ×wwwwwwwwwwwwwwwwwwwwwwÝ׈ˆˆˆˆˆˆˆˆˆ‡øˆˆˆˆˆˆˆˆˆ‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøñø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøøøø‡Ý×ÿ‡ÿ‡Ý×øøøøøøøø‡øøøøøñø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øøøøø‡Ý×ÿ‡ÿ‡Ý×ÿÿÿÿÿÿÿÿÿÿ‡ÿÿÿÿÿÿÿÿÿÿ÷Ý×wwwwwwwwwwwwwwwwwwwwwwÝÝxˆˆˆˆxˆˆˆˆˆˆˆˆˆˆxˆˆˆˆ}ÝÝ׈ˆˆˆøøøøøøøøøøxˆˆˆ‡ÝÝÝÝxˆˆˆˆxˆˆˆ}ÝÝÝÝ×wwwøñøøøñøøwwwwÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøñøøøñøø}ÝÝÝÝÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝÝÝÝÝøøøøøøøøøø}ÝÝÝÝÝÝÝÝÝÝÝÝÿÿÿÿÿÿÿÿÿÿ}ÝÝÝÝÝÝÝÝÝÝÝÝwwwwwwwwwww}ÝÝÝÝÝÝÝÝÝÝÝÝ׈ˆˆˆˆˆˆˆˆ‡ÝÝÝÝÝÝÝÝÝÝÝÝÝÝxˆˆˆˆˆˆˆˆ}ÝÝÝÝÝÝÝÝÝÝÝÝÝÝ×wwwwwwwwÝÝÝÝÝÝÝÝ€€€€€€€€€€€€€€€€€€€€€€€Ààðø?ÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿø?ÿÿüÿÿþÿÿ( @€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿ×wwwwwwwwwwwwwwÝ׈ˆˆˆˆˆ‡øˆˆˆˆˆ‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øøø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøøøø‡øñøøø‡Ý×ÿ‡ÿ‡Ý×øøø‡øøø‡Ý×ÿ‡ÿ‡Ý×ÿÿÿÿÿÿ‡ÿÿÿÿÿÿ÷Ý×wwwwwwwwwwwwwwÝÝxˆˆˆˆˆˆˆˆxˆˆ}ÝÝ׈ˆøøøøøøxˆ‡ÝÝÝÝxˆˆxˆ}ÝÝÝÝ×wøññøwwÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøøñø}ÝÝÝÝÝÝÝ݈}ÝÝÝÝÝÝÝÝøøøøøø}ÝÝÝÝÝÝÝÝÿÿÿÿÿÿ}ÝÝÝÝÝÝÝÝwwwwwww}ÝÝÝÝÝÝÝÝ׈ˆˆˆˆ‡ÝÝÝÝÝÝÝÝÝÝxˆˆˆˆ}ÝÝÝÝÝÝÝÝÝÝ×wwwwÝÝÝÝÝÝ€€€€€€€€€€€€€€€Ààðø?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€ÿÿÀÿÿàÿ( €€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿwwwwwww}xˆˆ‡ˆˆˆ}xˆ‡ˆˆ}xˆ‡ˆ}x‡ˆˆ}xˆ‡ˆ}x‡ˆˆ}xˆˆ‡ˆˆˆ}wwwwwww}ׇˆˆˆ‡‡ÝÝwˆ‡}ÝÝ׈‡ÝÝÝׇÝÝÝׇÝÝÝ׈ˆˆ‡ÝÝÝ×wwwwÝ݇‡Ýøø‡ø‡Ý€‡Àà‡Ýàøàø‡àà‡Ý(0`ŽwXkqN]tno‰0-Š1-Œ6-Ë­ª´‰‚©ym¶Ž…À•ÏËÊ”C,“B,¯„w‚:"£o\œhP”]>Át©e=¼‡g»†gÀrÀŽlÀg¾ƒNÉ“bÑ›i²t5³u6Ë‘XÄŒVÛ°†ê̯À5ËŽIÙ¦nÚ§oä»åÀ™óÜÃÃ6dž:Ê‹=È‹Añغˌ=Ý­lÜ­pÞ±w彉ðÕ²üóçÊŒ7ΗFã¸{ïÒ¨øêÕúîÜÁ~ÈŠ'Û©]îÏ õÞ¸õà¾Ú¤JóÖ¡óبôÚ­óÛ°ôÝ´õâÂöæËÙ¡/ïÍŠïÏŽðÑ”ðÒ–ðÓšòÕŸò×¥ìÄmíÈzî˃é¼NëÀ]è¹:I™H–\¦OU—JI¡=c®Y\™UL†Gaœ]gŸcqªmj¶er¹ny»v‚¿n kQ‰OW‹V…Áƒ|¯zŠÂ‰Â…²„ÄŽ’Ç”“È•˜Êš›Ë–É™›ÌžœÌŸ¡Î¤¬Õ°»Ü¾¿Þ¤Щ°Ö´¶ÚºÇâÊËäÎÁßÅÝíßÔèØÑåÕL]áëäd¾‰n“çöî@‡b~ϧÑïà·æÐÄêØÚòçŒÖ¶ôûø˜ÝÃ>88+/ø÷÷÷÷÷h\^„ˆ‰}qq€’‘•”“—£[`//"QRT$1=>>8+2ø÷÷÷÷÷j\^‚„ˆ‰sccy‹’‘•”“£\`2/"OQ$%=>>*2ø÷÷÷÷÷i\^‚„ˆsccy‹Œ‘•”£\a//"NO66**L=>(2ø÷÷÷÷÷i\]~ƒ„rccyŽ‹Œ‘•£\a//"WNFTHI*++LL=(/ø÷÷÷÷÷h\^|~ƒrccsŠŽ‹Œ‘¡\`//'VWRFTHJCDKLL)2ø÷÷÷÷÷j\]x|~rccp~‹’¡\_//'VVQRFTHJCDKL(/ø÷÷÷÷÷i\^wx|~pcccccbŽ‹Œ¡\`//'UVOQRFGHJCDK(/ø÷÷÷÷÷i\]wwx|pcckrssŠŽ¡\a//0UUNOQRSGHIJD(2ø÷÷÷÷÷i\^vwwxpccr†…‰ŠŽ¡\`///YUWNOQRFTHIJ)/ø÷÷÷÷÷j\]uvwwmccp‚†‡‰ŠŽ¡\`//9YYVWNO5;*THI)2ø÷÷÷÷÷j\]uuvwmccp‚†…‰Šœ\a//9XYVVWNSTH)2ø÷÷÷÷÷i\]ouuvmccbbbbbs‰œ\a//@XX0RST)/ø÷÷÷÷÷i\]oouulefffggkt‡‰œ\`/2@ZXX:;NPRF(/ø÷÷÷÷÷h\]loouuvwwx|~‚†…œ\_2/@ZZXXYYUUUVWNOPQ(/ø÷÷÷÷÷i\]ffggkkqqqzzz{{{–\_//?MMMMEEEAAAA33452ø÷÷÷÷÷i\\\\\\\\\\\\\\\\\\\`//&&&&&--&&&&-&&&&./÷÷÷÷÷÷illlllllll›¤¤¤¤¤¤¤¤¤¤È##" ÷÷÷÷÷÷÷÷ï¢¢š ŸžžÁ®­®®®®¯®®­®­®­®®­­®­   ÷÷÷÷÷÷÷÷÷÷ï¢šš ŸžÀ®¾¥¥¦¦¦¥¥¥¥¥¥¦¥¥¦¦°­  ÷÷÷÷÷÷÷÷÷÷÷÷ïššš ŸÀ­êËÌÌÍÍÎÏп¿ÑÑ»¼¼º©­  ÷÷÷÷÷÷÷÷÷÷÷÷÷÷ïšš  À®êÊËÌÜÝÞÎÏпËÌÌÇÒ¿§­ ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ïïïïïÀ®êàÊËõôÍÎÏÐõõÑÇ¿§® ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä­éàÊÊõõÝõóÏõõÑ»¬§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®éÞßàõõÜõÎõõ¿Ñ¬©­òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÛÞàõõÜõâõõ¿¿¬§­ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÜÉÞõöõöõöõп´§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®éÙÜÉõôÐд§®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä­îØÙÜõÓÓôÎϳª®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®îÖØÙõÖØõÎγ©®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À¯îÕרôöõ×ÖõöõÍι«®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À¯îÓÕÖõõÉßàÊõõÆÍ¹§®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­íÓÓÕõõÛÉßàõõÌÆ¹§®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Ä®íÓÓÓóõóÙÜÉßóõóË̸«®òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À®íäÓÓÓÕרÙÛÝßàÊËË·«®ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­ðééêêêääåååææçèèÕ°¯ñø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷À­ÂÃÂÂÃÂÃÃÃÃÃÂÂÂÃî¯òø÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷Å­­®¯­­®­®­­­¯­®­­­®½ì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ëᨼ¼»º¿¬´³²¸¶¶±±µÅì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷켨¼¼»º¿¬´³²¸¶¶µÔì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ì¼¼¼Ç»º¿¬´³²¸¸âì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ìãâââââÚÚÚÚÔìì÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ÿÿÿÿÿÿðàÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀà?ðøÿüÿþÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿð?ÿÿøÿÿüÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿ( @ŽnPh„ixðçèѶ¶Ò··¼•”Š1-Ŧ ­€vÁŸ—°…yÀ•Š¥uf¨bJÆŽÅœ—O1§aAœgO§`>©eD´„l™„¨d=¤iIÂŽpÈ¢ŽÖ·¦©d8£hEÁs³rHÂgè͹ˆXÁ†OດéȧÀ5çÄïØÀÄ„:Ê‹=ݰzçÁ”îÔ¶ËŒ=ÒšSÜ­n澋óÝ¿Î;Ò˜HÛ©^ä»êÈ—öäË÷èÓùìÚûòåÑ–;áµqðÓ¦òÙ²òÛ¸ôáÂÝ©L߯_óبñÖ©óÚ­ôÛ°õß¹Ù¢5îÍŠðÑ•ðÓšðÔŸìÃjîÌ…Ø é¼Lè¹3_s-G‘CˆB‡H–BvBuAuBvD‹7m3eH%0_J.M5>w+I4D2P‘=F‚9I¡=J¡=T©Gf¯[M„Ea³Yg±^o³g`œZfµ_r¸ld`y·t¹zuºqq¢n„¼„²‚€¿~…Áƒˆ¾†”ƔŎ˜È™ÊžœÌž–Ê™›Ìž›Ëž¢Î¥¦Ò©‚”ƒƒ•„´Ù··Úº»Ü¾ÇâÊ×êÙÛìݬԱÌäϺ׿éóë|ÁŽ‘Ê£‡ŠšÐ­ Ø·¬ÞùäÏ×ñäãõíÄêÚ†… ¨§Z›Ÿ7s‰8tŠ5u“X°û^µüd·ü3Zz²ÜÿÄäÿ#”÷$•ø$•÷8žù?¡úI¥úS«ú\²üb˜ÇŒÇý¦Ôþ¼àÿ*ì>–íZ¬ú~¿ý‘Æû›Íý×ëÿãñÿûýÿ#Šöêôÿ¹Óò¹ÒñÚëÿ#€õ$€õWpWoÊàþÐäþ/€õ3‚õ8†ö<‰öX—îe“رù”¾úœÃú Æû¦Éû®Îû·Ôý¸Õý¿Ùþ²Èè`™ödœöl¡÷s¦øt¨øy«øTr£‡´ùˆµùyØy׺úhözØ¡¸à@sÛGxÛv•Ñ6gÓDrÔKvÕNxÔUܤÕÌÕé8^Äj}¼!9´,£'“»»¾üüýýýýýýýýýýýýýüýýýýýýýýýýýýýüüüü ŠŠ‹ŠŠ‹‹Š‹ŠŠŠýýýüüü]ZZZZZZZZZZZWV-1---------1-ýüüü\g–™šš››œœŸŸmV2.AHBC5D;<<(-ýüüü^i†‰ƒz|“‘•kV2.P:#!!+=>(-ýüüü\e…„coŽ“‘kV239 $=(-ýüüü]e…{coŽ“kV73@ GJ'0<(-ýüüü^e~xco’ŒŽ“kV78@ OGJKD;*1ýüüü]d}~wca``€ŽkV78F OOGJKD*1ýüüü\dy}rch{ˆŒŽkV7EF MNOGIK/1ýüüü\buyrcj€‡‰’ŒkV?EE RR.#:I/-ýüüü[btuncfssv‚’kV?LE&%"9G41ýüüü]_ptqhhhjjˆkV?LTE@NO41ýüüü]_mptuy}~€„lV6SUTTQQQRRN91ýüüü[WXXXYXXYXYYWV-)))))))))),,ýüüü˜ž”’™—¢¥£££¤£©ÉÉÈÉÉâ$üüüüüûžžŸ´Á²²¦¦³§§¨¨¨§­ üüüüüüüûž´ÇÓÔÖרÚÊËÅ¿«¬ üüüüüüüüüûû¡æÆçÓõøòçãø÷Å«­ üüüüüüüüüüüüüæÆãçõîèøË·¬öýüüüüüüüüüüüüüüüüåÇÒãñîÜùøÊª¬íýüüüüüüüüüüüüüüüüæÇáÒðøÚª¬æýüüüüüüüüüüüüüüüüæÆßáïÜøøÙ¶®æýüüüüüüüüüüüüüüüüæÆÞßïùß÷úø×¶¬æýüüüüüüüüüüüüüüüüéÇÝÞïðãçøøÖ½­æýüüüüüüüüüüüüüüüüåÆÜÝëøìÒäøøÕ½­éýüüüüüüüüüüüüüüüüéÇÐÜÝÞàáÒÞßÔ¼­æýüüüüüüüüüüüüüüüüæÁÌÌÍÍÍÎÎÏÏÏÏ®æýüüüüüüüüüüüüüüüü󹺺²²±±±°°¯¯¸óüüüüüüüüüüüüüüüüüüêÀ¿¿Å«·¶½µ»ÐêüüüüüüüüüüüüüüüüüüüüôÀ¿¾«·¶µÑêüüüüüüüüüüüüüüüüüüüüüüôÄÃÄÃÃÃÛêüüüüüüüüüüüüüÀ€€€€€€€€€€€€€€€Ààð?þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿÿÿÿ€ÿÿÀÿ( uVh‘tz·Ž…Ô·¯Â™„ T,©d<Ú¼«Ê”rÊ”s©d6¨c6»YŠ`Ï›oˆUÖ¡qðÚÆÕ¡pÖ¢qݱ…øëÞÒ˜XÒ™YÔŸeÓžeÌIÓœYÒ™XÓšQÓ›QôâËȈ)ÈŒ7ëÈ”óݾЖ8Ñ—<Ò˜?èÇòÙ²ðÒŸõà»ñצ_s-CŠ<<==.ECK2LPV.$ E@J3MOU.  !D?H31IT.-,%B;G1JKS.( ) *E9A011R.&#++E/4678:."&' NQWhX^XXXe Šrpqƒt}~]mvŽŒ†\ˆl{‹…[‰iz„Z‰jy‡w‚€Y‰djklnoc‰sgba`_f|ux||||d}ca€ŽV7 GJ*1€üüÀdyðchðˆŒðV7ð ðOGð/1øüü(0` # # # # # # # #! # #! #! # # # # # # # #gdc # # #! # # # # # # # # # # # # # # # # #BuAuBvBvBvBvAuAuBvBvAuBuBvBvBvBvAuAuBv! #­o3²t5²t5²t5²t5²t5²t5²t5²t5²t6²t5²t5³u6²t5²t5²t5²t6²t5²t5²t5! #! #a„ZI—I–I–I—H–I—I–H–I–I–I–I–I–H–H–H–I–I—I–BvÊ‹=Ê‹=ËŒ=Ê‹=Ê‹=Ê‹=Ë‹=Ë‹=Ê‹=Ê‹=Ê‹=Ê‹=Ë‹=Ê‹=Ê‹=ËŒ=Ê‹=Ê‹=ËŒ=Ê‹=—lR! #a„YI—é»Hé½RΗF©d7©d8©d9©d<¨d=©e@ã¹vïÎðÑ”ðÒ™òÕ Ú§oË‹=—lR! #a„YH–è»Hé½Rê¿ZëÁ`ëÃiìÄníÇvíÇyîÊîˆïÎðÑ”ðÒ™Ú¦nÊ‹=˜lS! #b…ZH–=zBƒ2D„4E„9F…:H†?H†@K‡DLˆHNˆJQ‰OR‰OUŠSV‹UW‹WYŒZMŽ^I–BuÊ‹=ËŒ=Á~ØŸ!Ø *Ù¢6Ù¢;Ù£CÚ¥KÚ¦PÚ§WÛ¨ZÛª`ÛªcÛ¬jÝ­nÝ®qݰwÒ™`ËŒ=˜lR! #b„ZI–I—I–I—I—I–H–H–I—H–I—I—H–H–I—I—I—H–H–AuËŒ=ËŒ=À5Ã5À5À5À5À5€5À5Ã5À5Ã5À5Ã5Ã5À5À5dž:Ê‹=—lR! #~Œ€T>j§Zf§We¦Va¥S`¥Q]¤OZ¤LZ¤K@‡b;wi=ua=ua=ua=uanògž÷l¢÷q¥ø,¤Ž,£‚±øˆµùŒ·ù‘»ú,£Ž,£¦Éû«ÌûÏþ2¢ú#”÷4@egdc$sÕ$•ø;kñc›÷gžöm£ø,£Ž,¤°ù‚±ø‡µùŒ¸ù,£,£¡Æú¨ÊûšÌü1¢ú$•ø4@egdc%sÖ#•÷:jñ_™÷c›ögž÷"=´,£ 9´y«ø¯ù‚±ø‡µù!:´,£ 9´›Âú¢Çû–Êü1¢ù#•÷5@fgdc%tÖ$•ø8iñZ•ö_™÷cœ÷gžöm¢÷q¥øv©ø{¬ø¯ø„³ù‡´ùŽºú‘»ù˜ÀúœÂú“Çû1¡ù#”÷5Afgdc$sÕ$•ø0[ñFóHóLƒóQ†ôS‡ôY‹õ[õ_õa‘õe“öh•õj—öo›öqœöuŸöm¢÷.™ø#”÷5@egdc%sÖ$•÷$€õ$€õ#ô#€õ#€õ$€õ#€õ$€õ$€õ$€õ$€õ#€ô$€õ#€õ#€õ$€õ#ô#•÷$•ø5@fgdc8wÐ#”÷#•÷$•ø$•÷#•÷$•ø#”÷$•ø$•ø$•ø#•÷#”÷$•ø#”÷#•÷$•ø$•ø#”÷#”÷$•øXf‘\{Äéõÿéõÿéõÿáðÿ×ìÿÌæþÅâþ¹Ýÿ³Úÿ§Ôþ Ñþ–ÌýÇý†Ãü|¿ýv»ük¶ük¶üh€¸\{Äéõÿéõÿèôÿáðÿ×ëÿÌæÿÅâþ¹Ýÿ²Ùþ§Õÿ Ñþ–ÌýŒÇý†Ãüq¸üv»üh€¸\{ÄéõÿäòÿèôÿÞïÿ×ëÿÊåþÅâþ¹Ýþ²Ùþ§Õþ Òþ–ÌýŒÇý†Ãüh€¸\{Ä…£ØxÙxÙt›Ùt›Ùq™Ùo™Ùm—Øm—Ùk–Ùk–Ùk–Ùh€¸ÿÿÿÿÿÿðàÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀÀàðø?üþÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿðÿÿð?ÿÿøÿÿüÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿ( @ # # # # # # # # # # # # #˜•“ # # # # # # # # # # # # #‚†…BL@BM@BM@BL@BL@BL@BL@BM@CMABM@BL@BL@ #w\Rv\Rw]Sw\Rw\Rw\Sv\Rv\Rw\Rw]Sw]Sw]StYQ1-/ #AuH–I–H–H–H–H–H–I—H–H–H–I–_s-Ê‹=ËŒ=Ë‹=Ê‹=Ê‹=ËŒ=Ê‹=Ë‹=Ê‹=ËŒ=ËŒ=Ê‹=²t6REE #BuI5|Á–Ò­ž×µ¡Ø¸©Ü¿®ßÅ·âͺåÐÃéÙÈëÞP¢F_s-Ó›Vݯ}ðÔ¦ñÕ©òÙ³òÛ·óÞ¿ôàÅõãÌ÷æÒøèØèÅ¥²t6RDD #AuP‘=›Ë¥Ò©œÊžq¢n„²‚ÇâÊÍåÏÙëÛÝíßêôëI¡<_s-ÓšTݰyðÔŸëɘÀŽkÀnÀrÀsïØÀùîÛüóåêʬ²t5REE #BvN‘8–ɘœÌžˆ½…0_O…HºÛ¾ÆâÊÍäÏÙëÛÝíßI¡=^s,ÒšQÝ®p彂§aA’L.£hE¤iJ™X7§bIêεùîÛéȧ²t5RDE #BvM6ŽÅŽ–Ê™„¼€0`L„D·Ú»ºÛ¾ÇâÊÍåÐ×êÚI¡=_s-Ò™MÛ«ká´qŠ1.ªfHóبô۰ດÃqîÔ¶øêÕèǤ³u6RDD #AuK2…Á„ÅŽ~¹y0_L„D¬Õ°´Ù¸»Ü¾ÇâÊËäÎI¡=_s-Ò™KÛ©_à²lŠ1.ªfFðÓœòبóÛ°õà»õâÁ÷æÊçÅŸÊ‹=REE #BvJ.€¿~…Á„y¶t0_3f6l6m•ԻܾÇâÊI¡=^s,Ò™Fܪ]à°bŠ1.¨dCðÒ—ðÓ›óØ©ôÛ¯õߺõáÁçěˌ=REE #AuIŽ+uºq€¾}r´j0_E5ƒ»€‰½†¢Î¥³Ø·ºÛ¾I¡=_s-Ñ—EÚ¦P߯]Š1-©eAîÍŠðÒ•ðÓœòبóÙ­õߺæÁ•Ê‹=SEE #BuHŽ'r¹muºqn²f0_G‚9“È”œÌž¥Ò©«Ô¯´Ù·I¡=_s-Ñ—>Ù¥IÞ¬Q‰0-©d=îʃî̇ޱxŠcëȘóÚ­æÀ’Ê‹=REE #BuG!f´_r¹mf¯[0_>w+^›Wa›\cœ_™Èš«Ô®I¡=^s,Ò—=Ù¢<ݪH“B,žT4Á†OˆX³rH§a?㸀óب彊ʋ=REE #BuFa²Xgµ_g°]B€.D3D4G‚8G‚:‰¿‡¡Î¤I¡=_s-Ñ–7Ù¡/é¼Há¯M¨c6©d8¨d;©e?äºvðÑ•ðӛ澊ˌ=SEE #BvCˆW®Hb³Yf´^p¸kuºq€¿}ƒ¿Å’Ç”›ÌžI¡<^s,Î;Ø ç¸2é¼Gë¿VëÀ_ìÃlíÆtî˃îˇïє廂ʋ=SEE #AuFB‡CˆCˆCˆCˆBˆCˆCˆB‡CˆG’_s-Ê‹=À5À5À5À5€5À5Ã5Ã5À5À5Ń8„;tcc #‡‰±Æ²º×¿®Ó¶œÍ«‘É¢Z›Ÿ5u“7tŠ7s‰7tŠ7tŠ7tŠ3ZzWoWpWpWpWoTr£ƒiw´„lÙ„È¡ŽÖ¶¥ä˼ä˼˜•“‡‰ãõíãõíÁéÖÁéÖ`—Æ#ŠöS¬úT®ûW°ûY°û[²û^´ü_´üc¶üc·üf¹ü]·ü$•øvWj¥ue°…zÁŸ—Ʀ¡Ö¶¥˜•“‡‰ãõíØñåÁéÖd˜È$€õ•¾úžÄú¥Èû®Îü¸Õþ¿ÙþÊàþÐãþÚêÿãïÿÆèÿ$•øpM\›gO¨zl¨}rÁ¦¥˜•“‡‰‡‰‡‰\±$€õºù”½ù6_Ç,£Uܹù‡³ù,£!9´ÚêþÁåÿ$•øXBe’cX«|t¨zl˜•“y×$€õ†´ùºù9\À;kÓiö,£Ðãþ¼áÿ#”÷4@e˜•“y×#€õ€°ø…´øNxÕŽ2cÒd™õ'ž,£Êàþ³Üÿ$•ø?Ru˜•“zØ$€õy«ø€°ùJvÔŽ,¤¾Ùý°Úÿ$•÷CXz˜•“y×#€õr¥øxªøGtÔŽa—õ,£,¤¹Öý¦Õþ$•øCXz˜•“y×$€õk¡÷r¦÷DrÔ(žt¦÷!:´“,£¯Ïü£Óþ#•÷CYz˜•“y×#€ôc›öl¡÷AoÔŽJvÔ‡µù‘¼ú,£,¤©ËûœÎü$•øCXz˜•“yœ×$€õ^˜öeœöAsÛ,£GxÛ‚±ø‡µù,£,£ Åú™Ëü#•÷BXz˜•“zØ#€õV“ö`™öe÷l¢÷t¨øy«øƒ²ùl¡÷s¦÷šÁû‘Æû#”÷CXz˜•“zØ$‹÷/ô0€õ3õ4ƒõ5ƒõ7…õ8†õ;ˆö<ˆö=ˆõ<‹ö$•øCY{˜•“©Ù=–í[¬úW«úT©úQ©úM§úH¥úE£ù?¡ù= ù8žù6ø+Žìs„­˜•“ ¸àêôÿÛîÿÛîÿÛîÿÄãÿ¼ßÿ¨ÕþœÏþŒÇý}¿ý}¿ý_ŠË˜•“ ¸àêôÿÛîÿÛîÿ×ëÿÂáþ¼ßÿ¨ÕþŒÇý}¿ý_ŠË˜•“ ¸à ¸à›²Ø›²Ø›²Ø›²Ø›²Ø›²Ø›²Ø˜•“À€€€€€€€€€€€€€€€Ààð?þÿþÿþÿþÿþÿþÿþÿþÿþÿþÿÿÿÿ€ÿÿÀÿ( ³G—I¡=J¡=I¡=I¡=I¡=_s-ÌIÒ˜XÒ˜XÒ™YÒ˜XÒ™Y¦|Xfdc“¾d`¦Ñ©;w ÎåÐÜíÞËîà_s-ÔždëÈ”©d7©d6ðÛÇøëÞ«Zgec”¾‘]šU™Ëœ;w ¹Û½ÍåиãÎ_s-ÓœY¨c6¼Zݰ„Ê”rôâË«Zfdc”¾‘X˜O†Á„;w _s-LJ)Ñ–9Ò—<Ô›QÓœYÓže®ƒ\°®¬ÕÚÖƒ–…²Ô¹v¦ ,i»;z¯;z¯;z¯;z°LoadIcon(IDR_MAINFRAME); } void CHelloClientDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CHelloClientDlg, CDialog) ON_WM_PAINT() ON_WM_QUERYDRAGICON() //}}AFX_MSG_MAP ON_BN_CLICKED(IDC_INVOKE, OnSayHello) ON_BN_CLICKED(IDC_FLUSH, OnFlush) ON_BN_CLICKED(IDC_SHUTDOWN, OnShutdown) END_MESSAGE_MAP() BOOL CHelloClientDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(_hIcon, TRUE); // Set big icon SetIcon(_hIcon, FALSE); // Set small icon // // Retrieve the controls. // _mode = (CComboBox*)GetDlgItem(IDC_MODE); _timeout = (CButton*)GetDlgItem(IDC_TIMEOUT); _status = (CStatic*)GetDlgItem(IDC_STATUSBAR); // // Use twoway mode as the initial default. // _mode->SetCurSel(_currentMode); // // Disable flush button if built without batch support. // #ifndef ICEE_HAS_BATCH (CButton*)GetDlgItem(IDC_FLUSH)->EnableWindow(FALSE); #endif // // Create the proxy. // Ice::PropertiesPtr properties = _communicator->getProperties(); const char* proxyProperty = "Hello.Proxy"; std::string proxy = properties->getProperty(proxyProperty); Ice::ObjectPrx obj = _communicator->stringToProxy(proxy); _proxy = Demo::HelloPrx::uncheckedCast(obj); _currentProxy = _proxy; _status->SetWindowText(CString(" Ready")); return TRUE; // return TRUE unless you set the focus to a control } // If you add a minimize button to your dialog, you will need the code below // to draw the icon. For MFC applications using the document/view model, // this is automatically done for you by the framework. void CHelloClientDlg::OnPaint() { #ifdef _WIN32_WCE CDialog::OnPaint(); #else if(IsIconic()) { CPaintDC dc(this); // device context for painting SendMessage(WM_ICONERASEBKGND, reinterpret_cast(dc.GetSafeHdc()), 0); // Center icon in client rectangle int cxIcon = GetSystemMetrics(SM_CXICON); int cyIcon = GetSystemMetrics(SM_CYICON); CRect rect; GetClientRect(&rect); int x = (rect.Width() - cxIcon + 1) / 2; int y = (rect.Height() - cyIcon + 1) / 2; // Draw the icon dc.DrawIcon(x, y, _hIcon); } else { CDialog::OnPaint(); } #endif } // The system calls this function to obtain the cursor to display while the user drags // the minimized window. HCURSOR CHelloClientDlg::OnQueryDragIcon() { return static_cast(_hIcon); } void CHelloClientDlg::OnSayHello() { try { updateProxy(); _currentProxy->sayHello(); #ifdef ICEE_HAS_BATCH if(_currentProxy->ice_isBatchOneway()) { _status->SetWindowText(CString(" Queued batch request")); } else #endif { _status->SetWindowText(CString(" Sent request")); } } catch(const IceUtil::Exception& ex) { handleException(ex); } } void CHelloClientDlg::OnFlush() { #ifdef ICEE_HAS_BATCH try { _communicator->flushBatchRequests(); _status->SetWindowText(CString(" Flushed batch requests")); } catch(const IceUtil::Exception& ex) { handleException(ex); } #endif } void CHelloClientDlg::OnShutdown() { try { updateProxy(); _currentProxy->shutdown(); #ifdef ICEE_HAS_BATCH if(_currentProxy->ice_isBatchOneway()) { _status->SetWindowText(CString(" Queued shutdown request")); } else #endif { _status->SetWindowText(CString(" Sent shutdown request")); } } catch(const IceUtil::Exception& ex) { handleException(ex); } } void CHelloClientDlg::updateProxy() { int mode = _mode->GetCurSel(); bool timeout = _timeout->GetCheck() == BST_CHECKED; if(mode == _currentMode && timeout == _useTimeout) { return; } Ice::ObjectPrx proxy; switch(mode) { case 0: proxy = _proxy->ice_twoway(); break; case 1: proxy = _proxy->ice_oneway(); break; case 2: #ifdef ICEE_HAS_BATCH proxy = _proxy->ice_batchOneway(); break; #else AfxMessageBox(CString("Batch mode is currently not enabled."), MB_OK|MB_ICONEXCLAMATION); return; #endif default: assert(false); } if(timeout) { proxy = proxy->ice_timeout(2000); } else { proxy = proxy->ice_timeout(-1); } if(proxy->ice_isTwoway()) { _currentProxy = Demo::HelloPrx::checkedCast(proxy); } else { _currentProxy = Demo::HelloPrx::uncheckedCast(proxy); } _currentMode = mode; _useTimeout = timeout; } void CHelloClientDlg::handleException(const IceUtil::Exception& e) { try { e.ice_throw(); } catch(const Ice::NoEndpointException&) { AfxMessageBox(CString("The proxy does not support the current configuration"), MB_OK|MB_ICONEXCLAMATION); } catch(const IceUtil::Exception& ex) { AfxMessageBox(CString(ex.toString().c_str()), MB_OK|MB_ICONEXCLAMATION); } _status->SetWindowText(CString(" Ready")); } IceE-1.2.0/demo/IceE/MFC/client/stdafx.h0000644000076400007640000000362210616652361017322 0ustar matthewmatthew// stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, but // are changed infrequently // #if !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_) #define AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 #ifndef _WIN32_WCE #if !defined(NDEBUG) && !defined(_STLP_DEBUG) # define _STLP_DEBUG #endif #ifndef WINVER #define WINVER 0x0400 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0400 #endif #else #if _MSC_VER >= 1400 # define _CE_ALLOW_SINGLE_THREADED_OBJECTS_IN_MTA # ifndef WINVER # define WINVER 0x0400 # endif #endif #if (_WIN32_WCE <= 200) #error : This project does not support MFCCE 2.00 or earlier, because it requires CControlBar, available only in MFCCE 2.01 or later #endif // // _STLP_USE_MFC must be defined. We don't use iostreams so lets turn // that off too. This must defined here since some of the AFX header // files include STLport headers. // #define _STLP_USE_MFC #define _STLP_NO_NEW_IOSTREAMS #define _STLP_NO_IOSTREAMS #endif // _WIN32_WCE #ifndef VC_EXTRALEAN #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif #include // MFC core and standard components #include // MFC extensions #if defined(_WIN32_WCE) && (_WIN32_WCE >= 211) && (_AFXDLL) #include // MFC support for Internet Explorer 4 Common Controls #endif #ifndef _AFX_NO_AFXCMN_SUPPORT #include // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT #include // MFC socket extensions //{{AFX_INSERT_LOCATION}} // Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line. #include #endif // !defined(AFX_STDAFX_H__CCAD4B79_862C_4DFB_A13B_E56154F5C0B8__INCLUDED_) IceE-1.2.0/demo/IceE/Makefile0000644000076400007640000000122110576536574015442 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../.. include $(top_srcdir)/config/Make.rules SUBDIRS = hello \ latency \ throughput \ callback \ chat \ bidir \ minimal \ workqueue $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done IceE-1.2.0/demo/IceE/README0000644000076400007640000000264410620544016014650 0ustar matthewmatthewDemos in this directory: - MFC Shows how to use Ice-E in conjunction with the Microsoft Foundation Classes. - bidir This demo shows how to use bi-directional connections for callbacks. This is typically used when the server cannot open a connection to the client to send callbacks, for example, because firewalls block incoming connections to the client. - callback A simple callback demo that illustrates how a client can pass a proxy to a server, invoke an operation in the server, and the server call back into an object provided by the client as part of that invocation. - chat MFC and command-line clients that work with the Glacier2 chat demo found in the Ice distribution. - hello This demo illustrates how to invoke ordinary (twoway) operations, as well as how to invoke oneway operations and how to use batched invocations. - latency A simple latency test that measures the basic call dispatch delay of Ice-E. - minimal The simplest Ice-E demo, equivalent to "Hello, World". - throughput This demo allows you to send sequences of various types between client and server and measure the maximum bandwidth that can be achieved using serialized synchronous requests. - workqueue This application illustrates the use of the threading and synchronization primitives provided by the Ice-E library. It uses Ice-E to implement a simple producer/consumer queueing application. IceE-1.2.0/demo/IceE/minimal/0000755000076400007640000000000010620544016015410 5ustar matthewmatthewIceE-1.2.0/demo/IceE/minimal/minimalS_CE.vcproj0000755000076400007640000026653710620410340020773 0ustar matthewmatthew IceE-1.2.0/demo/IceE/minimal/Hello.ice0000644000076400007640000000073310576536574017164 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef HELLO_ICE #define HELLO_ICE module Demo { interface Hello { ["cpp:const"] idempotent void sayHello(); }; }; #endif IceE-1.2.0/demo/IceE/minimal/.depend0000644000076400007640000001402110616637156016663 0ustar matthewmatthewHello$(OBJEXT): Hello.cpp Hello.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Hello.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Hello.h Hello.cpp: Hello.ice IceE-1.2.0/demo/IceE/minimal/Makefile.mak0000644000076400007640000000353110616662372017634 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) OBJS = Hello.obj !include $(top_srcdir)/config/Make.rules.mak !if "$(EMBEDDED_DEVICE)" != "" COBJS = WinCEClient.obj SOBJS = WinCEServer.obj !else COBJS = Client.obj SOBJS = Server.obj !endif SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) HelloC.obj $(COBJS) /out:$@ $(MINLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(OBJS) $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest !if "$(EMBEDDED_DEVICE)" != "" WinCEClient.obj: WinCEClient.cpp $(CXX) /c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) WinCEClient.cpp !else Client.obj: Client.cpp $(CXX) /c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) Client.cpp !endif HelloC.obj Hello.obj: Hello.cpp $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) Hello.cpp $(CXX) /c -DICEE_PURE_CLIENT /FoHelloC.obj $(CPPFLAGS) $(CXXFLAGS) Hello.cpp clean:: del /q Hello.cpp Hello.h !include .depend IceE-1.2.0/demo/IceE/minimal/config0000644000076400007640000000121710267231724016607 0ustar matthewmatthew# # The client reads this property to create the reference to the # "hello" object in the server. # Hello.Proxy=hello:tcp -p 10000 # # The server creates one single object adapter with the name # "Hello". The following line sets the endpoints for this # adapter. # Hello.Endpoints=tcp -p 10000 # # Warn about connection exceptions # Ice.Warn.Connections=1 # # Network Tracing # # 0 = no network tracing # 1 = trace connection establishment and closure # 2 = like 1, but more detailed # 3 = like 2, but also trace data transfer # Ice.Trace.Network=0 # # Protocol Tracing # # 0 = no protocol tracing # 1 = trace protocol messages # Ice.Trace.Protocol=0 IceE-1.2.0/demo/IceE/minimal/WinCEClient.cpp0000644000076400007640000000416710576536574020254 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { extern int __argc; extern char **__argv; int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for "Hello.Proxy" so that the demo will // run without a configuration file. // initData.properties->setProperty("Hello.Proxy", "hello:tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // try { initData.properties->load("config.txt"); } catch(const Ice::FileException&) { } communicator = Ice::initialize(__argc, __argv, initData); HelloPrx hello = HelloPrx::checkedCast(communicator->stringToProxy(initData.properties->getProperty("Hello.Proxy"))); if(!hello) { MessageBox(NULL, L"invalid proxy", L"Minimal Client", MB_ICONEXCLAMATION | MB_OK); return EXIT_FAILURE; } hello->sayHello(); MessageBox(NULL, L"Sent \"sayHello()\" message", L"Minimal Client", MB_ICONEXCLAMATION | MB_OK); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/minimal/WinCEServer.cpp0000644000076400007640000001206310576536574020276 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; class HelloI : public Hello { public: HelloI(HWND wnd) : _wnd(wnd) { } virtual void sayHello(const Ice::Current&) const { // // Its not legal to write to windows controls in a thread // other than main, so we post a custom message to the main // thread which will cause the message to be written to the // edit control. // static wchar_t* hello = L"Hello World\r\n"; ::PostMessage(_wnd, WM_USER, (WPARAM)FALSE, (LPARAM)_wcsdup(hello)); } private: const HWND _wnd; }; static HWND editHwnd; static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_USER: { // tprint from a thread other than main. lParam holds a pointer to the text. ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)wParam, (LPARAM)lParam); free((wchar_t*)lParam); } break; case WM_CREATE: { RECT rcClient; GetClientRect(hWnd, &rcClient); editHwnd = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"", WS_CHILD | WS_VISIBLE | WS_VSCROLL /*| WS_HSCROLL*/ | ES_MULTILINE, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hWnd, (HMENU)101, GetModuleHandle(NULL), NULL); assert(editHwnd != NULL); } break; case WM_SIZE: { RECT rcClient; GetClientRect(hWnd, &rcClient); SetWindowPos(editHwnd, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER); } break; case WM_CLOSE: DestroyWindow(hWnd); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, msg, wParam, lParam); } return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { static const TCHAR windowClassName[] = L"Minimal Server"; WNDCLASS wc; wc.style = CS_HREDRAW|CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = windowClassName; if(!RegisterClass(&wc)) { MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } RECT rect; GetClientRect(GetDesktopWindow(), &rect); int width = rect.right - rect.left; if(width > 320) { width = 320; } int height = rect.bottom - rect.top; if(height > 200) { height = 200; } HWND mainWnd = CreateWindow(windowClassName, L"Minimal Server", WS_VISIBLE|WS_OVERLAPPED|WS_SYSMENU|WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL); if(mainWnd == NULL) { MessageBox(NULL, L"Window Creation Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } ShowWindow(mainWnd, SW_SHOW); UpdateWindow(mainWnd); int status = EXIT_SUCCESS; extern int __argc; extern char **__argv; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for Hello.Endpoints so that the demo // will run without a configuration file. // initData.properties->setProperty("Hello.Endpoints","tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // try { initData.properties->load("config.txt"); } catch(const Ice::FileException&) { } communicator = Ice::initialize(__argc, __argv, initData); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Hello"); adapter->add(new HelloI(mainWnd), communicator->stringToIdentity("hello")); adapter->activate(); // // Display a helpful message to the user. // ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"Close the window to terminate the server.\r\n"); // // Run the message pump. // MSG Msg; while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(mainWnd, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(mainWnd, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/minimal/minimalC.vcproj0000755000076400007640000003063710620372032020377 0ustar matthewmatthew IceE-1.2.0/demo/IceE/minimal/Server.cpp0000644000076400007640000000310410576536574017404 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; class HelloI : public Hello { public: virtual void sayHello(const Ice::Current&) const { printf("Hello World!\n"); } }; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Hello"); Ice::ObjectPtr object = new HelloI; adapter->add(object, communicator->stringToIdentity("hello")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/minimal/minimalS.vcproj0000755000076400007640000003046310620372032020414 0ustar matthewmatthew IceE-1.2.0/demo/IceE/minimal/Makefile0000644000076400007640000000204310576536574017073 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Hello.o COBJS = Client.o SOBJS = Server.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Hello.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ HelloC.o $(COBJS) $(MINLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) Client.o: Client.cpp $(CXX) -c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) $< HelloC.o Hello.o: Hello.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< $(CXX) -c -DICEE_PURE_CLIENT -o HelloC.o $(CPPFLAGS) $(CXXFLAGS) $< include .depend IceE-1.2.0/demo/IceE/minimal/Client.cpp0000644000076400007640000000442710576536574017365 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; void menu() { printf("usage:\nh: say hello\nx: exit\n?: help\n"); } int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); const char* proxyProperty = "Hello.Proxy"; string proxy = properties->getProperty(proxyProperty); if(proxy.empty()) { fprintf(stderr, "%s: property `%s' not set\n", argv[0], proxyProperty); return EXIT_FAILURE; } HelloPrx hello = HelloPrx::checkedCast(communicator->stringToProxy(proxy)); if(!hello) { fprintf(stderr, "%s: invalid proxy\n", argv[0]); return EXIT_FAILURE; } menu(); char c = EOF; do { try { printf("==> "); do { c = getchar(); } while(c != EOF && c == '\n'); if(c == 'h') { hello->sayHello(); } else if(c == 'x') { // Nothing to do } else if(c == '?') { menu(); } else { printf("unknown command `%c'\n", c); menu(); } } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); } } while(c != EOF && c != 'x'); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/minimal/README0000644000076400007640000000057710620544016016301 0ustar matthewmatthewThis demo is a minimal Ice "hello world" application. Each time the client is run a "sayHello" invocation is sent to the server. To run the demo, first start the server: $ server In a separate window, start the client: $ client Note that this demo hardwires port 10000. If port 10000 is not available on your machine, you need to edit both client and server to use a free port. IceE-1.2.0/demo/IceE/minimal/minimalC_CE.vcproj0000755000076400007640000026700310620410340020740 0ustar matthewmatthew IceE-1.2.0/demo/IceE/latency/0000755000076400007640000000000010620544016015421 5ustar matthewmatthewIceE-1.2.0/demo/IceE/latency/.depend0000644000076400007640000001403710616637156016703 0ustar matthewmatthewLatency$(OBJEXT): Latency.cpp Latency.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Latency.h Server$(OBJEXT): Server.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Latency.h Latency.cpp: Latency.ice IceE-1.2.0/demo/IceE/latency/latencyS_CE.vcproj0000755000076400007640000026676310620410340021016 0ustar matthewmatthew IceE-1.2.0/demo/IceE/latency/Makefile.mak0000644000076400007640000000337210616662372017650 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) OBJS = Latency.obj !include $(top_srcdir)/config/Make.rules.mak !if "$(EMBEDDED_DEVICE)" != "" COBJS = WinCEClient.obj SOBJS = WinCEServer.obj !else COBJS = Client.obj SOBJS = Server.obj !endif SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) LatencyC.obj $(COBJS) /out:$@ $(MINLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(OBJS) $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest Client.obj: Client.cpp $(CXX) /c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) Client.cpp LatencyC.obj Latency.obj: Latency.cpp $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) Latency.cpp $(CXX) /c -DICEE_PURE_CLIENT /FoLatencyC.obj $(CPPFLAGS) $(CXXFLAGS) Latency.cpp clean:: del /q Latency.cpp Latency.h !include .depend IceE-1.2.0/demo/IceE/latency/Latency.ice0000644000076400007640000000066010576536574017530 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef LATENCY_ICE #define LATENCY_ICE module Demo { interface Ping { }; }; #endif IceE-1.2.0/demo/IceE/latency/config0000644000076400007640000000025110503515306016607 0ustar matthewmatthewLatency.Proxy=ping:default -p 10000 -h 127.0.0.1 Latency.Endpoints=default -p 10000 -h 127.0.0.1 # # Use faster blocking client side model by default. # Ice.Blocking=1 IceE-1.2.0/demo/IceE/latency/WinCEClient.cpp0000755000076400007640000001240510616652361020246 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; static HWND editHwnd; static bool wmDestroy = false; static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CREATE: { RECT rcClient; GetClientRect(hWnd, &rcClient); editHwnd = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"", WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hWnd, (HMENU)101, GetModuleHandle(NULL), NULL); assert(editHwnd != NULL); } break; case WM_SIZE: { RECT rcClient; GetClientRect(hWnd, &rcClient); SetWindowPos(editHwnd, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER); } break; case WM_CLOSE: DestroyWindow(hWnd); break; case WM_DESTROY: wmDestroy = true; PostQuitMessage(0); break; default: return DefWindowProc(hWnd, msg, wParam, lParam); } return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { static const TCHAR windowClassName[] = L"Latency Client"; WNDCLASS wc; wc.style = CS_HREDRAW|CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = windowClassName; if(!RegisterClass(&wc)) { MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } RECT rect; GetClientRect(GetDesktopWindow(), &rect); int width = rect.right - rect.left; if(width > 320) { width = 320; } int height = rect.bottom - rect.top; if(height > 200) { height = 200; } HWND mainWnd = CreateWindow(windowClassName, L"Latency Client", WS_VISIBLE|WS_OVERLAPPED|WS_SYSMENU|WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL); if(mainWnd == NULL) { MessageBox(NULL, L"Window Creation Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } ShowWindow(mainWnd, SW_SHOW); UpdateWindow(mainWnd); int status = EXIT_SUCCESS; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for Latency.Proxy so that the demo will // run without a configuration file. // initData.properties->setProperty("Latency.Proxy", "ping:tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // try { initData.properties->load("config.txt"); } catch(const Ice::FileException&) { } communicator = Ice::initialize(__argc, __argv, initData); const char* proxyProperty = "Latency.Proxy"; string proxy = initData.properties->getProperty(proxyProperty); PingPrx ping = PingPrx::checkedCast(communicator->stringToProxy(proxy)); if(!ping) { MessageBox(NULL, L"invalid proxy", L"Latency Client", MB_ICONEXCLAMATION | MB_OK); return EXIT_FAILURE; } // Initial ping to setup the connection. ping->ice_ping(); IceUtil::Time tm = IceUtil::Time::now(); const int repetitions = 10000; wchar_t buf[1000]; wsprintf(buf, L"pinging server %d times (this may take a while)\r\n", repetitions); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)buf); for(int i = 0; i < repetitions; ++i) { ping->ice_ping(); if((i % 100) == 0) { ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"."); // // Run the message pump just in case the user tries to close the app. // MSG Msg; while(PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } if(wmDestroy) { break; } } } tm = IceUtil::Time::now() - tm; wsprintf(buf, L"\r\ntime for %d pings: %fms\r\ntime per ping: %fms\r\n", repetitions, tm.toMilliSecondsDouble(), tm.toMilliSecondsDouble() / repetitions); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)buf); // // Run the message pump. // MSG Msg; while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/latency/WinCEServer.cpp0000755000076400007640000001061610576536574020314 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; class PingI : public Ping { public: // no methods. }; static HWND editHwnd; static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CREATE: { RECT rcClient; GetClientRect(hWnd, &rcClient); editHwnd = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"", WS_CHILD | WS_VISIBLE | WS_VSCROLL /*| WS_HSCROLL*/ | ES_MULTILINE, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hWnd, (HMENU)101, GetModuleHandle(NULL), NULL); assert(editHwnd != NULL); } break; case WM_SIZE: { RECT rcClient; GetClientRect(hWnd, &rcClient); SetWindowPos(editHwnd, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER); } break; case WM_CLOSE: DestroyWindow(hWnd); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, msg, wParam, lParam); } return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { static const TCHAR windowClassName[] = L"Latency Server"; WNDCLASS wc; wc.style = CS_HREDRAW|CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = windowClassName; if(!RegisterClass(&wc)) { MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } RECT rect; GetClientRect(GetDesktopWindow(), &rect); int width = rect.right - rect.left; if(width > 320) { width = 320; } int height = rect.bottom - rect.top; if(height > 200) { height = 200; } HWND mainWnd = CreateWindow(windowClassName, L"Latency Server", WS_VISIBLE|WS_OVERLAPPED|WS_SYSMENU|WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL); if(mainWnd == NULL) { MessageBox(NULL, L"Window Creation Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } ShowWindow(mainWnd, SW_SHOW); UpdateWindow(mainWnd); int status = EXIT_SUCCESS; extern int __argc; extern char **__argv; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for Latency.Endpoints so that the demo // will run without a configuration file. // initData.properties->setProperty("Latency.Endpoints","tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // try { initData.properties->load("config.txt"); } catch(const Ice::FileException&) { } communicator = Ice::initialize(__argc, __argv, initData); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Latency"); adapter->add(new PingI, communicator->stringToIdentity("ping")); adapter->activate(); // // Display a helpful message to the user. // ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"Close the window to terminate the server.\r\n"); // // Run the message pump. // MSG Msg; while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(mainWnd, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(mainWnd, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/latency/Server.cpp0000644000076400007640000000272110576536574017421 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; class PingI : public Ping { public: // no methods. }; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Latency"); adapter->add(new PingI, communicator->stringToIdentity("ping")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/latency/latencyS.vcproj0000755000076400007640000003052110620372032020431 0ustar matthewmatthew IceE-1.2.0/demo/IceE/latency/Makefile0000644000076400007640000000206110576536574017104 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Latency.o COBJS = Client.o SOBJS = Server.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Latency.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ LatencyC.o $(COBJS) $(MINLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) Client.o: Client.cpp $(CXX) -c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) $< LatencyC.o Latency.o: Latency.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< $(CXX) -c -DICEE_PURE_CLIENT -o LatencyC.o $(CPPFLAGS) $(CXXFLAGS) $< include .depend IceE-1.2.0/demo/IceE/latency/Client.cpp0000644000076400007640000000427110603211113017335 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); const char* proxyProperty = "Latency.Proxy"; string proxy = properties->getProperty(proxyProperty); if(proxy.empty()) { fprintf(stderr, "%s: property `%s' not set\n", argv[0], proxyProperty); return EXIT_FAILURE; } Ice::ObjectPrx base = communicator->stringToProxy(proxy); PingPrx ping = PingPrx::checkedCast(base); if(!ping) { fprintf(stderr, "%s: invalid proxy\n", argv[0]); return EXIT_FAILURE; } // Initial ping to setup the connection. ping->ice_ping(); IceUtil::Time tm = IceUtil::Time::now(); const int repetitions = 100000; printf("pinging server %d times (this may take a while)\n", repetitions); for(int i = 0; i < repetitions; ++i) { ping->ice_ping(); } tm = IceUtil::Time::now() - tm; printf("time for %d pings: %0.2lfms\n", repetitions, tm.toMilliSecondsDouble()); printf("time per ping: %lfms\n", tm.toMilliSecondsDouble() / repetitions); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/latency/README0000644000076400007640000000026110620544016016300 0ustar matthewmatthewA simple latency test that measures the basic call dispatch delay of Ice. To run the demo, first start the server: $ server In a separate window, start the client: $ client IceE-1.2.0/demo/IceE/latency/latencyC.vcproj0000755000076400007640000003067510620372032020423 0ustar matthewmatthew IceE-1.2.0/demo/IceE/latency/latencyC_CE.vcproj0000755000076400007640000026713610620410340020771 0ustar matthewmatthew IceE-1.2.0/demo/IceE/bidir/0000755000076400007640000000000010620544016015053 5ustar matthewmatthewIceE-1.2.0/demo/IceE/bidir/.depend0000644000076400007640000002045410616637156016335 0ustar matthewmatthewCallback$(OBJEXT): Callback.cpp Callback.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp Callback.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Server$(OBJEXT): Server.cpp CallbackI.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Callback.h CallbackI$(OBJEXT): CallbackI.cpp CallbackI.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Callback.h Callback.cpp: Callback.ice ../../../slice/IceE/Identity.ice IceE-1.2.0/demo/IceE/bidir/Makefile.mak0000644000076400007640000000260110614106575017270 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) OBJS = Callback.obj COBJS = Client.obj SOBJS = CallbackI.obj \ Server.obj SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) $(OBJS) $(COBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(OBJS) $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest clean:: del /q Callback.cpp Callback.h !include .depend IceE-1.2.0/demo/IceE/bidir/config0000644000076400007640000000027010267756016016256 0ustar matthewmatthewCallback.Client.CallbackServer=sender:tcp -p 10000 Callback.Client.Endpoints= Callback.Server.Endpoints=tcp -p 10000 #Ice.Trace.Network=1 #Ice.Trace.Protocol=1 Ice.Warn.Connections=1 IceE-1.2.0/demo/IceE/bidir/Callback.ice0000644000076400007640000000110010576536574017245 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CALLBACK_ICE #define CALLBACK_ICE #include module Demo { interface CallbackReceiver { void callback(int num); }; interface CallbackSender { void addClient(Ice::Identity ident); }; }; #endif IceE-1.2.0/demo/IceE/bidir/Server.cpp0000644000076400007640000000324310616533266017041 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include using namespace std; using namespace Demo; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Callback.Server"); CallbackSenderIPtr sender = new CallbackSenderI(communicator); adapter->add(sender, communicator->stringToIdentity("sender")); adapter->activate(); sender->start(); try { communicator->waitForShutdown(); } catch(...) { sender->destroy(); throw; } sender->destroy(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/bidir/CallbackI.cpp0000644000076400007640000000363710616533266017407 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include using namespace std; using namespace Demo; CallbackSenderI::CallbackSenderI(const Ice::CommunicatorPtr& communicator) : _communicator(communicator), _destroy(false), _num(0), _callbackSenderThread(new CallbackSenderThread(this)) { } void CallbackSenderI::destroy() { IceUtil::ThreadPtr callbackSenderThread; { Lock lock(*this); printf("destroying callback sender\n"); _destroy = true; notify(); callbackSenderThread = _callbackSenderThread; _callbackSenderThread = 0; // Resolve cyclic dependency. } callbackSenderThread->getThreadControl().join(); } void CallbackSenderI::addClient(const Ice::Identity& ident, const Ice::Current& current) { Lock lock(*this); printf("adding client `%s'\n", _communicator->identityToString(ident).c_str()); CallbackReceiverPrx client = CallbackReceiverPrx::uncheckedCast(current.con->createProxy(ident)); _clients.insert(client); } void CallbackSenderI::start() { _callbackSenderThread->start(); } void CallbackSenderI::run() { Lock lock(*this); while(!_destroy) { timedWait(IceUtil::Time::seconds(2)); if(!_destroy && !_clients.empty()) { ++_num; set::iterator p = _clients.begin(); while(p != _clients.end()) { try { (*p)->callback(_num); ++p; } catch(const Ice::Exception& ex) { fprintf(stderr, "removing client `%s':\n%s\n", _communicator->identityToString((*p)->ice_getIdentity()).c_str(), ex.toString().c_str()); _clients.erase(p++); } } } } } IceE-1.2.0/demo/IceE/bidir/bidirC.vcproj0000755000076400007640000003061210620372032017476 0ustar matthewmatthew IceE-1.2.0/demo/IceE/bidir/CallbackI.h0000644000076400007640000000307310616533266017046 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef CALLBACK_I_H #define CALLBACK_I_H #include #include #include class CallbackSenderI; typedef IceUtil::Handle CallbackSenderIPtr; class CallbackSenderI : public Demo::CallbackSender, public IceUtil::Monitor { public: CallbackSenderI(const Ice::CommunicatorPtr&); void destroy(); virtual void addClient(const Ice::Identity&, const Ice::Current&); void start(); void run(); private: Ice::CommunicatorPtr _communicator; bool _destroy; Ice::Int _num; std::set _clients; // // We cannot derive CallbackSenderI from IceUtil::Thread, because // CallbackSenderI uses Ice::GCShared as base, and // IceUtil::Thread uses IceUtil::Shared as base. These two base // classes are not compatible. Therefore we use this helper class. // class CallbackSenderThread : public IceUtil::Thread { public: CallbackSenderThread(const CallbackSenderIPtr& callbackSender) : _callbackSender(callbackSender) { } virtual void run() { _callbackSender->run(); } private: CallbackSenderIPtr _callbackSender; }; IceUtil::ThreadPtr _callbackSenderThread; }; #endif IceE-1.2.0/demo/IceE/bidir/Makefile0000644000076400007640000000154010576536574016537 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Callback.o COBJS = Client.o SOBJS = Server.o \ CallbackI.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Callback.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) include .depend IceE-1.2.0/demo/IceE/bidir/Client.cpp0000644000076400007640000000453610616533266017017 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; class CallbackReceiverI : public CallbackReceiver { public: virtual void callback(Ice::Int num, const Ice::Current&) { printf("received callback #%d\n", num); } }; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); const char* proxyProperty = "Callback.Client.CallbackServer"; string proxy = properties->getProperty(proxyProperty); if(proxy.empty()) { fprintf(stderr, "%s: property `%s' not set\n", argv[0], proxyProperty); return EXIT_FAILURE; } CallbackSenderPrx server = CallbackSenderPrx::checkedCast(communicator->stringToProxy(proxy)); if(!server) { fprintf(stderr, "%s: invalid proxy\n", argv[0]); return EXIT_FAILURE; } Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Callback.Client"); Ice::Identity ident; ident.name = IceUtil::generateUUID(); ident.category = ""; adapter->add(new CallbackReceiverI, ident); adapter->activate(); server->ice_getConnection()->setAdapter(adapter); server->addClient(ident); communicator->waitForShutdown(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/bidir/README0000644000076400007640000000052310620544016015733 0ustar matthewmatthewThis demo shows how to use bidirectional connections for callbacks. This is typically used if the server cannot open a connection to the client to send callbacks, for example, because firewalls block incoming connections to the client. To run the demo, first start the server: $ server In a separate window, start the client: $ client IceE-1.2.0/demo/IceE/bidir/bidirS.vcproj0000755000076400007640000003254010620372032017520 0ustar matthewmatthew IceE-1.2.0/demo/IceE/workqueue/0000755000076400007640000000000010620544016016011 5ustar matthewmatthewIceE-1.2.0/demo/IceE/workqueue/.depend0000644000076400007640000000323610616637156017272 0ustar matthewmatthewWorkQueue$(OBJEXT): WorkQueue.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h IceE-1.2.0/demo/IceE/workqueue/WorkQueue.cpp0000644000076400007640000000366110616533266020464 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; class WorkQueue : public IceUtil::Thread { public: WorkQueue() { } ~WorkQueue() { } virtual void run() { while(1) { string item = nextItem(); if(item == "destroy") { break; } printf("work item: %s\n", item.c_str()); IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(1)); } } void add(const string& item) { IceUtil::Monitor::Lock lock(_monitor); if(_queue.empty()) { _monitor.notify(); } _queue.push_back(item); } private: string nextItem() { IceUtil::Monitor::Lock lock(_monitor); while(_queue.empty()) { _monitor.wait(); } string item = _queue.front(); _queue.pop_front(); return item; } IceUtil::Monitor _monitor; list _queue; }; typedef IceUtil::Handle WorkQueuePtr; int main() { try { WorkQueuePtr h = new WorkQueue(); IceUtil::ThreadControl control = h->start(); printf("Pushing work items"); printf("."); fflush(stdout); h->add("item1"); printf("."); fflush(stdout); h->add("item2"); printf("."); fflush(stdout); h->add("item3"); printf("."); fflush(stdout); h->add("item4"); printf("."); fflush(stdout); h->add("item5"); printf("."); fflush(stdout); h->add("destroy"); printf(" ok\n"); printf("Waiting for WorkQueue to terminate\n"); control.join(); } catch(const IceUtil::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); return EXIT_FAILURE; } return EXIT_SUCCESS; } IceE-1.2.0/demo/IceE/workqueue/Makefile.mak0000644000076400007640000000165110614106575020232 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = workqueue.exe TARGETS = $(CLIENT) OBJS = WorkQueue.obj SRCS = $(OBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak CPPFLAGS = -I. $(CPPFLAGS) -DICEE_PURE_CLIENT -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(LINK) $(LDFLAGS) $(PDBFLAGS) $(OBJS) /out:$@ $(MINLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest !include .depend IceE-1.2.0/demo/IceE/workqueue/workqueue.vcproj0000755000076400007640000002464210620372032021275 0ustar matthewmatthew IceE-1.2.0/demo/IceE/workqueue/Makefile0000644000076400007640000000117410576536574017500 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = workqueue TARGETS = $(CLIENT) OBJS = WorkQueue.o SRCS = $(OBJS:.o=.cpp) include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) -DICEE_PURE_CLIENT $(CLIENT): $(OBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(MINLIBS) include .depend IceE-1.2.0/demo/IceE/workqueue/README0000644000076400007640000000026410620544016016673 0ustar matthewmatthewThis application illustrates the use of the threading and synchronization primitives provided by Ice-E. It uses Ice-E to implement a simple producer/ consumer queuing application. IceE-1.2.0/demo/IceE/throughput/0000755000076400007640000000000010620544016016173 5ustar matthewmatthewIceE-1.2.0/demo/IceE/throughput/.depend0000644000076400007640000002044310616637156017453 0ustar matthewmatthewThroughput$(OBJEXT): Throughput.cpp Throughput.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/Thread.h ../../../include/IceE/LocalException.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/Iterator.h Client$(OBJEXT): Client.cpp ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/InstanceF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/ObjectF.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Incoming.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Throughput.h Server$(OBJEXT): Server.cpp ThroughputI.h Throughput.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h ThroughputI$(OBJEXT): ThroughputI.cpp ThroughputI.h Throughput.h ../../../include/IceE/ProxyF.h ../../../include/IceE/ProxyHandle.h ../../../include/IceE/Handle.h ../../../include/IceE/ExceptionBase.h ../../../include/IceE/Config.h ../../../include/IceE/ObjectF.h ../../../include/IceE/Shared.h ../../../include/IceE/Mutex.h ../../../include/IceE/Lock.h ../../../include/IceE/ThreadException.h ../../../include/IceE/Exception.h ../../../include/IceE/ScopedArray.h ../../../include/IceE/Proxy.h ../../../include/IceE/ProxyFactoryF.h ../../../include/IceE/ConnectionF.h ../../../include/IceE/ReferenceF.h ../../../include/IceE/CommunicatorF.h ../../../include/IceE/Identity.h ../../../include/IceE/UndefSysMacros.h ../../../include/IceE/OperationMode.h ../../../include/IceE/Outgoing.h ../../../include/IceE/BasicStream.h ../../../include/IceE/Buffer.h ../../../include/IceE/Protocol.h ../../../include/IceE/StringConverter.h ../../../include/IceE/Object.h ../../../include/IceE/Current.h ../../../include/IceE/ObjectAdapterF.h ../../../include/IceE/DispatchStatus.h ../../../include/IceE/Incoming.h ../../../include/IceE/InstanceF.h ../../../include/IceE/ServantManagerF.h ../../../include/IceE/IceE.h ../../../include/IceE/Initialize.h ../../../include/IceE/PropertiesF.h ../../../include/IceE/LoggerF.h ../../../include/IceE/BuiltinSequences.h ../../../include/IceE/LocalException.h ../../../include/IceE/Properties.h ../../../include/IceE/Logger.h ../../../include/IceE/LoggerUtil.h ../../../include/IceE/Communicator.h ../../../include/IceE/RecMutex.h ../../../include/IceE/ObjectAdapter.h ../../../include/IceE/ObjectAdapterFactoryF.h ../../../include/IceE/IncomingConnectionFactoryF.h ../../../include/IceE/EndpointF.h ../../../include/IceE/RouterF.h ../../../include/IceE/RouterInfoF.h ../../../include/IceE/LocatorF.h ../../../include/IceE/LocatorInfoF.h ../../../include/IceE/Monitor.h ../../../include/IceE/Cond.h ../../../include/IceE/Time.h ../../../include/IceE/UUID.h ../../../include/IceE/Connection.h ../../../include/IceE/OutgoingConnectionFactoryF.h ../../../include/IceE/TransceiverF.h ../../../include/IceE/TraceLevelsF.h ../../../include/IceE/Thread.h ../../../include/IceE/Functional.h ../../../include/IceE/Unicode.h ../../../include/IceE/SafeStdio.h Throughput.cpp: Throughput.ice IceE-1.2.0/demo/IceE/throughput/throughputS_CE.vcproj0000755000076400007640000030351010620410340022320 0ustar matthewmatthew IceE-1.2.0/demo/IceE/throughput/Makefile.mak0000644000076400007640000000350610616662372020421 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\..\.. CLIENT = client.exe SERVER = server.exe TARGETS = $(CLIENT) $(SERVER) OBJS = Throughput.obj !include $(top_srcdir)/config/Make.rules.mak !if "$(EMBEDDED_DEVICE)" != "" COBJS = WinCEClient.obj SOBJS = WinCEServer.obj !else COBJS = Client.obj SOBJS = Server.obj !endif SOBJS = $(SOBJS) \ ThroughputI.obj SRCS = $(OBJS:.obj=.cpp) \ $(COBJS:.obj=.cpp) \ $(SOBJS:.obj=.cpp) CPPFLAGS = -I. $(CPPFLAGS) -WX -DWIN32_LEAN_AND_MEAN !if "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb) SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb) !endif $(CLIENT): $(OBJS) $(COBJS) $(LINK) $(LDFLAGS) $(CPDBFLAGS) ThroughputC.obj $(COBJS) /out:$@ $(MINLIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest $(SERVER): $(OBJS) $(SOBJS) $(LINK) $(LDFLAGS) $(SPDBFLAGS) $(OBJS) $(SOBJS) /out:$@ $(LIBS) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest Client.obj: Client.cpp $(CXX) /c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) Client.cpp ThroughputC.obj Throughput.obj: Throughput.cpp $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) Throughput.cpp $(CXX) /c -DICEE_PURE_CLIENT /FoThroughputC.obj $(CPPFLAGS) $(CXXFLAGS) Throughput.cpp clean:: del /q Throughput.cpp Throughput.h IceE-1.2.0/demo/IceE/throughput/config0000644000076400007640000000026510503515306017366 0ustar matthewmatthewThroughput.Proxy=throughput:default -p 10000 -h 127.0.0.1 Throughput.Endpoints=default -p 10000 -h 127.0.0.1 # # Use faster blocking client side model by default. # Ice.Blocking=1 IceE-1.2.0/demo/IceE/throughput/WinCEClient.cpp0000755000076400007640000003177710576536574021051 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; static HWND editHwnd; static bool wmDestroy = false; static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CREATE: { RECT rcClient; GetClientRect(hWnd, &rcClient); editHwnd = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"", WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hWnd, (HMENU)101, GetModuleHandle(NULL), NULL); assert(editHwnd != NULL); } break; case WM_SIZE: { RECT rcClient; GetClientRect(hWnd, &rcClient); SetWindowPos(editHwnd, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER); } break; case WM_CLOSE: DestroyWindow(hWnd); break; case WM_DESTROY: wmDestroy = true; PostQuitMessage(0); break; default: return DefWindowProc(hWnd, msg, wParam, lParam); } return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { static const TCHAR windowClassName[] = L"Throughput Client"; WNDCLASS wc; wc.style = CS_HREDRAW|CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = windowClassName; if(!RegisterClass(&wc)) { MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } RECT rect; GetClientRect(GetDesktopWindow(), &rect); int width = rect.right - rect.left; if(width > 320) { width = 320; } int height = rect.bottom - rect.top; if(height > 200) { height = 200; } HWND mainWnd = CreateWindow(windowClassName, L"Throughput Client", WS_VISIBLE|WS_OVERLAPPED|WS_SYSMENU|WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL); if(mainWnd == NULL) { MessageBox(NULL, L"Window Creation Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } ShowWindow(mainWnd, SW_SHOW); UpdateWindow(mainWnd); int status = EXIT_SUCCESS; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for Throughput.Proxy so that the demo will // run without a configuration file. // initData.properties->setProperty("Throughput.Proxy", "throughput:tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // try { initData.properties->load("config.txt"); } catch(const Ice::FileException&) { } communicator = Ice::initialize(__argc, __argv, initData); const char* proxyProperty = "Throughput.Proxy"; string proxy = initData.properties->getProperty(proxyProperty); ThroughputPrx throughput = ThroughputPrx::checkedCast(communicator->stringToProxy(proxy)); if(!throughput) { MessageBox(NULL, L"invalid proxy", L"Throughput Client", MB_ICONEXCLAMATION | MB_OK); return EXIT_FAILURE; } ThroughputPrx throughputOneway = ThroughputPrx::uncheckedCast(throughput->ice_oneway()); // // The amount by which we reduce buffer sizes for CE runs // const int reduce = 100; // // Initialize data structures // ByteSeq byteSeq(ByteSeqSize / reduce, 0); pair byteArr; byteArr.first = &byteSeq[0]; byteArr.second = byteArr.first + byteSeq.size(); StringSeq stringSeq(StringSeqSize / reduce, "hello"); StringDoubleSeq structSeq(StringDoubleSeqSize / reduce); int i; for(i = 0; i < StringDoubleSeqSize / reduce; ++i) { structSeq[i].s = "hello"; structSeq[i].d = 3.14; } FixedSeq fixedSeq(FixedSeqSize / reduce); for(i = 0; i < FixedSeqSize / reduce; ++i) { fixedSeq[i].i = 0; fixedSeq[i].j = 0; fixedSeq[i].d = 0; } const int repetitions = 1000; // Initial ping to setup the connection. throughput->ice_ping(); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"Running throughput tests (this may take a while)\r\n"); for(int type = 0; type < 4; ++type) { wchar_t* data; int seqSize; if(type == 0) { data = L"byte"; seqSize = ByteSeqSize / reduce; } else if(type == 1) { data = L"string"; seqSize = StringSeqSize / reduce; } else if(type == 2) { data = L"variable-length struct"; seqSize = StringDoubleSeqSize / reduce; } else if(type == 3) { data = L"fixed-length struct"; seqSize = FixedSeqSize / reduce; } for(int mode = 0; mode < 4; ++mode) { wchar_t* action; wchar_t* qualifier = L""; if(mode == 0) { action = L"sending"; } else if(mode == 1) { action = L"sending"; qualifier = L" as oneway"; } else if(mode == 2) { action = L"receiving"; } else if(mode == 3) { action = L"sending and receiving"; } wchar_t buf[1000]; wsprintf(buf, L"\r\n%s %d %s sequences of size %d%s\r\n", action, repetitions, data, seqSize, qualifier); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)buf); IceUtil::Time tm = IceUtil::Time::now(); for(i = 0; i < repetitions; ++i) { switch(type) { case 0: { switch(mode) { case 0: { throughput->sendByteSeq(byteArr); break; } case 1: { throughputOneway->sendByteSeq(byteArr); break; } case 2: { throughput->recvByteSeq(); break; } case 3: { throughput->echoByteSeq(byteSeq); break; } } break; } case 1: { switch(mode) { case 0: { throughput->sendStringSeq(stringSeq); break; } case 1: { throughputOneway->sendStringSeq(stringSeq); break; } case 2: { throughput->recvStringSeq(); break; } case 3: { throughput->echoStringSeq(stringSeq); break; } } break; } case 2: { switch(mode) { case 0: { throughput->sendStructSeq(structSeq); break; } case 1: { throughputOneway->sendStructSeq(structSeq); break; } case 2: { throughput->recvStructSeq(); break; } case 3: { throughput->echoStructSeq(structSeq); break; } } break; } case 3: { switch(mode) { case 0: { throughput->sendFixedSeq(fixedSeq); break; } case 1: { throughputOneway->sendFixedSeq(fixedSeq); break; } case 2: { throughput->recvFixedSeq(); break; } case 3: { throughput->echoFixedSeq(fixedSeq); break; } } break; } } if((i % 100) == 0) { ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"."); // // Run the message pump just in case the user tries to close the app. // MSG Msg; while(PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } if(wmDestroy) { break; } } } tm = IceUtil::Time::now() - tm; wsprintf(buf, L"\r\ntime for %d sequences: %.04fms\r\ntime per sequence: %.04fms\r\n", repetitions, tm.toMilliSecondsDouble(), tm.toMilliSecondsDouble() / repetitions); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)buf); int wireSize = 0; switch(type) { case 0: { wireSize = 1; break; } case 1: { wireSize = static_cast(stringSeq[0].size()); break; } case 2: { wireSize = static_cast(structSeq[0].s.size()); wireSize += 8; // Size of double on the wire. break; } case 3: { wireSize = 16; // Size of two ints and a double on the wire. break; } } double mbit = repetitions * seqSize * wireSize * 8.0 / tm.toMicroSeconds(); if(mode == 3) { mbit *= 2; } wsprintf(buf, L"throughput: %.04f MBit/s\r\n", mbit); ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)buf); } } ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"\r\nThroughput tests completed\r\n"); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } // // Run the message pump. // MSG Msg; while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(NULL, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/throughput/WinCEServer.cpp0000755000076400007640000001060510576536574021064 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; static HWND editHwnd; static LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CREATE: { RECT rcClient; GetClientRect(hWnd, &rcClient); editHwnd = CreateWindowEx(WS_EX_CLIENTEDGE, L"EDIT", L"", WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hWnd, (HMENU)101, GetModuleHandle(NULL), NULL); assert(editHwnd != NULL); } break; case WM_SIZE: { RECT rcClient; GetClientRect(hWnd, &rcClient); SetWindowPos(editHwnd, NULL, 0, 0, rcClient.right, rcClient.bottom, SWP_NOZORDER); } break; case WM_CLOSE: DestroyWindow(hWnd); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, msg, wParam, lParam); } return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { static const TCHAR windowClassName[] = L"Throughput Server"; WNDCLASS wc; wc.style = CS_HREDRAW|CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hInstance; wc.hIcon = LoadIcon(NULL, 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = windowClassName; if(!RegisterClass(&wc)) { MessageBox(NULL, L"Window Registration Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } RECT rect; GetClientRect(GetDesktopWindow(), &rect); int width = rect.right - rect.left; if(width > 320) { width = 320; } int height = rect.bottom - rect.top; if(height > 200) { height = 200; } HWND mainWnd = CreateWindow(windowClassName, L"Throughput Server", WS_VISIBLE|WS_OVERLAPPED|WS_SYSMENU|WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL); if(mainWnd == NULL) { MessageBox(NULL, L"Window Creation Failed!", L"Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } ShowWindow(mainWnd, SW_SHOW); UpdateWindow(mainWnd); int status = EXIT_SUCCESS; extern int __argc; extern char **__argv; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); // // Set a default value for Latency.Endpoints so that the demo // will run without a configuration file. // initData.properties->setProperty("Throughput.Endpoints","tcp -p 10000"); // // Now, load the configuration file if present. Under WinCE we // use "config.txt" since it can be edited with pocket word. // try { initData.properties->load("config.txt"); } catch(const Ice::FileException&) { } communicator = Ice::initialize(__argc, __argv, initData); Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Throughput"); Ice::ObjectPtr object = new ThroughputI(100); adapter->add(object, communicator->stringToIdentity("throughput")); adapter->activate(); // // Display a helpful message to the user. // ::SendMessage(editHwnd, EM_REPLACESEL, (WPARAM)FALSE, (LPARAM)L"Close the window to terminate the server.\r\n"); // // Run the message pump. // MSG Msg; while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(mainWnd, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { TCHAR wtext[1024]; string err = ex.toString(); mbstowcs(wtext, err.c_str(), err.size()); MessageBox(mainWnd, wtext, L"Error", MB_ICONEXCLAMATION | MB_OK); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/throughput/Server.cpp0000644000076400007640000000331310616533266020157 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { // // Check if we need to run with small sequences // int reduce = 1; for(int i = 0; i < argc; ++i) { if(strcmp(argv[i], "--small") == 0) { reduce = 100; } } Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("Throughput"); Ice::ObjectPtr object = new ThroughputI(reduce); adapter->add(object, communicator->stringToIdentity("throughput")); adapter->activate(); communicator->waitForShutdown(); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); initData.properties->setProperty("Ice.Override.Timeout", "100"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/throughput/Makefile0000644000076400007640000000212410576536574017656 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../../.. CLIENT = client SERVER = server TARGETS = $(CLIENT) $(SERVER) OBJS = Throughput.o COBJS = Client.o SOBJS = Server.o ThroughputI.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ $(SOBJS:.o=.cpp) SLICE_SRCS = Throughput.ice include $(top_srcdir)/config/Make.rules CPPFLAGS := -I. $(CPPFLAGS) $(CLIENT): $(OBJS) $(COBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ ThroughputC.o $(COBJS) $(MINLIBS) $(SERVER): $(OBJS) $(SOBJS) rm -f $@ $(CXX) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS) Client.o: Client.cpp $(CXX) -c -DICEE_PURE_CLIENT $(CPPFLAGS) $(CXXFLAGS) $< ThroughputC.o Throughput.o: Throughput.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< $(CXX) -c -DICEE_PURE_CLIENT -o ThroughputC.o $(CPPFLAGS) $(CXXFLAGS) $< include .depend IceE-1.2.0/demo/IceE/throughput/Client.cpp0000644000076400007640000002142210603211113020104 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; void menu() { printf("usage:\n"); printf("\n"); printf("toggle type of data to send:\n"); printf("1: sequence of bytes (default)\n"); printf("2: sequence of strings (\"hello\")\n"); printf("3: sequence of structs with a string (\"hello\") and a double\n"); printf("4: sequence of structs with two ints and a double\n"); printf("\n"); printf("select test to run:\n"); printf("t: Send sequence as twoway\n"); printf("o: Send sequence as oneway\n"); printf("r: Receive sequence\n"); printf("e: Echo (send and receive) sequence\n"); printf("\n"); printf("other commands:\n"); printf("s: shutdown server\n"); printf("x: exit\n"); printf("?: help\n"); } int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { // // Check if we need to run with small sequences // int reduce = 1; int i; for(i = 0; i < argc; ++i) { if(strcmp(argv[i], "--small") == 0) { reduce = 100; } } Ice::PropertiesPtr properties = communicator->getProperties(); const char* proxyProperty = "Throughput.Proxy"; std::string proxy = properties->getProperty(proxyProperty); if(proxy.empty()) { fprintf(stderr, "%s: property `%s' not set\n", argv[0], proxyProperty); return EXIT_FAILURE; } Ice::ObjectPrx base = communicator->stringToProxy(proxy); ThroughputPrx throughput = ThroughputPrx::checkedCast(base); if(!throughput) { fprintf(stderr, "%s: invalid proxy\n", argv[0]); return EXIT_FAILURE; } ThroughputPrx throughputOneway = ThroughputPrx::uncheckedCast(throughput->ice_oneway()); ByteSeq byteSeq(ByteSeqSize / reduce, 0); pair byteArr; byteArr.first = &byteSeq[0]; byteArr.second = byteArr.first + byteSeq.size(); StringSeq stringSeq(StringSeqSize / reduce, "hello"); StringDoubleSeq structSeq(StringDoubleSeqSize / reduce); for(i = 0; i < StringDoubleSeqSize / reduce; ++i) { structSeq[i].s = "hello"; structSeq[i].d = 3.14; } FixedSeq fixedSeq(FixedSeqSize / reduce); for(i = 0; i < FixedSeqSize / reduce; ++i) { fixedSeq[i].i = 0; fixedSeq[i].j = 0; fixedSeq[i].d = 0; } menu(); throughput->ice_ping(); // Initial ping to setup the connection. // // By default use byte sequence. // char currentType = '1'; int seqSize = ByteSeqSize / reduce; char c = EOF; do { try { printf("==> "); do { c = getchar(); } while(c != EOF && c == '\n'); IceUtil::Time tm = IceUtil::Time::now(); const int repetitions = 1000; if(c == '1' || c == '2' || c == '3' || c == '4') { currentType = c; switch(c) { case '1': { printf("using byte sequences\n"); seqSize = ByteSeqSize / reduce; break; } case '2': { printf("using string sequences\n"); seqSize = StringSeqSize / reduce; break; } case '3': { printf("using variable-length struct sequences\n"); seqSize = StringDoubleSeqSize / reduce; break; } case '4': { printf("using fixed-length struct sequences\n"); seqSize = FixedSeqSize / reduce; break; } } } else if(c == 't' || c == 'o' || c == 'r' || c == 'e') { switch(c) { case 't': case 'o': { printf("sending"); break; } case 'r': { printf("receiving"); break; } case 'e': { printf("sending and receiving"); break; } } printf(" %d", repetitions); switch(currentType) { case '1': { printf(" byte"); break; } case '2': { printf(" string"); break; } case '3': { printf(" variable-length struct"); break; } case '4': { printf(" fixed-length struct"); break; } } printf(" sequences of size %d", seqSize); if(c == 'o') { printf(" as oneway"); } printf("...\n"); for(int i = 0; i < repetitions; ++i) { switch(currentType) { case '1': { switch(c) { case 't': { throughput->sendByteSeq(byteArr); break; } case 'o': { throughputOneway->sendByteSeq(byteArr); break; } case 'r': { throughput->recvByteSeq(); break; } case 'e': { throughput->echoByteSeq(byteSeq); break; } } break; } case '2': { switch(c) { case 't': { throughput->sendStringSeq(stringSeq); break; } case 'o': { throughputOneway->sendStringSeq(stringSeq); break; } case 'r': { throughput->recvStringSeq(); break; } case 'e': { throughput->echoStringSeq(stringSeq); break; } } break; } case '3': { switch(c) { case 't': { throughput->sendStructSeq(structSeq); break; } case 'o': { throughputOneway->sendStructSeq(structSeq); break; } case 'r': { throughput->recvStructSeq(); break; } case 'e': { throughput->echoStructSeq(structSeq); break; } } break; } case '4': { switch(c) { case 't': { throughput->sendFixedSeq(fixedSeq); break; } case 'o': { throughputOneway->sendFixedSeq(fixedSeq); break; } case 'r': { throughput->recvFixedSeq(); break; } case 'e': { throughput->echoFixedSeq(fixedSeq); break; } } break; } } } tm = IceUtil::Time::now() - tm; printf("time for %d sequences: %lfms\n", repetitions, tm.toMilliSecondsDouble()); printf("time per sequence: %lfms\n", tm.toMilliSecondsDouble() / repetitions); int wireSize = 0; switch(currentType) { case '1': { wireSize = 1; break; } case '2': { wireSize = static_cast(stringSeq[0].size()); break; } case '3': { wireSize = static_cast(structSeq[0].s.size()); wireSize += 8; // Size of double on the wire. break; } case '4': { wireSize = 16; // Size of two ints and a double on the wire. break; } } double mbit = repetitions * seqSize * wireSize * 8.0 / tm.toMicroSeconds(); if(c == 'e') { mbit *= 2; } printf("throughput: %.2lfMbps\n", mbit); } else if(c == 's') { throughput->shutdown(); } else if(c == 'x') { // Nothing to do } else if(c == '?') { menu(); } else { printf("unknown command `%c'\n", c); menu(); } } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); } } while(c != EOF && c != 'x'); return EXIT_SUCCESS; } int main(int argc, char* argv[]) { int status; Ice::CommunicatorPtr communicator; try { Ice::InitializationData initData; initData.properties = Ice::createProperties(); initData.properties->load("config"); communicator = Ice::initialize(argc, argv, initData); status = run(argc, argv, communicator); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } if(communicator) { try { communicator->destroy(); } catch(const Ice::Exception& ex) { fprintf(stderr, "%s\n", ex.toString().c_str()); status = EXIT_FAILURE; } } return status; } IceE-1.2.0/demo/IceE/throughput/README0000644000076400007640000000045610620544016017060 0ustar matthewmatthewA simple throughput demo that allows you to send sequences of various types between client and server and to measure the maximum bandwidth that can be achieved using serialized synchronous requests. To run the demo, first start the server: $ server In a separate window, start the client: $ client IceE-1.2.0/demo/IceE/throughput/Throughput.ice0000644000076400007640000000244610576536574021060 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef THROUGHPUT_ICE #define THROUGHPUT_ICE module Demo { sequence ByteSeq; const int ByteSeqSize = 500000; sequence StringSeq; const int StringSeqSize = 50000; struct StringDouble { string s; double d; }; sequence StringDoubleSeq; const int StringDoubleSeqSize = 50000; struct Fixed { int i; int j; double d; }; sequence FixedSeq; const int FixedSeqSize = 50000; interface Throughput { void sendByteSeq(["cpp:array"] ByteSeq seq); ByteSeq recvByteSeq(); ByteSeq echoByteSeq(ByteSeq seq); void sendStringSeq(StringSeq seq); StringSeq recvStringSeq(); StringSeq echoStringSeq(StringSeq seq); void sendStructSeq(StringDoubleSeq seq); StringDoubleSeq recvStructSeq(); StringDoubleSeq echoStructSeq(StringDoubleSeq seq); void sendFixedSeq(FixedSeq seq); FixedSeq recvFixedSeq(); FixedSeq echoFixedSeq(FixedSeq seq); idempotent void shutdown(); }; }; #endif IceE-1.2.0/demo/IceE/throughput/throughputS.vcproj0000755000076400007640000003265310620372032021765 0ustar matthewmatthew IceE-1.2.0/demo/IceE/throughput/throughputC.vcproj0000755000076400007640000003111610620372032021736 0ustar matthewmatthew IceE-1.2.0/demo/IceE/throughput/throughputC_CE.vcproj0000755000076400007640000027035010620410340022305 0ustar matthewmatthew IceE-1.2.0/demo/IceE/throughput/ThroughputI.h0000644000076400007640000000321510616533266020641 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef THROUGHPUT_I_H #define THROUGHPUT_I_H #include class ThroughputI : public Demo::Throughput { public: ThroughputI(int); virtual void sendByteSeq(const std::pair&, const Ice::Current&); virtual Demo::ByteSeq recvByteSeq(const Ice::Current&); virtual Demo::ByteSeq echoByteSeq(const Demo::ByteSeq&, const Ice::Current&); virtual void sendStringSeq(const Demo::StringSeq&, const Ice::Current&); virtual Demo::StringSeq recvStringSeq(const Ice::Current&); virtual Demo::StringSeq echoStringSeq(const Demo::StringSeq&, const Ice::Current&); virtual void sendStructSeq(const Demo::StringDoubleSeq&, const Ice::Current&); virtual Demo::StringDoubleSeq recvStructSeq(const Ice::Current&); virtual Demo::StringDoubleSeq echoStructSeq(const Demo::StringDoubleSeq&, const Ice::Current&); virtual void sendFixedSeq(const Demo::FixedSeq&, const Ice::Current&); virtual Demo::FixedSeq recvFixedSeq(const Ice::Current&); virtual Demo::FixedSeq echoFixedSeq(const Demo::FixedSeq&, const Ice::Current&); virtual void shutdown(const Ice::Current& c); private: const Demo::ByteSeq _byteSeq; const Demo::StringSeq _stringSeq; /*const*/ Demo::StringDoubleSeq _structSeq; /*const*/ Demo::FixedSeq _fixedSeq; }; #endif IceE-1.2.0/demo/IceE/throughput/ThroughputI.cpp0000644000076400007640000000405110616533266021173 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Demo; ThroughputI::ThroughputI(int reduce) : _byteSeq(ByteSeqSize / reduce, 0), _stringSeq(StringSeqSize / reduce, "hello"), _structSeq(StringDoubleSeqSize / reduce), _fixedSeq(FixedSeqSize / reduce) { int i; for(i = 0; i < StringDoubleSeqSize / reduce; ++i) { _structSeq[i].s = "hello"; _structSeq[i].d = 3.14; } for(i = 0; i < FixedSeqSize / reduce; ++i) { _fixedSeq[i].i = 0; _fixedSeq[i].j = 0; _fixedSeq[i].d = 0; } } void ThroughputI::sendByteSeq(const pair&, const Ice::Current&) { } ByteSeq ThroughputI::recvByteSeq(const Ice::Current&) { return _byteSeq; } ByteSeq ThroughputI::echoByteSeq(const ByteSeq& seq, const Ice::Current&) { return seq; } void ThroughputI::sendStringSeq(const StringSeq&, const Ice::Current&) { } StringSeq ThroughputI::recvStringSeq(const Ice::Current&) { return _stringSeq; } StringSeq ThroughputI::echoStringSeq(const StringSeq& seq, const Ice::Current&) { return seq; } void ThroughputI::sendStructSeq(const StringDoubleSeq&, const Ice::Current&) { } StringDoubleSeq ThroughputI::recvStructSeq(const Ice::Current&) { return _structSeq; } StringDoubleSeq ThroughputI::echoStructSeq(const StringDoubleSeq& seq, const Ice::Current&) { return seq; } void ThroughputI::sendFixedSeq(const FixedSeq&, const Ice::Current&) { } FixedSeq ThroughputI::recvFixedSeq(const Ice::Current&) { return _fixedSeq; } FixedSeq ThroughputI::echoFixedSeq(const FixedSeq& seq, const Ice::Current&) { return seq; } void ThroughputI::shutdown(const Ice::Current& c) { c.adapter->getCommunicator()->shutdown(); } IceE-1.2.0/allTests.py0000755000076400007640000000566410616553120014415 0ustar matthewmatthew#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** import os, sys import getopt for toplevel in [".", "..", "../..", "../../..", "../../../.."]: toplevel = os.path.normpath(toplevel) if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): break else: raise "can't find toplevel directory!" def isCygwin(): # The substring on sys.platform is required because some cygwin # versions return variations like "cygwin_nt-4.01". if sys.platform[:6] == "cygwin": return 1 else: return 0 def isWin32(): if sys.platform == "win32" or isCygwin(): return 1 else: return 0 def isWin9x(): if isWin32(): if os.environ.has_key("OS") and os.environ["OS"] == "Windows_NT": return 0 return 1 else: return 0 def runTests(args, tests, num = 0): # # Run each of the tests. # for i in tests: i = os.path.normpath(i) dir = os.path.join(toplevel, "test", i) print if(num > 0): print "[" + str(num) + "]", print "*** running tests in " + dir, print if isWin9x(): status = os.system("python " + os.path.join(dir, "run.py " + args)) else: status = os.system(os.path.join(dir, "run.py " + args)) if status: if(num > 0): print "[" + str(num) + "]", print "test in " + dir + " failed with exit status", status, sys.exit(status) # # List of all basic tests. # tests = [ "IceE/thread", "IceE/uuid", "IceE/proxy", "IceE/operations", "IceE/exceptions", "IceE/inheritance", "IceE/facets", "IceE/faultTolerance", "IceE/location", "IceE/adapterDeactivation", "IceE/slicing", "IceE/custom", "IceE/retry", ] # # These tests are currently disabled on cygwin # if isCygwin() == 0: tests += [ \ ] def usage(): print "usage: " + sys.argv[0] + " -l -r -R --host host --blocking" sys.exit(2) try: opts, args = getopt.getopt(sys.argv[1:], "lr:R:", \ ["host=", "blocking"]) except getopt.GetoptError: usage() if(args): usage() loop = 0 args = "" for o, a in opts: if o == "-l": loop = 1 if o == "-r" or o == '-R': import re regexp = re.compile(a) if o == '-r': def rematch(x): return regexp.search(x) else: def rematch(x): return not regexp.search(x) tests = filter(rematch, tests) if o == "--host" : args += " " + o + " " + a if o in ( "--blocking" ): args += " " + o if loop: num = 1 while 1: runTests(args, tests, num) num += 1 else: runTests(args, tests) IceE-1.2.0/Makefile0000644000076400007640000000302410576536574013714 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = . include $(top_srcdir)/config/Make.rules SUBDIRS = src slice include test demo install:: @if test ! -d $(prefix) ; \ then \ echo "Creating $(prefix)..." ; \ mkdir $(prefix) ; \ chmod a+rx $(prefix) ; \ fi @if test ! -d $(install_bindir) ; \ then \ echo "Creating $(install_bindir)..." ; \ mkdir -p $(install_bindir) ; \ chmod a+rx $(install_bindir) ; \ fi @if test ! -d $(install_libdir) ; \ then \ echo "Creating $(install_libdir)..." ; \ mkdir -p $(install_libdir) ; \ chmod a+rx $(install_libdir) ; \ fi @if test ! -d $(install_includedir) ; \ then \ echo "Creating $(install_includedir)..." ; \ mkdir $(install_includedir) ; \ chmod a+rx $(install_includedir) ; \ fi @if test ! -d $(install_slicedir) ; \ then \ echo "Creating $(install_slicedir)..." ; \ mkdir $(install_slicedir) ; \ chmod a+rx $(install_slicedir) ; \ fi $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done install:: $(call installdata,ICEE_LICENSE,$(prefix)) $(call installdata,LICENSE,$(prefix)) test:: @python $(top_srcdir)/allTests.py IceE-1.2.0/slice/0000755000076400007640000000000010620543774013342 5ustar matthewmatthewIceE-1.2.0/slice/Makefile.mak0000755000076400007640000000106110600254657015547 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. !include $(top_srcdir)/config/Make.rules.mak SUBDIRS = IceE $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/slice/Makefile0000644000076400007640000000105210576536574015012 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. include $(top_srcdir)/config/Make.rules SUBDIRS = IceE $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done IceE-1.2.0/slice/IceE/0000755000076400007640000000000010620543774014147 5ustar matthewmatthewIceE-1.2.0/slice/IceE/LocatorF.ice0000644000076400007640000000072510576536574016360 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_LOCATOR_F_ICE #define ICE_LOCATOR_F_ICE module Ice { interface Locator; interface LocatorRegistry; }; #endif IceE-1.2.0/slice/IceE/BuiltinSequences.ice0000644000076400007640000000167610576536574020137 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_BUILTIN_SEQUENCES_ICE #define ICE_BUILTIN_SEQUENCES_ICE module Ice { /** A sequence of bools. **/ sequence BoolSeq; /** A sequence of bytes. **/ sequence ByteSeq; /** A sequence of shorts. **/ sequence ShortSeq; /** A sequence of ints. **/ sequence IntSeq; /** A sequence of longs. **/ sequence LongSeq; /** A sequence of floats. **/ sequence FloatSeq; /** A sequence of doubles. **/ sequence DoubleSeq; /** A sequence of strings. **/ sequence StringSeq; /** A sequence of object proxies. **/ sequence ObjectProxySeq; }; #endif IceE-1.2.0/slice/IceE/Locator.ice0000644000076400007640000001142110576536574016245 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_LOCATOR_ICE #define ICE_LOCATOR_ICE #include module Ice { /** * * This exception is raised if an adapter cannot be found. * **/ exception AdapterNotFoundException { }; /** * * This exception is raised if the replica group provided by the * server is invalid. * **/ exception InvalidReplicaGroupIdException { }; /** * * This exception is raised if a server tries to set endpoints for * an adapter that is already active. * **/ exception AdapterAlreadyActiveException { }; /** * * This exception is raised if an object cannot be found. * **/ exception ObjectNotFoundException { }; /** * * This exception is raised if a server cannot be found. * **/ exception ServerNotFoundException { }; interface LocatorRegistry; /** * * The &Ice; locator interface. This interface is used by clients to * lookup adapters and objects. It is also used by servers to get the * locator registry proxy. * * The [Locator] interface is intended to be used by * &Ice; internals and by locator implementations. Regular user code * should not attempt to use any functionality of this interface * directly. * **/ interface Locator { /** * * Find an object by identity and return its proxy. * * @param id The identity. * * @return The proxy, or null if the object is not active. * * @throws ObjectNotFoundException Raised if the object cannot * be found. * **/ ["nonmutating", "cpp:const"] idempotent Object* findObjectById(Ice::Identity id) throws ObjectNotFoundException; /** * * Find an adapter by id and return its proxy (a dummy direct * proxy created by the adapter). * * @param id The adapter id. * * @return The adapter proxy, or null if the adapter is not active. * * @throws AdapterNotFoundException Raised if the adapter cannot be * found. * **/ ["nonmutating", "cpp:const"] idempotent Object* findAdapterById(string id) throws AdapterNotFoundException; /** * * Get the locator registry. * * @return The locator registry. * **/ ["nonmutating", "cpp:const"] idempotent LocatorRegistry* getRegistry(); }; /** * * The &Ice; locator registry interface. This interface is used by * servers to register adapter endpoints with the locator. * * The [LocatorRegistry] interface is intended to be used * by &Ice; internals and by locator implementations. Regular user * code should not attempt to use any functionality of this interface * directly. * **/ interface LocatorRegistry { /** * * Set the adapter endpoints with the locator registry. * * @param id The adapter id. * * @param proxy The adapter proxy (a dummy direct proxy created * by the adapter). The direct proxy contains the adapter * endpoints. * * @throws AdapterNotFoundException Raised if the adapter cannot * be found, or if the locator only allows * registered adapters to set their active proxy and the * adapter is not registered with the locator. * * @throws AdapterAlreadyActive Raised if an adapter with the same * id is already active. * **/ idempotent void setAdapterDirectProxy(string id, Object* proxy) throws AdapterNotFoundException, AdapterAlreadyActiveException; /** * * Set the adapter endpoints with the locator registry. * * @param adapterId The adapter id. * * @param replicaGroupId The replica group id. * * @param proxy The adapter proxy (a dummy direct proxy created * by the adapter). The direct proxy contains the adapter * endpoints. * * @throws AdapterNotFoundException Raised if the adapter cannot * be found, or if the locator only allows registered adapters to * set their active proxy and the adapter is not registered with * the locator. * * @throws AdapterAlreadyActive Raised if an adapter with the same * id is already active. * * @throws InvalidReplicaGroupIdException Raised if the given * replica group doesn't match the one registered with the * locator registry for this object adapter. * **/ ["amd"] idempotent void setReplicatedAdapterDirectProxy(string adapterId, string replicaGroupId, Object* proxy) throws AdapterNotFoundException, AdapterAlreadyActiveException, InvalidReplicaGroupIdException; }; }; #endif IceE-1.2.0/slice/IceE/RouterF.ice0000644000076400007640000000066710576536574016242 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_ROUTER_F_ICE #define ICE_ROUTER_F_ICE module Ice { interface Router; }; #endif IceE-1.2.0/slice/IceE/Makefile.mak0000755000076400007640000000117410600254657016361 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\.. !include $(top_srcdir)/config/Make.rules.mak install:: @if not exist $(install_slicedir)\IceE \ @echo "Creating $(install_slicedir)\IceE..." & \ mkdir $(install_slicedir)\IceE @for %i in ( *.ice ) do \ @echo Installing %i & \ copy %i $(install_slicedir)\IceE IceE-1.2.0/slice/IceE/Identity.ice0000644000076400007640000000142210576536574016433 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_IDENTITY_ICE #define ICE_IDENTITY_ICE module Ice { /** * * The identity of an &Ice; object. An empty [name] denotes a null * object. * **/ struct Identity { /** * * The name of the &Ice; object. * **/ string name; /** * * The &Ice; object category. * * @see ServantLocator * @see ObjectAdapter::addServantLocator * **/ string category; }; }; #endif IceE-1.2.0/slice/IceE/Makefile0000644000076400007640000000133710576536574015625 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../.. include $(top_srcdir)/config/Make.rules install:: @if test ! -d $(install_slicedir)/IceE ; \ then \ echo "Creating $(install_slicedir)/IceE..." ; \ $(call mkdir,$(install_slicedir)/IceE) ; \ fi @for i in *.ice ; \ do \ echo "Installing $$i" ; \ $(INSTALL_DATA) $$i $(install_slicedir)/IceE/$$i ; \ chmod a+r $(install_slicedir)/IceE/$$i ; \ done IceE-1.2.0/slice/IceE/Router.ice0000644000076400007640000000363110576536574016126 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICE_ROUTER_ICE #define ICE_ROUTER_ICE #include module Ice { /** * * The &Ice; router interface. Routers can be set either globally with * [Communicator::setDefaultRouter], or with [ice_router] on specific * proxies. * * The router interface is intended to be used by &Ice; * internals and by router implementations. Regular user code should * not attempt to use any functionality of this interface * directly. * **/ interface Router { /** * * Get the router's client proxy, i.e., the proxy to use for * forwarding requests from the client to the router. * * @return The router's client proxy. * **/ ["nonmutating", "cpp:const"] idempotent Object* getClientProxy(); /** * * Get the router's server proxy, i.e., the proxy to use for * forwarding requests from the server to the router. * * @return The router's server proxy. * **/ ["nonmutating", "cpp:const"] idempotent Object* getServerProxy(); /** * * Add new proxy information to the router's routing table. * * @param proxy The proxy to add. * **/ ["deprecate:This method has been deprecated, use addProxies instead."] idempotent void addProxy(Object* proxy); /** * * Add new proxy information to the router's routing table. * * @param proxies The proxies to add. * * @return Proxies discarded by the router. * **/ idempotent ObjectProxySeq addProxies(ObjectProxySeq proxies); }; }; #endif IceE-1.2.0/README0000644000076400007640000001251410620544016013114 0ustar matthewmatthewIntroduction ============ Ice-E is a compact subset of Ice designed for embedded environments while retaining many of the features that have made Ice such a compelling alternative for distributed applications. Comparing Ice-E and Ice ======================= In order to reduce the size of the Ice-E run time, several Ice features have been removed, and others are optional. The differences are discussed in the sections below. Concurrency Models ------------------ Ice-E supports only the thread-per-connection server-side concurrency model; the thread pool concurrency model is not supported. Applications that make nested callbacks must be aware of the following limitations of the thread-per-connection model: * For bidirectional connections, the nested callback must be a oneway invocation. * For regular (unidirectional) connections, the nested callback can be a twoway invocation. * Only one level of nested callbacks is allowed. For the client-side, Ice-E supports the thread-per-connection model as well as a blocking concurrency model that can provide better performance results. Set the configuration property Ice.Blocking=1 to enable the blocking model. In addition to the limitations of the thread-per-connection model described above, the blocking model also disallows the use of bidirectional connections. Transports ---------- Ice-E includes support for the TCP transport; UDP and SSL are not supported. The built-in TCP transport can be replaced with one of your own. Objects by Value ---------------- Ice-E does not allow Slice classes to be transmitted by value. Servant Locators ---------------- Ice-E does not support servant locators. Ice-E applications must use the active servant map. Collocation Optimization ------------------------ Support for collocation optimization has been removed. Note that Ice-E applications are still able to make invocations on collocated servants, but those invocations are not optimized and therefore will be marshaled and sent over the built-in transport. Other Removed Features ---------------------- Ice-E has also eliminated the following features: * Asynchronous invocation and dispatch * Streaming APIs * Active connection management * Protocol compression * Ice::Application and Ice::Service classes * Local interfaces. Optional Features ----------------- Support for routers, locators and batch messages is enabled by default but can be removed in order to further reduce the size of the Ice-E run time. See the "Configuration" section below for more information. Compatibility ------------- Ice-E and Ice share the same C++ mapping and remain source-code compatible, given the limitations described above. Furthermore, since the two products also share the same protocol, a distributed system can use any combination of Ice and Ice-E applications. Customization ------------- If the current features do not meet your requirements, ZeroC can customize Ice-E for commercial users. Please contact us at info@zeroc.com for more information. Run-time Libraries ================== In order to minimize the size of Ice-E applications, two versions of the run time library are provided: * The "client" library is suitable for applications requiring only client-side functionality. * The "server" library supports client- and server-side functionality. A simple rule of thumb is to use the server library if your program creates an object adapter, otherwise you can use the client library. Users of the client library must define the preprocessor macro ICEE_PURE_CLIENT when compiling an application as well as link with the appropriate run time library. Configuration ============= You may build the Ice-E run time libraries with certain components disabled in order to further reduce the size of your applications. The default configuration enables all of the optional components, but you can selectively disable them by editing the file include/IceE/Config.h and commenting out their corresponding preprocessor macros. The optional components are described below. For more information on these features, please refer to the Ice manual. Router Support -------------- If ICEE_HAS_ROUTER is defined, the Ice-E libraries will include support for routers. This component is necessary in order to use Ice-E with the Glacier2 router. Applications that use routers often also receive callbacks from remote servers. These applications must use the server library, because the client library does not provide support for callbacks. Locator Support --------------- If ICEE_HAS_LOCATOR is defined, the Ice-E libraries will include support for locators. This component is necessary in order to use indirect proxies in Ice-E. Batch Messages Support ---------------------- If ICEE_HAS_BATCH is defined, the Ice-E client library will include support for sending batch messages. This feature cannot be disabled in the server library. Blocking Client Support ----------------------- If ICEE_PURE_BLOCKING_CLIENT is defined, the Ice-E client library will include support only for the blocking client-side concurrency model. Wstring and String Converter Support ------------------------------------ If ICEE_HAS_WSTRING is defined, the Ice-E libraries will include support for using wide strings as well as configuring custom string converters. Installation ============ For installation instructions, please refer to the INSTALL.* file for your platform. IceE-1.2.0/bin/0000755000076400007640000000000010620544016013001 5ustar matthewmatthewIceE-1.2.0/src/0000755000076400007640000000000010620544003013014 5ustar matthewmatthewIceE-1.2.0/src/Makefile.mak0000755000076400007640000000113110620347541015232 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. !include $(top_srcdir)/config/Make.rules.mak SUBDIRS = IceE \ IceEC $(EVERYTHING):: @for %i in ( $(SUBDIRS) ) do \ @if exist %i \ @echo "making $@ in %i" & \ cmd /c "cd %i & $(MAKE) -nologo -f Makefile.mak $@" || exit 1 IceE-1.2.0/src/IceEC/0000755000076400007640000000000010620544003013724 5ustar matthewmatthewIceE-1.2.0/src/IceEC/.depend0000644000076400007640000013561110616637156015214 0ustar matthewmatthewBasicStream$(OBJEXT): ../../src/IceE/BasicStream.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Properties.h ../../include/IceE/PropertiesF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Instance.h ../../include/IceE/InstanceF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/ProxyFactory.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/LocalException.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/LoggerUtil.h Buffer$(OBJEXT): ../../src/IceE/Buffer.cpp ../../include/IceE/Buffer.h ../../include/IceE/Config.h ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h BuiltinSequences$(OBJEXT): ../../src/IceE/BuiltinSequences.cpp ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h Communicator$(OBJEXT): ../../src/IceE/Communicator.cpp ../../include/IceE/Communicator.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/LoggerF.h ../../include/IceE/PropertiesF.h ../../include/IceE/InstanceF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Router.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../IceE/Instance.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/Properties.h ../IceE/ReferenceFactory.h ../IceE/Reference.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/LocatorF.h ../IceE/ProxyFactory.h ../../include/IceE/LoggerUtil.h ../../include/IceE/LocalException.h Cond$(OBJEXT): ../../src/IceE/Cond.cpp ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Config.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h Connection$(OBJEXT): ../../src/IceE/Connection.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Connection.h ../../include/IceE/ConnectionF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/InstanceF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ReferenceF.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/LoggerUtil.h ../../include/IceE/Properties.h ../IceE/TraceUtil.h ../IceE/DefaultsAndOverrides.h ../IceE/Transceiver.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/LocalException.h ../IceE/ReferenceFactory.h ../IceE/Reference.h ../../include/IceE/RouterF.h ../../include/IceE/LocatorF.h ../IceE/ProxyFactory.h ../IceE/TraceLevels.h ConvertUTF$(OBJEXT): ../../src/IceE/ConvertUTF.cpp ../../include/IceE/Config.h ../IceE/ConvertUTF.h ../../include/IceE/Unicode.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h DefaultsAndOverrides$(OBJEXT): ../../src/IceE/DefaultsAndOverrides.cpp ../IceE/DefaultsAndOverrides.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/PropertiesF.h ../../include/IceE/Properties.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Network.h Endpoint$(OBJEXT): ../../src/IceE/Endpoint.cpp ../IceE/Endpoint.h ../../include/IceE/EndpointF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ExceptionBase$(OBJEXT): ../../src/IceE/ExceptionBase.cpp ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/SafeStdio.h ../../include/IceE/StaticMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h FactoryTable$(OBJEXT): ../../src/IceE/FactoryTable.cpp ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/StaticMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Mutex.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/Shared.h FactoryTableDef$(OBJEXT): ../../src/IceE/FactoryTableDef.cpp ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/StaticMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Mutex.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/Shared.h Identity$(OBJEXT): ../../src/IceE/Identity.cpp ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Shared.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h Initialize$(OBJEXT): ../../src/IceE/Initialize.cpp ../../include/IceE/Initialize.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/PropertiesF.h ../../include/IceE/LoggerF.h ../../include/IceE/InstanceF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Communicator.h ../../include/IceE/RecMutex.h ../../include/IceE/Properties.h ../../include/IceE/LocalException.h Instance$(OBJEXT): ../../src/IceE/Instance.cpp ../../include/IceE/DisableWarnings.h ../IceE/Instance.h ../../include/IceE/InstanceF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/TraceLevels.h ../IceE/DefaultsAndOverrides.h ../IceE/RouterInfo.h ../../include/IceE/RouterF.h ../../include/IceE/EndpointF.h ../../include/IceE/Router.h ../IceE/LocatorInfo.h ../../include/IceE/LocatorF.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../IceE/ReferenceFactory.h ../IceE/Reference.h ../IceE/ProxyFactory.h ../IceE/OutgoingConnectionFactory.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/LocalException.h ../../include/IceE/Properties.h ../IceE/LoggerI.h ../../include/IceE/Logger.h ../IceE/EndpointFactory.h ../../include/IceE/StringUtil.h LocalException$(OBJEXT): ../../src/IceE/LocalException.cpp ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/SafeStdio.h ../../include/IceE/StringUtil.h ../IceE/Network.h Locator$(OBJEXT): ../../src/IceE/Locator.cpp ../../include/IceE/Locator.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/InstanceF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h LocatorInfo$(OBJEXT): ../../src/IceE/LocatorInfo.cpp ../../include/IceE/Config.h ../IceE/LocatorInfo.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Shared.h ../../include/IceE/LocatorF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/EndpointF.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/InstanceF.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/TraceLevels.h ../../include/IceE/LoggerUtil.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../IceE/Reference.h ../../include/IceE/RouterF.h ../../include/IceE/Functional.h Logger$(OBJEXT): ../../src/IceE/Logger.cpp ../../include/IceE/Logger.h ../../include/IceE/LoggerF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h LoggerI$(OBJEXT): ../../src/IceE/LoggerI.cpp ../IceE/LoggerI.h ../../include/IceE/Logger.h ../../include/IceE/LoggerF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/StaticMutex.h LoggerUtil$(OBJEXT): ../../src/IceE/LoggerUtil.cpp ../../include/IceE/LoggerUtil.h ../../include/IceE/LoggerF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Logger.h Network$(OBJEXT): ../../src/IceE/Network.cpp ../../include/IceE/StaticMutex.h ../../include/IceE/Config.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../IceE/Network.h ../../include/IceE/LocalException.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/SafeStdio.h OperationMode$(OBJEXT): ../../src/IceE/OperationMode.cpp ../../include/IceE/OperationMode.h ../../include/IceE/Config.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/Shared.h Outgoing$(OBJEXT): ../../src/IceE/Outgoing.cpp ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/InstanceF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../IceE/Reference.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../IceE/ReferenceFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/Initialize.h OutgoingConnectionFactory$(OBJEXT): ../../src/IceE/OutgoingConnectionFactory.cpp ../IceE/OutgoingConnectionFactory.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/InstanceF.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Connection.h ../../include/IceE/TransceiverF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Thread.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ReferenceF.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ../IceE/DefaultsAndOverrides.h ../IceE/Connector.h ../IceE/ConnectorF.h ../IceE/Endpoint.h ../IceE/RouterInfo.h ../../include/IceE/RouterF.h ../../include/IceE/LocalException.h ../../include/IceE/Functional.h ../IceE/Reference.h ../../include/IceE/LocatorF.h Properties$(OBJEXT): ../../src/IceE/Properties.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Properties.h ../../include/IceE/PropertiesF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/StringUtil.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/InstanceF.h ../../include/IceE/LocalException.h Protocol$(OBJEXT): ../../src/IceE/Protocol.cpp ../../include/IceE/Protocol.h ../../include/IceE/Config.h Proxy$(OBJEXT): ../../src/IceE/Proxy.cpp ../../include/IceE/Communicator.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/LoggerF.h ../../include/IceE/PropertiesF.h ../../include/IceE/InstanceF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/ProxyFactory.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../IceE/Reference.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../IceE/Instance.h ../IceE/DefaultsAndOverridesF.h ../IceE/ReferenceFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/LocalException.h ../IceE/RouterInfo.h ../../include/IceE/Router.h ../IceE/LocatorInfo.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ProxyFactory$(OBJEXT): ../../src/IceE/ProxyFactory.cpp ../IceE/ProxyFactory.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/InstanceF.h ../../include/IceE/ReferenceF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Thread.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Time.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Reference.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/LocatorF.h ../IceE/ReferenceFactory.h ../IceE/LocatorInfo.h ../../include/IceE/Properties.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ../../include/IceE/LocalException.h ../../include/IceE/SafeStdio.h RecMutex$(OBJEXT): ../../src/IceE/RecMutex.cpp ../../include/IceE/RecMutex.h ../../include/IceE/Config.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h Reference$(OBJEXT): ../../src/IceE/Reference.cpp ../IceE/Reference.h ../../include/IceE/ReferenceF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/EndpointF.h ../../include/IceE/InstanceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../IceE/ReferenceFactory.h ../IceE/ReferenceFactoryF.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../IceE/RouterInfo.h ../../include/IceE/Router.h ../IceE/LocatorInfo.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/Connection.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/Functional.h ../IceE/OutgoingConnectionFactory.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ../../include/IceE/StringUtil.h ReferenceFactory$(OBJEXT): ../../src/IceE/ReferenceFactory.cpp ../IceE/ReferenceFactory.h ../IceE/ReferenceFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../IceE/Reference.h ../../include/IceE/ReferenceF.h ../../include/IceE/EndpointF.h ../../include/IceE/InstanceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../IceE/EndpointFactory.h ../IceE/RouterInfo.h ../../include/IceE/Router.h ../IceE/LocatorInfo.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/StringUtil.h ../../include/IceE/LoggerUtil.h ../../include/IceE/Properties.h ../../include/IceE/Communicator.h Router$(OBJEXT): ../../src/IceE/Router.cpp ../../include/IceE/Router.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/InstanceF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/LocalException.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h RouterInfo$(OBJEXT): ../../src/IceE/RouterInfo.cpp ../../include/IceE/Config.h ../IceE/RouterInfo.h ../../include/IceE/RouterInfoF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Shared.h ../../include/IceE/RouterF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/EndpointF.h ../../include/IceE/Router.h ../../include/IceE/BuiltinSequences.h ../IceE/Reference.h ../../include/IceE/InstanceF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../../include/IceE/LocalException.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/Functional.h SafeStdio$(OBJEXT): ../../src/IceE/SafeStdio.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/SafeStdio.h ../../include/IceE/Config.h Shared$(OBJEXT): ../../src/IceE/Shared.cpp ../../include/IceE/Shared.h ../../include/IceE/Config.h StaticMutex$(OBJEXT): ../../src/IceE/StaticMutex.cpp ../../include/IceE/StaticMutex.h ../../include/IceE/Config.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h StringConverter$(OBJEXT): ../../src/IceE/StringConverter.cpp ../../include/IceE/Config.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../../include/IceE/Shared.h ../../include/IceE/Unicode.h ../../include/IceE/LocalException.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h StringUtil$(OBJEXT): ../../src/IceE/StringUtil.cpp ../../include/IceE/StringUtil.h ../../include/IceE/Config.h ../../include/IceE/ExceptionBase.h Thread$(OBJEXT): ../../src/IceE/Thread.cpp ../../include/IceE/Thread.h ../../include/IceE/Shared.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Time.h ThreadException$(OBJEXT): ../../src/IceE/ThreadException.cpp ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/SafeStdio.h Time$(OBJEXT): ../../src/IceE/Time.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Time.h ../../include/IceE/Config.h TraceLevels$(OBJEXT): ../../src/IceE/TraceLevels.cpp ../IceE/TraceLevels.h ../../include/IceE/Shared.h ../../include/IceE/Config.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/PropertiesF.h ../../include/IceE/Properties.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h TraceUtil$(OBJEXT): ../../src/IceE/TraceUtil.cpp ../IceE/TraceUtil.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/LoggerF.h ../../include/IceE/StringUtil.h ../../include/IceE/DispatchStatus.h ../IceE/TraceLevels.h ../../include/IceE/PropertiesF.h ../../include/IceE/Logger.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/SafeStdio.h ../../include/IceE/OperationMode.h ../../include/IceE/Identity.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../IceE/Instance.h ../../include/IceE/InstanceF.h ../../include/IceE/CommunicatorF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Outgoing.h UnknownEndpoint$(OBJEXT): ../../src/IceE/UnknownEndpoint.cpp ../IceE/UnknownEndpoint.h ../IceE/Endpoint.h ../../include/IceE/EndpointF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h Unicode$(OBJEXT): ../../src/IceE/Unicode.cpp ../../include/IceE/Config.h ../../include/IceE/Unicode.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../IceE/ConvertUTF.h Connector$(OBJEXT): ../../src/TcpTransport/Connector.cpp ../IceE/Connector.h ../IceE/ConnectorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/LoggerF.h ../IceE/Transceiver.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/TraceLevels.h ../../include/IceE/LoggerUtil.h ../IceE/Network.h EndpointFactory$(OBJEXT): ../../src/TcpTransport/EndpointFactory.cpp ../IceE/EndpointFactory.h ../IceE/EndpointFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/EndpointF.h ../../include/IceE/InstanceF.h ../IceE/UnknownEndpoint.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../TcpTransport/TcpEndpoint.h TcpEndpoint$(OBJEXT): ../../src/TcpTransport/TcpEndpoint.cpp ../TcpTransport/TcpEndpoint.h ../IceE/Endpoint.h ../../include/IceE/EndpointF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ../IceE/Network.h ../IceE/Connector.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/LoggerF.h ../IceE/Transceiver.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/LocalException.h ../../include/IceE/Identity.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../IceE/DefaultsAndOverrides.h ../../include/IceE/SafeStdio.h Transceiver$(OBJEXT): ../../src/TcpTransport/Transceiver.cpp ../IceE/Transceiver.h ../../include/IceE/TransceiverF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/InstanceF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/LoggerF.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/TraceLevels.h ../../include/IceE/LoggerUtil.h ../IceE/Network.h ../../include/IceE/LocalException.h ../../include/IceE/SafeStdio.h BuiltinSequences.cpp: ../../slice/IceE/BuiltinSequences.ice Identity.cpp: ../../slice/IceE/Identity.ice Locator.cpp: ../../slice/IceE/Locator.ice ../../slice/IceE/Identity.ice LocatorF.cpp: ../../slice/IceE/LocatorF.ice Router.cpp: ../../slice/IceE/Router.ice ../../slice/IceE/BuiltinSequences.ice RouterF.cpp: ../../slice/IceE/RouterF.ice IceE-1.2.0/src/IceEC/Makefile.mak0000755000076400007640000000750610620347541016156 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\.. LIBNAME = $(top_srcdir)\lib\iceec$(LIBSUFFIX).lib DLLNAME = $(top_srcdir)\bin\iceec$(SOVERSION)$(LIBSUFFIX).dll TARGETS = $(LIBNAME) $(DLLNAME) TRANSPORT_DIR = $(top_srcdir)\src\TcpTransport ICEE_DIR = $(top_srcdir)\src\IceE TRANSPORT_OBJS = Connector.obj \ EndpointFactory.obj \ TcpEndpoint.obj \ Transceiver.obj ICEE_OBJS = BasicStream.obj \ Buffer.obj \ BuiltinSequences.obj \ Communicator.obj \ Cond.obj \ Connection.obj \ ConvertUTF.obj \ DefaultsAndOverrides.obj \ Endpoint.obj \ ExceptionBase.obj \ FactoryTable.obj \ FactoryTableDef.obj \ Identity.obj \ Initialize.obj \ Instance.obj \ LocalException.obj \ Locator.obj \ LocatorInfo.obj \ Logger.obj \ LoggerI.obj \ LoggerUtil.obj \ Network.obj \ OperationMode.obj \ Outgoing.obj \ OutgoingConnectionFactory.obj \ Properties.obj \ Protocol.obj \ Proxy.obj \ ProxyFactory.obj \ RecMutex.obj \ Reference.obj \ ReferenceFactory.obj \ Router.obj \ RouterInfo.obj \ SafeStdio.obj \ Shared.obj \ StaticMutex.obj \ StringConverter.obj \ StringUtil.obj \ Thread.obj \ ThreadException.obj \ Time.obj \ TraceLevels.obj \ TraceUtil.obj \ UnknownEndpoint.obj \ Unicode.obj HDIR = $(includedir)\IceE SDIR = $(slicedir)\IceE !include $(top_srcdir)\config\Make.rules.mak CPPFLAGS = -I.. $(CPPFLAGS) -DICE_API_EXPORTS -DFD_SETSIZE=1024 -DICEE_PURE_CLIENT -DWIN32_LEAN_AND_MEAN SLICE2CPPEFLAGS = --ice --include-dir IceE --dll-export ICE_API $(SLICE2CPPEFLAGS) !if "$(STATICLIBS)" != "yes" & "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb) !endif {$(SDIR)\}.ice{$(HDIR)}.h: del /q $(HDIR)\$(*F).h $(ICEE_DIR)\$(*F).cpp $(SLICE2CPP) $(SLICE2CPPEFLAGS) $< move $(*F).h $(HDIR) move $(*F).cpp $(ICEE_DIR) {$(TRANSPORT_DIR)\}.cpp.obj:: $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) $< {$(ICEE_DIR)\}.cpp.obj:: $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) $< !if "$(STATICLIBS)" == "yes" $(DLLNAME): $(LIBNAME): $(ICEE_OBJS) $(TRANSPORT_OBJS) $(AR) $(ARFLAGS) $(PDBFLAGS) $(ICEE_OBJS) $(TRANSPORT_OBJS) /out:$(LIBNAME) !else $(LIBNAME): $(DLLNAME) $(DLLNAME): $(ICEE_OBJS) $(TRANSPORT_OBJS) $(LINK) $(LDFLAGS) /dll $(PDBFLAGS) $(ICEE_OBJS) $(TRANSPORT_OBJS) /out:$(DLLNAME) $(BASELIBS) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest @if exist $(DLLNAME:.dll=.exp) del /q $(DLLNAME:.dll=.exp) !endif clean:: del /q $(LIBNAME:.lib=.*) install:: all copy $(LIBNAME) $(install_libdir) !if "$(STATICLIBS)" != "yes" clean:: del /q $(DLLNAME:.dll=.*) install:: all copy $(DLLNAME) $(install_bindir) !endif !include .depend IceE-1.2.0/src/IceEC/Makefile0000644000076400007640000000626710616637156015420 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../.. LIBFILENAME = $(call mklibfilename,IceEC,$(VERSION)) SONAME = $(call mksoname,IceEC,$(SOVERSION)) LIBNAME = $(call mklibname,IceEC) TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) TRANSPORT_DIR = $(top_srcdir)/src/TcpTransport ICE_DIR = $(top_srcdir)/src/IceE TRANSPORT_OBJS = Connector.o \ EndpointFactory.o \ TcpEndpoint.o \ Transceiver.o ICE_OBJS = BasicStream.o \ Buffer.o \ BuiltinSequences.o \ Communicator.o \ Cond.o \ Connection.o \ ConvertUTF.o \ DefaultsAndOverrides.o \ Endpoint.o \ ExceptionBase.o \ FactoryTable.o \ FactoryTableDef.o \ Identity.o \ Initialize.o \ Instance.o \ LocalException.o \ Locator.o \ LocatorInfo.o \ Logger.o \ LoggerI.o \ LoggerUtil.o \ Network.o \ OperationMode.o \ Outgoing.o \ OutgoingConnectionFactory.o \ Properties.o \ Protocol.o \ Proxy.o \ ProxyFactory.o \ RecMutex.o \ Reference.o \ ReferenceFactory.o \ Router.o \ RouterInfo.o \ SafeStdio.o \ Shared.o \ StaticMutex.o \ StringConverter.o \ StringUtil.o \ Thread.o \ ThreadException.o \ Time.o \ TraceLevels.o \ TraceUtil.o \ UnknownEndpoint.o \ Unicode.o OBJS = $(LOCAL_OBJS) $(ICE_OBJS) $(TRANSPORT_OBJS) SRCS = $(patsubst %.o,$(ICE_DIR)/%.cpp,$(ICE_OBJS)) \ $(patsubst %.o,$(TRANSPORT_DIR)/%.cpp,$(TRANSPORT_OBJS)) SLICE_SRCS = $(SDIR)/BuiltinSequences.ice \ $(SDIR)/Identity.ice \ $(SDIR)/Locator.ice \ $(SDIR)/LocatorF.ice \ $(SDIR)/Router.ice \ $(SDIR)/RouterF.ice HDIR = $(includedir)/IceE SDIR = $(slicedir)/IceE include $(top_srcdir)/config/Make.rules ifeq ($(USE_SPARC_ASM),yes) ASRC = IceAtomic.c AOBJ = IceAtomic.o SRCS := $(SRCS) $(ASRCS) OBJS := $(OBJS) $(AOBJ) CFLAGS := $(CFLAGS) -fomit-frame-pointer endif $(HDIR)/%.h $(ICE_DIR)/%.cpp: $(SDIR)/%.ice rm -f $(HDIR)/$(*F).h $(ICE_DIR)/$(*F).cpp $(SLICE2CPPE) $(SLICE2CPPEFLAGS) $< mv $(*F).h $(HDIR) mv $(*F).cpp $(ICE_DIR) %.o: $(TRANSPORT_DIR)/%.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< %.o: $(ICE_DIR)/%.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< CPPFLAGS := -I.. $(CPPFLAGS) -DICE_API_EXPORTS -DICEE_PURE_CLIENT SLICE2CPPEFLAGS := --ice --include-dir IceE --dll-export ICE_API $(SLICE2CPPEFLAGS) LINKWITH := $(ICE_OS_LIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) rm -f $@ ln -s $(LIBFILENAME) $@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME) rm -f $@ ln -s $(SONAME) $@ endif install:: all $(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) include .depend IceE-1.2.0/src/Makefile0000644000076400007640000000106610576536574014507 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = .. include $(top_srcdir)/config/Make.rules SUBDIRS = IceE \ IceEC $(EVERYTHING):: @for subdir in $(SUBDIRS); \ do \ echo "making $@ in $$subdir"; \ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \ done IceE-1.2.0/src/TcpTransport/0000755000076400007640000000000010620544003015457 5ustar matthewmatthewIceE-1.2.0/src/TcpTransport/.depend0000644000076400007640000001475410255571072016744 0ustar matthewmatthewAcceptor.o: Acceptor.cpp ../../include/Ice/Acceptor.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/TransceiverF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/InstanceF.h ../Ice/TraceLevelsF.h ../../include/Ice/LoggerF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/AcceptorF.h ../../include/Ice/Transceiver.h ../Ice/Instance.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/RecMutex.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../Ice/DefaultsAndOverridesF.h ../Ice/RouterInfoF.h ../Ice/LocatorInfoF.h ../Ice/ReferenceFactoryF.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionFactoryF.h ../../include/Ice/ObjectAdapterFactoryF.h ../../include/Ice/EndpointFactoryF.h ../Ice/TraceLevels.h ../../include/Ice/LoggerUtil.h ../Ice/Network.h Connector.o: Connector.cpp ../../include/Ice/Connector.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/TransceiverF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/InstanceF.h ../Ice/TraceLevelsF.h ../../include/Ice/LoggerF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/ConnectorF.h ../../include/Ice/Transceiver.h ../Ice/Instance.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/RecMutex.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../Ice/DefaultsAndOverridesF.h ../Ice/RouterInfoF.h ../Ice/LocatorInfoF.h ../Ice/ReferenceFactoryF.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionFactoryF.h ../../include/Ice/ObjectAdapterFactoryF.h ../../include/Ice/EndpointFactoryF.h ../Ice/TraceLevels.h ../../include/Ice/LoggerUtil.h ../Ice/Network.h EndpointFactory.o: EndpointFactory.cpp ../../include/Ice/EndpointFactory.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/EndpointF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/InstanceF.h ../../include/Ice/EndpointFactoryF.h ../../include/Ice/Endpoint.h ../../include/Ice/AcceptorF.h ../../include/Ice/ConnectorF.h ../../include/Ice/TransceiverF.h ../../include/Ice/LocalException.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h Endpoint.o: Endpoint.cpp ../../include/Ice/Endpoint.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/EndpointF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/AcceptorF.h ../../include/Ice/ConnectorF.h ../../include/Ice/TransceiverF.h ../../include/Ice/InstanceF.h ../Ice/Network.h ../../include/Ice/Acceptor.h ../Ice/TraceLevelsF.h ../../include/Ice/LoggerF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/Connector.h ../../include/Ice/Transceiver.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/LocalException.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionIF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/BuiltinSequences.h ../Ice/Instance.h ../../include/IceUtil/RecMutex.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../Ice/DefaultsAndOverridesF.h ../Ice/RouterInfoF.h ../Ice/LocatorInfoF.h ../Ice/ReferenceFactoryF.h ../../include/Ice/ConnectionFactoryF.h ../../include/Ice/ObjectAdapterFactoryF.h ../../include/Ice/EndpointFactoryF.h ../Ice/DefaultsAndOverrides.h ../../include/IceUtil/SafeStdio.h Transceiver.o: Transceiver.cpp ../../include/Ice/Transceiver.h ../../include/IceUtil/Shared.h ../../include/IceUtil/Config.h ../../include/Ice/InstanceF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../Ice/TraceLevelsF.h ../../include/Ice/LoggerF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/Ice/UndefSysMacros.h ../../include/Ice/TransceiverF.h ../Ice/Instance.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/IceUtil/ThreadException.h ../../include/IceUtil/RecMutex.h ../../include/Ice/CommunicatorF.h ../../include/Ice/PropertiesF.h ../Ice/DefaultsAndOverridesF.h ../Ice/RouterInfoF.h ../Ice/LocatorInfoF.h ../Ice/ReferenceFactoryF.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionFactoryF.h ../../include/Ice/ObjectAdapterFactoryF.h ../../include/Ice/EndpointFactoryF.h ../Ice/TraceLevels.h ../../include/Ice/LoggerUtil.h ../../include/Ice/Buffer.h ../Ice/Network.h ../../include/Ice/LocalException.h ../../include/Ice/Proxy.h ../../include/Ice/ConnectionIF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/ConnectionF.h ../../include/Ice/Identity.h ../../include/Ice/BuiltinSequences.h ../../include/IceUtil/SafeStdio.h IceE-1.2.0/src/TcpTransport/Acceptor.cpp0000644000076400007640000000512610607167247017747 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(Acceptor* p) { return p; } SOCKET IceInternal::Acceptor::fd() { return _fd; } void IceInternal::Acceptor::close() { if(_traceLevels->network >= 1) { Trace out(_logger, _traceLevels->networkCat); out << "stopping to accept tcp connections at " << toString(); } SOCKET fd = _fd; _fd = INVALID_SOCKET; closeSocket(fd); } void IceInternal::Acceptor::listen() { try { doListen(_fd, _backlog); } catch(...) { _fd = INVALID_SOCKET; throw; } if(_traceLevels->network >= 1) { Trace out(_logger, _traceLevels->networkCat); out << "accepting tcp connections at " << toString(); } } TransceiverPtr IceInternal::Acceptor::accept() { SOCKET fd = doAccept(_fd); #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS setBlock(fd, true); #endif if(_traceLevels->network >= 1) { Trace out(_logger, _traceLevels->networkCat); out << "accepted tcp connection\n" << fdToString(fd); } return new Transceiver(_instance, fd); } void IceInternal::Acceptor::connectToSelf() { SOCKET fd = createSocket(); setBlock(fd, false); doConnect(fd, _addr, -1); closeSocket(fd); } string IceInternal::Acceptor::toString() const { return addrToString(_addr); } int IceInternal::Acceptor::effectivePort() { return ntohs(_addr.sin_port); } IceInternal::Acceptor::Acceptor(const InstancePtr& instance, const string& host, int port) : _instance(instance), _traceLevels(instance->traceLevels()), _logger(instance->initializationData().logger), _backlog(0) { if(_backlog <= 0) { _backlog = 5; } try { _fd = createSocket(); getAddress(host, port, _addr); if(_traceLevels->network >= 2) { Trace out(_logger, _traceLevels->networkCat); out << "attempting to bind to tcp socket " << toString(); } doBind(_fd, _addr); } catch(...) { _fd = INVALID_SOCKET; throw; } } IceInternal::Acceptor::~Acceptor() { assert(_fd == INVALID_SOCKET); } IceE-1.2.0/src/TcpTransport/TcpEndpoint.cpp0000644000076400007640000001655410616576164020447 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #ifndef ICEE_PURE_CLIENT # include #endif using namespace std; using namespace Ice; using namespace IceInternal; IceInternal::TcpEndpoint::TcpEndpoint(const InstancePtr& instance, const string& ho, Int po, Int ti, bool pub) : _instance(instance), _host(ho), _port(po), _timeout(ti), _publish(pub) { } IceInternal::TcpEndpoint::TcpEndpoint(const InstancePtr& instance, const string& str) : _instance(instance), _port(0), _timeout(-1), _publish(true) { const string delim = " \t\n\r"; string::size_type beg; string::size_type end = 0; while(true) { beg = str.find_first_not_of(delim, end); if(beg == string::npos) { break; } end = str.find_first_of(delim, beg); if(end == string::npos) { end = str.length(); } string option = str.substr(beg, end - beg); if(option.length() != 2 || option[0] != '-') { EndpointParseException ex(__FILE__, __LINE__); ex.str = "tcp " + str; throw ex; } string argument; string::size_type argumentBeg = str.find_first_not_of(delim, end); if(argumentBeg != string::npos && str[argumentBeg] != '-') { beg = argumentBeg; end = str.find_first_of(delim, beg); if(end == string::npos) { end = str.length(); } argument = str.substr(beg, end - beg); } switch(option[1]) { case 'h': { if(argument.empty()) { EndpointParseException ex(__FILE__, __LINE__); ex.str = "tcp " + str; throw ex; } const_cast(_host) = argument; break; } case 'p': { const_cast(_port) = atoi(argument.c_str()); if(_port <= 0 || _port > 65535) { EndpointParseException ex(__FILE__, __LINE__); ex.str = "tcp " + str; throw ex; } break; } case 't': { const_cast(_timeout) = atoi(argument.c_str()); if(_timeout == 0) { EndpointParseException ex(__FILE__, __LINE__); ex.str = "tcp " + str; throw ex; } break; } case 'z': { // Ignore compression flag. break; } default: { EndpointParseException ex(__FILE__, __LINE__); ex.str = "tcp " + str; throw ex; } } } } IceInternal::TcpEndpoint::TcpEndpoint(BasicStream* s) : _instance(s->instance()), _port(0), _timeout(-1), _publish(true) { bool dummy; s->startReadEncaps(); s->read(const_cast(_host), false); s->read(const_cast(_port)); s->read(const_cast(_timeout)); s->read(const_cast(dummy)); s->endReadEncaps(); } void IceInternal::TcpEndpoint::streamWrite(BasicStream* s) const { s->write(TcpEndpointType); s->startWriteEncaps(); s->write(_host, false); s->write(_port); s->write(_timeout); s->write(false); s->endWriteEncaps(); } string IceInternal::TcpEndpoint::toString() const { string s; s += "tcp -h "; s += _host; s += Ice::printfToString(" -p %d", _port); if(_timeout != -1) { s += Ice::printfToString(" -t %d", _timeout); } return s; } Short IceInternal::TcpEndpoint::type() const { return TcpEndpointType; } Int IceInternal::TcpEndpoint::timeout() const { return _timeout; } EndpointPtr IceInternal::TcpEndpoint::timeout(Int timeout) const { if(timeout == _timeout) { return const_cast(this); } else { return new TcpEndpoint(_instance, _host, _port, timeout, _publish); } } bool IceInternal::TcpEndpoint::secure() const { return false; } bool IceInternal::TcpEndpoint::datagram() const { return false; } bool IceInternal::TcpEndpoint::unknown() const { return false; } ConnectorPtr IceInternal::TcpEndpoint::connector() const { return new Connector(_instance, _host, _port); } bool IceInternal::TcpEndpoint::operator==(const Endpoint& r) const { const TcpEndpoint* p = dynamic_cast(&r); if(!p) { return false; } if(this == p) { return true; } if(_port != p->_port) { return false; } if(_timeout != p->_timeout) { return false; } if(_host != p->_host) { // // We do the most time-consuming part of the comparison last. // struct sockaddr_in laddr; struct sockaddr_in raddr; try { getAddress(_host, _port, laddr); getAddress(p->_host, p->_port, raddr); } catch(const DNSException&) { return false; } return compareAddress(laddr, raddr); } return true; } bool IceInternal::TcpEndpoint::operator!=(const Endpoint& r) const { return !operator==(r); } bool IceInternal::TcpEndpoint::operator<(const Endpoint& r) const { const TcpEndpoint* p = dynamic_cast(&r); if(!p) { return type() < r.type(); } if(this == p) { return false; } if(_port < p->_port) { return true; } else if(p->_port < _port) { return false; } if(_timeout < p->_timeout) { return true; } else if(p->_timeout < _timeout) { return false; } if(_host != p->_host) { // // We do the most time-consuming part of the comparison last. // struct sockaddr_in laddr; try { getAddress(_host, _port, laddr); } catch(const DNSException&) { } struct sockaddr_in raddr; try { getAddress(p->_host, p->_port, raddr); } catch(const DNSException&) { } if(laddr.sin_addr.s_addr < raddr.sin_addr.s_addr) { return true; } else if(raddr.sin_addr.s_addr < laddr.sin_addr.s_addr) { return false; } } return false; } vector IceInternal::TcpEndpoint::expand(bool server) const { if(_host.empty()) { const_cast(_host) = _instance->defaultsAndOverrides()->defaultHost; if(_host.empty()) { if(server) { const_cast(_host) = "0.0.0.0"; } else { const_cast(_host) = "127.0.0.1"; } } } else if(_host == "*") { const_cast(_host) = "0.0.0.0"; } vector endps; if(_host == "0.0.0.0") { vector hosts = getLocalHosts(); for(unsigned int i = 0; i < hosts.size(); ++i) { endps.push_back(new TcpEndpoint(_instance, hosts[i], _port, _timeout, hosts.size() == 1 || hosts[i] != "127.0.0.1")); } } else { endps.push_back(const_cast(this)); } return endps; } #ifndef ICEE_PURE_CLIENT AcceptorPtr IceInternal::TcpEndpoint::acceptor(EndpointPtr& endp) const { Acceptor* p = new Acceptor(_instance, _host, _port); endp = new TcpEndpoint(_instance, _host, p->effectivePort(), _timeout, _publish); return p; } bool IceInternal::TcpEndpoint::publish() const { return _publish; } #endif IceE-1.2.0/src/TcpTransport/EndpointFactory.cpp0000644000076400007640000000331610616637156021317 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(EndpointFactory* p) { return p; } IceInternal::EndpointFactory::EndpointFactory(const InstancePtr& instance) : _instance(instance) { } IceInternal::EndpointFactory::~EndpointFactory() { } EndpointPtr IceInternal::EndpointFactory::create(const std::string& str) const { const string delim = " \t\n\r"; string::size_type beg = str.find_first_not_of(delim); if(beg == string::npos) { EndpointParseException ex(__FILE__, __LINE__); ex.str = str; throw ex; } string::size_type end = str.find_first_of(delim, beg); if(end == string::npos) { end = str.length(); } string protocol = str.substr(beg, end - beg); if(protocol == "default" || protocol == "tcp") { return new TcpEndpoint(_instance, str.substr(end)); } return 0; } EndpointPtr IceInternal::EndpointFactory::read(BasicStream* s) const { Short type; s->read(type); if(type == TcpEndpointType) { return new TcpEndpoint(s); } return new UnknownEndpoint(type, s); } void IceInternal::EndpointFactory::destroy() { _instance = 0; } IceE-1.2.0/src/TcpTransport/TcpEndpoint.h0000644000076400007640000000322410616576164020102 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_TRANSPORT_TCP_ENDPOINT_H #define ICEE_TRANSPORT_TCP_ENDPOINT_H #include namespace IceInternal { const Ice::Short TcpEndpointType = 1; class TcpEndpoint : public IceInternal::Endpoint { public: TcpEndpoint(const InstancePtr&, const std::string&, Ice::Int, Ice::Int, bool); TcpEndpoint(const InstancePtr&, const std::string&); TcpEndpoint(BasicStream*); virtual void streamWrite(BasicStream*) const; virtual std::string toString() const; virtual Ice::Short type() const; virtual Ice::Int timeout() const; virtual EndpointPtr timeout(Ice::Int) const; virtual bool secure() const; virtual bool datagram() const; virtual bool unknown() const; virtual ConnectorPtr connector() const; #ifndef ICEE_PURE_CLIENT virtual AcceptorPtr acceptor(EndpointPtr&) const; virtual bool publish() const; #endif virtual std::vector expand(bool) const; virtual bool operator==(const Endpoint&) const; virtual bool operator!=(const Endpoint&) const; virtual bool operator<(const Endpoint&) const; private: // // All members are const, because endpoints are immutable. // const InstancePtr _instance; const std::string _host; const Ice::Int _port; const Ice::Int _timeout; const bool _publish; }; } #endif IceE-1.2.0/src/TcpTransport/Connector.cpp0000644000076400007640000000307610607167247020143 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(Connector* p) { return p; } TransceiverPtr Connector::connect(int timeout) { if(_traceLevels->network >= 2) { Trace out(_logger, _traceLevels->networkCat); out << "trying to establish tcp connection to " << toString(); } SOCKET fd = createSocket(); setBlock(fd, false); doConnect(fd, _addr, timeout); #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS setBlock(fd, true); #endif if(_traceLevels->network >= 1) { Trace out(_logger, _traceLevels->networkCat); out << "tcp connection established\n" << fdToString(fd); } return new Transceiver(_instance, fd); } string Connector::toString() const { return addrToString(_addr); } Connector::Connector(const InstancePtr& instance, const string& host, int port) : _instance(instance), _traceLevels(instance->traceLevels()), _logger(instance->initializationData().logger) { getAddress(host, port, _addr); } Connector::~Connector() { } IceE-1.2.0/src/TcpTransport/Transceiver.cpp0000644000076400007640000003056210607167247020476 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(Transceiver* p) { return p; } void IceInternal::Transceiver::setTimeouts(int readTimeout, int writeTimeout) { _readTimeout = readTimeout; #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS setTimeout(_fd, true, _readTimeout); #endif _writeTimeout = writeTimeout; #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS setTimeout(_fd, false, _writeTimeout); #endif } SOCKET IceInternal::Transceiver::fd() { assert(_fd != INVALID_SOCKET); return _fd; } void IceInternal::Transceiver::close() { if(_traceLevels->network >= 1) { Trace out(_logger, _traceLevels->networkCat); out << "closing tcp connection\n" << toString(); } #ifdef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS #ifdef _WIN32 assert(_event != 0); WSACloseEvent(_event); WSACloseEvent(_readEvent); WSACloseEvent(_writeEvent); _event = 0; _readEvent = 0; _writeEvent = 0; #endif #endif assert(_fd != INVALID_SOCKET); try { closeSocket(_fd); _fd = INVALID_SOCKET; } catch(const SocketException&) { _fd = INVALID_SOCKET; throw; } } void IceInternal::Transceiver::shutdownWrite() { if(_traceLevels->network >= 2) { Trace out(_logger, _traceLevels->networkCat); out << "shutting down tcp connection for writing\n" << toString(); } assert(_fd != INVALID_SOCKET); shutdownSocketWrite(_fd); } void IceInternal::Transceiver::shutdownReadWrite() { if(_traceLevels->network >= 2) { Trace out(_logger, _traceLevels->networkCat); out << "shutting down tcp connection for reading and writing\n" << toString(); } assert(_fd != INVALID_SOCKET); shutdownSocketReadWrite(_fd); } void IceInternal::Transceiver::writeWithTimeout(Buffer& buf, int timeout) { Buffer::Container::difference_type packetSize = static_cast(buf.b.end() - buf.i); #ifdef _WIN32 // // Limit packet size to avoid performance problems on WIN32 // if(_isPeerLocal && packetSize > 64 * 1024) { packetSize = 64 * 1024; } #endif #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS if(timeout > 0 && timeout != _writeTimeout) { setTimeout(_fd, false, timeout); } try { #endif while(buf.i != buf.b.end()) { repeatSend: assert(_fd != INVALID_SOCKET); ssize_t ret = ::send(_fd, reinterpret_cast(&*buf.i), packetSize, 0); if(ret == 0) { ConnectionLostException ex(__FILE__, __LINE__); ex.error = 0; throw ex; } if(ret == SOCKET_ERROR) { if(interrupted()) { goto repeatSend; } if(noBuffers() && packetSize > 1024) { packetSize /= 2; goto repeatSend; } #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS if(timedout()) { throw TimeoutException(__FILE__, __LINE__); } #else if(wouldBlock()) { doSelect(false, timeout > 0 ? timeout : _writeTimeout); continue; } #endif if(connectionLost()) { ConnectionLostException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } if(_traceLevels->network >= 3) { Trace out(_logger, _traceLevels->networkCat); out << Ice::printfToString("sent %d of %d", ret, packetSize) << " bytes via tcp\n" << toString(); } buf.i += ret; if(packetSize > buf.b.end() - buf.i) { packetSize = static_cast(buf.b.end() - buf.i); } } #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS } catch(const Ice::LocalException&) { if(timeout > 0 && timeout != _writeTimeout) { try { setTimeout(_fd, false, _writeTimeout); } catch(const Ice::LocalException&) { // IGNORE } } throw; } if(timeout > 0 && timeout != _writeTimeout) { try { setTimeout(_fd, false, _writeTimeout); } catch(const Ice::LocalException&) { // IGNORE } } #endif } void IceInternal::Transceiver::readWithTimeout(Buffer& buf, int timeout) { assert(timeout != 0); Buffer::Container::difference_type packetSize = static_cast(buf.b.end() - buf.i); #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS if(timeout > 0 && timeout != _readTimeout) { setTimeout(_fd, true, timeout); } try { #endif while(buf.i != buf.b.end()) { repeatRead: assert(_fd != INVALID_SOCKET); ssize_t ret = ::recv(_fd, reinterpret_cast(&*buf.i), packetSize, 0); if(ret == 0) { // // If the connection is lost when reading data, we shut // down the write end of the socket. This helps to unblock // threads that are stuck in send() or select() while // sending data. Note: I don't really understand why // send() or select() sometimes don't detect a connection // loss. Therefore this helper to make them detect it. // //assert(_fd != INVALID_SOCKET); //shutdownSocketReadWrite(_fd); ConnectionLostException ex(__FILE__, __LINE__); ex.error = 0; throw ex; } if(ret == SOCKET_ERROR) { if(interrupted()) { goto repeatRead; } if(noBuffers() && packetSize > 1024) { packetSize /= 2; goto repeatRead; } #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS if(timedout()) { throw TimeoutException(__FILE__, __LINE__); } #else if(wouldBlock()) { doSelect(true, timeout > 0 ? timeout : _readTimeout); continue; } #endif if(connectionLost()) { // // See the commment above about shutting down the // socket if the connection is lost while reading // data. // //assert(_fd != INVALID_SOCKET); //shutdownSocketReadWrite(_fd); ConnectionLostException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } if(_traceLevels->network >= 3) { Trace out(_logger, _traceLevels->networkCat); out << Ice::printfToString("received %d of %d", ret, packetSize) << " bytes via tcp\n" << toString(); } buf.i += ret; if(packetSize > buf.b.end() - buf.i) { packetSize = static_cast(buf.b.end() - buf.i); } } #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS } catch(const Ice::LocalException&) { if(timeout > 0 && timeout != _readTimeout) { try { setTimeout(_fd, true, _readTimeout); } catch(const Ice::LocalException&) { // IGNORE } } throw; } if(timeout > 0 && timeout != _readTimeout) { try { setTimeout(_fd, true, _readTimeout); } catch(const Ice::LocalException&) { // IGNORE } } #endif } string IceInternal::Transceiver::type() const { return "tcp"; } string IceInternal::Transceiver::toString() const { return _desc; } IceInternal::Transceiver::Transceiver(const InstancePtr& instance, SOCKET fd) : _traceLevels(instance->traceLevels()), _logger(instance->initializationData().logger), _fd(fd), _readTimeout(-1), _writeTimeout(-1), _desc(fdToString(fd)) #ifdef _WIN32 , _isPeerLocal(isPeerLocal(fd)) #endif { #ifdef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS #ifdef _WIN32 _event = WSACreateEvent(); _readEvent = WSACreateEvent(); _writeEvent = WSACreateEvent(); if(_event == 0 || _readEvent == 0 || _writeEvent == 0) { int error = WSAGetLastError(); if(_event != 0) { WSACloseEvent(_event); } if(_readEvent != 0) { WSACloseEvent(_readEvent); } if(_writeEvent != 0) { WSACloseEvent(_writeEvent); } closeSocket(_fd); SocketException ex(__FILE__, __LINE__); ex.error = error; throw ex; } // // Select the READ, WRITE and CLOSE for trigging. // if(WSAEventSelect(_fd, _event, FD_READ|FD_WRITE|FD_CLOSE) == SOCKET_ERROR) { int error = WSAGetLastError(); WSACloseEvent(_event); WSACloseEvent(_readEvent); WSACloseEvent(_writeEvent); closeSocket(_fd); SocketException ex(__FILE__, __LINE__); ex.error = error; throw ex; } #else FD_ZERO(&_wFdSet); FD_ZERO(&_rFdSet); #endif #endif } IceInternal::Transceiver::~Transceiver() { assert(_fd == INVALID_SOCKET); #ifdef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS #ifdef _WIN32 assert(_event == 0); assert(_readEvent == 0); assert(_writeEvent == 0); #endif #endif } #ifdef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS void IceInternal::Transceiver::doSelect(bool read, int timeout) { while(true) { #ifdef _WIN32 // // This code is basically the same as the code in // ::send above. Check that for detailed comments. // WSAEVENT events[2]; events[0] = _event; events[1] = read ? _readEvent : _writeEvent; long tout = (timeout >= 0) ? timeout : WSA_INFINITE; DWORD rc = WSAWaitForMultipleEvents(2, events, FALSE, tout, FALSE); if(rc == WSA_WAIT_FAILED) { SocketException ex(__FILE__, __LINE__); ex.error = WSAGetLastError(); throw ex; } if(rc == WSA_WAIT_TIMEOUT) { assert(timeout >= 0); throw TimeoutException(__FILE__, __LINE__); } if(rc == WSA_WAIT_EVENT_0) { WSANETWORKEVENTS nevents; if(WSAEnumNetworkEvents(_fd, _event, &nevents) == SOCKET_ERROR) { SocketException ex(__FILE__, __LINE__); ex.error = WSAGetLastError(); throw ex; } // // If we're selecting for reading and have consumed a WRITE // event, set the _writeEvent event. Otherwise, if we're // selecting for writing have consumed a READ event, set the // _readEvent event. // if(read && nevents.lNetworkEvents & FD_WRITE) { WSASetEvent(_writeEvent); } else if(!read && nevents.lNetworkEvents & FD_READ) { WSASetEvent(_readEvent); } // // This checks for an error on the fd (this would // be same as recv itself returning an error). In // the event of an error we set the error code, // and repeat the error handling. // if(read && nevents.lNetworkEvents & FD_READ && nevents.iErrorCode[FD_READ_BIT] != 0) { WSASetLastError(nevents.iErrorCode[FD_READ_BIT]); } else if(!read && nevents.lNetworkEvents & FD_WRITE && nevents.iErrorCode[FD_WRITE_BIT] != 0) { WSASetLastError(nevents.iErrorCode[FD_WRITE_BIT]); } else if(nevents.lNetworkEvents & FD_CLOSE && nevents.iErrorCode[FD_CLOSE_BIT] != 0) { WSASetLastError(nevents.iErrorCode[FD_CLOSE_BIT]); } else { return; // No errors: we're done. } if(interrupted()) { continue; } if(connectionLost()) { // // See the commment above about shutting down the // socket if the connection is lost while reading // data. // //assert(_fd != INVALID_SOCKET); //shutdownSocketReadWrite(_fd); ConnectionLostException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } else { // // Otherwise the _readEvent or _writeEvent is set, reset it. // if(read) { WSAResetEvent(_readEvent); } else { WSAResetEvent(_writeEvent); } return; } #else int rs; assert(_fd != INVALID_SOCKET); if(read) { FD_SET(_fd, &_rFdSet); } else { FD_SET(_fd, &_wFdSet); } struct pollfd pollFd[1]; pollFd[0].fd = _fd; pollFd[0].events = read ? POLLIN : POLLOUT; rs = ::poll(pollFd, 1, timeout); if(rs == SOCKET_ERROR) { if(interrupted()) { continue; } SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } if(rs == 0) { throw TimeoutException(__FILE__, __LINE__); } return; #endif } } #endif IceE-1.2.0/src/IceE/0000755000076400007640000000000010620544002013620 5ustar matthewmatthewIceE-1.2.0/src/IceE/Proxy.cpp0000644000076400007640000004313310616576164015474 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #ifdef ICEE_HAS_ROUTER # include # include #endif #ifdef ICEE_HAS_LOCATOR # include # include #endif using namespace std; using namespace Ice; using namespace IceInternal; void Ice::__write(::IceInternal::BasicStream* __os, const ::Ice::Context& v, ::Ice::__U__Context) { __os->writeSize(::Ice::Int(v.size())); ::Ice::Context::const_iterator p; for(p = v.begin(); p != v.end(); ++p) { __os->write(p->first); __os->write(p->second); } } void Ice::__read(::IceInternal::BasicStream* __is, ::Ice::Context& v, ::Ice::__U__Context) { ::Ice::Int sz; __is->readSize(sz); while(sz--) { ::std::pair pair; __is->read(const_cast< ::std::string&>(pair.first)); ::Ice::Context::iterator __i = v.insert(v.end(), pair); __is->read(__i->second); } } ::Ice::ObjectPrx IceInternal::checkedCastImpl(const ObjectPrx& b, const string& f, const string& typeId) { // // COMPILERBUG: Without this work-around, release VC7.0 and VC7.1 // build crash when FacetNotExistException is raised // #if defined(_MSC_VER) && (_MSC_VER >= 1300) && (_MSC_VER <= 1310) ObjectPrx fooBar; #endif if(b) { ObjectPrx bb = b->ice_facet(f); try { if(bb->ice_isA(typeId)) { return bb; } #ifndef NDEBUG else { assert(typeId != "::Ice::Object"); } #endif } catch(const FacetNotExistException&) { } } return 0; } ::Ice::ObjectPrx IceInternal::checkedCastImpl(const ObjectPrx& b, const string& f, const string& typeId, const Context& ctx) { // // COMPILERBUG: Without this work-around, release VC7.0 build crash // when FacetNotExistException is raised // #if defined(_MSC_VER) && (_MSC_VER == 1300) ObjectPrx fooBar; #endif if(b) { ObjectPrx bb = b->ice_facet(f); try { if(bb->ice_isA(typeId, ctx)) { return bb; } #ifndef NDEBUG else { assert(typeId != "::Ice::Object"); } #endif } catch(const FacetNotExistException&) { } } return 0; } bool IceProxy::Ice::Object::operator==(const Object& r) const { return _reference == r._reference; } bool IceProxy::Ice::Object::operator<(const Object& r) const { return _reference < r._reference; } Int IceProxy::Ice::Object::ice_getHash() const { return _reference->hash(); } CommunicatorPtr IceProxy::Ice::Object::ice_getCommunicator() const { return _reference->getCommunicator(); } string IceProxy::Ice::Object::ice_toString() const { return _reference->toString(); } bool IceProxy::Ice::Object::ice_isA(const string& __id, const Context* __context) { int __cnt = 0; while(true) { ConnectionPtr __connection; try { __checkTwowayOnly("ice_isA"); static const string __operation("ice_isA"); __connection = ice_getConnection(); Outgoing __og(__connection.get(), _reference.get(), __operation, ::Ice::Nonmutating, __context); BasicStream* __stream = __og.stream(); try { __stream->write(__id, false); } catch(const ::Ice::LocalException& __ex) { __og.abort(__ex); } bool __ret; bool __ok = __og.invoke(); try { if(!__ok) { try { __stream->throwException(); } catch(const ::Ice::UserException& __ex) { throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name()); } } __stream->read(__ret); } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::LocalExceptionWrapper(__ex, false); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif return __ret; } catch(const LocalExceptionWrapper& __ex) { __handleExceptionWrapperRelaxed(__connection, __ex, __cnt); } catch(const LocalException& __ex) { __handleException(__connection, __ex, __cnt); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif } } void IceProxy::Ice::Object::ice_ping(const Context* __context) { int __cnt = 0; while(true) { ConnectionPtr __connection; try { static const string __operation("ice_ping"); __connection = ice_getConnection(); Outgoing __og(__connection.get(), _reference.get(), __operation, ::Ice::Nonmutating, __context); bool __ok = __og.invoke(); try { BasicStream* __is = __og.stream(); if(!__ok) { try { __is->throwException(); } catch(const ::Ice::UserException& __ex) { throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name()); } } } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::LocalExceptionWrapper(__ex, false); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif return; } catch(const LocalExceptionWrapper& __ex) { __handleExceptionWrapperRelaxed(__connection, __ex, __cnt); } catch(const LocalException& __ex) { __handleException(__connection, __ex, __cnt); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif } } vector IceProxy::Ice::Object::ice_ids(const Context* __context) { int __cnt = 0; while(true) { ConnectionPtr __connection; try { __checkTwowayOnly("ice_ids"); static const string __operation("ice_ids"); __connection = ice_getConnection(); Outgoing __og(__connection.get(), _reference.get(), __operation, ::Ice::Nonmutating, __context); vector __ret; bool __ok = __og.invoke(); try { BasicStream* __is = __og.stream(); if(!__ok) { try { __is->throwException(); } catch(const ::Ice::UserException& __ex) { throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name()); } } __is->read(__ret, false); } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::LocalExceptionWrapper(__ex, false); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif return __ret; } catch(const LocalExceptionWrapper& __ex) { __handleExceptionWrapperRelaxed(__connection, __ex, __cnt); } catch(const LocalException& __ex) { __handleException(__connection, __ex, __cnt); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif } } string IceProxy::Ice::Object::ice_id(const Context* __context) { int __cnt = 0; while(true) { ConnectionPtr __connection; try { __checkTwowayOnly("ice_id"); static const string __operation("ice_id"); __connection = ice_getConnection(); Outgoing __og(__connection.get(), _reference.get(), __operation, ::Ice::Nonmutating, __context); string __ret; bool __ok = __og.invoke(); try { BasicStream* __is = __og.stream(); if(!__ok) { try { __is->throwException(); } catch(const ::Ice::UserException& __ex) { throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name()); } } __is->read(__ret, false); } catch(const ::Ice::LocalException& __ex) { throw ::IceInternal::LocalExceptionWrapper(__ex, false); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif return __ret; } catch(const LocalExceptionWrapper& __ex) { __handleExceptionWrapperRelaxed(__connection, __ex, __cnt); } catch(const LocalException& __ex) { __handleException(__connection, __ex, __cnt); } #if defined(_MSC_VER) && defined(_M_ARM) // ARM bug. catch(...) { throw; } #endif } } Context IceProxy::Ice::Object::ice_getContext() const { return *_reference->getContext(); } ObjectPrx IceProxy::Ice::Object::ice_context(const Context& newContext) const { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(_reference->changeContext(newContext)); return proxy; } Identity IceProxy::Ice::Object::ice_getIdentity() const { return _reference->getIdentity(); } ObjectPrx IceProxy::Ice::Object::ice_identity(const Identity& newIdentity) const { if(newIdentity.name.empty()) { throw IllegalIdentityException(__FILE__, __LINE__); } if(newIdentity == _reference->getIdentity()) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(_reference->changeIdentity(newIdentity)); return proxy; } } const string& IceProxy::Ice::Object::ice_getFacet() const { return _reference->getFacet(); } ObjectPrx IceProxy::Ice::Object::ice_facet(const string& newFacet) const { if(newFacet == _reference->getFacet()) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(_reference->changeFacet(newFacet)); return proxy; } } #ifdef ICEE_HAS_ROUTER RouterPrx IceProxy::Ice::Object::ice_getRouter() const { RouterInfoPtr ri = _reference->getRouterInfo(); return ri ? ri->getRouter() : RouterPrx(); } ObjectPrx IceProxy::Ice::Object::ice_router(const RouterPrx& router) const { ReferencePtr ref = _reference->changeRouter(router); if(ref == _reference) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(ref); return proxy; } } #endif #ifdef ICEE_HAS_LOCATOR string IceProxy::Ice::Object::ice_getAdapterId() const { return _reference->getAdapterId(); } ObjectPrx IceProxy::Ice::Object::ice_adapterId(const string& adapterId) const { ReferencePtr ref = _reference->changeAdapterId(adapterId); if(ref == _reference) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(ref); return proxy; } } LocatorPrx IceProxy::Ice::Object::ice_getLocator() const { LocatorInfoPtr ri = _reference->getLocatorInfo(); return ri ? ri->getLocator() : LocatorPrx(); } ObjectPrx IceProxy::Ice::Object::ice_locator(const LocatorPrx& locator) const { ReferencePtr ref = _reference->changeLocator(locator); if(ref == _reference) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(ref); return proxy; } } #endif bool IceProxy::Ice::Object::ice_isSecure() const { return _reference->getSecure(); } ObjectPrx IceProxy::Ice::Object::ice_secure(bool b) const { if(b == _reference->getSecure()) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(_reference->changeSecure(b)); return proxy; } } ObjectPrx IceProxy::Ice::Object::ice_timeout(int t) const { ReferencePtr ref = _reference->changeTimeout(t); if(ref == _reference) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(ref); return proxy; } } ConnectionPtr IceProxy::Ice::Object::ice_getConnection() { ::IceUtil::Mutex::Lock sync(*this); if(!_connection) { _connection = _reference->getConnection(); // // If this proxy is for a non-local object, and we are // using a router, then add this proxy to the router info // object. // #ifdef ICEE_HAS_ROUTER RouterInfoPtr ri = _reference->getRouterInfo(); if(ri) { ri->addProxy(this); } #endif } return _connection; } ConnectionPtr IceProxy::Ice::Object::ice_getCachedConnection() const { ::IceUtil::Mutex::Lock sync(*this); return _connection; } void IceProxy::Ice::Object::__copyFrom(const ObjectPrx& from) { ReferencePtr ref; ConnectionPtr con; { ::IceUtil::Mutex::Lock sync(*from.get()); ref = from->_reference; con = from->_connection; } // // No need to synchronize "*this", as this operation is only // called upon initialization. // assert(!_reference); assert(!_connection); _reference = ref; _connection = con; } void IceProxy::Ice::Object::__handleException(const ConnectionPtr& connection, const LocalException& ex, int& cnt) { // // Only _connection needs to be mutex protected here. // { ::IceUtil::Mutex::Lock sync(*this); if(connection.get() == _connection.get()) { _connection = 0; } } ProxyFactoryPtr proxyFactory = _reference->getInstance()->proxyFactory(); if(proxyFactory) { proxyFactory->checkRetryAfterException(ex, _reference, cnt); } else { // // The communicator is already destroyed, so we cannot retry. // ex.ice_throw(); } } void IceProxy::Ice::Object::__handleExceptionWrapper(const ConnectionPtr& connection, const LocalExceptionWrapper& ex) { { IceUtil::Mutex::Lock sync(*this); if(connection.get() == _connection.get()) { _connection = 0; } } if(!ex.retry()) { ex.get()->ice_throw(); } } void IceProxy::Ice::Object::__handleExceptionWrapperRelaxed(const ConnectionPtr& connection, const LocalExceptionWrapper& ex, int& cnt) { if(!ex.retry()) { __handleException(connection, *ex.get(), cnt); } else { IceUtil::Mutex::Lock sync(*this); if(connection.get() == _connection.get()) { _connection = 0; } } } void IceProxy::Ice::Object::__checkTwowayOnly(const char* name) const { // // No mutex lock necessary, there is nothing mutable in this // operation. // if(!ice_isTwoway()) { TwowayOnlyException ex(__FILE__, __LINE__); ex.operation = name; throw ex; } } ReferenceMode IceProxy::Ice::Object::getMode() const { return _reference->getMode(); } ObjectPrx IceProxy::Ice::Object::changeMode(ReferenceMode newMode) const { if(_reference->getMode() == newMode) { return ObjectPrx(const_cast< ::IceProxy::Ice::Object*>(this)); } else { ObjectPrx proxy(new ::IceProxy::Ice::Object()); proxy->setup(_reference->changeMode(newMode)); return proxy; } } bool Ice::proxyIdentityLess(const ObjectPrx& lhs, const ObjectPrx& rhs) { if(!lhs && !rhs) { return false; } else if(!lhs && rhs) { return true; } else if(lhs && !rhs) { return false; } else { return lhs->ice_getIdentity() < rhs->ice_getIdentity(); } } bool Ice::proxyIdentityEqual(const ObjectPrx& lhs, const ObjectPrx& rhs) { if(!lhs && !rhs) { return true; } else if(!lhs && rhs) { return false; } else if(lhs && !rhs) { return false; } else { return lhs->ice_getIdentity() == rhs->ice_getIdentity(); } } bool Ice::proxyIdentityAndFacetLess(const ObjectPrx& lhs, const ObjectPrx& rhs) { if(!lhs && !rhs) { return false; } else if(!lhs && rhs) { return true; } else if(lhs && !rhs) { return false; } else { Identity lhsIdentity = lhs->ice_getIdentity(); Identity rhsIdentity = rhs->ice_getIdentity(); if(lhsIdentity < rhsIdentity) { return true; } else if(rhsIdentity < lhsIdentity) { return false; } string lhsFacet = lhs->ice_getFacet(); string rhsFacet = rhs->ice_getFacet(); if(lhsFacet < rhsFacet) { return true; } else if(rhsFacet < lhsFacet) { return false; } return false; } } bool Ice::proxyIdentityAndFacetEqual(const ObjectPrx& lhs, const ObjectPrx& rhs) { if(!lhs && !rhs) { return true; } else if(!lhs && rhs) { return false; } else if(lhs && !rhs) { return false; } else { Identity lhsIdentity = lhs->ice_getIdentity(); Identity rhsIdentity = rhs->ice_getIdentity(); if(lhsIdentity == rhsIdentity) { string lhsFacet = lhs->ice_getFacet(); string rhsFacet = rhs->ice_getFacet(); if(lhsFacet == rhsFacet) { return true; } } return false; } } IceE-1.2.0/src/IceE/Outgoing.cpp0000644000076400007640000002456010616576164016151 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include // Need to be included before Outgoing.h because of std::auto_ptr #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceInternal::LocalExceptionWrapper::LocalExceptionWrapper(const LocalException& ex, bool r) : _retry(r) { _ex.reset(dynamic_cast(ex.ice_clone())); } IceInternal::LocalExceptionWrapper::LocalExceptionWrapper(const LocalExceptionWrapper& ex) : _retry(ex._retry) { _ex.reset(dynamic_cast(ex.get()->ice_clone())); } const LocalException* IceInternal::LocalExceptionWrapper::get() const { assert(_ex.get()); return _ex.get(); } bool IceInternal::LocalExceptionWrapper::retry() const { return _retry; } IceInternal::Outgoing::Outgoing(Connection* connection, Reference* ref, const string& operation, OperationMode mode, const Context* context) : _connection(connection), _reference(ref), _state(StateUnsent), _stream(ref->getInstance().get(), ref->getInstance()->messageSizeMax() #ifdef ICEE_HAS_WSTRING , ref->getInstance()->initializationData().stringConverter, ref->getInstance()->initializationData().wstringConverter #endif ) { switch(_reference->getMode()) { case ReferenceModeTwoway: case ReferenceModeOneway: { _stream.writeBlob(requestHdr, sizeof(requestHdr)); break; } case ReferenceModeBatchOneway: #ifdef ICEE_HAS_BATCH { _connection->prepareBatchRequest(&_stream); break; } #endif case ReferenceModeDatagram: case ReferenceModeBatchDatagram: { assert(false); break; } } // _reference->getIdentity().__write(&_stream); _stream.write(_reference->getIdentity().name); // Directly write name for performance reasons. _stream.write(_reference->getIdentity().category); // Directly write category for performance reasons. // // For compatibility with the old FacetPath we still write an // array of strings (we don't use the basic stream string array // method here for performance reasons.) // if(_reference->getFacet().empty()) { _stream.writeSize(0); } else { _stream.writeSize(1); _stream.write(_reference->getFacet()); } _stream.write(operation, false); _stream.write(static_cast(mode)); if(context == 0) { context = _reference->getContext(); } _stream.writeSize(Int(context->size())); Context::const_iterator p; for(p = context->begin(); p != context->end(); ++p) { _stream.write(p->first); _stream.write(p->second); } // // Input and output parameters are always sent in an // encapsulation, which makes it possible to forward requests as // blobs. // _stream.startWriteEncaps(); } bool IceInternal::Outgoing::invoke() { assert(_state == StateUnsent); _state = StateInProgress; _stream.endWriteEncaps(); switch(_reference->getMode()) { case ReferenceModeTwoway: { // // We let all exceptions raised by sending directly // propagate to the caller, because they can be retried // without violating "at-most-once". In case of such // exceptions, the connection object does not call back on // this object, so we don't need to lock the mutex, keep // track of state, or save exceptions. // _connection->sendRequest(&_stream, this); if(_exception.get()) { // // A CloseConnectionException indicates graceful // server shutdown, and is therefore always repeatable // without violating "at-most-once". That's because by // sending a close connection message, the server // guarantees that all outstanding requests can safely // be repeated. // // An ObjectNotExistException can always be retried as // well without violating "at-most-once". // if(dynamic_cast(_exception.get()) || dynamic_cast(_exception.get())) { _exception->ice_throw(); } // // Throw the exception wrapped in a LocalExceptionWrapper, to // indicate that the request cannot be resent without // potentially violating the "at-most-once" principle. // throw LocalExceptionWrapper(*_exception.get(), false); } if(_state == StateUserException) { return false; } assert(_state == StateOK); break; } case ReferenceModeOneway: { // // For oneway requests, the connection object // never calls back on this object. Therefore we don't // need to lock the mutex or save exceptions. We simply // let all exceptions from sending propagate to the // caller, because such exceptions can be retried without // violating "at-most-once". // _connection->sendRequest(&_stream, 0); break; } case ReferenceModeBatchOneway: #ifdef ICEE_HAS_BATCH { // // For batch oneways, the same rules as for // regular oneways (see comment above) // apply. // _connection->finishBatchRequest(&_stream); break; } #endif case ReferenceModeDatagram: case ReferenceModeBatchDatagram: { assert(false); return false; } } return true; } void IceInternal::Outgoing::abort(const LocalException& ex) { assert(_state == StateUnsent); // // If we didn't finish a batch oneway request, we must // notify the connection about that we give up ownership of the // batch stream. // #ifdef ICEE_HAS_BATCH if(_reference->getMode() == ReferenceModeBatchOneway) { _connection->abortBatchRequest(); // // If we abort a batch requests, we cannot retry, because not // only the batch request that caused the problem will be // aborted, but all other requests in the batch as well. // throw LocalExceptionWrapper(ex, false); } #endif ex.ice_throw(); } void IceInternal::Outgoing::finished(BasicStream& is) { assert(_reference->getMode() == ReferenceModeTwoway); // Can only be called for twoways. assert(_state <= StateInProgress); // // Only swap the stream if the given stream is not this Outgoing object stream! // if(&is != &_stream) { _stream.swap(is); } Byte status; _stream.read(status); switch(static_cast(status)) { case DispatchOK: { // // Input and output parameters are always sent in an // encapsulation, which makes it possible to forward // oneway requests as blobs. // _stream.startReadEncaps(); _state = StateOK; // The state must be set last, in case there is an exception. break; } case DispatchUserException: { // // Input and output parameters are always sent in an // encapsulation, which makes it possible to forward // oneway requests as blobs. // _stream.startReadEncaps(); _state = StateUserException; // The state must be set last, in case there is an exception. break; } case DispatchObjectNotExist: case DispatchFacetNotExist: case DispatchOperationNotExist: { // // Don't read the exception members directly into the // exception. Otherwise if reading fails and raises an // exception, you will have a memory leak. // Identity ident; ident.__read(&_stream); // // For compatibility with the old FacetPath. // vector facetPath; _stream.read(facetPath); string facet; if(!facetPath.empty()) { if(facetPath.size() > 1) { throw MarshalException(__FILE__, __LINE__); } facet.swap(facetPath[0]); } string operation; _stream.read(operation, false); RequestFailedException* ex; switch(static_cast(status)) { case DispatchObjectNotExist: { ex = new ObjectNotExistException(__FILE__, __LINE__); break; } case DispatchFacetNotExist: { ex = new FacetNotExistException(__FILE__, __LINE__); break; } case DispatchOperationNotExist: { ex = new OperationNotExistException(__FILE__, __LINE__); break; } default: { ex = 0; // To keep the compiler from complaining. assert(false); break; } } ex->id = ident; ex->facet = facet; ex->operation = operation; _exception.reset(ex); _state = StateLocalException; // The state must be set last, in case there is an exception. break; } case DispatchUnknownException: case DispatchUnknownLocalException: case DispatchUnknownUserException: { // // Don't read the exception members directly into the // exception. Otherwise if reading fails and raises an // exception, you will have a memory leak. // string unknown; _stream.read(unknown, false); UnknownException* ex; switch(static_cast(status)) { case DispatchUnknownException: { ex = new UnknownException(__FILE__, __LINE__); break; } case DispatchUnknownLocalException: { ex = new UnknownLocalException(__FILE__, __LINE__); break; } case DispatchUnknownUserException: { ex = new UnknownUserException(__FILE__, __LINE__); break; } default: { ex = 0; // To keep the compiler from complaining. assert(false); break; } } ex->unknown = unknown; _exception.reset(ex); _state = StateLocalException; // The state must be set last, in case there is an exception. break; } default: { //_exception.reset(new UnknownReplyStatusException(__FILE__, __LINE__)); _exception.reset(new ProtocolException(__FILE__, __LINE__, "unknown reply status")); _state = StateLocalException; break; } } } void IceInternal::Outgoing::finished(const LocalException& ex) { assert(_reference->getMode() == ReferenceModeTwoway); // Can only be called for twoways. assert(_state <= StateInProgress); _state = StateLocalException; _exception.reset(dynamic_cast(ex.ice_clone())); } IceE-1.2.0/src/IceE/DefaultsAndOverrides.cpp0000644000076400007640000000317610602152305020411 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(DefaultsAndOverrides* p) { return p; } IceInternal::DefaultsAndOverrides::DefaultsAndOverrides(const PropertiesPtr& properties) : overrideTimeout(false), overrideTimeoutValue(-1), overrideConnectTimeout(false), overrideConnectTimeoutValue(-1) { const_cast(defaultHost) = properties->getProperty("Ice.Default.Host"); #ifdef ICEE_HAS_ROUTER const_cast(defaultRouter) = properties->getProperty("Ice.Default.Router"); #endif string value; value = properties->getProperty("Ice.Override.Timeout"); if(!value.empty()) { const_cast(overrideTimeout) = true; const_cast(overrideTimeoutValue) = properties->getPropertyAsInt("Ice.Override.Timeout"); } value = properties->getProperty("Ice.Override.ConnectTimeout"); if(!value.empty()) { const_cast(overrideConnectTimeout) = true; const_cast(overrideConnectTimeoutValue) = properties->getPropertyAsInt("Ice.Override.ConnectTimeout"); } #ifdef ICEE_HAS_LOCATOR const_cast(defaultLocator) = properties->getProperty("Ice.Default.Locator"); #endif } IceE-1.2.0/src/IceE/ServantManager.h0000644000076400007640000000271010604226663016722 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_SERVANT_MANAGER_H #define ICEE_SERVANT_MANAGER_H #include #include #include #include #include #include namespace IceInternal { class ServantManager : public IceUtil::Shared, public IceUtil::Mutex { public: void addServant(const Ice::ObjectPtr&, const Ice::Identity&, const std::string&); Ice::ObjectPtr removeServant(const Ice::Identity&, const std::string&); Ice::FacetMap removeAllFacets(const Ice::Identity&); Ice::ObjectPtr findServant(const Ice::Identity&, const std::string&) const; Ice::FacetMap findAllFacets(const Ice::Identity&) const; bool hasServant(const Ice::Identity&) const; private: ServantManager(const InstancePtr&, const std::string&); ~ServantManager(); void destroy(); friend class Ice::ObjectAdapter; InstancePtr _instance; const std::string _adapterName; typedef std::map ServantMapMap; ServantMapMap _servantMapMap; mutable ServantMapMap::iterator _servantMapMapHint; }; } #endif IceE-1.2.0/src/IceE/ExceptionBase.cpp0000755000076400007640000000565610614125577017113 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include using namespace std; namespace IceUtil { bool nullHandleAbort = false; }; IceUtil::Exception::Exception() : _file(0), _line(0) { } IceUtil::Exception::Exception(const char* file, int line) : _file(file), _line(line) { } IceUtil::Exception::~Exception() throw() { } const char* IceUtil::Exception::_name = "IceUtil::Exception"; string IceUtil::Exception::ice_name() const { return _name; } string IceUtil::Exception::toString() const { string out; if(_file && _line > 0) { out += Ice::printfToString("%s:%d: ", _file, _line); } out += ice_name(); return out; } const char* IceUtil::Exception::what() const throw() { StaticMutex::Lock lock(globalMutex); { if(_str.empty()) { _str = toString(); // Lazy initialization. } } return _str.c_str(); } IceUtil::Exception* IceUtil::Exception::ice_clone() const { return new Exception(*this); } void IceUtil::Exception::ice_throw() const { throw *this; } const char* IceUtil::Exception::ice_file() const { return _file; } int IceUtil::Exception::ice_line() const { return _line; } IceUtil::NullHandleException::NullHandleException(const char* file, int line) : Exception(file, line) { if(nullHandleAbort) { #ifdef _WIN32_WCE // // WinCE does not appear to have abort() // exit(-1); #else abort(); #endif } } IceUtil::NullHandleException::~NullHandleException() throw() { } const char* IceUtil::NullHandleException::_name = "IceUtil::NullHandleException"; string IceUtil::NullHandleException::ice_name() const { return _name; } IceUtil::Exception* IceUtil::NullHandleException::ice_clone() const { return new NullHandleException(*this); } void IceUtil::NullHandleException::ice_throw() const { throw *this; } IceUtil::IllegalArgumentException::IllegalArgumentException(const char* file, int line) : Exception(file, line) { } IceUtil::IllegalArgumentException::IllegalArgumentException(const char* file, int line, const string& r) : Exception(file, line), reason(r) { } IceUtil::IllegalArgumentException::~IllegalArgumentException() throw() { } const char* IceUtil::IllegalArgumentException::_name = "IceUtil::IllegalArgumentException"; string IceUtil::IllegalArgumentException::ice_name() const { return _name; } IceUtil::Exception* IceUtil::IllegalArgumentException::ice_clone() const { return new IllegalArgumentException(*this); } void IceUtil::IllegalArgumentException::ice_throw() const { throw *this; } IceE-1.2.0/src/IceE/ReferenceFactory.cpp0000644000076400007640000004165410616576164017607 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #ifdef ICEE_HAS_ROUTER # include # include #endif #ifdef ICEE_HAS_LOCATOR # include # include #endif #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(::IceInternal::ReferenceFactory* p) { return p; } ReferencePtr IceInternal::ReferenceFactory::copy(const Reference* r) const { Mutex::Lock sync(*this); if(!_instance) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } const Ice::Identity& ident = r->getIdentity(); if(ident.name.empty() && ident.category.empty()) { return 0; } return r->clone(); } ReferencePtr IceInternal::ReferenceFactory::create(const Identity& ident, const Context& context, const string& facet, ReferenceMode mode, bool secure, const vector& endpoints #ifdef ICEE_HAS_ROUTER , const RouterInfoPtr& routerInfo #endif ) { Mutex::Lock sync(*this); if(!_instance) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } if(ident.name.empty() && ident.category.empty()) { return 0; } // // Create new reference // #ifdef ICEE_HAS_ROUTER return new DirectReference(_instance, _communicator, ident, context, facet, mode, secure, endpoints, routerInfo); #else return new DirectReference(_instance, _communicator, ident, context, facet, mode, secure, endpoints); #endif } #ifdef ICEE_HAS_LOCATOR ReferencePtr IceInternal::ReferenceFactory::create(const Identity& ident, const Context& context, const string& facet, ReferenceMode mode, bool secure, const string& adapterId #ifdef ICEE_HAS_ROUTER , const RouterInfoPtr& routerInfo #endif , const LocatorInfoPtr& locatorInfo) { Mutex::Lock sync(*this); if(!_instance) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } if(ident.name.empty() && ident.category.empty()) { return 0; } // // Create new reference // #ifdef ICEE_HAS_ROUTER return new IndirectReference(_instance, _communicator, ident, context, facet, mode, secure, adapterId, routerInfo, locatorInfo); #else return new IndirectReference(_instance, _communicator, ident, context, facet, mode, secure, adapterId, locatorInfo); #endif } #endif ReferencePtr IceInternal::ReferenceFactory::create(const Identity& ident, const Context& context, const string& facet, ReferenceMode mode, const vector& fixedConnections) { Mutex::Lock sync(*this); if(!_instance) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } if(ident.name.empty() && ident.category.empty()) { return 0; } // // Create new reference // return new FixedReference(_instance, _communicator, ident, context, facet, mode, fixedConnections); } ReferencePtr IceInternal::ReferenceFactory::create(const string& str) { if(str.empty()) { return 0; } const string delim = " \t\n\r"; string s(str); string::size_type beg; string::size_type end = 0; beg = s.find_first_not_of(delim, end); if(beg == string::npos) { throw ProxyParseException(__FILE__, __LINE__, str); } // // Extract the identity, which may be enclosed in single // or double quotation marks. // string idstr; end = IceUtil::checkQuote(s, beg); if(end == string::npos) { throw ProxyParseException(__FILE__, __LINE__, str); } else if(end == 0) { end = s.find_first_of(delim + ":@", beg); if(end == string::npos) { end = s.size(); } idstr = s.substr(beg, end - beg); } else { beg++; // Skip leading quote idstr = s.substr(beg, end - beg); end++; // Skip trailing quote } if(beg == end) { throw ProxyParseException(__FILE__, __LINE__, str); } // // Parsing the identity may raise IdentityParseException. // Identity ident = _instance->stringToIdentity(idstr); if(ident.name.empty()) { // // An identity with an empty name and a non-empty // category is illegal. // if(!ident.category.empty()) { throw IllegalIdentityException(__FILE__, __LINE__, ident); } // // Treat a stringified proxy containing two double // quotes ("") the same as an empty string, i.e., // a null proxy, but only if nothing follows the // quotes. // else if(s.find_first_not_of(delim, end) != string::npos) { throw ProxyParseException(__FILE__, __LINE__, str); } else { return 0; } } string facet; ReferenceMode mode = ReferenceModeTwoway; bool secure = false; string adapter; while(true) { beg = s.find_first_not_of(delim, end); if(beg == string::npos) { break; } if(s[beg] == ':' || s[beg] == '@') { break; } end = s.find_first_of(delim + ":@", beg); if(end == string::npos) { end = s.length(); } if(beg == end) { break; } string option = s.substr(beg, end - beg); if(option.length() != 2 || option[0] != '-') { throw ProxyParseException(__FILE__, __LINE__, str); } // // Check for the presence of an option argument. The // argument may be enclosed in single or double // quotation marks. // string argument; string::size_type argumentBeg = s.find_first_not_of(delim, end); if(argumentBeg != string::npos) { if(s[argumentBeg] != '@' && s[argumentBeg] != ':' && s[argumentBeg] != '-') { beg = argumentBeg; end = IceUtil::checkQuote(s, beg); if(end == string::npos) { throw ProxyParseException(__FILE__, __LINE__, str); } else if(end == 0) { end = s.find_first_of(delim + ":@", beg); if(end == string::npos) { end = s.size(); } argument = s.substr(beg, end - beg); } else { beg++; // Skip leading quote argument = s.substr(beg, end - beg); end++; // Skip trailing quote } } } // // If any new options are added here, // IceInternal::Reference::toString() and its derived classes must be updated as well. // switch(option[1]) { case 'f': { if(argument.empty()) { throw ProxyParseException(__FILE__, __LINE__, str); } if(!IceUtil::unescapeString(argument, 0, argument.size(), facet)) { throw ProxyParseException(__FILE__, __LINE__, str); } #ifdef ICEE_HAS_WSTRING if(_instance->initializationData().stringConverter) { string tmpFacet; _instance->initializationData().stringConverter->fromUTF8( reinterpret_cast(facet.data()), reinterpret_cast(facet.data() + facet.size()), tmpFacet); facet = tmpFacet; } #endif break; } case 't': { if(!argument.empty()) { throw ProxyParseException(__FILE__, __LINE__, str); } mode = ReferenceModeTwoway; break; } case 'o': { if(!argument.empty()) { throw ProxyParseException(__FILE__, __LINE__, str); } mode = ReferenceModeOneway; break; } case 'O': { if(!argument.empty()) { throw ProxyParseException(__FILE__, __LINE__, str); } mode = ReferenceModeBatchOneway; break; } case 'd': { if(!argument.empty()) { throw ProxyParseException(__FILE__, __LINE__, str); } mode = ReferenceModeDatagram; break; } case 'D': { if(!argument.empty()) { throw ProxyParseException(__FILE__, __LINE__, str); } mode = ReferenceModeBatchDatagram; break; } case 's': { if(!argument.empty()) { throw ProxyParseException(__FILE__, __LINE__, str); } secure = true; break; } default: { throw ProxyParseException(__FILE__, __LINE__, str); } } } #ifdef ICEE_HAS_ROUTER RouterInfoPtr routerInfo = _instance->routerManager()->get(getDefaultRouter()); #endif #ifdef ICEE_HAS_LOCATOR LocatorInfoPtr locatorInfo = _instance->locatorManager()->get(getDefaultLocator()); #endif if(beg == string::npos) { #ifdef ICEE_HAS_LOCATOR # ifdef ICEE_HAS_ROUTER return create(ident, Ice::Context(), facet, mode, secure, "", routerInfo, locatorInfo); # else return create(ident, Ice::Context(), facet, mode, secure, "", locatorInfo); # endif #else throw FeatureNotSupportedException(__FILE__, __LINE__, "indirect proxy `" + str + "' (no locator support built-in)"); #endif } vector endpoints; switch(s[beg]) { case ':': { vector unknownEndpoints; end = beg; while(end < s.length() && s[end] == ':') { beg = end + 1; end = s.find(':', beg); if(end == string::npos) { end = s.length(); } string es = s.substr(beg, end - beg); EndpointPtr endp = _instance->endpointFactory()->create(es); if(endp != 0) { vector endps = endp->expand(false); endpoints.insert(endpoints.end(), endps.begin(), endps.end()); } else { unknownEndpoints.push_back(es); } } if(endpoints.size() == 0) { throw EndpointParseException(__FILE__, __LINE__, unknownEndpoints.front()); } else if(unknownEndpoints.size() != 0 && _instance->initializationData().properties->getPropertyAsIntWithDefault( "Ice.Warn.Endpoints", 1) > 0) { Warning out(_instance->initializationData().logger); out << "Proxy contains unknown endpoints:"; for(unsigned int idx = 0; idx < unknownEndpoints.size(); ++idx) { out << " `" << unknownEndpoints[idx] << "'"; } } #ifdef ICEE_HAS_ROUTER return create(ident, Ice::Context(), facet, mode, secure, endpoints, routerInfo); #else return create(ident, Ice::Context(), facet, mode, secure, endpoints); #endif break; } case '@': { #ifdef ICEE_HAS_LOCATOR beg = s.find_first_not_of(delim, beg + 1); if(beg == string::npos) { throw ProxyParseException(__FILE__, __LINE__, str); } string adapterstr; end = IceUtil::checkQuote(s, beg); if(end == string::npos) { throw ProxyParseException(__FILE__, __LINE__, str); } else if(end == 0) { end = s.find_first_of(delim, beg); if(end == string::npos) { end = s.size(); } adapterstr = s.substr(beg, end - beg); } else { beg++; // Skip leading quote adapterstr = s.substr(beg, end - beg); end++; // Skip trailing quote. } // Check for trailing whitespace. if(end != string::npos && s.find_first_not_of(delim, end) != string::npos) { throw ProxyParseException(__FILE__, __LINE__, str); } if(!IceUtil::unescapeString(adapterstr, 0, adapterstr.size(), adapter) || adapter.size() == 0) { throw ProxyParseException(__FILE__, __LINE__, str); } #ifdef ICEE_HAS_WSTRING if(_instance->initializationData().stringConverter) { string tmpAdapter; _instance->initializationData().stringConverter->fromUTF8( reinterpret_cast(adapter.data()), reinterpret_cast(adapter.data() + adapter.size()), tmpAdapter); adapter = tmpAdapter; } #endif #ifdef ICEE_HAS_ROUTER return create(ident, Ice::Context(), facet, mode, secure, adapter, routerInfo, locatorInfo); #else return create(ident, Ice::Context(), facet, mode, secure, adapter, locatorInfo); #endif #else throw FeatureNotSupportedException(__FILE__, __LINE__, "indirect proxy `" + str + "' (no locator support built-in)"); #endif break; } default: { throw ProxyParseException(__FILE__, __LINE__, str); } } return 0; // Unreachable, fixes compiler warning. } ReferencePtr IceInternal::ReferenceFactory::createFromProperties(const string& propertyPrefix) { PropertiesPtr properties = _instance->initializationData().properties; ReferencePtr ref = create(properties->getProperty(propertyPrefix)); if(!ref) { return 0; } #ifdef ICEE_HAS_LOCATOR string property = propertyPrefix + ".Locator"; if(!properties->getProperty(property).empty()) { ref = ref->changeLocator( LocatorPrx::uncheckedCast(_communicator->propertyToProxy(property))); } #endif #ifdef ICEE_HAS_ROUTER property = propertyPrefix + ".Router"; if(!properties->getProperty(property).empty()) { ref = ref->changeRouter( RouterPrx::uncheckedCast(_communicator->propertyToProxy(property))); } #endif return ref; } ReferencePtr IceInternal::ReferenceFactory::create(const Identity& ident, BasicStream* s) { // // Don't read the identity here. Operations calling this // constructor read the identity, and pass it as a parameter. // if(ident.name.empty() && ident.category.empty()) { return 0; } // // For compatibility with the old FacetPath. // vector facetPath; s->read(facetPath); string facet; if(!facetPath.empty()) { if(facetPath.size() > 1) { throwProxyUnmarshalException(__FILE__, __LINE__); } facet.swap(facetPath[0]); } Byte modeAsByte; s->read(modeAsByte); ReferenceMode mode = static_cast(modeAsByte); if(mode < 0 || mode > ReferenceModeLast) { throwProxyUnmarshalException(__FILE__, __LINE__); } vector endpoints; string adapterId; #ifdef ICEE_HAS_ROUTER RouterInfoPtr routerInfo = _instance->routerManager()->get(getDefaultRouter()); #endif bool secure; s->read(secure); Ice::Int sz; s->readSize(sz); if(sz > 0) { endpoints.reserve(sz); while(sz--) { EndpointPtr endpoint = _instance->endpointFactory()->read(s); endpoints.push_back(endpoint); } #ifdef ICEE_HAS_ROUTER return create(ident, Ice::Context(), facet, mode, secure, endpoints, routerInfo); #else return create(ident, Ice::Context(), facet, mode, secure, endpoints); #endif } else { #ifdef ICEE_HAS_LOCATOR LocatorInfoPtr locatorInfo = _instance->locatorManager()->get(getDefaultLocator()); s->read(adapterId); # ifdef ICEE_HAS_ROUTER return create(ident, Ice::Context(), facet, mode, secure, adapterId, routerInfo, locatorInfo); # else return create(ident, Ice::Context(), facet, mode, secure, adapterId, locatorInfo); # endif #else throwProxyUnmarshalException(__FILE__, __LINE__); return 0; // Unreachable, fixes compiler warning. #endif } } #ifdef ICEE_HAS_ROUTER void IceInternal::ReferenceFactory::setDefaultRouter(const RouterPrx& defaultRouter) { IceUtil::Mutex::Lock sync(*this); _defaultRouter = defaultRouter; } RouterPrx IceInternal::ReferenceFactory::getDefaultRouter() const { IceUtil::Mutex::Lock sync(*this); return _defaultRouter; } #endif #ifdef ICEE_HAS_LOCATOR void IceInternal::ReferenceFactory::setDefaultLocator(const LocatorPrx& defaultLocator) { IceUtil::Mutex::Lock sync(*this); _defaultLocator = defaultLocator; } LocatorPrx IceInternal::ReferenceFactory::getDefaultLocator() const { IceUtil::Mutex::Lock sync(*this); return _defaultLocator; } #endif IceInternal::ReferenceFactory::ReferenceFactory(const InstancePtr& instance, const CommunicatorPtr& communicator) : _instance(instance), _communicator(communicator) { } void IceInternal::ReferenceFactory::destroy() { Mutex::Lock sync(*this); if(!_instance) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } _instance = 0; _communicator = 0; #ifdef ICEE_HAS_ROUTER _defaultRouter = 0; #endif #ifdef ICEE_HAS_LOCATOR _defaultLocator = 0; #endif } IceE-1.2.0/src/IceE/Shared.cpp0000644000076400007640000000246710576536574015574 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include using namespace Ice; IceUtil::SimpleShared::SimpleShared() : _ref(0), _noDelete(false) { } IceUtil::SimpleShared::SimpleShared(const SimpleShared&) : _ref(0), _noDelete(false) { } IceUtil::Shared::Shared() : #ifndef ICEE_HAS_ATOMIC_FUNCTIONS _ref(0), #endif _noDelete(false) { #ifdef ICEE_HAS_ATOMIC_FUNCTIONS ice_atomic_set(&_ref, 0); #endif } IceUtil::Shared::Shared(const Shared&) : #ifndef ICEE_HAS_ATOMIC_FUNCTIONS _ref(0), #endif _noDelete(false) { #ifdef ICEE_HAS_ATOMIC_FUNCTIONS ice_atomic_set(&_ref, 0); #endif } int IceUtil::Shared::__getRef() const { #if defined(_WIN32) return InterlockedExchangeAdd(const_cast(&_ref), 0); #elif defined(ICEE_HAS_ATOMIC_FUNCTIONS) return ice_atomic_exchange_add(0, const_cast(&_ref)); #else _mutex.lock(); int ref = _ref; _mutex.unlock(); return ref; #endif } void IceUtil::Shared::__setNoDelete(bool b) { _noDelete = b; } IceE-1.2.0/src/IceE/StringConverter.cpp0000755000076400007640000000446410616161100017474 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_WSTRING #include #include #include using namespace IceUtil; using namespace std; namespace Ice { Byte* UnicodeWstringConverter::toUTF8(const wchar_t* sourceStart, const wchar_t* sourceEnd, UTF8Buffer& buffer) const { // // The "chunk size" is the maximum of the number of characters in the // source and 6 (== max bytes necessary to encode one Unicode character). // size_t chunkSize = std::max(static_cast(sourceEnd - sourceStart), 6); Byte* targetStart = buffer.getMoreBytes(chunkSize, 0); Byte* targetEnd = targetStart + chunkSize; ConversionResult result; while((result = convertUTFWstringToUTF8(sourceStart, sourceEnd, targetStart, targetEnd, lenientConversion)) == targetExhausted) { targetStart = buffer.getMoreBytes(chunkSize, targetStart); targetEnd = targetStart + chunkSize; } switch(result) { case conversionOK: break; case sourceExhausted: throw StringConversionException(__FILE__, __LINE__, "wide string source exhausted"); case sourceIllegal: throw StringConversionException(__FILE__, __LINE__, "wide string source illegal"); default: { assert(0); throw StringConversionException(__FILE__, __LINE__); } } return targetStart; } void UnicodeWstringConverter::fromUTF8(const Byte* sourceStart, const Byte* sourceEnd, wstring& target) const { ConversionResult result = convertUTF8ToUTFWstring(sourceStart, sourceEnd, target, lenientConversion); switch(result) { case conversionOK: break; case sourceExhausted: throw StringConversionException(__FILE__, __LINE__, "UTF-8 string source exhausted"); case sourceIllegal: throw StringConversionException(__FILE__, __LINE__, "UTF-8 string source illegal"); default: { assert(0); throw StringConversionException(__FILE__, __LINE__); } } } } #endif IceE-1.2.0/src/IceE/Protocol.cpp0000644000076400007640000000253010576536574016156 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include namespace IceInternal { const Ice::Byte magic[] = { 0x49, 0x63, 0x65, 0x50 }; // 'I', 'c', 'e', 'P' const Ice::Byte requestHdr[] = { magic[0], magic[1], magic[2], magic[3], protocolMajor, protocolMinor, encodingMajor, encodingMinor, requestMsg, 0, // Compression status 0, 0, 0, 0, // Message size (placeholder) 0, 0, 0, 0 // Request id (placeholder) }; const Ice::Byte requestBatchHdr[] = { magic[0], magic[1], magic[2], magic[3], protocolMajor, protocolMinor, encodingMajor, encodingMinor, requestBatchMsg, 0, // Compression status 0, 0, 0, 0, // Message size (place holder) 0, 0, 0, 0 // Number of requests in batch (placeholder) }; const Ice::Byte replyHdr[] = { magic[0], magic[1], magic[2], magic[3], protocolMajor, protocolMinor, encodingMajor, encodingMinor, replyMsg, 0, // Compression status 0, 0, 0, 0 // Message size (placeholder) }; } IceE-1.2.0/src/IceE/.depend0000644000076400007640000020026410616637156015106 0ustar matthewmatthewBasicStream$(OBJEXT): BasicStream.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Properties.h ../../include/IceE/PropertiesF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Instance.h ../../include/IceE/InstanceF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/ProxyFactory.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/LocalException.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/LoggerUtil.h Buffer$(OBJEXT): Buffer.cpp ../../include/IceE/Buffer.h ../../include/IceE/Config.h ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h BuiltinSequences$(OBJEXT): BuiltinSequences.cpp ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h Communicator$(OBJEXT): Communicator.cpp ../../include/IceE/Communicator.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/LoggerF.h ../../include/IceE/PropertiesF.h ../../include/IceE/InstanceF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Router.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Incoming.h ../../include/IceE/ServantManagerF.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../IceE/Instance.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/Properties.h ../IceE/ReferenceFactory.h ../IceE/Reference.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/LocatorF.h ../IceE/ProxyFactory.h ../../include/IceE/LoggerUtil.h ../../include/IceE/LocalException.h ../IceE/ObjectAdapterFactory.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h Cond$(OBJEXT): Cond.cpp ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Config.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h Connection$(OBJEXT): Connection.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Connection.h ../../include/IceE/ConnectionF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/InstanceF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Incoming.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/Current.h ../../include/IceE/Identity.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ReferenceF.h ../../include/IceE/Outgoing.h ../../include/IceE/LoggerUtil.h ../../include/IceE/Properties.h ../IceE/TraceUtil.h ../IceE/DefaultsAndOverrides.h ../IceE/Transceiver.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../IceE/AcceptorF.h ../../include/IceE/LocalException.h ../IceE/ReferenceFactory.h ../IceE/Reference.h ../../include/IceE/RouterF.h ../../include/IceE/Object.h ../../include/IceE/DispatchStatus.h ../../include/IceE/LocatorF.h ../IceE/ProxyFactory.h ../IceE/TraceLevels.h ConvertUTF$(OBJEXT): ConvertUTF.cpp ../../include/IceE/Config.h ../IceE/ConvertUTF.h ../../include/IceE/Unicode.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h Current$(OBJEXT): Current.cpp ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h DefaultsAndOverrides$(OBJEXT): DefaultsAndOverrides.cpp ../IceE/DefaultsAndOverrides.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/PropertiesF.h ../../include/IceE/Properties.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Network.h Endpoint$(OBJEXT): Endpoint.cpp ../IceE/Endpoint.h ../../include/IceE/EndpointF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ../IceE/AcceptorF.h ExceptionBase$(OBJEXT): ExceptionBase.cpp ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/SafeStdio.h ../../include/IceE/StaticMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h FactoryTable$(OBJEXT): FactoryTable.cpp ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/StaticMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Mutex.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/Shared.h FactoryTableDef$(OBJEXT): FactoryTableDef.cpp ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/StaticMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Mutex.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/Shared.h Identity$(OBJEXT): Identity.cpp ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/ConnectionF.h ../../include/IceE/OperationMode.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h Incoming$(OBJEXT): Incoming.cpp ../../include/IceE/Incoming.h ../../include/IceE/InstanceF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/Identity.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../IceE/ServantManager.h ../../include/IceE/ObjectAdapter.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Outgoing.h ../../include/IceE/Object.h ../../include/IceE/DispatchStatus.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/RecMutex.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Thread.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../IceE/ReferenceFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/Initialize.h ../../include/IceE/Properties.h ../../include/IceE/LoggerUtil.h ../../include/IceE/StringUtil.h IncomingConnectionFactory$(OBJEXT): IncomingConnectionFactory.cpp ../IceE/IncomingConnectionFactory.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/EndpointF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/InstanceF.h ../IceE/AcceptorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/Incoming.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Current.h ../../include/IceE/Identity.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ReferenceF.h ../../include/IceE/Outgoing.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ../IceE/DefaultsAndOverrides.h ../../include/IceE/Properties.h ../IceE/Transceiver.h ../IceE/Acceptor.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/LocalException.h ../../include/IceE/Functional.h Initialize$(OBJEXT): Initialize.cpp ../../include/IceE/Initialize.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/PropertiesF.h ../../include/IceE/LoggerF.h ../../include/IceE/InstanceF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Communicator.h ../../include/IceE/RecMutex.h ../../include/IceE/Properties.h ../../include/IceE/LocalException.h Instance$(OBJEXT): Instance.cpp ../../include/IceE/DisableWarnings.h ../IceE/Instance.h ../../include/IceE/InstanceF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/TraceLevels.h ../IceE/DefaultsAndOverrides.h ../IceE/RouterInfo.h ../../include/IceE/RouterF.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/EndpointF.h ../../include/IceE/Router.h ../../include/IceE/Incoming.h ../../include/IceE/ServantManagerF.h ../IceE/LocatorInfo.h ../../include/IceE/LocatorF.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../IceE/ReferenceFactory.h ../IceE/Reference.h ../IceE/ProxyFactory.h ../IceE/OutgoingConnectionFactory.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/LocalException.h ../../include/IceE/Properties.h ../IceE/LoggerI.h ../../include/IceE/Logger.h ../IceE/EndpointFactory.h ../IceE/ObjectAdapterFactory.h ../../include/IceE/StringUtil.h LocalException$(OBJEXT): LocalException.cpp ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/SafeStdio.h ../../include/IceE/StringUtil.h ../IceE/Network.h Locator$(OBJEXT): Locator.cpp ../../include/IceE/Locator.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Incoming.h ../../include/IceE/InstanceF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h LocatorInfo$(OBJEXT): LocatorInfo.cpp ../../include/IceE/Config.h ../IceE/LocatorInfo.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Shared.h ../../include/IceE/LocatorF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/EndpointF.h ../../include/IceE/Locator.h ../../include/IceE/Incoming.h ../../include/IceE/InstanceF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/TraceLevels.h ../../include/IceE/LoggerUtil.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../IceE/AcceptorF.h ../IceE/Reference.h ../../include/IceE/RouterF.h ../../include/IceE/Functional.h Logger$(OBJEXT): Logger.cpp ../../include/IceE/Logger.h ../../include/IceE/LoggerF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h LoggerI$(OBJEXT): LoggerI.cpp ../IceE/LoggerI.h ../../include/IceE/Logger.h ../../include/IceE/LoggerF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/StaticMutex.h LoggerUtil$(OBJEXT): LoggerUtil.cpp ../../include/IceE/LoggerUtil.h ../../include/IceE/LoggerF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Logger.h Network$(OBJEXT): Network.cpp ../../include/IceE/StaticMutex.h ../../include/IceE/Config.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../IceE/Network.h ../../include/IceE/LocalException.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/SafeStdio.h Object$(OBJEXT): Object.cpp ../../include/IceE/Object.h ../../include/IceE/ObjectF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/ConnectionF.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Incoming.h ../../include/IceE/InstanceF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Outgoing.h ../../include/IceE/SafeStdio.h ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ../../include/IceE/ObjectAdapter.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/InstanceF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/DispatchStatus.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/RecMutex.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../IceE/ObjectAdapterFactory.h ../../include/IceE/UUID.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/BuiltinSequences.h ../IceE/ProxyFactory.h ../IceE/ReferenceFactory.h ../IceE/Reference.h ../IceE/EndpointFactory.h ../IceE/IncomingConnectionFactory.h ../IceE/AcceptorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/Thread.h ../IceE/OutgoingConnectionFactory.h ../IceE/ServantManager.h ../../include/IceE/LocalException.h ../../include/IceE/Properties.h ../../include/IceE/Functional.h ../IceE/LocatorInfo.h ../../include/IceE/Locator.h ../../include/IceE/Incoming.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../IceE/RouterInfo.h ../../include/IceE/Router.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ObjectAdapterFactory$(OBJEXT): ObjectAdapterFactory.cpp ../IceE/ObjectAdapterFactory.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/RouterF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/DispatchStatus.h ../../include/IceE/InstanceF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/ObjectAdapter.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/RecMutex.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Functional.h OperationMode$(OBJEXT): OperationMode.cpp ../../include/IceE/OperationMode.h ../../include/IceE/Config.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/Shared.h Outgoing$(OBJEXT): Outgoing.cpp ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/InstanceF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Incoming.h ../../include/IceE/Current.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../IceE/Reference.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/Object.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../IceE/ReferenceFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/Initialize.h OutgoingConnectionFactory$(OBJEXT): OutgoingConnectionFactory.cpp ../IceE/OutgoingConnectionFactory.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/InstanceF.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Connection.h ../../include/IceE/TransceiverF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Incoming.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Current.h ../../include/IceE/Identity.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Thread.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ReferenceF.h ../../include/IceE/Outgoing.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ../IceE/DefaultsAndOverrides.h ../IceE/Connector.h ../IceE/ConnectorF.h ../IceE/Endpoint.h ../IceE/AcceptorF.h ../IceE/RouterInfo.h ../../include/IceE/RouterF.h ../../include/IceE/Object.h ../../include/IceE/DispatchStatus.h ../../include/IceE/LocalException.h ../../include/IceE/Functional.h ../IceE/Reference.h ../../include/IceE/LocatorF.h Properties$(OBJEXT): Properties.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Properties.h ../../include/IceE/PropertiesF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/StringUtil.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/InstanceF.h ../../include/IceE/LocalException.h Protocol$(OBJEXT): Protocol.cpp ../../include/IceE/Protocol.h ../../include/IceE/Config.h Proxy$(OBJEXT): Proxy.cpp ../../include/IceE/Communicator.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/LoggerF.h ../../include/IceE/PropertiesF.h ../../include/IceE/InstanceF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/ProxyFactory.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Incoming.h ../../include/IceE/Current.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../IceE/Reference.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/Object.h ../../include/IceE/DispatchStatus.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../IceE/Instance.h ../IceE/DefaultsAndOverridesF.h ../IceE/ReferenceFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/LocalException.h ../IceE/RouterInfo.h ../../include/IceE/Router.h ../IceE/LocatorInfo.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ProxyFactory$(OBJEXT): ProxyFactory.cpp ../IceE/ProxyFactory.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/InstanceF.h ../../include/IceE/ReferenceF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Thread.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Time.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/Reference.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/LocatorF.h ../IceE/ReferenceFactory.h ../IceE/LocatorInfo.h ../../include/IceE/Properties.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ../../include/IceE/LocalException.h ../../include/IceE/SafeStdio.h RecMutex$(OBJEXT): RecMutex.cpp ../../include/IceE/RecMutex.h ../../include/IceE/Config.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h Reference$(OBJEXT): Reference.cpp ../IceE/Reference.h ../../include/IceE/ReferenceF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/EndpointF.h ../../include/IceE/InstanceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../IceE/ReferenceFactory.h ../IceE/ReferenceFactoryF.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../IceE/AcceptorF.h ../IceE/RouterInfo.h ../../include/IceE/Router.h ../../include/IceE/Incoming.h ../../include/IceE/ServantManagerF.h ../IceE/LocatorInfo.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/Connection.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/Functional.h ../IceE/OutgoingConnectionFactory.h ../../include/IceE/LoggerUtil.h ../IceE/TraceLevels.h ../../include/IceE/StringUtil.h ReferenceFactory$(OBJEXT): ReferenceFactory.cpp ../IceE/ReferenceFactory.h ../IceE/ReferenceFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/ConnectionF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../IceE/Reference.h ../../include/IceE/ReferenceF.h ../../include/IceE/EndpointF.h ../../include/IceE/InstanceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/RouterF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../IceE/AcceptorF.h ../IceE/EndpointFactory.h ../IceE/RouterInfo.h ../../include/IceE/Router.h ../../include/IceE/Incoming.h ../../include/IceE/ServantManagerF.h ../IceE/LocatorInfo.h ../../include/IceE/Locator.h ../../include/IceE/UserExceptionFactory.h ../../include/IceE/FactoryTable.h ../../include/IceE/FactoryTableDef.h ../../include/IceE/UserExceptionFactoryF.h ../../include/IceE/StaticMutex.h ../../include/IceE/StringUtil.h ../../include/IceE/LoggerUtil.h ../../include/IceE/Properties.h ../../include/IceE/Communicator.h Router$(OBJEXT): Router.cpp ../../include/IceE/Router.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/ObjectF.h ../../include/IceE/Shared.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/Incoming.h ../../include/IceE/InstanceF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/EndpointF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/LocalException.h ../../include/IceE/Iterator.h ../../include/IceE/DisableWarnings.h RouterInfo$(OBJEXT): RouterInfo.cpp ../../include/IceE/Config.h ../IceE/RouterInfo.h ../../include/IceE/RouterInfoF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Shared.h ../../include/IceE/RouterF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/DispatchStatus.h ../../include/IceE/EndpointF.h ../../include/IceE/Router.h ../../include/IceE/Incoming.h ../../include/IceE/InstanceF.h ../../include/IceE/ServantManagerF.h ../../include/IceE/BuiltinSequences.h ../IceE/Reference.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/RecMutex.h ../../include/IceE/LocalException.h ../../include/IceE/Connection.h ../../include/IceE/OutgoingConnectionFactoryF.h ../../include/IceE/TransceiverF.h ../../include/IceE/LoggerF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/Thread.h ../../include/IceE/Functional.h SafeStdio$(OBJEXT): SafeStdio.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/SafeStdio.h ../../include/IceE/Config.h ServantManager$(OBJEXT): ServantManager.cpp ../IceE/ServantManager.h ../../include/IceE/ServantManagerF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/InstanceF.h ../../include/IceE/ObjectAdapter.h ../../include/IceE/ObjectAdapterF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/IncomingConnectionFactoryF.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/EndpointF.h ../../include/IceE/RouterF.h ../../include/IceE/Exception.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Object.h ../../include/IceE/Current.h ../../include/IceE/DispatchStatus.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorF.h ../../include/IceE/LocatorInfoF.h ../../include/IceE/RecMutex.h ../../include/IceE/Monitor.h ../../include/IceE/Cond.h ../../include/IceE/Time.h ../../include/IceE/LocalException.h ../../include/IceE/BuiltinSequences.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/StringUtil.h Shared$(OBJEXT): Shared.cpp ../../include/IceE/Shared.h ../../include/IceE/Config.h StaticMutex$(OBJEXT): StaticMutex.cpp ../../include/IceE/StaticMutex.h ../../include/IceE/Config.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h StringConverter$(OBJEXT): StringConverter.cpp ../../include/IceE/Config.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../../include/IceE/Shared.h ../../include/IceE/Unicode.h ../../include/IceE/LocalException.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h StringUtil$(OBJEXT): StringUtil.cpp ../../include/IceE/StringUtil.h ../../include/IceE/Config.h ../../include/IceE/ExceptionBase.h Thread$(OBJEXT): Thread.cpp ../../include/IceE/Thread.h ../../include/IceE/Shared.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Time.h ThreadException$(OBJEXT): ThreadException.cpp ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Handle.h ../../include/IceE/SafeStdio.h Time$(OBJEXT): Time.cpp ../../include/IceE/DisableWarnings.h ../../include/IceE/Time.h ../../include/IceE/Config.h TraceLevels$(OBJEXT): TraceLevels.cpp ../IceE/TraceLevels.h ../../include/IceE/Shared.h ../../include/IceE/Config.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/PropertiesF.h ../../include/IceE/Properties.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h TraceUtil$(OBJEXT): TraceUtil.cpp ../IceE/TraceUtil.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/LoggerF.h ../../include/IceE/StringUtil.h ../../include/IceE/DispatchStatus.h ../IceE/TraceLevels.h ../../include/IceE/PropertiesF.h ../../include/IceE/Logger.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/SafeStdio.h ../../include/IceE/OperationMode.h ../../include/IceE/Identity.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../IceE/Instance.h ../../include/IceE/InstanceF.h ../../include/IceE/CommunicatorF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Outgoing.h UnknownEndpoint$(OBJEXT): UnknownEndpoint.cpp ../IceE/UnknownEndpoint.h ../IceE/Endpoint.h ../../include/IceE/EndpointF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ../IceE/AcceptorF.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../../include/IceE/TraceLevelsF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Initialize.h ../../include/IceE/LoggerF.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h Unicode$(OBJEXT): Unicode.cpp ../../include/IceE/Config.h ../../include/IceE/Unicode.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../IceE/ConvertUTF.h UUID$(OBJEXT): UUID.cpp ../../include/IceE/Config.h ../../include/IceE/UUID.h ../../include/IceE/Exception.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Handle.h ../../include/IceE/StaticMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h Acceptor$(OBJEXT): ../../src/TcpTransport/Acceptor.cpp ../IceE/Acceptor.h ../../include/IceE/TransceiverF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/InstanceF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/LoggerF.h ../IceE/AcceptorF.h ../IceE/Transceiver.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/TraceLevels.h ../../include/IceE/LoggerUtil.h ../IceE/Network.h Connector$(OBJEXT): ../../src/TcpTransport/Connector.cpp ../IceE/Connector.h ../IceE/ConnectorF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/LoggerF.h ../IceE/Transceiver.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/TraceLevels.h ../../include/IceE/LoggerUtil.h ../IceE/Network.h EndpointFactory$(OBJEXT): ../../src/TcpTransport/EndpointFactory.cpp ../IceE/EndpointFactory.h ../IceE/EndpointFactoryF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/EndpointF.h ../../include/IceE/InstanceF.h ../IceE/UnknownEndpoint.h ../IceE/Endpoint.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../IceE/AcceptorF.h ../../include/IceE/LocalException.h ../../include/IceE/Exception.h ../../include/IceE/Identity.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../TcpTransport/TcpEndpoint.h TcpEndpoint$(OBJEXT): ../../src/TcpTransport/TcpEndpoint.cpp ../TcpTransport/TcpEndpoint.h ../IceE/Endpoint.h ../../include/IceE/EndpointF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../IceE/ConnectorF.h ../../include/IceE/TransceiverF.h ../../include/IceE/InstanceF.h ../IceE/AcceptorF.h ../IceE/Network.h ../IceE/Connector.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/LoggerF.h ../IceE/Transceiver.h ../../include/IceE/BasicStream.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../../include/IceE/Exception.h ../../include/IceE/LocalException.h ../../include/IceE/Identity.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/Proxy.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/CommunicatorF.h ../../include/IceE/Mutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../IceE/Instance.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Initialize.h ../IceE/DefaultsAndOverrides.h ../../include/IceE/SafeStdio.h ../IceE/Acceptor.h Transceiver$(OBJEXT): ../../src/TcpTransport/Transceiver.cpp ../IceE/Transceiver.h ../../include/IceE/TransceiverF.h ../../include/IceE/Handle.h ../../include/IceE/ExceptionBase.h ../../include/IceE/Config.h ../../include/IceE/Shared.h ../../include/IceE/InstanceF.h ../../include/IceE/TraceLevelsF.h ../../include/IceE/LoggerF.h ../IceE/Instance.h ../../include/IceE/CommunicatorF.h ../../include/IceE/PropertiesF.h ../IceE/DefaultsAndOverridesF.h ../../include/IceE/RouterInfoF.h ../../include/IceE/LocatorInfoF.h ../IceE/ReferenceFactoryF.h ../../include/IceE/ProxyFactoryF.h ../../include/IceE/OutgoingConnectionFactoryF.h ../IceE/EndpointFactoryF.h ../../include/IceE/ObjectAdapterFactoryF.h ../../include/IceE/RecMutex.h ../../include/IceE/Lock.h ../../include/IceE/ThreadException.h ../../include/IceE/Exception.h ../../include/IceE/Initialize.h ../../include/IceE/BuiltinSequences.h ../../include/IceE/ProxyF.h ../../include/IceE/ProxyHandle.h ../../include/IceE/ObjectF.h ../../include/IceE/ScopedArray.h ../../include/IceE/Proxy.h ../../include/IceE/ConnectionF.h ../../include/IceE/ReferenceF.h ../../include/IceE/Mutex.h ../../include/IceE/Identity.h ../../include/IceE/UndefSysMacros.h ../../include/IceE/OperationMode.h ../../include/IceE/Outgoing.h ../../include/IceE/BasicStream.h ../../include/IceE/Buffer.h ../../include/IceE/Protocol.h ../../include/IceE/StringConverter.h ../IceE/TraceLevels.h ../../include/IceE/LoggerUtil.h ../IceE/Network.h ../../include/IceE/LocalException.h ../../include/IceE/SafeStdio.h BuiltinSequences.cpp: ../../slice/IceE/BuiltinSequences.ice Identity.cpp: ../../slice/IceE/Identity.ice LocatorF.cpp: ../../slice/IceE/LocatorF.ice Locator.cpp: ../../slice/IceE/Locator.ice ../../slice/IceE/Identity.ice RouterF.cpp: ../../slice/IceE/RouterF.ice Router.cpp: ../../slice/IceE/Router.ice ../../slice/IceE/BuiltinSequences.ice IceE-1.2.0/src/IceE/UnknownEndpoint.cpp0000644000076400007640000000565410616637156017520 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceInternal::UnknownEndpoint::UnknownEndpoint(Short type, BasicStream* s) : _instance(s->instance()), _type(type) { s->startReadEncaps(); Int sz = s->getReadEncapsSize(); s->readBlob(const_cast&>(_rawBytes), sz); s->endReadEncaps(); } void IceInternal::UnknownEndpoint::streamWrite(BasicStream* s) const { s->write(_type); s->startWriteEncaps(); s->writeBlob(_rawBytes); s->endWriteEncaps(); } string IceInternal::UnknownEndpoint::toString() const { return string(); } Short IceInternal::UnknownEndpoint::type() const { return _type; } Int IceInternal::UnknownEndpoint::timeout() const { return -1; } EndpointPtr IceInternal::UnknownEndpoint::timeout(Int) const { return const_cast(this); } bool IceInternal::UnknownEndpoint::secure() const { return false; } bool IceInternal::UnknownEndpoint::datagram() const { return false; } bool IceInternal::UnknownEndpoint::unknown() const { return true; } ConnectorPtr IceInternal::UnknownEndpoint::connector() const { return 0; } #ifndef ICEE_PURE_CLIENT AcceptorPtr IceInternal::UnknownEndpoint::acceptor(EndpointPtr& endp) const { endp = const_cast(this); return 0; } bool IceInternal::UnknownEndpoint::publish() const { return false; } #endif vector IceInternal::UnknownEndpoint::expand(bool) const { assert(false); vector ret; return ret; } bool IceInternal::UnknownEndpoint::operator==(const Endpoint& r) const { const UnknownEndpoint* p = dynamic_cast(&r); if(!p) { return false; } if(this == p) { return true; } if(_type != p->_type) { return false; } if(_rawBytes != p->_rawBytes) { return false; } return true; } bool IceInternal::UnknownEndpoint::operator!=(const Endpoint& r) const { return !operator==(r); } bool IceInternal::UnknownEndpoint::operator<(const Endpoint& r) const { const UnknownEndpoint* p = dynamic_cast(&r); if(!p) { return type() < r.type(); } if(this == p) { return false; } if(_type < p->_type) { return true; } else if(p->_type < _type) { return false; } if(_rawBytes < p->_rawBytes) { return true; } else if(p->_rawBytes < _rawBytes) { return false; } return false; } IceE-1.2.0/src/IceE/Network.cpp0000644000076400007640000005722110607167246016004 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #if defined(_WIN32) # include #elif defined(__APPLE__) || defined(__FreeBSD__) # include #else # include # include # ifdef __sun # include # endif #endif using namespace std; using namespace Ice; using namespace IceInternal; #ifdef __sun # define INADDR_NONE (unsigned long)-1 #endif static IceUtil::StaticMutex inetMutex = ICE_STATIC_MUTEX_INITIALIZER; static string inetAddrToString(struct in_addr in) { // // inet_ntoa uses static memory on some platforms so we protect // access and make a copy. // IceUtil::StaticMutex::Lock lock(inetMutex); return string(inet_ntoa(in)); } int IceInternal::getSocketErrno() { #ifdef _WIN32 return WSAGetLastError(); #else return errno; #endif } bool IceInternal::interrupted() { #ifdef _WIN32 return WSAGetLastError() == WSAEINTR; #else # ifdef EPROTO return errno == EINTR || errno == EPROTO; # else return errno == EINTR; # endif #endif } bool IceInternal::noBuffers() { #ifdef _WIN32 int error = WSAGetLastError(); return error == WSAENOBUFS || error == WSAEFAULT; #else return errno == ENOBUFS; #endif } bool IceInternal::wouldBlock() { #ifdef _WIN32 return WSAGetLastError() == WSAEWOULDBLOCK; #else return errno == EAGAIN || errno == EWOULDBLOCK; #endif } bool IceInternal::timedout() { #ifdef _WIN32 return WSAGetLastError() == WSAETIMEDOUT; #else return errno == EAGAIN || errno == EWOULDBLOCK; #endif } bool IceInternal::connectFailed() { #ifdef _WIN32 int error = WSAGetLastError(); return error == WSAECONNREFUSED || error == WSAETIMEDOUT || error == WSAENETUNREACH || error == WSAEHOSTUNREACH || error == WSAECONNRESET || error == WSAESHUTDOWN || error == WSAECONNABORTED; #else return errno == ECONNREFUSED || errno == ETIMEDOUT || errno == ENETUNREACH || errno == EHOSTUNREACH || errno == ECONNRESET || errno == ESHUTDOWN || errno == ECONNABORTED; #endif } bool IceInternal::connectionRefused() { #ifdef _WIN32 int error = WSAGetLastError(); return error == WSAECONNREFUSED; #else return errno == ECONNREFUSED; #endif } bool IceInternal::connectInProgress() { #ifdef _WIN32 return WSAGetLastError() == WSAEWOULDBLOCK; #else return errno == EINPROGRESS; #endif } bool IceInternal::connectionLost() { #ifdef _WIN32 int error = WSAGetLastError(); return error == WSAECONNRESET || error == WSAESHUTDOWN || error == WSAENOTCONN || error == WSAECONNABORTED; #else return errno == ECONNRESET || errno == ENOTCONN || errno == ESHUTDOWN || errno == ECONNABORTED || errno == EPIPE; #endif } bool IceInternal::notConnected() { #ifdef _WIN32 return WSAGetLastError() == WSAENOTCONN; #else return errno == ENOTCONN; #endif } SOCKET IceInternal::createSocket() { SOCKET fd; fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if(fd == INVALID_SOCKET) { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } setTcpNoDelay(fd); setKeepAlive(fd); return fd; } static void closeSocketNoThrow(SOCKET fd) { #ifdef _WIN32 int error = WSAGetLastError(); closesocket(fd); WSASetLastError(error); #else int error = errno; close(fd); errno = error; #endif } void IceInternal::closeSocket(SOCKET fd) { #ifdef _WIN32 int error = WSAGetLastError(); if(closesocket(fd) == SOCKET_ERROR) { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } WSASetLastError(error); #else int error = errno; if(close(fd) == SOCKET_ERROR) { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } errno = error; #endif } void IceInternal::shutdownSocketWrite(SOCKET fd) { if(shutdown(fd, SHUT_WR) == SOCKET_ERROR) { // // Ignore errors indicating that we are shutdown already. // #if defined(_WIN32) int error = WSAGetLastError(); if(error == WSAENOTCONN) { return; } #elif defined(__APPLE__) if(errno == ENOTCONN || errno == EINVAL) { return; } #else if(errno == ENOTCONN) { return; } #endif SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } void IceInternal::shutdownSocketReadWrite(SOCKET fd) { if(shutdown(fd, SHUT_RDWR) == SOCKET_ERROR) { // // Ignore errors indicating that we are shutdown already. // #if defined(_WIN32) int error = WSAGetLastError(); if(error == WSAENOTCONN) { return; } #elif defined(__APPLE__) if(errno == ENOTCONN || errno == EINVAL) { return; } #else if(errno == ENOTCONN) { return; } #endif SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } void IceInternal::setBlock(SOCKET fd, bool block) { if(block) { #ifdef _WIN32 unsigned long arg = 0; if(ioctlsocket(fd, FIONBIO, &arg) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = WSAGetLastError(); throw ex; } #else int flags = fcntl(fd, F_GETFL); flags &= ~O_NONBLOCK; if(fcntl(fd, F_SETFL, flags) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = errno; throw ex; } #endif } else { #ifdef _WIN32 unsigned long arg = 1; if(ioctlsocket(fd, FIONBIO, &arg) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = WSAGetLastError(); throw ex; } #else int flags = fcntl(fd, F_GETFL); flags |= O_NONBLOCK; if(fcntl(fd, F_SETFL, flags) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = errno; throw ex; } #endif } } #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS void IceInternal::setTimeout(SOCKET fd, bool recv, int timeout) { assert(timeout != 0); #ifndef _WIN32 struct timeval tv; tv.tv_sec = timeout > 0 ? timeout / 1000 : 0; tv.tv_usec = timeout > 0 ? (timeout - tv.tv_sec * 1000) * 1000 : 0; if(setsockopt(fd, SOL_SOCKET, recv ? SO_RCVTIMEO : SO_SNDTIMEO, (char*)&tv, (int)sizeof(timeval)) == SOCKET_ERROR) #else int tt = timeout > 0 ? timeout : 0; if(setsockopt(fd, SOL_SOCKET, recv ? SO_RCVTIMEO : SO_SNDTIMEO, (char*)&tt, (int)sizeof(int)) == SOCKET_ERROR) #endif { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } #endif void IceInternal::setTcpNoDelay(SOCKET fd) { int flag = 1; if(setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } void IceInternal::setKeepAlive(SOCKET fd) { int flag = 1; if(setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } void IceInternal::setSendBufferSize(SOCKET fd, int sz) { if(setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (char*)&sz, int(sizeof(int))) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } void IceInternal::doBind(SOCKET fd, struct sockaddr_in& addr) { #ifndef _WIN32 int flag = 1; if(setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&flag, int(sizeof(int))) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } #endif if(bind(fd, reinterpret_cast(&addr), int(sizeof(addr))) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } socklen_t len = static_cast(sizeof(addr)); #ifdef NDEBUG getsockname(fd, reinterpret_cast(&addr), &len); #else int ret = getsockname(fd, reinterpret_cast(&addr), &len); assert(ret != SOCKET_ERROR); #endif } void IceInternal::doConnect(SOCKET fd, struct sockaddr_in& addr, int timeout) { #ifdef _WIN32 // // Set larger send buffer size to avoid performance problems on // WIN32. // setSendBufferSize(fd, 64 * 1024); // // Under WinCE its not possible to find out the connection failure // reason with SO_ERROR, so its necessary to use the WSAEVENT // mechanism. We use the same mechanism for any Winsock platform. // WSAEVENT event = WSACreateEvent(); if(event == 0) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = WSAGetLastError(); throw ex; } if(WSAEventSelect(fd, event, FD_CONNECT) == SOCKET_ERROR) { int error = WSAGetLastError(); WSACloseEvent(event); closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = error; throw ex; } #endif repeatConnect: if(::connect(fd, reinterpret_cast(&addr), int(sizeof(addr))) == SOCKET_ERROR) { if(interrupted()) { goto repeatConnect; } if(connectInProgress()) { int val; #ifdef _WIN32 WSAEVENT events[1]; events[0] = event; long tout = (timeout >= 0) ? timeout : WSA_INFINITE; DWORD rc = WSAWaitForMultipleEvents(1, events, FALSE, tout, FALSE); if(rc == WSA_WAIT_FAILED) { int error = WSAGetLastError(); WSACloseEvent(event); closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = error; throw ex; } if(rc == WSA_WAIT_TIMEOUT) { WSACloseEvent(event); closeSocketNoThrow(fd); assert(timeout >= 0); throw ConnectTimeoutException(__FILE__, __LINE__); } assert(rc == WSA_WAIT_EVENT_0); WSANETWORKEVENTS nevents; if(WSAEnumNetworkEvents(fd, event, &nevents) == SOCKET_ERROR) { int error = WSAGetLastError(); WSACloseEvent(event); closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = error; throw ex; } // // This is necessary to be able to set the socket in blocking mode. // if(WSAEventSelect(fd, event, 0) == SOCKET_ERROR) { int error = WSAGetLastError(); WSACloseEvent(event); closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = error; throw ex; } // // Now we close the event, because we're finished and // this code be repeated. // WSACloseEvent(event); assert(nevents.lNetworkEvents & FD_CONNECT); val = nevents.iErrorCode[FD_CONNECT_BIT]; #else repeatPoll: struct pollfd pollFd[1]; pollFd[0].fd = fd; pollFd[0].events = POLLOUT; int ret = ::poll(pollFd, 1, timeout); if(ret == 0) { closeSocketNoThrow(fd); throw ConnectTimeoutException(__FILE__, __LINE__); } else if(ret == SOCKET_ERROR) { if(interrupted()) { goto repeatPoll; } SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } // // Strange windows bug: The following call to Sleep() is // necessary, otherwise no error is reported through // getsockopt. // //Sleep(0); socklen_t len = static_cast(sizeof(int)); if(getsockopt(fd, SOL_SOCKET, SO_ERROR, reinterpret_cast(&val), &len) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } #endif if(val > 0) { closeSocketNoThrow(fd); #ifdef _WIN32 WSASetLastError(val); #else errno = val; #endif if(connectionRefused()) { ConnectionRefusedException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else if(connectFailed()) { ConnectFailedException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } return; } closeSocketNoThrow(fd); if(connectionRefused()) { ConnectionRefusedException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else if(connectFailed()) { ConnectFailedException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } } void IceInternal::getAddress(const string& host, int port, struct sockaddr_in& addr) { memset(&addr, 0, sizeof(struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = inet_addr(host.c_str()); if(addr.sin_addr.s_addr == INADDR_NONE) { #ifdef _WIN32 // // Windows XP has getaddrinfo(), but we don't want to require XP to run IceE. // // // gethostbyname() is thread safe on Windows, with a separate hostent per thread // struct hostent* entry; int retry = 5; do { entry = gethostbyname(host.c_str()); } while(entry == 0 && WSAGetLastError() == WSATRY_AGAIN && --retry >= 0); if(entry == 0) { DNSException ex(__FILE__, __LINE__); ex.error = WSAGetLastError(); ex.host = host; throw ex; } memcpy(&addr.sin_addr, entry->h_addr, entry->h_length); #else struct addrinfo* info = 0; int retry = 5; struct addrinfo hints = { 0 }; hints.ai_family = PF_INET; int rs = 0; do { rs = getaddrinfo(host.c_str(), 0, &hints, &info); } while(info == 0 && rs == EAI_AGAIN && --retry >= 0); if(rs != 0) { DNSException ex(__FILE__, __LINE__); ex.error = rs; ex.host = host; throw ex; } assert(info->ai_family == PF_INET); struct sockaddr_in* sin = reinterpret_cast(info->ai_addr); addr.sin_addr.s_addr = sin->sin_addr.s_addr; freeaddrinfo(info); #endif } } bool IceInternal::compareAddress(const struct sockaddr_in& addr1, const struct sockaddr_in& addr2) { return (addr1.sin_family == addr2.sin_family) && (addr1.sin_port == addr2.sin_port) && (addr1.sin_addr.s_addr == addr2.sin_addr.s_addr); } #ifdef _WIN32 string IceInternal::errorToString(int error) { #ifndef _WIN32_WCE if(error < WSABASEERR) { LPVOID lpMsgBuf = 0; DWORD ok = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR)&lpMsgBuf, 0, NULL); if(ok) { LPCTSTR msg = (LPCTSTR)lpMsgBuf; assert(msg && strlen((const char*)msg) > 0); string result = (const char*)msg; LocalFree(lpMsgBuf); return result; } } #endif return printfToString("error: %d", error); } string IceInternal::errorToStringDNS(int error) { return errorToString(error); } #else string IceInternal::errorToString(int error) { return strerror(error); } string IceInternal::errorToStringDNS(int error) { return gai_strerror(error); } #endif string IceInternal::lastErrorToString() { #ifdef _WIN32 return errorToString(WSAGetLastError()); #else return errorToString(errno); #endif } std::string IceInternal::fdToString(SOCKET fd) { if(fd == INVALID_SOCKET) { return ""; } socklen_t localLen = static_cast(sizeof(struct sockaddr_in)); struct sockaddr_in localAddr; if(getsockname(fd, reinterpret_cast(&localAddr), &localLen) == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } bool peerNotConnected = false; socklen_t remoteLen = static_cast(sizeof(struct sockaddr_in)); struct sockaddr_in remoteAddr; if(getpeername(fd, reinterpret_cast(&remoteAddr), &remoteLen) == SOCKET_ERROR) { if(notConnected()) { peerNotConnected = true; } else { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } string s; s += "local address = "; s += addrToString(localAddr); if(peerNotConnected) { s += "\nremote address = "; } else { s += "\nremote address = "; s += addrToString(remoteAddr); } return s; } std::string IceInternal::addrToString(const struct sockaddr_in& addr) { string s; s += inetAddrToString(addr.sin_addr); s += ":"; s += Ice::printfToString("%d", ntohs(addr.sin_port)); return s; } #ifndef ICEE_PURE_CLIENT bool IceInternal::acceptInterrupted() { if(interrupted()) { return true; } #ifdef _WIN32 int error = WSAGetLastError(); return error == WSAECONNABORTED || error == WSAECONNRESET || error == WSAETIMEDOUT; #else return errno == ECONNABORTED || errno == ECONNRESET || errno == ETIMEDOUT; #endif } SOCKET IceInternal::doAccept(SOCKET fd) { int ret; repeatAccept: if((ret = ::accept(fd, 0, 0)) == INVALID_SOCKET) { if(acceptInterrupted()) { goto repeatAccept; } SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } setTcpNoDelay(ret); setKeepAlive(ret); #ifdef _WIN32 // // Set larger send buffer size to avoid performance problems on // WIN32. // setSendBufferSize(ret, 64 * 1024); #endif return ret; } void IceInternal::doListen(SOCKET fd, int backlog) { repeatListen: if(::listen(fd, backlog) == SOCKET_ERROR) { if(interrupted()) { goto repeatListen; } closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } #endif vector IceInternal::getLocalHosts() { vector result; #if defined(_WIN32) vector addrs = getLocalAddresses(); for(unsigned int i = 0; i < addrs.size(); ++i) { result.push_back(inetAddrToString(addrs[i].sin_addr)); } #elif defined(__APPLE__) || defined(__FreeBSD__) struct ifaddrs* ifap; if(::getifaddrs(&ifap) == SOCKET_ERROR) { SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } struct ifaddrs* curr = ifap; while(curr != 0) { if(curr->ifa_addr && curr->ifa_addr->sa_family == AF_INET) { struct sockaddr_in* addr = reinterpret_cast(curr->ifa_addr); if(addr->sin_addr.s_addr != 0) { result.push_back(inetAddrToString((*addr).sin_addr)); } } curr = curr->ifa_next; } ::freeifaddrs(ifap); #else SOCKET fd = createSocket(); #ifdef _AIX int cmd = CSIOCGIFCONF; #else int cmd = SIOCGIFCONF; #endif struct ifconf ifc; int numaddrs = 10; int old_ifc_len = 0; // // Need to call ioctl multiple times since we do not know up front // how many addresses there will be, and thus how large a buffer we need. // We keep increasing the buffer size until subsequent calls return // the same length, meaning we have all the addresses. // while(true) { int bufsize = numaddrs * sizeof(struct ifreq); ifc.ifc_len = bufsize; ifc.ifc_buf = (char*)malloc(bufsize); int rs = ioctl(fd, cmd, &ifc); if(rs == SOCKET_ERROR) { free(ifc.ifc_buf); closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } else if(ifc.ifc_len == old_ifc_len) { // // Returned same length twice in a row, finished. // break; } else { old_ifc_len = ifc.ifc_len; } numaddrs += 10; free(ifc.ifc_buf); } numaddrs = ifc.ifc_len / sizeof(struct ifreq); struct ifreq* ifr = ifc.ifc_req; for(int i = 0; i < numaddrs; ++i) { if(ifr[i].ifr_addr.sa_family == AF_INET) { struct sockaddr_in* addr = reinterpret_cast(&ifr[i].ifr_addr); if(addr->sin_addr.s_addr != 0) { result.push_back(inetAddrToString((*addr).sin_addr)); } } } free(ifc.ifc_buf); closeSocket(fd); #endif return result; } #ifdef _WIN32 vector IceInternal::getLocalAddresses() { vector result; try { SOCKET fd = createSocket(); vector buffer; buffer.resize(1024); unsigned long len = 0; DWORD rs = WSAIoctl(fd, SIO_ADDRESS_LIST_QUERY, 0, 0, &buffer[0], buffer.size(), &len, 0, 0); if(rs == SOCKET_ERROR) { // // If the buffer wasn't big enough, resize it to the // required length and try again. // if(getSocketErrno() == WSAEFAULT) { buffer.resize(len); rs = WSAIoctl(fd, SIO_ADDRESS_LIST_QUERY, 0, 0, &buffer[0], buffer.size(), &len, 0, 0); } if(rs == SOCKET_ERROR) { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } // // Add the local interface addresses. // SOCKET_ADDRESS_LIST* addrs = reinterpret_cast(&buffer[0]); for (int i = 0; i < addrs->iAddressCount; ++i) { result.push_back(*reinterpret_cast(addrs->Address[i].lpSockaddr)); } // // Add the loopback interface address. // struct sockaddr_in addr; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(0); addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); result.push_back(addr); closeSocket(fd); } catch(const Ice::LocalException&) { // // TODO: Warning? // } return result; } bool IceInternal::isLocalAddress(const struct sockaddr_in& addr) { struct sockaddr_in addr0 = addr; addr0.sin_port = htons(0); // Local interface addresses have the port set to 0. vector localAddrs = getLocalAddresses(); for(vector::const_iterator p = localAddrs.begin(); p != localAddrs.end(); ++p) { if(compareAddress(addr0, *p)) { return true; } } return false; } bool IceInternal::isPeerLocal(SOCKET fd) { socklen_t remoteLen = static_cast(sizeof(struct sockaddr_in)); struct sockaddr_in remoteAddr; if(getpeername(fd, reinterpret_cast(&remoteAddr), &remoteLen) == SOCKET_ERROR) { if(notConnected()) { return false; } else { closeSocketNoThrow(fd); SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; } } return isLocalAddress(remoteAddr); } #endif IceE-1.2.0/src/IceE/Base64.cpp0000644000076400007640000001151410616561253015366 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include using namespace std; string IceUtil::Base64::encode(const vector& plainSeq) { string retval; if(plainSeq.size() == 0) { return retval; } // Reserve enough space for the returned base64 string size_t base64Bytes = (((plainSeq.size() * 4) / 3) + 1); size_t newlineBytes = (((base64Bytes * 2) / 76) + 1); size_t totalBytes = base64Bytes + newlineBytes; retval.reserve(totalBytes); unsigned char by1 = 0; unsigned char by2 = 0; unsigned char by3 = 0; unsigned char by4 = 0; unsigned char by5 = 0; unsigned char by6 = 0; unsigned char by7 = 0; for(size_t i = 0; i < plainSeq.size(); i += 3) { by1 = plainSeq[i]; by2 = 0; by3 = 0; if((i + 1) < plainSeq.size()) { by2 = plainSeq[i+1]; } if((i + 2) < plainSeq.size()) { by3 = plainSeq[i+2]; } by4 = by1 >> 2; by5 = ((by1 & 0x3) << 4) | (by2 >> 4); by6 = ((by2 & 0xf) << 2) | (by3 >> 6); by7 = by3 & 0x3f; retval += encode(by4); retval += encode(by5); if((i + 1) < plainSeq.size()) { retval += encode(by6); } else { retval += "="; } if((i + 2) < plainSeq.size()) { retval += encode(by7); } else { retval += "="; } } string outString; outString.reserve(totalBytes); string::iterator iter = retval.begin(); while((retval.end() - iter) > 76) { copy(iter, iter+76, back_inserter(outString)); outString += "\r\n"; iter += 76; } copy(iter, retval.end(), back_inserter(outString)); return outString; } vector IceUtil::Base64::decode(const string& str) { string newStr; newStr.reserve(str.length()); for(size_t j = 0; j < str.length(); j++) { if(isBase64(str[j])) { newStr += str[j]; } } vector retval; if(newStr.length() == 0) { return retval; } // Note: This is how we were previously computing the size of the return // sequence. The method below is more efficient (and correct). // size_t lines = str.size() / 78; // size_t totalBytes = (lines * 76) + (((str.size() - (lines * 78)) * 3) / 4); // Figure out how long the final sequence is going to be. size_t totalBytes = (newStr.size() * 3 / 4) + 1; retval.reserve(totalBytes); unsigned char by1 = 0; unsigned char by2 = 0; unsigned char by3 = 0; unsigned char by4 = 0; char c1, c2, c3, c4; for(size_t i = 0; i < newStr.length(); i += 4) { c1 = 'A'; c2 = 'A'; c3 = 'A'; c4 = 'A'; c1 = newStr[i]; if((i + 1) < newStr.length()) { c2 = newStr[i + 1]; } if((i + 2) < newStr.length()) { c3 = newStr[i + 2]; } if((i + 3) < newStr.length()) { c4 = newStr[i + 3]; } by1 = decode(c1); by2 = decode(c2); by3 = decode(c3); by4 = decode(c4); retval.push_back((by1 << 2) | (by2 >> 4)); if(c3 != '=') { retval.push_back(((by2 & 0xf) << 4) | (by3 >> 2)); } if(c4 != '=') { retval.push_back(((by3 & 0x3) << 6) | by4); } } return retval; } bool IceUtil::Base64::isBase64(char c) { if(c >= 'A' && c <= 'Z') { return true; } if(c >= 'a' && c <= 'z') { return true; } if(c >= '0' && c <= '9') { return true; } if(c == '+') { return true; } if(c == '/') { return true; } if(c == '=') { return true; } return false; } char IceUtil::Base64::encode(unsigned char uc) { if(uc < 26) { return 'A' + uc; } if(uc < 52) { return 'a' + (uc - 26); } if(uc < 62) { return '0' + (uc - 52); } if(uc == 62) { return '+'; } return '/'; } unsigned char IceUtil::Base64::decode(char c) { if(c >= 'A' && c <= 'Z') { return c - 'A'; } if(c >= 'a' && c <= 'z') { return c - 'a' + 26; } if(c >= '0' && c <= '9') { return c - '0' + 52; } if(c == '+') { return 62; } return 63; } IceE-1.2.0/src/IceE/Initialize.cpp0000644000076400007640000001164010616505646016447 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; StringSeq Ice::argsToStringSeq(int argc, char* argv[]) { StringSeq result; for(int i = 0; i < argc; i++) { result.push_back(argv[i]); } return result; } void Ice::stringSeqToArgs(const StringSeq& args, int& argc, char* argv[]) { // // Shift all elements in argv which are present in args to the // beginning of argv. // int i = 0; while(i < argc) { if(find(args.begin(), args.end(), argv[i]) == args.end()) { for(int j = i; j < argc - 1; j++) { argv[j] = argv[j + 1]; } --argc; } else { ++i; } } // // Make sure that argv[argc] == 0, the ISO C++ standard requires this. // if(argv) { argv[argc] = 0; } } PropertiesPtr Ice::createProperties( #ifdef ICEE_HAS_WSTRING const StringConverterPtr& converter #endif ) { return new Properties( #ifdef ICEE_HAS_WSTRING converter #endif ); } PropertiesPtr Ice::createProperties(StringSeq& args, const PropertiesPtr& defaults #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& converter #endif ) { return new Properties(args, defaults #ifdef ICEE_HAS_WSTRING , converter #endif ); } PropertiesPtr Ice::createProperties(int& argc, char* argv[], const PropertiesPtr& defaults #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& converter #endif ) { StringSeq args = argsToStringSeq(argc, argv); PropertiesPtr properties = createProperties(args, defaults #ifdef ICEE_HAS_WSTRING , converter #endif ); stringSeqToArgs(args, argc, argv); return properties; } inline void checkIceVersion(Int version) { #ifndef ICE_IGNORE_VERSION // // Major and minor version numbers must match. // if(ICEE_INT_VERSION / 100 != version / 100) { throw VersionMismatchException(__FILE__, __LINE__); } // // The caller's patch level cannot be greater than library's patch level. (Patch level changes are // backward-compatible, but not forward-compatible.) // if(version % 100 > ICEE_INT_VERSION % 100) { throw VersionMismatchException(__FILE__, __LINE__); } #endif } CommunicatorPtr Ice::initialize(int& argc, char* argv[], const InitializationData& initializationData, Int version) { checkIceVersion(version); InitializationData initData = initializationData; initData.properties = createProperties(argc, argv, initData.properties); CommunicatorPtr communicator = new Communicator(initData); communicator->finishSetup(argc, argv); return communicator; } CommunicatorPtr Ice::initialize(StringSeq& args, const InitializationData& initializationData, Int version) { int origArgc = 0; char** argv = 0; CommunicatorPtr communicator; try { // // Make a dummy argc/argv. // (We can't use argsToStringSeq() because that requires an already initialized argv.) // int argc = args.size(); origArgc = argc; argv = new char*[args.size() + 1]; int i; for(i = 0; i != argc; ++i) { argv[i] = new char[args[i].size() + 1]; #if defined(_MSC_VER) && (_MSC_VER >= 1400) strcpy_s(argv[i], args[i].size() + 1, args[i].c_str()); #else strcpy(argv[i], args[i].c_str()); #endif } argv[argc] = 0; communicator = initialize(argc, argv, initializationData, version); args = argsToStringSeq(argc, argv); for(i = 0; i < origArgc; ++i) { delete[] argv[i]; } delete[] argv; } catch(...) { for(int i = 0; i < origArgc; ++i) { delete[] argv[i]; } delete[] argv; throw; } return communicator; } CommunicatorPtr Ice::initialize(const InitializationData& initData, Int version) { // // We can't simply call the other initialize() because this one does NOT read // the config file, while the other one always does. // checkIceVersion(version); CommunicatorPtr communicator = new Communicator(initData); int argc = 0; char* argv[] = { 0 }; communicator->finishSetup(argc, argv); return communicator; } InstancePtr IceInternal::getInstance(const CommunicatorPtr& communicator) { return communicator->_instance; } IceE-1.2.0/src/IceE/UUID.cpp0000644000076400007640000001505310616505646015116 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include // On Windows, we use Windows's RPC UUID generator. // // Under WinCE we use the Cryptography functions to generate random // numbers which should be suitable for a "version 4" UUID. // // On other platforms, we use a high quality random number generator // (/dev/random) to generate "version 4" UUIDs, as described in // http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-00.txt // #ifdef _WIN32_WCE # include # include #elif defined(_WIN32) # include #else # include # include # include # include # include #endif using namespace std; // Helper char to hex functions // inline void halfByteToHex(unsigned char hb, char*& hexBuffer) { if(hb < 10) { *hexBuffer++ = '0' + hb; } else { *hexBuffer++ = 'A' + (hb - 10); } } inline void bytesToHex(unsigned char* bytes, size_t len, char*& hexBuffer) { for(size_t i = 0; i < len; i++) { halfByteToHex((bytes[i] & 0xF0) >> 4, hexBuffer); halfByteToHex((bytes[i] & 0x0F), hexBuffer); } } IceUtil::UUIDGenerationException::UUIDGenerationException(const char* file, int line) : Exception(file, line) { } const char* IceUtil::UUIDGenerationException::_name = "IceUtil::UUIDGenerationException"; #ifdef _WIN32_WCE static IceUtil::StaticMutex staticMutex = ICE_STATIC_MUTEX_INITIALIZER; static HCRYPTPROV cryptProv = 0; namespace { // // Close the crypt provider on exit. // class UUIDCleanup { public: ~UUIDCleanup() { IceUtil::StaticMutex::Lock lock(staticMutex); if(cryptProv != 0) { CryptReleaseContext(cryptProv, 0); cryptProv = 0; } } }; static UUIDCleanup uuidCleanup; } #elif !defined(_WIN32) // // Unfortunately on Linux (at least up to 2.6.9), concurrent access to /dev/urandom // can return the same value. Search for "Concurrent access to /dev/urandom" in the // linux-kernel mailing list archive for additional details. // Since /dev/urandom on other platforms is usually a port from Linux, this problem // could be widespread. Therefore, instead of using 122 random bits that could be // duplicated, we replace the last 15 bits of all "random" UUIDs by the last 15 bits // of the process id, and in each process, we serialize access to /dev/urandom using // a static mutex. // static IceUtil::StaticMutex staticMutex = ICE_STATIC_MUTEX_INITIALIZER; static int fd = -1; static char myPid[2]; namespace { // // Close fd at exit // class UUIDCleanup { public: ~UUIDCleanup() { IceUtil::StaticMutex::Lock lock(staticMutex); if(fd != -1) { close(fd); fd = -1; } } }; static UUIDCleanup uuidCleanup; } #endif string IceUtil::UUIDGenerationException::ice_name() const { return _name; } IceUtil::Exception* IceUtil::UUIDGenerationException::ice_clone() const { return new UUIDGenerationException(*this); } void IceUtil::UUIDGenerationException::ice_throw() const { throw *this; } string IceUtil::generateUUID() { #if defined(_WIN32 ) && !defined(_WIN32_WCE) UUID uuid; UuidCreate(&uuid); unsigned char* str; UuidToString(&uuid, &str); string result = reinterpret_cast(str); RpcStringFree(&str); return result; #else struct UUID { unsigned char timeLow[4]; unsigned char timeMid[2]; unsigned char timeHighAndVersion[2]; unsigned char clockSeqHiAndReserved; unsigned char clockSeqLow; unsigned char node[6]; }; UUID uuid; assert(sizeof(UUID) == 16); char* buffer = reinterpret_cast(&uuid); int reads = 0; size_t index = 0; #ifdef _WIN32_WCE HCRYPTPROV localProv; { IceUtil::StaticMutex::Lock lock(staticMutex); if(cryptProv == 0) { if(!CryptAcquireContext(&cryptProv, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { throw UUIDGenerationException(__FILE__, __LINE__); } } localProv = cryptProv; } memset(buffer, 0, 16); if(!CryptGenRandom(localProv, 16, (unsigned char*)buffer)) { throw UUIDGenerationException(__FILE__, __LINE__); } #else { // // Serialize access to /dev/urandom; see comment above. // IceUtil::StaticMutex::Lock lock(staticMutex); if(fd == -1) { fd = open("/dev/urandom", O_RDONLY); if (fd == -1) { assert(0); throw UUIDGenerationException(__FILE__, __LINE__); } // // Initialize myPid as well // pid_t pid = getpid(); myPid[0] = (pid >> 8) & 0x7F; myPid[1] = pid & 0xFF; } // // Limit the number of attempts to 20 reads to avoid // a potential "for ever" loop // while(reads <= 20 && index != sizeof(UUID)) { ssize_t bytesRead = read(fd, buffer + index, sizeof(UUID) - index); if(bytesRead == -1 && errno != EINTR) { int err = errno; fprintf(stderr, "Reading /dev/urandom returned %s\n", strerror(err)); assert(0); throw UUIDGenerationException(__FILE__, __LINE__); } else { index += bytesRead; reads++; } } } if (index != sizeof(UUID)) { assert(0); throw UUIDGenerationException(__FILE__, __LINE__); } // // Replace the end of the node by myPid (15 bits) // uuid.node[4] = (uuid.node[4] & 0x80) | myPid[0]; uuid.node[5] = myPid[1]; #endif // // Adjust the bits that say "version 4" UUID // uuid.timeHighAndVersion[0] &= 0x0F; uuid.timeHighAndVersion[0] |= (4 << 4); uuid.clockSeqHiAndReserved &= 0x3F; uuid.clockSeqHiAndReserved |= 0x80; // // Convert to a UUID string // char uuidString[16 * 2 + 4 + 1]; // 16 bytes, 4 '-' and a final '\0' char* uuidIndex = uuidString; bytesToHex(uuid.timeLow, sizeof(uuid.timeLow), uuidIndex); *uuidIndex++ = '-'; bytesToHex(uuid.timeMid, sizeof(uuid.timeMid), uuidIndex); *uuidIndex++ = '-'; bytesToHex(uuid.timeHighAndVersion, sizeof(uuid.timeHighAndVersion), uuidIndex); *uuidIndex++ = '-'; bytesToHex(&uuid.clockSeqHiAndReserved, sizeof(uuid.clockSeqHiAndReserved), uuidIndex); bytesToHex(&uuid.clockSeqLow, sizeof(uuid.clockSeqLow), uuidIndex); *uuidIndex++ = '-'; bytesToHex(uuid.node, sizeof(uuid.node), uuidIndex); *uuidIndex = '\0'; return uuidString; #endif } IceE-1.2.0/src/IceE/ConvertUTF.cpp0000755000076400007640000003773510616505646016365 0ustar matthewmatthew#include #if defined(ICEE_HAS_WSTRING) /* * Copyright 2001-2004 Unicode, Inc. * * Disclaimer * * This source code is provided as is by Unicode, Inc. No claims are * made as to fitness for any particular purpose. No warranties of any * kind are expressed or implied. The recipient agrees to determine * applicability of information provided. If this file has been * purchased on magnetic or optical media from Unicode, Inc., the * sole remedy for any claim will be exchange of defective media * within 90 days of receipt. * * Limitations on Rights to Redistribute This Code * * Unicode, Inc. hereby grants the right to freely use the information * supplied in this file in the creation of products supporting the * Unicode Standard, and to make copies of this file in any form * for internal or external distribution as long as this notice * remains attached. */ // ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** /* --------------------------------------------------------------------- Conversions between UTF32, UTF-16, and UTF-8. Source code file. Author: Mark E. Davis, 1994. Rev History: Rick McGowan, fixes & updates May 2001. Sept 2001: fixed const & error conditions per mods suggested by S. Parent & A. Lillich. June 2002: Tim Dodd added detection and handling of incomplete source sequences, enhanced error detection, added casts to eliminate compiler warnings. July 2003: slight mods to back out aggressive FFFE detection. Jan 2004: updated switches in from-UTF8 conversions. Oct 2004: updated to use UNI_MAX_LEGAL_UTF32 in UTF-32 conversions. See the header file "ConvertUTF.h" for complete documentation. ------------------------------------------------------------------------ */ #include #ifdef CVTUTF_DEBUG #include #endif namespace IceUtil { static const int halfShift = 10; /* used for shifting by 10 bits */ static const UTF32 halfBase = 0x0010000UL; static const UTF32 halfMask = 0x3FFUL; #define UNI_SUR_HIGH_START (UTF32)0xD800 #define UNI_SUR_HIGH_END (UTF32)0xDBFF #define UNI_SUR_LOW_START (UTF32)0xDC00 #define UNI_SUR_LOW_END (UTF32)0xDFFF // #define false 0 // #define true 1 /* --------------------------------------------------------------------- */ /* * Index into the table below with the first byte of a UTF-8 sequence to * get the number of trailing bytes that are supposed to follow it. * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is * left as-is for anyone who may want to do such conversion, which was * allowed in earlier algorithms. */ static const char trailingBytesForUTF8[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 }; /* * Magic values subtracted from a buffer value during UTF8 conversion. * This table contains as many values as there might be trailing bytes * in a UTF-8 sequence. */ static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; /* * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed * into the first byte, depending on how many bytes follow. There are * as many entries in this table as there are UTF-8 sequence types. * (I.e., one byte sequence, two byte... etc.). Remember that sequencs * for *legal* UTF-8 will be 4 or fewer bytes total. */ static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; /* --------------------------------------------------------------------- */ /* The interface converts a whole buffer to avoid function-call overhead. * Constants have been gathered. Loops & conditionals have been removed as * much as possible for efficiency, in favor of drop-through switches. * (See "Note A" at the bottom of the file for equivalent code.) * If your compiler supports it, the "isLegalUTF8" call can be turned * into an inline function. */ /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF16toUTF8 ( const UTF16** sourceStart, const UTF16* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF16* source = *sourceStart; UTF8* target = *targetStart; while (source < sourceEnd) { UTF32 ch; unsigned short bytesToWrite = 0; const UTF32 byteMask = 0xBF; const UTF32 byteMark = 0x80; const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ ch = *source++; /* If we have a surrogate pair, convert to UTF32 first. */ if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { /* If the 16 bits following the high surrogate are in the source buffer... */ if (source < sourceEnd) { UTF32 ch2 = *source; /* If it's a low surrogate, convert to UTF32. */ if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { ch = ((ch - UNI_SUR_HIGH_START) << halfShift) + (ch2 - UNI_SUR_LOW_START) + halfBase; ++source; } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ --source; /* return to the illegal value itself */ result = sourceIllegal; break; } } else { /* We don't have the 16 bits following the high surrogate. */ --source; /* return to the high surrogate */ result = sourceExhausted; break; } } else if (flags == strictConversion) { /* UTF-16 surrogate values are illegal in UTF-32 */ if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { --source; /* return to the illegal value itself */ result = sourceIllegal; break; } } /* Figure out how many bytes the result will require */ if (ch < (UTF32)0x80) { bytesToWrite = 1; } else if (ch < (UTF32)0x800) { bytesToWrite = 2; } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; } else if (ch < (UTF32)0x110000) { bytesToWrite = 4; } else { bytesToWrite = 3; ch = UNI_REPLACEMENT_CHAR; } target += bytesToWrite; if (target > targetEnd) { source = oldSource; /* Back up source pointer! */ target -= bytesToWrite; result = targetExhausted; break; } switch (bytesToWrite) { /* note: everything falls through. */ case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); } target += bytesToWrite; } *sourceStart = source; *targetStart = target; return result; } /* --------------------------------------------------------------------- */ /* * Utility routine to tell whether a sequence of bytes is legal UTF-8. * This must be called with the length pre-determined by the first byte. * If not calling this from ConvertUTF8to*, then the length can be set by: * length = trailingBytesForUTF8[*source]+1; * and the sequence is illegal right away if there aren't that many bytes * available. * If presented with a length > 4, this returns false. The Unicode * definition of UTF-8 goes up to 4-byte sequences. */ static Boolean isLegalUTF8(const UTF8 *source, int length) { UTF8 a; const UTF8 *srcptr = source+length; switch (length) { default: return false; /* Everything else falls through when "true"... */ case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; case 2: if ((a = (*--srcptr)) > 0xBF) return false; switch (*source) { /* no fall-through in this inner switch */ case 0xE0: if (a < 0xA0) return false; break; case 0xED: if (a > 0x9F) return false; break; case 0xF0: if (a < 0x90) return false; break; case 0xF4: if (a > 0x8F) return false; break; default: if (a < 0x80) return false; } case 1: if (*source >= 0x80 && *source < 0xC2) return false; } if (*source > 0xF4) return false; return true; } /* --------------------------------------------------------------------- */ /* * Exported function to return whether a UTF-8 sequence is legal or not. * This is not used here; it's just exported. */ Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { if(source == sourceEnd) { return true; } while(true) { int length = trailingBytesForUTF8[*source]+1; // Is buffer big enough to contain character? if (source+length > sourceEnd) { return false; } // Is character legal UTF8? if(!isLegalUTF8(source, length)) { return false; } // Are we at end of buffer? source += length; if(source == sourceEnd) { return true; } } } /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF8toUTF16 ( const UTF8** sourceStart, const UTF8* sourceEnd, UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF8* source = *sourceStart; UTF16* target = *targetStart; while (source < sourceEnd) { UTF32 ch = 0; unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; if (source + extraBytesToRead >= sourceEnd) { result = sourceExhausted; break; } /* Do this check whether lenient or strict */ if (! isLegalUTF8(source, extraBytesToRead+1)) { result = sourceIllegal; break; } /* * The cases all fall through. See "Note A" below. */ switch (extraBytesToRead) { case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ case 3: ch += *source++; ch <<= 6; case 2: ch += *source++; ch <<= 6; case 1: ch += *source++; ch <<= 6; case 0: ch += *source++; } ch -= offsetsFromUTF8[extraBytesToRead]; if (target >= targetEnd) { source -= (extraBytesToRead+1); /* Back up source pointer! */ result = targetExhausted; break; } if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ /* UTF-16 surrogate values are illegal in UTF-32 */ if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { if (flags == strictConversion) { source -= (extraBytesToRead+1); /* return to the illegal value itself */ result = sourceIllegal; break; } else { *target++ = UNI_REPLACEMENT_CHAR; } } else { *target++ = (UTF16)ch; /* normal case */ } } else if (ch > UNI_MAX_UTF16) { if (flags == strictConversion) { result = sourceIllegal; source -= (extraBytesToRead+1); /* return to the start */ break; /* Bail out; shouldn't continue */ } else { *target++ = UNI_REPLACEMENT_CHAR; } } else { /* target is a character in range 0xFFFF - 0x10FFFF. */ if (target + 1 >= targetEnd) { source -= (extraBytesToRead+1); /* Back up source pointer! */ result = targetExhausted; break; } ch -= halfBase; *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); } } *sourceStart = source; *targetStart = target; return result; } /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF32toUTF8 ( const UTF32** sourceStart, const UTF32* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF32* source = *sourceStart; UTF8* target = *targetStart; while (source < sourceEnd) { UTF32 ch; unsigned short bytesToWrite = 0; const UTF32 byteMask = 0xBF; const UTF32 byteMark = 0x80; ch = *source++; if (flags == strictConversion ) { /* UTF-16 surrogate values are illegal in UTF-32 */ if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { --source; /* return to the illegal value itself */ result = sourceIllegal; break; } } /* * Figure out how many bytes the result will require. Turn any * illegally large UTF32 things (> Plane 17) into replacement chars. */ if (ch < (UTF32)0x80) { bytesToWrite = 1; } else if (ch < (UTF32)0x800) { bytesToWrite = 2; } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; } else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4; } else { bytesToWrite = 3; ch = UNI_REPLACEMENT_CHAR; result = sourceIllegal; } target += bytesToWrite; if (target > targetEnd) { --source; /* Back up source pointer! */ target -= bytesToWrite; result = targetExhausted; break; } switch (bytesToWrite) { /* note: everything falls through. */ case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]); } target += bytesToWrite; } *sourceStart = source; *targetStart = target; return result; } /* --------------------------------------------------------------------- */ ConversionResult ConvertUTF8toUTF32 ( const UTF8** sourceStart, const UTF8* sourceEnd, UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { ConversionResult result = conversionOK; const UTF8* source = *sourceStart; UTF32* target = *targetStart; while (source < sourceEnd) { UTF32 ch = 0; unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; if (source + extraBytesToRead >= sourceEnd) { result = sourceExhausted; break; } /* Do this check whether lenient or strict */ if (! isLegalUTF8(source, extraBytesToRead+1)) { result = sourceIllegal; break; } /* * The cases all fall through. See "Note A" below. */ switch (extraBytesToRead) { case 5: ch += *source++; ch <<= 6; case 4: ch += *source++; ch <<= 6; case 3: ch += *source++; ch <<= 6; case 2: ch += *source++; ch <<= 6; case 1: ch += *source++; ch <<= 6; case 0: ch += *source++; } ch -= offsetsFromUTF8[extraBytesToRead]; if (target >= targetEnd) { source -= (extraBytesToRead+1); /* Back up the source pointer! */ result = targetExhausted; break; } if (ch <= UNI_MAX_LEGAL_UTF32) { /* * UTF-16 surrogate values are illegal in UTF-32, and anything * over Plane 17 (> 0x10FFFF) is illegal. */ if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { if (flags == strictConversion) { source -= (extraBytesToRead+1); /* return to the illegal value itself */ result = sourceIllegal; break; } else { *target++ = UNI_REPLACEMENT_CHAR; } } else { *target++ = ch; } } else { /* i.e., ch > UNI_MAX_LEGAL_UTF32 */ result = sourceIllegal; *target++ = UNI_REPLACEMENT_CHAR; } } *sourceStart = source; *targetStart = target; return result; } /* --------------------------------------------------------------------- Note A. The fall-through switches in UTF-8 reading code save a temp variable, some decrements & conditionals. The switches are equivalent to the following loop: { int tmpBytesToRead = extraBytesToRead+1; do { ch += *source++; --tmpBytesToRead; if (tmpBytesToRead) ch <<= 6; } while (tmpBytesToRead > 0); } In UTF-8 writing code, the switches on "bytesToWrite" are similarly unrolled loops. --------------------------------------------------------------------- */ } #endif IceE-1.2.0/src/IceE/ProxyFactory.h0000644000076400007640000000247610616403646016470 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_PROXY_FACTORY_H #define ICEE_PROXY_FACTORY_H #include #include #include #include #include namespace Ice { class LocalException; } namespace IceInternal { class BasicStream; class ProxyFactory : public IceUtil::Shared { public: Ice::ObjectPrx stringToProxy(const std::string&) const; std::string proxyToString(const Ice::ObjectPrx&) const; Ice::ObjectPrx propertyToProxy(const std::string&) const; Ice::ObjectPrx streamToProxy(BasicStream*) const; void proxyToStream(const Ice::ObjectPrx&, BasicStream*) const; Ice::ObjectPrx referenceToProxy(const ReferencePtr&) const; void checkRetryAfterException(const Ice::LocalException&, const ReferencePtr&, int&) const; private: ProxyFactory(const InstancePtr&); virtual ~ProxyFactory(); friend class Instance; InstancePtr _instance; std::vector _retryIntervals; }; } #endif IceE-1.2.0/src/IceE/Incoming.cpp0000644000076400007640000002536410616161100016100 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceInternal::Incoming::Incoming(Instance* inst, Connection* con, BasicStream& is, const ObjectAdapterPtr& adapter) : _os(inst, inst->messageSizeMax() #ifdef ICEE_HAS_WSTRING , inst->initializationData().stringConverter, inst->initializationData().wstringConverter #endif ), _is(is), _connection(con) { setAdapter(adapter); _current.con = con; _current.adapter = adapter.get(); } void IceInternal::Incoming::setAdapter(const Ice::ObjectAdapterPtr& adapter) { _adapter = adapter; if(_adapter) { _servantManager = _adapter->getServantManager().get(); if(!_servantManager) { _adapter = 0; } } else { _servantManager = 0; } } void IceInternal::Incoming::invoke(bool response, Int requestId) { assert(_adapter && _servantManager); _current.requestId = requestId; // // Clear the context from the previous invocation. // _current.ctx.clear(); // // Read the current. // //_current.id.__read(&_is); _is.read(_current.id.name); // Directly read name for performance reasons. _is.read(_current.id.category); // Directly read category for performance reasons. // // For compatibility with the old FacetPath. Note that we don't use // the stream read vector method for performance reasons. // // vector facetPath; // _is.read(facetPath); // string facet; // if(!facetPath.empty()) // { // if(facetPath.size() > 1) // { // throw MarshalException(__FILE__, __LINE__); // } // facet.swap(facetPath[0]); // } // _current.facet.swap(facet); Int sz; _is.readSize(sz); if(sz > 0) { if(sz > 1) { throw MarshalException(__FILE__, __LINE__); } _is.read(_current.facet); } else { _current.facet.clear(); } _is.read(_current.operation, false); Byte b; _is.read(b); _current.mode = static_cast(b); _is.readSize(sz); while(sz--) { pair pr; _is.read(const_cast(pr.first)); _is.read(pr.second); _current.ctx.insert(_current.ctx.end(), pr); } _is.startReadEncaps(); if(response) { assert(_os.b.size() == headerSize + 4); // Dispatch status position. _os.write(static_cast(0)); _os.startWriteEncaps(); } // Initialize status to some value, to keep the compiler happy. DispatchStatus status = DispatchOK; // // Don't put the code above into the try block below. Exceptions // in the code above are considered fatal, and must propagate to // the caller of this operation. // try { Ice::ObjectPtr servant; if(_servantManager) { servant = _servantManager->findServant(_current.id, _current.facet); } if(!servant) { if(_servantManager && _servantManager->hasServant(_current.id)) { status = DispatchFacetNotExist; } else { status = DispatchObjectNotExist; } } else { status = servant->__dispatch(*this, _current); } } catch(RequestFailedException& ex) { _is.endReadEncaps(); if(ex.id.name.empty()) { ex.id = _current.id; } if(ex.facet.empty() && !_current.facet.empty()) { ex.facet = _current.facet; } if(ex.operation.empty() && !_current.operation.empty()) { ex.operation = _current.operation; } if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1) { __warning(ex); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. if(dynamic_cast(&ex)) { _os.write(static_cast(DispatchObjectNotExist)); } else if(dynamic_cast(&ex)) { _os.write(static_cast(DispatchFacetNotExist)); } else if(dynamic_cast(&ex)) { _os.write(static_cast(DispatchOperationNotExist)); } else { assert(false); } ex.id.__write(&_os); // // For compatibility with the old FacetPath. // if(ex.facet.empty()) { _os.write(static_cast(0), static_cast(0)); } else { _os.write(&ex.facet, &ex.facet + 1); } _os.write(ex.operation, false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(const UnknownLocalException& ex) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning(ex); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownLocalException)); _os.write(ex.unknown, false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(const UnknownUserException& ex) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning(ex); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownUserException)); _os.write(ex.unknown, false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(const UnknownException& ex) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning(ex); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownException)); _os.write(ex.unknown, false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(const LocalException& ex) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning(ex); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownLocalException)); _os.write(ex.toString(), false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(const UserException& ex) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning(ex); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownUserException)); _os.write(ex.toString(), false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(const Exception& ex) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning(ex); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownException)); _os.write(ex.toString(), false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(const std::exception& ex) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning(string("std::exception: ") + ex.what()); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownException)); string msg = string("std::exception: ") + ex.what(); _os.write(msg, false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } catch(...) { _is.endReadEncaps(); if(_os.instance()->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 0) { __warning("unknown c++ exception"); } if(response) { _os.endWriteEncaps(); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(DispatchUnknownException)); _os.write(string("unknown c++ exception"), false); _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } return; } // // Don't put the code below into the try block above. Exceptions // in the code below are considered fatal, and must propagate to // the caller of this operation. // _is.endReadEncaps(); if(response) { _os.endWriteEncaps(); if(status != DispatchOK && status != DispatchUserException) { assert(status == DispatchObjectNotExist || status == DispatchFacetNotExist || status == DispatchOperationNotExist); _os.b.resize(headerSize + 4); // Dispatch status position. _os.write(static_cast(status)); _current.id.__write(&_os); // // For compatibility with the old FacetPath. // if(_current.facet.empty()) { _os.write(static_cast(0), static_cast(0)); } else { _os.write(&_current.facet, &_current.facet + 1); } _os.write(_current.operation, false); } else { *(_os.b.begin() + headerSize + 4) = static_cast(status); // Dispatch status position. } _connection->sendResponse(&_os); } else { _connection->sendNoResponse(); } } void IceInternal::Incoming::__warning(const Exception& ex) const { __warning(ex.toString()); } void IceInternal::Incoming::__warning(const string& msg) const { Warning out(_os.instance()->initializationData().logger); out << "dispatch exception: " << msg; out << "\nidentity: " << _os.instance()->identityToString(_current.id); out << "\nfacet: " << IceUtil::escapeString(_current.facet, ""); out << "\noperation: " << _current.operation; } IceE-1.2.0/src/IceE/ReferenceFactoryF.h0000644000076400007640000000116010602152305017324 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_REFERENCE_FACTORY_F_H #define ICEE_REFERENCE_FACTORY_F_H #include #include namespace IceInternal { class ReferenceFactory; IceUtil::Shared* upCast(ReferenceFactory*); typedef Handle ReferenceFactoryPtr; } #endif IceE-1.2.0/src/IceE/TraceLevels.cpp0000644000076400007640000000222110602152305016533 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(TraceLevels* p) { return p; } IceInternal::TraceLevels::TraceLevels(const PropertiesPtr& properties) : network(0), networkCat("Network"), protocol(0), protocolCat("Protocol"), retry(0), retryCat("Retry"), location(0), locationCat("Location") { const string keyBase = "Ice.Trace."; const_cast(network) = properties->getPropertyAsInt(keyBase + networkCat); const_cast(protocol) = properties->getPropertyAsInt(keyBase + protocolCat); const_cast(retry) = properties->getPropertyAsInt(keyBase + retryCat); const_cast(location) = properties->getPropertyAsInt(keyBase + locationCat); } IceE-1.2.0/src/IceE/IncomingConnectionFactory.h0000755000076400007640000000420310576536574021137 0ustar matthewmatthew // ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_INCOMING_CONNECTION_FACTORY_H #define ICEE_INCOMING_CONNECTION_FACTORY_H #include #include #include #include #include #include #include #include #include #include #include #include namespace IceInternal { class IncomingConnectionFactory : public IceUtil::Monitor, public IceUtil::Shared { public: void activate(); void hold(); void destroy(); void waitUntilHolding() const; void waitUntilFinished(); EndpointPtr endpoint() const; std::list connections() const; #ifdef ICEE_HAS_BATCH void flushBatchRequests(); #endif virtual std::string toString() const; private: IncomingConnectionFactory(const InstancePtr&, const EndpointPtr&, const ::Ice::ObjectAdapterPtr&); virtual ~IncomingConnectionFactory(); friend class ::Ice::ObjectAdapter; enum State { StateActive, StateHolding, StateClosed }; void setState(State); void run(); class ThreadPerIncomingConnectionFactory : public IceUtil::Thread { public: ThreadPerIncomingConnectionFactory(const IncomingConnectionFactoryPtr&); virtual void run(); private: IncomingConnectionFactoryPtr _factory; }; friend class ThreadPerIncomingConnectionFactory; IceUtil::ThreadPtr _threadPerIncomingConnectionFactory; const InstancePtr _instance; AcceptorPtr _acceptor; const TransceiverPtr _transceiver; const EndpointPtr _endpoint; const ::Ice::ObjectAdapterPtr _adapter; const bool _warn; std::list _connections; State _state; }; } #endif IceE-1.2.0/src/IceE/Makefile.mak0000755000076400007640000001066510620347541016053 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ..\.. LIBNAME = $(top_srcdir)\lib\icee$(LIBSUFFIX).lib DLLNAME = $(top_srcdir)\bin\icee$(SOVERSION)$(LIBSUFFIX).dll TARGETS = $(LIBNAME) $(DLLNAME) TRANSPORT_DIR = $(top_srcdir)\src\TcpTransport TRANSPORT_OBJS = Acceptor.obj \ Connector.obj \ EndpointFactory.obj \ TcpEndpoint.obj \ Transceiver.obj LOCAL_OBJS = BasicStream.obj \ Buffer.obj \ BuiltinSequences.obj \ Communicator.obj \ Cond.obj \ Connection.obj \ ConvertUTF.obj \ Current.obj \ DefaultsAndOverrides.obj \ Endpoint.obj \ ExceptionBase.obj \ FactoryTable.obj \ FactoryTableDef.obj \ Identity.obj \ Incoming.obj \ IncomingConnectionFactory.obj \ Initialize.obj \ Instance.obj \ LocalException.obj \ Locator.obj \ LocatorInfo.obj \ Logger.obj \ LoggerI.obj \ LoggerUtil.obj \ Network.obj \ Object.obj \ ObjectAdapter.obj \ ObjectAdapterFactory.obj \ OperationMode.obj \ Outgoing.obj \ OutgoingConnectionFactory.obj \ Properties.obj \ Protocol.obj \ Proxy.obj \ ProxyFactory.obj \ RecMutex.obj \ Reference.obj \ ReferenceFactory.obj \ Router.obj \ RouterInfo.obj \ SafeStdio.obj \ ServantManager.obj \ Shared.obj \ StaticMutex.obj \ StringConverter.obj \ StringUtil.obj \ Thread.obj \ ThreadException.obj \ Time.obj \ TraceLevels.obj \ TraceUtil.obj \ UnknownEndpoint.obj \ Unicode.obj \ UUID.obj SRCS = $(LOCAL_OBJS:.obj=.cpp) \ $(TRANSPORT_DIR)\Acceptor.cpp \ $(TRANSPORT_DIR)\Connector.cpp \ $(TRANSPORT_DIR)\EndpointFactory.cpp \ $(TRANSPORT_DIR)\TcpEndpoint.cpp \ $(TRANSPORT_DIR)\Transceiver.cpp HDIR = $(includedir)\IceE SDIR = $(slicedir)\IceE !include $(top_srcdir)\config\Make.rules.mak CPPFLAGS = -I.. $(CPPFLAGS) -DICE_API_EXPORTS -DFD_SETSIZE=1024 -WX -DWIN32_LEAN_AND_MEAN SLICE2CPPEFLAGS = --ice --include-dir IceE --dll-export ICE_API $(SLICE2CPPEFLAGS) !if "$(STATICLIBS)" != "yes" & "$(OPTIMIZE_SPEED)" != "yes" & "$(OPTIMIZE_SIZE)" != "yes" PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb) !endif {$(TRANSPORT_DIR)\}.cpp.obj:: $(CXX) /c $(CPPFLAGS) $(CXXFLAGS) $< !if "$(STATICLIBS)" == "yes" $(DLLNAME): $(LIBNAME): $(LOCAL_OBJS) $(TRANSPORT_OBJS) $(AR) $(ARFLAGS) $(PDBFLAGS) $(LOCAL_OBJS) $(TRANSPORT_OBJS) /out:$(LIBNAME) !else $(LIBNAME): $(DLLNAME) $(DLLNAME): $(LOCAL_OBJS) $(TRANSPORT_OBJS) $(LINK) $(LDFLAGS) /dll $(PDBFLAGS) $(LOCAL_OBJS) $(TRANSPORT_OBJS) /out:$(DLLNAME) $(BASELIBS) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest @if exist $(DLLNAME:.dll=.exp) del /q $(DLLNAME:.dll=.exp) !endif clean:: del /q BuiltinSequences.cpp $(HDIR)\BuiltinSequences.h del /q Identity.cpp $(HDIR)\Identity.h del /q LocatorF.cpp $(HDIR)\LocatorF.h del /q Locator.cpp $(HDIR)\Locator.h del /q RouterF.cpp $(HDIR)\RouterF.h del /q Router.cpp $(HDIR)\Router.h del /q $(LIBNAME:.lib=.*) install:: all copy $(LIBNAME) $(install_libdir) !if "$(STATICLIBS)" != "yes" clean:: del /q $(DLLNAME:.dll=.*) install:: all copy $(LIBNAME) $(install_libdir) copy $(DLLNAME) $(install_bindir) !endif !include .depend IceE-1.2.0/src/IceE/Cond.cpp0000644000076400007640000000734110576536574015245 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifndef _WIN32 # include #endif #ifdef _WIN32 IceUtil::Semaphore::Semaphore(long initial) { _sem = CreateSemaphore(0, initial, 0x7fffffff, 0); if(_sem == INVALID_HANDLE_VALUE) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } IceUtil::Semaphore::~Semaphore() { CloseHandle(_sem); } void IceUtil::Semaphore::wait() const { int rc = WaitForSingleObject(_sem, INFINITE); if(rc != WAIT_OBJECT_0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } bool IceUtil::Semaphore::timedWait(const Time& timeout) const { long msec = (long)timeout.toMilliSeconds(); int rc = WaitForSingleObject(_sem, msec); if(rc != WAIT_TIMEOUT && rc != WAIT_OBJECT_0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } return rc != WAIT_TIMEOUT; } void IceUtil::Semaphore::post(int count) const { int rc = ReleaseSemaphore(_sem, count, 0); if(rc == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } IceUtil::Cond::Cond() : _gate(1), _blocked(0), _unblocked(0), _toUnblock(0) { } IceUtil::Cond::~Cond() { } void IceUtil::Cond::signal() { wake(false); } void IceUtil::Cond::broadcast() { wake(true); } void IceUtil::Cond::wake(bool broadcast) { // // Lock gate & mutex. // _gate.wait(); _internal.lock(); if(_unblocked != 0) { _blocked -= _unblocked; _unblocked = 0; } if(_blocked > 0) { // // Unblock some number of waiters. // _toUnblock = (broadcast) ? _blocked : 1; _internal.unlock(); _queue.post(); } else { // // Otherwise no blocked waiters, release gate & mutex. // _gate.post(); _internal.unlock(); } } void IceUtil::Cond::preWait() const { _gate.wait(); _blocked++; _gate.post(); } void IceUtil::Cond::postWait(bool timedOut) const { _internal.lock(); _unblocked++; if(_toUnblock != 0) { bool last = --_toUnblock == 0; _internal.unlock(); if(timedOut) { _queue.wait(); } if(last) { _gate.post(); } else { _queue.post(); } } else { _internal.unlock(); } } void IceUtil::Cond::dowait() const { try { _queue.wait(); postWait(false); } catch(...) { postWait(false); throw; } } bool IceUtil::Cond::timedDowait(const Time& timeout) const { try { bool rc = _queue.timedWait(timeout); postWait(!rc); return rc; } catch(...) { postWait(false); throw; } } #else IceUtil::Cond::Cond() { int rc; pthread_condattr_t attr; rc = pthread_condattr_init(&attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } rc = pthread_cond_init(&_cond, &attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } rc = pthread_condattr_destroy(&attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } IceUtil::Cond::~Cond() { int rc = 0; rc = pthread_cond_destroy(&_cond); assert(rc == 0); } void IceUtil::Cond::signal() { int rc = pthread_cond_signal(&_cond); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } void IceUtil::Cond::broadcast() { int rc = pthread_cond_broadcast(&_cond); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } #endif IceE-1.2.0/src/IceE/AcceptorF.h0000644000076400007640000000107610614125577015662 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ACCEPTOR_F_H #define ICEE_ACCEPTOR_F_H #include #include namespace IceInternal { class Acceptor; IceUtil::Shared* upCast(Acceptor*); typedef Handle AcceptorPtr; } #endif IceE-1.2.0/src/IceE/TraceUtil.h0000644000076400007640000000165610603224430015676 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_TRACE_UTIL_H #define ICEE_TRACE_UTIL_H #include #include namespace IceInternal { class BasicStream; void traceHeader(const char*, const BasicStream&, const ::Ice::LoggerPtr&, const TraceLevelsPtr&); void traceRequest(const char*, const BasicStream&, const ::Ice::LoggerPtr&, const TraceLevelsPtr&); #ifdef ICEE_HAS_BATCH void traceBatchRequest(const char*, const BasicStream&, const ::Ice::LoggerPtr&, const TraceLevelsPtr&); #endif void traceReply(const char*, const BasicStream&, const ::Ice::LoggerPtr&, const TraceLevelsPtr&); } #endif IceE-1.2.0/src/IceE/EndpointFactoryF.h0000644000076400007640000000115210614125577017225 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ENDPOINT_FACTORY_F_H #define ICEE_ENDPOINT_FACTORY_F_H #include #include namespace IceInternal { class EndpointFactory; IceUtil::Shared* upCast(EndpointFactory*); typedef Handle EndpointFactoryPtr; } #endif IceE-1.2.0/src/IceE/Instance.cpp0000644000076400007640000004151110616576164016115 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #ifdef ICEE_HAS_ROUTER # include # include #endif #ifdef ICEE_HAS_LOCATOR # include # include #endif #include #include #include #include #include #include #include #ifndef ICEE_PURE_CLIENT # include #endif #include #include #ifdef _WIN32 # include #else # include # include # include #endif using namespace std; using namespace Ice; using namespace IceInternal; static IceUtil::StaticMutex staticMutex = ICE_STATIC_MUTEX_INITIALIZER; static bool oneOffDone = false; static int instanceCount = 0; static bool printProcessIdDone = false; namespace IceUtil { extern bool nullHandleAbort; } IceUtil::Shared* IceInternal::upCast(Instance* p) { return p; } bool IceInternal::Instance::destroyed() const { IceUtil::RecMutex::Lock sync(*this); return _state == StateDestroyed; } TraceLevelsPtr IceInternal::Instance::traceLevels() const { // No mutex lock, immutable. return _traceLevels; } DefaultsAndOverridesPtr IceInternal::Instance::defaultsAndOverrides() const { // No mutex lock, immutable. return _defaultsAndOverrides; } #ifdef ICEE_HAS_ROUTER RouterManagerPtr IceInternal::Instance::routerManager() const { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } return _routerManager; } #endif #ifdef ICEE_HAS_LOCATOR LocatorManagerPtr IceInternal::Instance::locatorManager() const { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } return _locatorManager; } #endif ReferenceFactoryPtr IceInternal::Instance::referenceFactory() const { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } return _referenceFactory; } ProxyFactoryPtr IceInternal::Instance::proxyFactory() const { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } return _proxyFactory; } OutgoingConnectionFactoryPtr IceInternal::Instance::outgoingConnectionFactory() const { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } return _outgoingConnectionFactory; } #ifndef ICEE_PURE_CLIENT ObjectAdapterFactoryPtr IceInternal::Instance::objectAdapterFactory() const { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } return _objectAdapterFactory; } #endif #ifndef ICEE_PURE_BLOCKING_CLIENT size_t IceInternal::Instance::threadPerConnectionStackSize() const { // No mutex lock, immutable. return _threadPerConnectionStackSize; } #endif EndpointFactoryPtr IceInternal::Instance::endpointFactory() const { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } return _endpointFactory; } #ifdef ICEE_HAS_BATCH void IceInternal::Instance::flushBatchRequests() { OutgoingConnectionFactoryPtr connectionFactory; #ifndef ICEE_PURE_CLIENT ObjectAdapterFactoryPtr adapterFactory; #endif { IceUtil::RecMutex::Lock sync(*this); if(_state == StateDestroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } connectionFactory = _outgoingConnectionFactory; #ifndef ICEE_PURE_CLIENT adapterFactory = _objectAdapterFactory; #endif } connectionFactory->flushBatchRequests(); #ifndef ICEE_PURE_CLIENT adapterFactory->flushBatchRequests(); #endif } #endif Identity IceInternal::Instance::stringToIdentity(const string& s) const { Identity ident; // // Find unescaped separator. // string::size_type slash = string::npos, pos = 0; while((pos = s.find('/', pos)) != string::npos) { if(pos == 0 || s[pos - 1] != '\\') { if(slash == string::npos) { slash = pos; } else { // // Extra unescaped slash found. // IdentityParseException ex(__FILE__, __LINE__); ex.str = s; throw ex; } } pos++; } if(slash == string::npos) { if(!IceUtil::unescapeString(s, 0, s.size(), ident.name)) { IdentityParseException ex(__FILE__, __LINE__); ex.str = s; throw ex; } } else { if(!IceUtil::unescapeString(s, 0, slash, ident.category)) { IdentityParseException ex(__FILE__, __LINE__); ex.str = s; throw ex; } if(slash + 1 < s.size()) { if(!IceUtil::unescapeString(s, slash + 1, s.size(), ident.name)) { IdentityParseException ex(__FILE__, __LINE__); ex.str = s; throw ex; } } } #ifdef ICEE_HAS_WSTRING if(_initData.stringConverter) { string tmpString; _initData.stringConverter->fromUTF8(reinterpret_cast(ident.name.data()), reinterpret_cast(ident.name.data() + ident.name.size()), tmpString); ident.name = tmpString; _initData.stringConverter->fromUTF8(reinterpret_cast(ident.category.data()), reinterpret_cast(ident.category.data() + ident.category.size()), tmpString); ident.category = tmpString; } #endif return ident; } string IceInternal::Instance::identityToString(const Identity& ident) const { string name = ident.name; string category = ident.category; #ifdef ICEE_HAS_WSTRING if(_initData.stringConverter) { UTF8BufferI buffer; Byte* last = _initData.stringConverter->toUTF8(ident.name.data(), ident.name.data() + ident.name.size(), buffer); name = string(reinterpret_cast(buffer.getBuffer()), last - buffer.getBuffer()); buffer.reset(); last = _initData.stringConverter->toUTF8(ident.category.data(), ident.category.data() + ident.category.size(), buffer); category = string(reinterpret_cast(buffer.getBuffer()), last - buffer.getBuffer()); } #endif if(category.empty()) { return IceUtil::escapeString(name, "/"); } else { return IceUtil::escapeString(category, "/") + '/' + IceUtil::escapeString(name, "/"); } } IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const InitializationData& initData) : _state(StateActive), _initData(initData), _messageSizeMax(0) #ifndef ICEE_PURE_BLOCKING_CLIENT , _threadPerConnectionStackSize(0) #endif { try { __setNoDelete(true); IceUtil::StaticMutex::Lock sync(staticMutex); instanceCount++; if(!oneOffDone) { // // StdOut and StdErr redirection // string stdOutFilename = _initData.properties->getProperty("Ice.StdOut"); string stdErrFilename = _initData.properties->getProperty("Ice.StdErr"); if(stdOutFilename != "") { FILE * file; #ifdef _WIN32_WCE wchar_t* wtext = new wchar_t[sizeof(wchar_t) * stdOutFilename.length()]; mbstowcs(wtext, stdOutFilename.c_str(), stdOutFilename.length()); file = _wfreopen(wtext, L"a", stdout); delete wtext; #else file = freopen(stdOutFilename.c_str(), "a", stdout); #endif if(file == 0) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); throw ex; } } if(stdErrFilename != "") { FILE* file; #ifdef _WIN32_WCE wchar_t* wtext = new wchar_t[sizeof(wchar_t) * stdErrFilename.length()]; mbstowcs(wtext, stdErrFilename.c_str(), stdErrFilename.length()); file = _wfreopen(wtext, L"a", stderr); delete wtext; #else file = freopen(stdErrFilename.c_str(), "a", stderr); #endif if(file == 0) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); throw ex; } } unsigned int seed = static_cast(IceUtil::Time::now().toMicroSeconds()); srand(seed); #ifndef _WIN32 srand48(seed); #endif if(_initData.properties->getPropertyAsInt("Ice.NullHandleAbort") > 0) { IceUtil::nullHandleAbort = true; } #ifndef _WIN32 string newUser = _initData.properties->getProperty("Ice.ChangeUser"); if(!newUser.empty()) { struct passwd* pw = getpwnam(newUser.c_str()); if(!pw) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); throw ex; } if(setgid(pw->pw_gid) == -1) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); throw ex; } if(setuid(pw->pw_uid) == -1) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); throw ex; } } #endif oneOffDone = true; } if(instanceCount == 1) { #ifdef _WIN32 WORD version = MAKEWORD(1, 1); WSADATA data; if(WSAStartup(version, &data) != 0) { SocketException ex(__FILE__, __LINE__); ex.error = WSAGetLastError(); throw ex; } #endif #ifndef _WIN32 struct sigaction action; action.sa_handler = SIG_IGN; sigemptyset(&action.sa_mask); action.sa_flags = 0; sigaction(SIGPIPE, &action, 0); #endif } sync.release(); if(!_initData.logger) { _initData.logger = new LoggerI(_initData.properties->getProperty("Ice.ProgramName")); } const_cast(_traceLevels) = new TraceLevels(_initData.properties); const_cast(_defaultsAndOverrides) = new DefaultsAndOverrides(_initData.properties); { static const int defaultMessageSizeMax = 1024; Int num = _initData.properties->getPropertyAsIntWithDefault("Ice.MessageSizeMax", defaultMessageSizeMax); if(num < 1) { const_cast(_messageSizeMax) = defaultMessageSizeMax * 1024; // Ignore stupid values. } else if(static_cast(num) > (size_t)(0x7fffffff / 1024)) { const_cast(_messageSizeMax) = static_cast(0x7fffffff); } else { // Property is in kilobytes, _messageSizeMax in bytes. const_cast(_messageSizeMax) = static_cast(num) * 1024; } } #ifndef ICEE_PURE_BLOCKING_CLIENT { Int stackSize = _initData.properties->getPropertyAsInt("Ice.ThreadPerConnection.StackSize"); if(stackSize < 0) { stackSize = 0; } const_cast(_threadPerConnectionStackSize) = static_cast(stackSize); } #endif #ifdef ICEE_HAS_ROUTER _routerManager = new RouterManager; #endif #ifdef ICEE_HAS_LOCATOR _locatorManager = new LocatorManager; #endif _referenceFactory = new ReferenceFactory(this, communicator); _proxyFactory = new ProxyFactory(this); _endpointFactory = new EndpointFactory(this); _outgoingConnectionFactory = new OutgoingConnectionFactory(this); #ifndef ICEE_PURE_CLIENT _objectAdapterFactory = new ObjectAdapterFactory(this, communicator); #endif #ifdef ICEE_HAS_WSTRING if(!_initData.wstringConverter) { _initData.wstringConverter = new UnicodeWstringConverter(); } #endif __setNoDelete(false); } catch(...) { { IceUtil::StaticMutex::Lock sync(staticMutex); --instanceCount; } destroy(); __setNoDelete(false); throw; } } IceInternal::Instance::~Instance() { assert(_state == StateDestroyed); assert(!_referenceFactory); assert(!_proxyFactory); assert(!_outgoingConnectionFactory); #ifndef ICEE_PURE_CLIENT assert(!_objectAdapterFactory); #endif #ifdef ICEE_HAS_ROUTER assert(!_routerManager); #endif #ifdef ICEE_HAS_LOCATOR assert(!_locatorManager); #endif assert(!_endpointFactory); IceUtil::StaticMutex::Lock sync(staticMutex); if(--instanceCount == 0) { #ifdef _WIN32 WSACleanup(); #endif #ifndef _WIN32 struct sigaction action; action.sa_handler = SIG_DFL; sigemptyset(&action.sa_mask); action.sa_flags = 0; sigaction(SIGPIPE, &action, 0); #endif } } void IceInternal::Instance::finishSetup(int& argc, char* argv[]) { // // Get default router and locator proxies. Don't move this // initialization before the plug-in initialization!!! The proxies // might depend on endpoint factories to be installed by plug-ins. // #ifdef ICEE_HAS_ROUTER if(!_defaultsAndOverrides->defaultRouter.empty()) { _referenceFactory->setDefaultRouter( RouterPrx::uncheckedCast(_proxyFactory->stringToProxy(_defaultsAndOverrides->defaultRouter))); } #endif #ifdef ICEE_HAS_LOCATOR if(!_defaultsAndOverrides->defaultLocator.empty()) { _referenceFactory->setDefaultLocator( LocatorPrx::uncheckedCast(_proxyFactory->stringToProxy(_defaultsAndOverrides->defaultLocator))); } #endif #ifndef _WIN32_WCE // // Show process id if requested (but only once). // bool printProcessId = false; if(!printProcessIdDone && _initData.properties->getPropertyAsInt("Ice.PrintProcessId") > 0) { // // Safe double-check locking (no dependent variable!) // IceUtil::StaticMutex::Lock sync(staticMutex); printProcessId = !printProcessIdDone; // // We anticipate: we want to print it once, and we don't care when. // printProcessIdDone = true; } if(printProcessId) { #ifdef _WIN32 printf("%d\n", _getpid()); #else printf("%d\n", getpid()); #endif fflush(stdout); } #endif } void IceInternal::Instance::destroy() { { IceUtil::RecMutex::Lock sync(*this); // // If the _state is not StateActive then the instance is // either being destroyed, or has already been destroyed. // if(_state != StateActive) { return; } // // We cannot set state to StateDestroyed otherwise instance // methods called during the destroy process (such as // outgoingConnectionFactory() from // ObjectAdapterI::deactivate() will cause an exception. // _state = StateDestroyInProgress; } #ifndef ICEE_PURE_CLIENT if(_objectAdapterFactory) { _objectAdapterFactory->shutdown(); } if(_outgoingConnectionFactory) { _outgoingConnectionFactory->destroy(); } if(_objectAdapterFactory) { _objectAdapterFactory->destroy(); } if(_outgoingConnectionFactory) { _outgoingConnectionFactory->waitUntilFinished(); } #else if(_outgoingConnectionFactory) { _outgoingConnectionFactory->destroy(); _outgoingConnectionFactory->waitUntilFinished(); } #endif { IceUtil::RecMutex::Lock sync(*this); #ifndef ICEE_PURE_CLIENT _objectAdapterFactory = 0; #endif _outgoingConnectionFactory = 0; if(_referenceFactory) { _referenceFactory->destroy(); _referenceFactory = 0; } // No destroy function defined. // _proxyFactory->destroy(); _proxyFactory = 0; #ifdef ICEE_HAS_ROUTER if(_routerManager) { _routerManager->destroy(); _routerManager = 0; } #endif #ifdef ICEE_HAS_LOCATOR if(_locatorManager) { _locatorManager->destroy(); _locatorManager = 0; } #endif if(_endpointFactory) { _endpointFactory->destroy(); _endpointFactory = 0; } _state = StateDestroyed; } } #ifdef ICEE_HAS_WSTRING IceInternal::UTF8BufferI::UTF8BufferI() : _buffer(0), _offset(0) { } IceInternal::UTF8BufferI::~UTF8BufferI() { free(_buffer); } Byte* IceInternal::UTF8BufferI::getMoreBytes(size_t howMany, Byte* firstUnused) { if(_buffer == 0) { _buffer = (Byte*)malloc(howMany); } else { assert(firstUnused != 0); _offset = firstUnused - _buffer; _buffer = (Byte*)realloc(_buffer, _offset + howMany); } return _buffer + _offset; } Byte* IceInternal::UTF8BufferI::getBuffer() { return _buffer; } void IceInternal::UTF8BufferI::reset() { free(_buffer); _buffer = 0; _offset = 0; } #endif IceE-1.2.0/src/IceE/ProxyFactory.cpp0000644000076400007640000001567610616403646017031 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(ProxyFactory* p) { return p; } ObjectPrx IceInternal::ProxyFactory::stringToProxy(const string& str) const { ReferencePtr ref = _instance->referenceFactory()->create(str); return referenceToProxy(ref); } string IceInternal::ProxyFactory::proxyToString(const ObjectPrx& proxy) const { if(proxy) { return proxy->__reference()->toString(); } else { return ""; } } ObjectPrx IceInternal::ProxyFactory::propertyToProxy(const string& prefix) const { ReferencePtr ref = _instance->referenceFactory()->createFromProperties(prefix); return referenceToProxy(ref); } ObjectPrx IceInternal::ProxyFactory::streamToProxy(BasicStream* s) const { Identity ident; ident.__read(s); ReferencePtr ref = _instance->referenceFactory()->create(ident, s); return referenceToProxy(ref); } void IceInternal::ProxyFactory::proxyToStream(const ObjectPrx& proxy, BasicStream* s) const { if(proxy) { proxy->__reference()->getIdentity().__write(s); proxy->__reference()->streamWrite(s); } else { Identity ident; ident.__write(s); } } ObjectPrx IceInternal::ProxyFactory::referenceToProxy(const ReferencePtr& ref) const { if(ref) { ObjectPrx proxy = new ::IceProxy::Ice::Object; proxy->setup(ref); return proxy; } else { return 0; } } void IceInternal::ProxyFactory::checkRetryAfterException(const LocalException& ex, const ReferencePtr& ref, int& cnt) const { TraceLevelsPtr traceLevels = _instance->traceLevels(); LoggerPtr logger = _instance->initializationData().logger; #if defined(ICEE_HAS_LOCATOR) || defined(ICEE_HAS_ROUTER) const ObjectNotExistException* one = dynamic_cast(&ex); if(one) { #ifdef ICEE_HAS_LOCATOR LocatorInfoPtr li = ref->getLocatorInfo(); if(li) { // // We retry ObjectNotExistException if the reference is indirect. // li->clearObjectCache(IndirectReferencePtr::dynamicCast(ref)); } else #endif #ifdef ICEE_HAS_ROUTER if(ref->getRouterInfo() && one->operation == "ice_add_proxy") { // // If we have a router, an ObjectNotExistException with an // operation name "ice_add_proxy" indicates to the client // that the router isn't aware of the proxy (for example, // because it was evicted by the router). In this case, we // must *always* retry, so that the missing proxy is added // to the router. // if(traceLevels->retry >= 1) { Trace out(logger, traceLevels->retryCat); out << "retrying operation call to add proxy to router\n" << ex.toString(); } return; // We must always retry, so we don't look at the retry count. } else #endif { // // For all other cases, we don't retry ObjectNotExistException // ex.ice_throw(); } } else #endif if(dynamic_cast(&ex)) { // // We don't retry other *NotExistException, which are all // derived from RequestFailedException. // ex.ice_throw(); } // // There is no point in retrying an operation that resulted in a // MarshalException. This must have been raised locally (because // if it happened in a server it would result in an // UnknownLocalException instead), which means there was a problem // in this process that will not change if we try again. // // The most likely cause for a MarshalException is exceeding the // maximum message size, which is represented by the the subclass // MemoryLimitException. For example, a client can attempt to send // a message that exceeds the maximum memory size, or accumulate // enough batch requests without flushing that the maximum size is // reached. // // This latter case is especially problematic, because if we were // to retry a batch request after a MarshalException, we would in // fact silently discard the accumulated requests and allow new // batch requests to accumulate. If the subsequent batched // requests do not exceed the maximum message size, it appears to // the client that all of the batched requests were accepted, when // in reality only the last few are actually sent. // if(dynamic_cast(&ex)) { ex.ice_throw(); } ++cnt; assert(cnt > 0); if(cnt > static_cast(_retryIntervals.size())) { if(traceLevels->retry >= 1) { Trace out(logger, traceLevels->retryCat); out << "cannot retry operation call because retry limit has been exceeded\n" << ex.toString(); } ex.ice_throw(); } int interval = _retryIntervals[cnt - 1]; if(traceLevels->retry >= 1) { Trace out(logger, traceLevels->retryCat); out << "retrying operation call"; if(interval > 0) { out << Ice::printfToString(" in %dms", interval); } out << " because of exception\n" << ex.toString(); } if(interval > 0) { // // Sleep before retrying. // IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(interval)); } } IceInternal::ProxyFactory::ProxyFactory(const InstancePtr& instance) : _instance(instance) { string str = _instance->initializationData().properties->getPropertyWithDefault("Ice.RetryIntervals", "0"); string::size_type beg; string::size_type end = 0; while(true) { const string delim = " \t"; beg = str.find_first_not_of(delim, end); if(beg == string::npos) { if(_retryIntervals.empty()) { _retryIntervals.push_back(0); } break; } end = str.find_first_of(delim, beg); if(end == string::npos) { end = str.length(); } if(beg == end) { break; } string value = str.substr(beg, end - beg); int v = atoi(value.c_str()); // // If -1 is the first value, no retry and wait intervals. // if(v == -1 && _retryIntervals.empty()) { break; } _retryIntervals.push_back(v > 0 ? v : 0); } } IceInternal::ProxyFactory::~ProxyFactory() { } IceE-1.2.0/src/IceE/LoggerUtil.cpp0000644000076400007640000000306510576536574016436 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Ice; using namespace IceInternal; Ice::Print::Print(const LoggerPtr& logger) : _logger(logger) { } Ice::Print::~Print() { flush(); } void Ice::Print::flush() { if(!_str.empty()) { _logger->print(_str); } _str = "";; } string& Ice::Print::__str() { return _str; } Ice::Warning::Warning(const LoggerPtr& logger) : _logger(logger) { } Ice::Warning::~Warning() { flush(); } void Ice::Warning::flush() { if(!_str.empty()) { _logger->warning(_str); } _str = ""; } string& Ice::Warning::__str() { return _str; } Ice::Error::Error(const LoggerPtr& logger) : _logger(logger) { } Ice::Error::~Error() { flush(); } void Ice::Error::flush() { if(!_str.empty()) { _logger->error(_str); } _str = ""; } string& Ice::Error::__str() { return _str; } Ice::Trace::Trace(const LoggerPtr& logger, const string& category) : _logger(logger), _category(category) { } Ice::Trace::~Trace() { flush(); } void Ice::Trace::flush() { if(!_str.empty()) { _logger->trace(_category, _str); } _str = ""; } string& Ice::Trace::__str() { return _str; } IceE-1.2.0/src/IceE/IncomingConnectionFactory.cpp0000644000076400007640000002437010602152305021446 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(IncomingConnectionFactory* p) { return p; } void IceInternal::IncomingConnectionFactory::activate() { IceUtil::Monitor::Lock sync(*this); setState(StateActive); } void IceInternal::IncomingConnectionFactory::hold() { IceUtil::Monitor::Lock sync(*this); setState(StateHolding); } void IceInternal::IncomingConnectionFactory::destroy() { IceUtil::Monitor::Lock sync(*this); setState(StateClosed); } void IceInternal::IncomingConnectionFactory::waitUntilHolding() const { list connections; { IceUtil::Monitor::Lock sync(*this); // // First we wait until the connection factory itself is in holding // state. // while(_state < StateHolding) { wait(); } // // We want to wait until all connections are in holding state // outside the thread synchronization. // connections = _connections; } // // Now we wait until each connection is in holding state. // for_each(connections.begin(), connections.end(), Ice::constVoidMemFun(&Connection::waitUntilHolding)); } void IceInternal::IncomingConnectionFactory::waitUntilFinished() { IceUtil::ThreadPtr threadPerIncomingConnectionFactory; list connections; { IceUtil::Monitor::Lock sync(*this); // // First we wait until the factory is destroyed. If we are using // an acceptor, we also wait for it to be closed. // while(_state != StateClosed || _acceptor) { wait(); } threadPerIncomingConnectionFactory = _threadPerIncomingConnectionFactory; _threadPerIncomingConnectionFactory = 0; // // We want to wait until all connections are finished outside the // thread synchronization. // connections.swap(_connections); } if(threadPerIncomingConnectionFactory) { threadPerIncomingConnectionFactory->getThreadControl().join(); } for_each(connections.begin(), connections.end(), Ice::voidMemFun(&Connection::waitUntilFinished)); } EndpointPtr IceInternal::IncomingConnectionFactory::endpoint() const { // No mutex protection necessary, _endpoint is immutable. return _endpoint; } list IceInternal::IncomingConnectionFactory::connections() const { IceUtil::Monitor::Lock sync(*this); list result; // // Only copy connections which have not been destroyed. // remove_copy_if(_connections.begin(), _connections.end(), back_inserter(result), Ice::constMemFun(&Connection::isDestroyed)); return result; } void IceInternal::IncomingConnectionFactory::flushBatchRequests() { list c = connections(); // connections() is synchronized, so no need to synchronize here. for(list::const_iterator p = c.begin(); p != c.end(); ++p) { try { (*p)->flushBatchRequests(); } catch(const LocalException&) { // Ignore. } } } string IceInternal::IncomingConnectionFactory::toString() const { IceUtil::Monitor::Lock sync(*this); if(_transceiver) { return _transceiver->toString(); } assert(_acceptor); return _acceptor->toString(); } IceInternal::IncomingConnectionFactory::IncomingConnectionFactory(const InstancePtr& instance, const EndpointPtr& endpoint, const ObjectAdapterPtr& adapter) : _instance(instance), _endpoint(endpoint), _adapter(adapter), _warn(_instance->initializationData().properties->getPropertyAsInt("Ice.Warn.Connections") > 0), _state(StateHolding) { if(_instance->defaultsAndOverrides()->overrideTimeout) { const_cast(_endpoint) = _endpoint->timeout(_instance->defaultsAndOverrides()->overrideTimeoutValue); } _acceptor = _endpoint->acceptor(const_cast(_endpoint)); assert(_acceptor); _acceptor->listen(); __setNoDelete(true); try { // // If we are in thread per connection mode, we also use one // thread per incoming connection factory, that accepts new // connections on this endpoint. // _threadPerIncomingConnectionFactory = new ThreadPerIncomingConnectionFactory(this); _threadPerIncomingConnectionFactory->start(_instance->threadPerConnectionStackSize()); } catch(const Ice::Exception& ex) { { Error out(_instance->initializationData().logger); out << "cannot create thread for incoming connection factory:\n" << ex.toString(); } try { _acceptor->close(); } catch(const LocalException&) { // Here we ignore any exceptions in close(). } _state = StateClosed; _acceptor = 0; _threadPerIncomingConnectionFactory = 0; __setNoDelete(false); ex.ice_throw(); } __setNoDelete(false); } IceInternal::IncomingConnectionFactory::~IncomingConnectionFactory() { IceUtil::Monitor::Lock sync(*this); assert(_state == StateClosed); assert(!_acceptor); assert(_connections.empty()); assert(!_threadPerIncomingConnectionFactory); } void IceInternal::IncomingConnectionFactory::setState(State state) { if(_state == state) // Don't switch twice. { return; } switch(state) { case StateActive: { if(_state != StateHolding) // Can only switch from holding to active. { return; } for_each(_connections.begin(), _connections.end(), Ice::voidMemFun(&Connection::activate)); break; } case StateHolding: { if(_state != StateActive) // Can only switch from active to holding. { return; } for_each(_connections.begin(), _connections.end(), Ice::voidMemFun(&Connection::hold)); break; } case StateClosed: { if(_acceptor) { // // Connect to our own acceptor, which unblocks our // thread per incoming connection factory stuck in accept(). // _acceptor->connectToSelf(); } #ifdef _STLP_BEGIN_NAMESPACE // voidbind2nd is an STLport extension for broken compilers in IceE/Functional.h for_each(_connections.begin(), _connections.end(), voidbind2nd(Ice::voidMemFun1(&Connection::destroy), Connection::ObjectAdapterDeactivated)); #else for_each(_connections.begin(), _connections.end(), bind2nd(Ice::voidMemFun1(&Connection::destroy), Connection::ObjectAdapterDeactivated)); #endif break; } } _state = state; notifyAll(); } void IceInternal::IncomingConnectionFactory::run() { assert(_acceptor); while(true) { // // We must accept new connections outside the thread // synchronization, because we use blocking accept. // TransceiverPtr transceiver; try { transceiver = _acceptor->accept(); } catch(const SocketException&) { // Ignore socket exceptions. } catch(const TimeoutException&) { // Ignore timeouts. } catch(const LocalException& ex) { // Warn about other Ice local exceptions. if(_warn) { Warning out(_instance->initializationData().logger); out << "connection exception:\n" << ex.toString() << "\n" << _acceptor->toString(); } } ConnectionPtr connection; { IceUtil::Monitor::Lock sync(*this); while(_state == StateHolding) { wait(); } if(_state == StateClosed) { if(transceiver) { try { transceiver->close(); } catch(const LocalException&) { // Here we ignore any exceptions in close(). } } try { _acceptor->close(); } catch(const LocalException& ex) { _acceptor = 0; notifyAll(); ex.ice_throw(); } _acceptor = 0; notifyAll(); return; } assert(_state == StateActive); // // Reap connections for which destruction has completed. // _connections.erase(remove_if(_connections.begin(), _connections.end(), Ice::constMemFun(&Connection::isFinished)), _connections.end()); // // Create a connection object for the connection. // if(transceiver) { try { connection = new Connection(_instance, transceiver, _endpoint, _adapter); } catch(const LocalException&) { return; } _connections.push_back(connection); } } // // In thread per connection mode, the connection's thread will // take care of connection validation and activation. We don't // want to block this thread waiting until validation is // complete because it is the only thread that can accept // connections with this factory's acceptor. Therefore we // don't call validate() and activate() from the connection // factory in thread per connection mode. // } } IceInternal::IncomingConnectionFactory::ThreadPerIncomingConnectionFactory::ThreadPerIncomingConnectionFactory( const IncomingConnectionFactoryPtr& factory) : _factory(factory) { } void IceInternal::IncomingConnectionFactory::ThreadPerIncomingConnectionFactory::run() { try { _factory->run(); } catch(const Exception& ex) { Error out(_factory->_instance->initializationData().logger); out << "exception in thread per incoming connection factory:\n" << _factory->toString() << ex.toString(); } catch(const std::exception& ex) { Error out(_factory->_instance->initializationData().logger); out << "std::exception in thread per incoming connection factory:\n" << _factory->toString() << ex.what(); } catch(...) { Error out(_factory->_instance->initializationData().logger); out << "unknown exception in thread per incoming connection factory:\n" << _factory->toString(); } _factory = 0; // Resolve cyclic dependency. } IceE-1.2.0/src/IceE/BasicStream.cpp0000644000076400007640000011012310616161100016516 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; void IceInternal::BasicStream::clear() { while(_currentReadEncaps && _currentReadEncaps != &_preAllocatedReadEncaps) { ReadEncaps* oldEncaps = _currentReadEncaps; _currentReadEncaps = _currentReadEncaps->previous; delete oldEncaps; } while(_currentWriteEncaps && _currentWriteEncaps != &_preAllocatedWriteEncaps) { WriteEncaps* oldEncaps = _currentWriteEncaps; _currentWriteEncaps = _currentWriteEncaps->previous; delete oldEncaps; } while(_seqDataStack) { SeqData* oldSeqData = _seqDataStack; _seqDataStack = _seqDataStack->previous; delete oldSeqData; } } void IceInternal::BasicStream::swap(BasicStream& other) { assert(_instance == other._instance); Buffer::swap(other); // // Swap is never called for BasicStreams that have more than one // encaps. // assert(!_currentReadEncaps || _currentReadEncaps == &_preAllocatedReadEncaps); assert(!_currentWriteEncaps || _currentWriteEncaps == &_preAllocatedWriteEncaps); assert(!other._currentReadEncaps || other._currentReadEncaps == &other._preAllocatedReadEncaps); assert(!other._currentWriteEncaps || other._currentWriteEncaps == &other._preAllocatedWriteEncaps); if(_currentReadEncaps || other._currentReadEncaps) { _preAllocatedReadEncaps.swap(other._preAllocatedReadEncaps); if(!_currentReadEncaps) { _currentReadEncaps = &_preAllocatedReadEncaps; other._currentReadEncaps = 0; } else if(!other._currentReadEncaps) { other._currentReadEncaps = &other._preAllocatedReadEncaps; _currentReadEncaps = 0; } } if(_currentWriteEncaps || other._currentWriteEncaps) { _preAllocatedWriteEncaps.swap(other._preAllocatedWriteEncaps); if(!_currentWriteEncaps) { _currentWriteEncaps = &_preAllocatedWriteEncaps; other._currentWriteEncaps = 0; } else if(!other._currentWriteEncaps) { other._currentWriteEncaps = &other._preAllocatedWriteEncaps; _currentWriteEncaps = 0; } } std::swap(_seqDataStack, other._seqDataStack); std::swap(_unlimited, other._unlimited); } // // startSeq() and endSeq() sanity-check sequence sizes during // unmarshaling and prevent malicious messages with incorrect sequence // sizes from causing the receiver to use up all available memory by // allocating sequences with an impossibly large number of elements. // // The code generator inserts calls to startSeq() and endSeq() around // the code to unmarshal a sequence of a variable-length type. startSeq() // is called immediately after reading the sequence size, and endSeq() is // called after reading the final element of a sequence. // // For a sequence of a fixed-length type, the code generator inserts a // call to checkFixedSeq(), which does not cause any memory allocations. // // For sequences that contain constructed types that, in turn, contain // sequences, the code generator also inserts a call to endElement() // (inlined in BasicStream.h) after unmarshaling each element. // // startSeq() is passed the unmarshaled element count, plus the // minimum size (in bytes) occupied by the sequence's element // type. numElements * minSize is the smallest possible number of // bytes that the sequence will occupy on the wire. // // Every time startSeq() is called, it pushes the element count and // the minimum size on a stack. Every time endSeq() is called, it pops // the stack. // // For an ordinary sequence (one that does not (recursively) contain // nested sequences), numElements * minSize must be less than the // number of bytes remaining in the stream. // // For a sequence that is nested within some other sequence, there // must be enough bytes remaining in the stream for this sequence // (numElements + minSize), plus the sum of the bytes required by the // remaining elements of all the enclosing sequences. // // For the enclosing sequences, numElements - 1 is the number of // elements for which unmarshaling has not started yet. (The call to // endElement() in the generated code decrements that number whenever // a sequence element is unmarshaled.) // // For sequences that have variable-length elements, checkSeq() is called // whenever an element is unmarshaled. checkSeq() also checks whether // the stream has a sufficient number of bytes remaining. This means // that, for messages with bogus sequence sizes, unmarshaling is // aborted at the earliest possible point. // void IceInternal::BasicStream::startSeq(int numElements, int minSize) { if(numElements == 0) // Optimization to avoid pushing a useless stack frame. { return; } // // Push the current sequence details on the stack. // SeqData* sd = new SeqData(numElements, minSize); sd->previous = _seqDataStack; _seqDataStack = sd; int bytesLeft = static_cast(b.end() - i); if(_seqDataStack->previous == 0) // Outermost sequence { // // The sequence must fit within the message. // if(numElements * minSize > bytesLeft) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } } else // Nested sequence { checkSeq(bytesLeft); } } void IceInternal::BasicStream::checkFixedSeq(int numElements, int elemSize) { int bytesLeft = static_cast(b.end() - i); if(_seqDataStack == 0) // Outermost sequence { // // The sequence must fit within the message. // if(numElements * elemSize > bytesLeft) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } } else // Nested sequence { checkSeq(bytesLeft - numElements * elemSize); } } void IceInternal::BasicStream::endSeq(int sz) { if(sz == 0) // Pop only if something was pushed previously. { return; } // // Pop the sequence stack. // SeqData* oldSeqData = _seqDataStack; assert(oldSeqData); _seqDataStack = oldSeqData->previous; delete oldSeqData; } void IceInternal::BasicStream::WriteEncaps::swap(WriteEncaps& other) { std::swap(start, other.start); std::swap(writeIndex, other.writeIndex); std::swap(previous, other.previous); } void IceInternal::BasicStream::ReadEncaps::swap(ReadEncaps& other) { std::swap(start, other.start); std::swap(sz, other.sz); std::swap(encodingMajor, other.encodingMajor); std::swap(encodingMinor, other.encodingMinor); std::swap(previous, other.previous); } Int IceInternal::BasicStream::getReadEncapsSize() { assert(_currentReadEncaps); return _currentReadEncaps->sz - static_cast(sizeof(Int)) - 2; } void IceInternal::BasicStream::skipEncaps() { Int sz; read(sz); if(sz < 0) { throwNegativeSizeException(__FILE__, __LINE__); } if(i - sizeof(Int) + sz > b.end()) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } i += sz - sizeof(Int); } void IceInternal::BasicStream::startWriteSlice() { write(Int(0)); // Placeholder for the slice length. _writeSlice = b.size(); } void IceInternal::BasicStream::endWriteSlice() { Int sz = static_cast(b.size() - _writeSlice + sizeof(Int)); Byte* dest = &(*(b.begin() + _writeSlice - sizeof(Int))); #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&sz) + sizeof(Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&sz); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } void IceInternal::BasicStream::startReadSlice() { Int sz; read(sz); if(sz < 0) { throwNegativeSizeException(__FILE__, __LINE__); } _readSlice = i - b.begin(); } void IceInternal::BasicStream::endReadSlice() { } void IceInternal::BasicStream::skipSlice() { Int sz; read(sz); if(sz < 0) { throwNegativeSizeException(__FILE__, __LINE__); } i += sz - sizeof(Int); if(i > b.end()) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } } void IceInternal::BasicStream::writeBlob(const vector& v) { if(!v.empty()) { Container::size_type pos = b.size(); resize(pos + v.size()); memcpy(&b[pos], &v[0], v.size()); } } void IceInternal::BasicStream::readBlob(vector& v, Int sz) { if(sz > 0) { if(b.end() - i < sz) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } vector(i, i + sz).swap(v); i += sz; } else { v.clear(); } } void IceInternal::BasicStream::read(pair& v) { Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, 1); v.first = i; v.second = i + sz; i += sz; } else { v.first = v.second = i; } } void IceInternal::BasicStream::write(const Byte* begin, const Byte* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz); memcpy(&b[pos], begin, sz); } } void IceInternal::BasicStream::write(const vector& v) { Int sz = static_cast(v.size()); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz); copy(v.begin(), v.end(), b.begin() + pos); } } namespace { template struct BasicStreamWriteBoolHelper { static void write(const bool* begin, BasicStream::Container::size_type pos, BasicStream::Container& b, Int sz) { for(int idx = 0; idx < sz; ++idx) { b[pos + idx] = static_cast(*(begin + idx)); } } }; template<> struct BasicStreamWriteBoolHelper<1> { static void write(const bool* begin, BasicStream::Container::size_type pos, BasicStream::Container& b, Int sz) { memcpy(&b[pos], begin, sz); } }; } void IceInternal::BasicStream::write(const bool* begin, const bool* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz); BasicStreamWriteBoolHelper::write(begin, pos, b, sz); } } void IceInternal::BasicStream::read(vector& v) { Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, 1); v.resize(sz); copy(i, i + sz, v.begin()); i += sz; } else { v.clear(); } } namespace { template struct BasicStreamReadBoolHelper { static bool* read(pair& v, Int sz, BasicStream::Container::iterator& i) { bool* array = new bool[sz]; for(int idx = 0; idx < sz; ++idx) { array[idx] = static_cast(*(i + idx)); } v.first = array; v.second = array + sz; return array; } }; template<> struct BasicStreamReadBoolHelper<1> { static bool* read(pair& v, Int sz, BasicStream::Container::iterator& i) { v.first = reinterpret_cast(i); v.second = reinterpret_cast(i) + sz; return 0; } }; } bool* IceInternal::BasicStream::read(pair& v) { bool* result = 0; Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, 1); result = BasicStreamReadBoolHelper::read(v, sz, i); i += sz; } else { v.first = v.second = reinterpret_cast(i); } return result; } void IceInternal::BasicStream::write(Short v) { Container::size_type pos = b.size(); resize(pos + sizeof(Short)); Byte* dest = &b[pos]; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&v) + sizeof(Short) - 1; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&v); *dest++ = *src++; *dest = *src; #endif } void IceInternal::BasicStream::read(Short& v) { if(b.end() - i < static_cast(sizeof(Short))) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } const Byte* src = &(*i); i += sizeof(Short); #ifdef ICE_BIG_ENDIAN Byte* dest = reinterpret_cast(&v) + sizeof(Short) - 1; *dest-- = *src++; *dest = *src; #else Byte* dest = reinterpret_cast(&v); *dest++ = *src++; *dest = *src; #endif } void IceInternal::BasicStream::write(const Short* begin, const Short* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz * sizeof(Short)); #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(begin) + sizeof(Short) - 1; Byte* dest = &(*(b.begin() + pos)); for(int j = 0 ; j < sz ; ++j) { *dest++ = *src--; *dest++ = *src--; src += 2 * sizeof(Short); } #else memcpy(&b[pos], reinterpret_cast(begin), sz * sizeof(Short)); #endif } } void IceInternal::BasicStream::read(vector& v) { Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Short))); Container::iterator begin = i; i += sz * static_cast(sizeof(Short)); v.resize(sz); #ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&v[0]) + sizeof(Short) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Short); } #else copy(begin, i, reinterpret_cast(&v[0])); #endif } else { v.clear(); } } Short* IceInternal::BasicStream::read(pair& v) { Short* result = 0; Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Short))); #if defined(__i386) || defined(_M_IX86) v.first = reinterpret_cast(i); i += sz * static_cast(sizeof(Short)); v.second = reinterpret_cast(i); #else result = new Short[sz]; v.first = result; v.second = result + sz; Container::iterator begin = i; i += sz * static_cast(sizeof(Short)); # ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&result[0]) + sizeof(Short) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Short); } # else copy(begin, i, reinterpret_cast(&result[0])); # endif #endif } else { v.first = v.second = 0; } return result; } void IceInternal::BasicStream::write(const Int* begin, const Int* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz * sizeof(Int)); #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(begin) + sizeof(Int) - 1; Byte* dest = &(*(b.begin() + pos)); for(int j = 0 ; j < sz ; ++j) { *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; src += 2 * sizeof(Int); } #else memcpy(&b[pos], reinterpret_cast(begin), sz * sizeof(Int)); #endif } } void IceInternal::BasicStream::read(vector& v) { Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Int))); Container::iterator begin = i; i += sz * static_cast(sizeof(Int)); v.resize(sz); #ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&v[0]) + sizeof(Int) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Int); } #else copy(begin, i, reinterpret_cast(&v[0])); #endif } else { v.clear(); } } Int* IceInternal::BasicStream::read(pair& v) { Int* result = 0; Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Int))); #if defined(__i386) || defined(_M_IX86) v.first = reinterpret_cast(i); i += sz * static_cast(sizeof(Int)); v.second = reinterpret_cast(i); #else result = new Int[sz]; v.first = result; v.second = result + sz; Container::iterator begin = i; i += sz * static_cast(sizeof(Int)); # ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&result[0]) + sizeof(Int) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Int); } # else copy(begin, i, reinterpret_cast(&result[0])); # endif #endif } else { v.first = v.second = 0; } return result; } void IceInternal::BasicStream::write(Long v) { Container::size_type pos = b.size(); resize(pos + sizeof(Long)); Byte* dest = &b[pos]; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&v) + sizeof(Long) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&v); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } void IceInternal::BasicStream::read(Long& v) { if(b.end() - i < static_cast(sizeof(Long))) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } const Byte* src = &(*i); i += sizeof(Long); #ifdef ICE_BIG_ENDIAN Byte* dest = reinterpret_cast(&v) + sizeof(Long) - 1; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest = *src; #else Byte* dest = reinterpret_cast(&v); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } void IceInternal::BasicStream::write(const Long* begin, const Long* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz * sizeof(Long)); #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(begin) + sizeof(Long) - 1; Byte* dest = &(*(b.begin() + pos)); for(int j = 0 ; j < sz ; ++j) { *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; src += 2 * sizeof(Long); } #else memcpy(&b[pos], reinterpret_cast(begin), sz * sizeof(Long)); #endif } } void IceInternal::BasicStream::read(vector& v) { Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Long))); Container::iterator begin = i; i += sz * static_cast(sizeof(Long)); v.resize(sz); #ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&v[0]) + sizeof(Long) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Long); } #else copy(begin, i, reinterpret_cast(&v[0])); #endif } else { v.clear(); } } Long* IceInternal::BasicStream::read(pair& v) { Long* result = 0; Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Long))); #if defined(__i386) || defined(_M_IX86) v.first = reinterpret_cast(i); i += sz * static_cast(sizeof(Long)); v.second = reinterpret_cast(i); #else result = new Long[sz]; v.first = result; v.second = result + sz; Container::iterator begin = i; i += sz * static_cast(sizeof(Long)); # ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&result[0]) + sizeof(Long) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Long); } # else copy(begin, i, reinterpret_cast(&result[0])); # endif #endif } else { v.first = v.second = 0; } return result; } void IceInternal::BasicStream::write(Float v) { Container::size_type pos = b.size(); resize(pos + sizeof(Float)); Byte* dest = &b[pos]; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&v) + sizeof(Float) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&v); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } void IceInternal::BasicStream::read(Float& v) { if(b.end() - i < static_cast(sizeof(Float))) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } const Byte* src = &(*i); i += sizeof(Float); #ifdef ICE_BIG_ENDIAN Byte* dest = reinterpret_cast(&v) + sizeof(Float) - 1; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest = *src; #else Byte* dest = reinterpret_cast(&v); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif } void IceInternal::BasicStream::write(const Float* begin, const Float* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz * sizeof(Float)); #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(begin) + sizeof(Float) - 1; Byte* dest = &(*(b.begin() + pos)); for(int j = 0 ; j < sz ; ++j) { *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; src += 2 * sizeof(Float); } #else memcpy(&b[pos], reinterpret_cast(begin), sz * sizeof(Float)); #endif } } void IceInternal::BasicStream::read(vector& v) { Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Float))); Container::iterator begin = i; i += sz * static_cast(sizeof(Float)); v.resize(sz); #ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&v[0]) + sizeof(Float) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Float); } #else copy(begin, i, reinterpret_cast(&v[0])); #endif } else { v.clear(); } } Float* IceInternal::BasicStream::read(pair& v) { Float* result = 0; Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Float))); #if defined(__i386) || defined(_M_IX86) v.first = reinterpret_cast(i); i += sz * static_cast(sizeof(Float)); v.second = reinterpret_cast(i); #else result = new Float[sz]; v.first = result; v.second = result + sz; Container::iterator begin = i; i += sz * static_cast(sizeof(Float)); # ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&result[0]) + sizeof(Float) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Float); } # else copy(begin, i, reinterpret_cast(&result[0])); # endif #endif } else { v.first = v.second = 0; } return result; } void IceInternal::BasicStream::write(Double v) { Container::size_type pos = b.size(); resize(pos + sizeof(Double)); Byte* dest = &b[pos]; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&v) + sizeof(Double) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&v); # if defined(__arm__) && defined(__linux) dest[4] = *src++; dest[5] = *src++; dest[6] = *src++; dest[7] = *src++; dest[0] = *src++; dest[1] = *src++; dest[2] = *src++; dest[3] = *src; # else *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; # endif #endif } void IceInternal::BasicStream::read(Double& v) { if(b.end() - i < static_cast(sizeof(Double))) { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } const Byte* src = &(*i); i += sizeof(Double); #ifdef ICE_BIG_ENDIAN Byte* dest = reinterpret_cast(&v) + sizeof(Double) - 1; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest = *src; #else Byte* dest = reinterpret_cast(&v); # if defined(__arm__) && defined(__linux) dest[4] = *src++; dest[5] = *src++; dest[6] = *src++; dest[7] = *src++; dest[0] = *src++; dest[1] = *src++; dest[2] = *src++; dest[3] = *src; # else *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; # endif #endif } void IceInternal::BasicStream::write(const Double* begin, const Double* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { Container::size_type pos = b.size(); resize(pos + sz * sizeof(Double)); #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(begin) + sizeof(Double) - 1; Byte* dest = &(*(b.begin() + pos)); for(int j = 0 ; j < sz ; ++j) { *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; src += 2 * sizeof(Double); } #elif defined(__arm__) && defined(__linux) const Byte* src = reinterpret_cast(begin); Byte* dest = &(*(b.begin() + pos)); for(int j = 0 ; j < sz ; ++j) { dest[4] = *src++; dest[5] = *src++; dest[6] = *src++; dest[7] = *src++; dest[0] = *src++; dest[1] = *src++; dest[2] = *src++; dest[3] = *src++; dest += sizeof(Double); } #else memcpy(&b[pos], reinterpret_cast(begin), sz * sizeof(Double)); #endif } } void IceInternal::BasicStream::read(vector& v) { Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Double))); Container::iterator begin = i; i += sz * static_cast(sizeof(Double)); v.resize(sz); #ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&v[0]) + sizeof(Double) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Double); } #elif defined(__arm__) && defined(__linux) const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&v[0]); for(int j = 0 ; j < sz ; ++j) { dest[4] = *src++; dest[5] = *src++; dest[6] = *src++; dest[7] = *src++; dest[0] = *src++; dest[1] = *src++; dest[2] = *src++; dest[3] = *src++; dest += sizeof(Double); } #else copy(begin, i, reinterpret_cast(&v[0])); #endif } else { v.clear(); } } Double* IceInternal::BasicStream::read(pair& v) { Double* result = 0; Int sz; readSize(sz); if(sz > 0) { checkFixedSeq(sz, static_cast(sizeof(Double))); #if defined(__i386) || defined(_M_IX86) v.first = reinterpret_cast(i); i += sz * static_cast(sizeof(Double)); v.second = reinterpret_cast(i); #else result = new Double[sz]; v.first = result; v.second = result + sz; Container::iterator begin = i; i += sz * static_cast(sizeof(Double)); # ifdef ICE_BIG_ENDIAN const Byte* src = &(*begin); Byte* dest = reinterpret_cast(&result[0]) + sizeof(Double) - 1; for(int j = 0 ; j < sz ; ++j) { *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; *dest-- = *src++; dest += 2 * sizeof(Double); } # else copy(begin, i, reinterpret_cast(&result[0])); # endif #endif } else { v.first = v.second = 0; } return result; } // // NOTE: This member function is intentionally omitted in order to // cause a link error if it is used. This is for efficiency reasons: // writing a const char * requires a traversal of the string to get // the string length first, which takes O(n) time, whereas getting the // string length from a std::string takes constant time. // /* void IceInternal::BasicStream::write(const char*) { } */ #ifdef ICEE_HAS_WSTRING void IceInternal::BasicStream::writeConverted(const string& v) { // // What is the size of the resulting UTF-8 encoded string? // Impossible to tell, so we guess. If we don't guess correctly, // we'll have to fix the mistake afterwards // Int guessedSize = static_cast(v.size()); writeSize(guessedSize); // writeSize() only writes the size; it does not reserve any buffer space. size_t firstIndex = b.size(); StreamUTF8BufferI buffer(*this); Byte* lastByte = _stringConverter->toUTF8(v.data(), v.data() + v.size(), buffer); if(lastByte != b.end()) { b.resize(lastByte - b.begin()); } size_t lastIndex = b.size(); Int actualSize = static_cast(lastIndex - firstIndex); // // Check against the guess // if(guessedSize != actualSize) { if(guessedSize <= 254 && actualSize > 254) { // // Move the UTF-8 sequence 4 bytes further // Use memmove instead of memcpy since the source and destination typically overlap. // resize(b.size() + 4); memmove(b.begin() + firstIndex + 4, b.begin() + firstIndex, actualSize); } else if(guessedSize > 254 && actualSize <= 254) { // // Move the UTF-8 sequence 4 bytes back // memmove(b.begin() + firstIndex - 4, b.begin() + firstIndex, actualSize); resize(b.size() - 4); } if(guessedSize <= 254) { rewriteSize(actualSize, b.begin() + firstIndex - 1); } else { rewriteSize(actualSize, b.begin() + firstIndex - 1 - 4); } } } #endif void IceInternal::BasicStream::write(const string* begin, const string* end, bool convert) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { for(int i = 0; i < sz; ++i) { write(begin[i], convert); } } } void IceInternal::BasicStream::read(vector& v, bool convert) { Int sz; readSize(sz); if(sz > 0) { startSeq(sz, 1); v.resize(sz); for(int i = 0; i < sz; ++i) { read(v[i], convert); checkSeq(); endElement(); } endSeq(sz); } else { v.clear(); } } #ifdef ICEE_HAS_WSTRING void IceInternal::BasicStream::write(const wstring& v) { if(v.size() == 0) { writeSize(0); return; } // // What is the size of the resulting UTF-8 encoded string? // Impossible to tell, so we guess. If we don't guess correctly, // we'll have to fix the mistake afterwards // Int guessedSize = static_cast(v.size()); writeSize(guessedSize); // writeSize() only writes the size; it does not reserve any buffer space. size_t firstIndex = b.size(); StreamUTF8BufferI buffer(*this); Byte* lastByte = _wstringConverter->toUTF8(v.data(), v.data() + v.size(), buffer); if(lastByte != b.end()) { b.resize(lastByte - b.begin()); } size_t lastIndex = b.size(); Int actualSize = static_cast(lastIndex - firstIndex); // // Check against the guess // if(guessedSize != actualSize) { if(guessedSize <= 254 && actualSize > 254) { // // Move the UTF-8 sequence 4 bytes further // Use memmove instead of memcpy since the source and destination typically overlap. // resize(b.size() + 4); memmove(b.begin() + firstIndex + 4, b.begin() + firstIndex, actualSize); } else if(guessedSize > 254 && actualSize <= 254) { // // Move the UTF-8 sequence 4 bytes back // memmove(b.begin() + firstIndex - 4, b.begin() + firstIndex, actualSize); resize(b.size() - 4); } if(guessedSize <= 254) { rewriteSize(actualSize, b.begin() + firstIndex - 1); } else { rewriteSize(actualSize, b.begin() + firstIndex - 1 - 4); } } } void IceInternal::BasicStream::write(const wstring* begin, const wstring* end) { Int sz = static_cast(end - begin); writeSize(sz); if(sz > 0) { for(int i = 0; i < sz; ++i) { write(begin[i]); } } } void IceInternal::BasicStream::read(vector& v) { Int sz; readSize(sz); if(sz > 0) { startSeq(sz, 1); v.resize(sz); for(int j = 0; j < sz; ++j) { read(v[j]); checkSeq(); endElement(); } endSeq(sz); } else { v.clear(); } } #endif void IceInternal::BasicStream::write(const ObjectPrx& v) { _instance->proxyFactory()->proxyToStream(v, this); } void IceInternal::BasicStream::read(ObjectPrx& v) { v = _instance->proxyFactory()->streamToProxy(this); } void IceInternal::BasicStream::write(const UserException& v) { write(false); v.__write(this); } void IceInternal::BasicStream::throwException() { bool usesClasses; read(usesClasses); string id; read(id, false); for(;;) { // // Look for a factory for this ID. // UserExceptionFactoryPtr factory = factoryTable->getExceptionFactory(id); if(factory) { // // Got factory -- get the factory to instantiate the // exception, initialize the exception members, and throw // the exception. // try { factory->createAndThrow(); } catch(UserException& ex) { ex.__read(this, false); assert(!usesClasses); ex.ice_throw(); } } else { skipSlice(); // Slice off what we don't understand. read(id, false); // Read type id for next slice. } } // // The only way out of the loop above is to find an exception for // which the receiver has a factory. If this does not happen, // sender and receiver disagree about the Slice definitions they // use. In that case, the receiver will eventually fail to read // another type ID and throw a MarshalException. // } IceInternal::BasicStream::SeqData::SeqData(int num, int sz) : numElements(num), minSize(sz) { } IceE-1.2.0/src/IceE/Buffer.cpp0000644000076400007640000000546510576536574015600 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Ice; using namespace IceInternal; void IceInternal::Buffer::swap(Buffer& other) { #ifdef ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION Container::difference_type pos = i - b.begin(); Container::difference_type otherPos = other.i - other.b.begin(); b.swap(other.b); i = b.begin() + otherPos; other.i = other.b.begin() + pos; #else b.swap(other.b); std::swap(i, other.i); #endif } void IceInternal::Buffer::Container::swap(Container& other) { #ifdef ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION if(_buf == _fixed) { if(other._buf == other._fixed) { value_type tmp[ICE_BUFFER_FIXED_SIZE]; memcpy(tmp, _fixed, _size); memcpy(_fixed, other._fixed, other._size); memcpy(other._fixed, tmp, _size); } else { _buf = other._buf; memcpy(other._fixed, _fixed, _size); other._buf = other._fixed; } } else { if(other._buf == other._fixed) { other._buf = _buf; memcpy(_fixed, other._fixed, other._size); _buf = _fixed; } else { std::swap(_buf, other._buf); } } #else std::swap(_buf, other._buf); #endif std::swap(_size, other._size); std::swap(_capacity, other._capacity); std::swap(_shrinkCounter, other._shrinkCounter); } void IceInternal::Buffer::Container::clear() { #ifdef ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION if(_buf != _fixed) { free(_buf); _buf = _fixed; } _size = 0; _capacity = ICE_BUFFER_FIXED_SIZE; #else free(_buf); _buf = 0; _size = 0; _capacity = 0; #endif } void IceInternal::Buffer::Container::reserve(size_type n) { if(n > _capacity) { _capacity = std::max(n, std::min(2 * _capacity, _maxCapacity)); _capacity = std::max(static_cast(240), _capacity); } else if(n < _capacity) { _capacity = n; } else { return; } #ifdef ICE_SMALL_MESSAGE_BUFFER_OPTIMIZATION if(_buf != _fixed) { _buf = reinterpret_cast(realloc(_buf, _capacity)); } else if(_capacity > ICE_BUFFER_FIXED_SIZE) { _buf = reinterpret_cast(malloc(_capacity)); memcpy(_buf, _fixed, _size); } #else if(_buf) { _buf = reinterpret_cast(realloc(_buf, _capacity)); } else { _buf = reinterpret_cast(malloc(_capacity)); } #endif if(!_buf) { SyscallException ex(__FILE__, __LINE__); ex.error = getSystemErrno(); throw ex; } } IceE-1.2.0/src/IceE/ObjectAdapter.cpp0000644000076400007640000006010610616576164017061 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef ICEE_HAS_LOCATOR # include # include #endif #ifdef ICEE_HAS_ROUTER # include # include #endif #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(::Ice::ObjectAdapter* p) { return p; } string Ice::ObjectAdapter::getName() const { // // No mutex lock necessary, _name is immutable. // return _name; } CommunicatorPtr Ice::ObjectAdapter::getCommunicator() const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); return _communicator; } void Ice::ObjectAdapter::activate() { #ifdef ICEE_HAS_LOCATOR LocatorInfoPtr locatorInfo; #endif bool printAdapterReady = false; { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); // // If the one off initializations of the adapter are already // done, we just need to activate the incoming connection // factories and we're done. // if(_activateOneOffDone) { for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(), Ice::voidMemFun(&IncomingConnectionFactory::activate)); return; } // // One off initializations of the adapter: update the locator // registry and print the "adapter ready" message. We set the // _waitForActivate flag to prevent deactivation from other // threads while these one off initializations are done. // _waitForActivate = true; #ifdef ICEE_HAS_LOCATOR locatorInfo = _locatorInfo; #endif printAdapterReady = _instance->initializationData().properties->getPropertyAsInt("Ice.PrintAdapterReady") > 0; } #ifdef ICEE_HAS_LOCATOR try { Ice::Identity dummy; dummy.name = "dummy"; updateLocatorRegistry(locatorInfo, createDirectProxy(dummy)); } catch(const Ice::LocalException&) { // // If we couldn't update the locator registry, we let the // exception go through and don't activate the adapter to // allow to user code to retry activating the adapter // later. // { IceUtil::Monitor::Lock sync(*this); _waitForActivate = false; notifyAll(); } throw; } #endif if(printAdapterReady) { printf("%s ready\n", _name.c_str()); fflush(stdout); } { IceUtil::Monitor::Lock sync(*this); assert(!_deactivated); // Not possible if _waitForActivate = true; // // Signal threads waiting for the activation. // _waitForActivate = false; notifyAll(); _activateOneOffDone = true; for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(), Ice::voidMemFun(&IncomingConnectionFactory::activate)); } } void Ice::ObjectAdapter::hold() { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(), Ice::voidMemFun(&IncomingConnectionFactory::hold)); } void Ice::ObjectAdapter::waitForHold() { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(), Ice::constVoidMemFun(&IncomingConnectionFactory::waitUntilHolding)); } void Ice::ObjectAdapter::deactivate() { vector incomingConnectionFactories; OutgoingConnectionFactoryPtr outgoingConnectionFactory; #ifdef ICEE_HAS_LOCATOR LocatorInfoPtr locatorInfo; #endif { IceUtil::Monitor::Lock sync(*this); // // Ignore deactivation requests if the object adapter has already // been deactivated. // if(_deactivated) { return; } // // Wait for activation to complete. This is necessary to not // get out of order locator updates. // while(_waitForActivate) { wait(); } #ifdef ICEE_HAS_ROUTER if(_routerInfo) { // // Remove entry from the router manager. // _instance->routerManager()->erase(_routerInfo->getRouter()); // // Clear this object adapter with the router. // _routerInfo->setAdapter(0); } #endif incomingConnectionFactories = _incomingConnectionFactories; outgoingConnectionFactory = _instance->outgoingConnectionFactory(); #ifdef ICEE_HAS_LOCATOR locatorInfo = _locatorInfo; #endif _deactivated = true; notifyAll(); } #ifdef ICEE_HAS_LOCATOR try { updateLocatorRegistry(locatorInfo, 0); } catch(const Ice::LocalException&) { // // We can't throw exceptions in deactivate so we ignore // failures to update the locator registry. // } #endif // // Must be called outside the thread synchronization, because // Connection::destroy() might block when sending a CloseConnection // message. // for_each(incomingConnectionFactories.begin(), incomingConnectionFactories.end(), Ice::voidMemFun(&IncomingConnectionFactory::destroy)); // // Must be called outside the thread synchronization, because // changing the object adapter might block if there are still // requests being dispatched. // outgoingConnectionFactory->removeAdapter(this); } void Ice::ObjectAdapter::waitForDeactivate() { vector incomingConnectionFactories; { IceUtil::Monitor::Lock sync(*this); if(_destroyed) { return; } // // Wait for deactivation of the adapter itself, and for // the return of all direct method calls using this adapter. // while(!_deactivated || _directCount > 0) { wait(); } incomingConnectionFactories = _incomingConnectionFactories; } // // Now we wait until all incoming connection factories are // finished. // for_each(incomingConnectionFactories.begin(), incomingConnectionFactories.end(), Ice::voidMemFun(&IncomingConnectionFactory::waitUntilFinished)); } bool Ice::ObjectAdapter::isDeactivated() const { IceUtil::Monitor::Lock sync(*this); return _deactivated; } void Ice::ObjectAdapter::destroy() { { IceUtil::Monitor::Lock sync(*this); // // Another thread is in the process of destroying the object // adapter. Wait for it to finish. // while(_destroying) { wait(); } // // Object adapter is already destroyed. // if(_destroyed) { return; } _destroying = true; } // // Deactivate and wait for completion. // deactivate(); waitForDeactivate(); // // Now it's also time to clean up our servants and servant // locators. // _servantManager->destroy(); ObjectAdapterFactoryPtr objectAdapterFactory; { IceUtil::Monitor::Lock sync(*this); // // Signal that destroy is complete. // _destroying = false; _destroyed = true; notifyAll(); // // We're done, now we can throw away all incoming connection // factories. // _incomingConnectionFactories.clear(); // // Remove object references (some of them cyclic). // _instance = 0; _communicator = 0; #ifdef ICEE_HAS_ROUTER _routerEndpoints.clear(); _routerInfo = 0; #endif _publishedEndpoints.clear(); #ifdef ICEE_HAS_LOCATOR _locatorInfo = 0; #endif objectAdapterFactory = _objectAdapterFactory; _objectAdapterFactory = 0; } if(objectAdapterFactory) { objectAdapterFactory->removeObjectAdapter(_name); } } ObjectPrx Ice::ObjectAdapter::add(const ObjectPtr& object, const Identity& ident) { return addFacet(object, ident, ""); } ObjectPrx Ice::ObjectAdapter::addFacet(const ObjectPtr& object, const Identity& ident, const string& facet) { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); _servantManager->addServant(object, ident, facet); return newProxy(ident, facet); } ObjectPrx Ice::ObjectAdapter::addWithUUID(const ObjectPtr& object) { return addFacetWithUUID(object, ""); } ObjectPrx Ice::ObjectAdapter::addFacetWithUUID(const ObjectPtr& object, const string& facet) { Identity ident; ident.name = IceUtil::generateUUID(); return addFacet(object, ident, facet); } ObjectPtr Ice::ObjectAdapter::remove(const Identity& ident) { return removeFacet(ident, ""); } ObjectPtr Ice::ObjectAdapter::removeFacet(const Identity& ident, const string& facet) { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); return _servantManager->removeServant(ident, facet); } FacetMap Ice::ObjectAdapter::removeAllFacets(const Identity& ident) { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); return _servantManager->removeAllFacets(ident); } ObjectPtr Ice::ObjectAdapter::find(const Identity& ident) const { return findFacet(ident, ""); } ObjectPtr Ice::ObjectAdapter::findFacet(const Identity& ident, const string& facet) const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); return _servantManager->findServant(ident, facet); } FacetMap Ice::ObjectAdapter::findAllFacets(const Identity& ident) const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); return _servantManager->findAllFacets(ident); } ObjectPtr Ice::ObjectAdapter::findByProxy(const ObjectPrx& proxy) const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); ReferencePtr ref = proxy->__reference(); return findFacet(ref->getIdentity(), ref->getFacet()); } ObjectPrx Ice::ObjectAdapter::createProxy(const Identity& ident) const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); return newProxy(ident, ""); } #ifdef ICEE_HAS_LOCATOR ObjectPrx Ice::ObjectAdapter::createDirectProxy(const Identity& ident) const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); return newDirectProxy(ident, ""); } ObjectPrx Ice::ObjectAdapter::createIndirectProxy(const Identity& ident) const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); return newIndirectProxy(ident, "", _id); } #endif ObjectPrx Ice::ObjectAdapter::createReverseProxy(const Identity& ident) const { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); checkIdentity(ident); // // Get all incoming connections for this object adapter. // vector connections; vector::const_iterator p; for(p = _incomingConnectionFactories.begin(); p != _incomingConnectionFactories.end(); ++p) { list cons = (*p)->connections(); copy(cons.begin(), cons.end(), back_inserter(connections)); } // // Create a reference and return a reverse proxy for this // reference. // vector endpoints; ReferencePtr ref = _instance->referenceFactory()->create(ident, Ice::Context(), "", ReferenceModeTwoway, connections); return _instance->proxyFactory()->referenceToProxy(ref); } #ifdef ICEE_HAS_LOCATOR void Ice::ObjectAdapter::setLocator(const LocatorPrx& locator) { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); _locatorInfo = _instance->locatorManager()->get(locator); } #endif void Ice::ObjectAdapter::flushBatchRequests() { vector f; { IceUtil::Monitor::Lock sync(*this); f = _incomingConnectionFactories; } for_each(f.begin(), f.end(), Ice::voidMemFun(&IncomingConnectionFactory::flushBatchRequests)); } void Ice::ObjectAdapter::incDirectCount() { IceUtil::Monitor::Lock sync(*this); checkForDeactivation(); assert(_directCount >= 0); ++_directCount; } void Ice::ObjectAdapter::decDirectCount() { IceUtil::Monitor::Lock sync(*this); // Not check for deactivation here! assert(_instance); // Must not be called after waitForDeactivate(). assert(_directCount > 0); if(--_directCount == 0) { notifyAll(); } } ServantManagerPtr Ice::ObjectAdapter::getServantManager() const { // // No mutex lock necessary, _servantManager is immutable. // return _servantManager; } Ice::ObjectAdapter::ObjectAdapter(const InstancePtr& instance, const CommunicatorPtr& communicator, const ObjectAdapterFactoryPtr& objectAdapterFactory, const string& name, const string& endpointInfo #ifdef ICEE_HAS_ROUTER , const RouterPrx& router #endif ) : _deactivated(false), _instance(instance), _communicator(communicator), _objectAdapterFactory(objectAdapterFactory), _servantManager(new ServantManager(instance, name)), _activateOneOffDone(false), _name(name), #ifdef ICEE_HAS_LOCATOR _id(instance->initializationData().properties->getProperty(name + ".AdapterId")), _replicaGroupId(instance->initializationData().properties->getProperty(name + ".ReplicaGroupId")), #endif _directCount(0), _waitForActivate(false), _destroying(false), _destroyed(false) { __setNoDelete(true); try { #ifdef ICEE_HAS_ROUTER if(!router) { string routerStr = _instance->initializationData().properties->getProperty(_name + ".Router"); if(!routerStr.empty()) { const_cast(router) = RouterPrx::uncheckedCast(_instance->proxyFactory()->stringToProxy(routerStr)); } } if(router) { _routerInfo = _instance->routerManager()->get(router); if(_routerInfo) { // // Make sure this router is not already registered with another adapter. // if(_routerInfo->getAdapter()) { throw AlreadyRegisteredException(__FILE__, __LINE__, "object adapter with router", _instance->identityToString(router->ice_getIdentity())); } // // Add the router's server proxy endpoints to this object // adapter. // vector endpoints = _routerInfo->getServerEndpoints(); copy(endpoints.begin(), endpoints.end(), back_inserter(_routerEndpoints)); sort(_routerEndpoints.begin(), _routerEndpoints.end()); // Must be sorted. _routerEndpoints.erase(unique(_routerEndpoints.begin(), _routerEndpoints.end()), _routerEndpoints.end()); // // Associate this object adapter with the router. This way, // new outgoing connections to the router's client proxy will // use this object adapter for callbacks. // _routerInfo->setAdapter(this); // // Also modify all existing outgoing connections to the // router's client proxy to use this object adapter for // callbacks. // _instance->outgoingConnectionFactory()->setRouterInfo(_routerInfo); } } else #endif { // // Parse the endpoints, but don't store them in the adapter. // The connection factory might change it, for example, to // fill in the real port number. // vector endpoints = parseEndpoints(endpointInfo); for(vector::iterator p = endpoints.begin(); p != endpoints.end(); ++p) { _incomingConnectionFactories.push_back(new IncomingConnectionFactory(_instance, *p, this)); } if(endpoints.empty()) { TraceLevelsPtr tl = _instance->traceLevels(); if(tl->network >= 2) { Trace out(_instance->initializationData().logger, tl->networkCat); out << "created adapter `" << name << "' without endpoints"; } } // // Parse published endpoints. These are used in proxies // instead of the connection factory endpoints. // string endpts = _instance->initializationData().properties->getProperty(name + ".PublishedEndpoints"); _publishedEndpoints = parseEndpoints(endpts); if(_publishedEndpoints.empty()) { transform(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(), back_inserter(_publishedEndpoints), Ice::constMemFun(&IncomingConnectionFactory::endpoint)); } // // Filter out any endpoints that are not meant to be published. // _publishedEndpoints.erase(remove_if(_publishedEndpoints.begin(), _publishedEndpoints.end(), not1(Ice::constMemFun(&Endpoint::publish))), _publishedEndpoints.end()); } #ifdef ICEE_HAS_LOCATOR string locator = _instance->initializationData().properties->getProperty(_name + ".Locator"); if(!locator.empty()) { setLocator(LocatorPrx::uncheckedCast(_instance->proxyFactory()->stringToProxy(locator))); } else { setLocator(_instance->referenceFactory()->getDefaultLocator()); } #endif } catch(...) { deactivate(); waitForDeactivate(); __setNoDelete(false); throw; } __setNoDelete(false); } Ice::ObjectAdapter::~ObjectAdapter() { if(!_deactivated) { Warning out(_instance->initializationData().logger); out << "object adapter `" << _name << "' has not been deactivated"; } else if(!_destroyed) { Warning out(_instance->initializationData().logger); out << "object adapter `" << _name << "' has not been destroyed"; } else { //assert(!_servantManager); // We don't clear this reference, it needs to be immutable. assert(!_communicator); assert(_incomingConnectionFactories.empty()); assert(_directCount == 0); assert(!_waitForActivate); } } ObjectPrx Ice::ObjectAdapter::newProxy(const Identity& ident, const string& facet) const { #ifdef ICEE_HAS_LOCATOR if(_id.empty()) { #endif return newDirectProxy(ident, facet); #ifdef ICEE_HAS_LOCATOR } else if(_replicaGroupId.empty()) { return newIndirectProxy(ident, facet, _id); } else { return newIndirectProxy(ident, facet, _replicaGroupId); } #endif } ObjectPrx Ice::ObjectAdapter::newDirectProxy(const Identity& ident, const string& facet) const { vector endpoints = _publishedEndpoints; // // Now we also add the endpoints of the router's server proxy, if // any. This way, object references created by this object adapter // will also point to the router's server proxy endpoints. // #ifdef ICEE_HAS_ROUTER copy(_routerEndpoints.begin(), _routerEndpoints.end(), back_inserter(endpoints)); #endif // // Create a reference and return a proxy for this reference. // #ifdef ICEE_HAS_ROUTER ReferencePtr ref = _instance->referenceFactory()->create(ident, Ice::Context(), facet, ReferenceModeTwoway, false, endpoints, 0); #else ReferencePtr ref = _instance->referenceFactory()->create(ident, Ice::Context(), facet, ReferenceModeTwoway, false, endpoints); #endif return _instance->proxyFactory()->referenceToProxy(ref); } #ifdef ICEE_HAS_LOCATOR ObjectPrx Ice::ObjectAdapter::newIndirectProxy(const Identity& ident, const string& facet, const string& id) const { // // Create a reference with the adapter id. // #ifdef ICEE_HAS_ROUTER ReferencePtr ref = _instance->referenceFactory()->create(ident, Ice::Context(), facet, ReferenceModeTwoway, false, id, 0, _locatorInfo); #else ReferencePtr ref = _instance->referenceFactory()->create(ident, Ice::Context(), facet, ReferenceModeTwoway, false, id, _locatorInfo); #endif // // Return a proxy for the reference. // return _instance->proxyFactory()->referenceToProxy(ref); } #endif void Ice::ObjectAdapter::checkForDeactivation() const { if(_deactivated) { ObjectAdapterDeactivatedException ex(__FILE__, __LINE__); ex.name = _name; throw ex; } } void Ice::ObjectAdapter::checkIdentity(const Identity& ident) { if(ident.name.size() == 0) { IllegalIdentityException e(__FILE__, __LINE__); e.id = ident; throw e; } } vector Ice::ObjectAdapter::parseEndpoints(const string& str) const { string endpts = str; transform(endpts.begin(), endpts.end(), endpts.begin(), ::tolower); string::size_type beg; string::size_type end = 0; vector endpoints; while(end < endpts.length()) { const string delim = " \t\n\r"; beg = endpts.find_first_not_of(delim, end); if(beg == string::npos) { break; } end = endpts.find(':', beg); if(end == string::npos) { end = endpts.length(); } if(end == beg) { ++end; continue; } string s = endpts.substr(beg, end - beg); EndpointPtr endp = _instance->endpointFactory()->create(s); if(endp == 0) { EndpointParseException ex(__FILE__, __LINE__); ex.str = s; throw ex; } vector endps = endp->expand(true); endpoints.insert(endpoints.end(), endps.begin(), endps.end()); ++end; } return endpoints; } #ifdef ICEE_HAS_LOCATOR void ObjectAdapter::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locatorInfo, const Ice::ObjectPrx& proxy) { if(_id.empty()) { return; // Nothing to update. } // // We must get and call on the locator registry outside the thread // synchronization to avoid deadlocks. (we can't make remote calls // within the OA synchronization because the remote call will // indirectly call isLocal() on this OA with the OA factory // locked). // // TODO: This might throw if we can't connect to the // locator. Shall we raise a special exception for the activate // operation instead of a non obvious network exception? // LocatorRegistryPrx locatorRegistry = locatorInfo ? locatorInfo->getLocatorRegistry() : LocatorRegistryPrx(); if(!locatorRegistry) { return; } if(!_id.empty()) { try { if(_replicaGroupId.empty()) { locatorRegistry->setAdapterDirectProxy(_id, proxy); } else { locatorRegistry->setReplicatedAdapterDirectProxy(_id, _replicaGroupId, proxy); } } catch(const AdapterNotFoundException&) { NotRegisteredException ex(__FILE__, __LINE__); ex.kindOfObject = "object adapter"; ex.id = _id; throw ex; } catch(const InvalidReplicaGroupIdException&) { NotRegisteredException ex(__FILE__, __LINE__); ex.kindOfObject = "replica group"; ex.id = _replicaGroupId; throw ex; } catch(const AdapterAlreadyActiveException&) { ObjectAdapterIdInUseException ex(__FILE__, __LINE__); ex.id = _id; throw ex; } } } #endif IceE-1.2.0/src/IceE/TraceLevels.h0000644000076400007640000000150510576536574016234 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_TRACE_LEVELS_H #define ICEE_TRACE_LEVELS_H #include #include #include namespace IceInternal { class TraceLevels : public ::IceUtil::Shared { public: TraceLevels(const ::Ice::PropertiesPtr&); const int network; const char* networkCat; const int protocol; const char* protocolCat; const int retry; const char* retryCat; const int location; const char* locationCat; }; } #endif IceE-1.2.0/src/IceE/ServantManager.cpp0000644000076400007640000001515510602152305017251 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(ServantManager* p) { return p; } void IceInternal::ServantManager::addServant(const ObjectPtr& object, const Identity& ident, const string& facet) { IceUtil::Mutex::Lock sync(*this); assert(_instance); // Must not be called after destruction. ServantMapMap::iterator p = _servantMapMapHint; if(p == _servantMapMap.end() || p->first != ident) { p = _servantMapMap.find(ident); } if(p == _servantMapMap.end()) { p = _servantMapMap.insert(_servantMapMapHint, pair(ident, FacetMap())); } else { if(p->second.find(facet) != p->second.end()) { AlreadyRegisteredException ex(__FILE__, __LINE__); ex.kindOfObject = "servant"; ex.id = _instance->identityToString(ident); if(!facet.empty()) { ex.id += " -f " + IceUtil::escapeString(facet, ""); } throw ex; } } _servantMapMapHint = p; p->second.insert(pair(facet, object)); } ObjectPtr IceInternal::ServantManager::removeServant(const Identity& ident, const string& facet) { // // We return the removed servant to avoid releasing the last reference count // with *this locked. We don't want to run user code, such as the servant // destructor, with an internal Ice mutex locked. // ObjectPtr servant = 0; IceUtil::Mutex::Lock sync(*this); assert(_instance); // Must not be called after destruction. ServantMapMap::iterator p = _servantMapMapHint; FacetMap::iterator q; if(p == _servantMapMap.end() || p->first != ident) { p = _servantMapMap.find(ident); } if(p == _servantMapMap.end() || (q = p->second.find(facet)) == p->second.end()) { NotRegisteredException ex(__FILE__, __LINE__); ex.kindOfObject = "servant"; ex.id = _instance->identityToString(ident); if(!facet.empty()) { ex.id += " -f " + IceUtil::escapeString(facet, ""); } throw ex; } servant = q->second; p->second.erase(q); if(p->second.empty()) { if(p == _servantMapMapHint) { _servantMapMap.erase(p++); _servantMapMapHint = p; } else { _servantMapMap.erase(p); } } return servant; } FacetMap IceInternal::ServantManager::removeAllFacets(const Identity& ident) { IceUtil::Mutex::Lock sync(*this); assert(_instance); // Must not be called after destruction. ServantMapMap::iterator p = _servantMapMapHint; if(p == _servantMapMap.end() || p->first != ident) { p = _servantMapMap.find(ident); } if(p == _servantMapMap.end()) { NotRegisteredException ex(__FILE__, __LINE__); ex.kindOfObject = "servant"; ex.id = _instance->identityToString(ident); throw ex; } FacetMap result = p->second; if(p == _servantMapMapHint) { _servantMapMap.erase(p++); _servantMapMapHint = p; } else { _servantMapMap.erase(p); } return result; } ObjectPtr IceInternal::ServantManager::findServant(const Identity& ident, const string& facet) const { IceUtil::Mutex::Lock sync(*this); // // This assert is not valid if the adapter dispatch incoming // requests from bidir connections. This method might be called if // requests are received over the bidir connection after the // adapter was deactivated. // //assert(_instance); // Must not be called after destruction. ServantMapMap::iterator p = _servantMapMapHint; FacetMap::iterator q; ServantMapMap& servantMapMap = const_cast(_servantMapMap); if(p == servantMapMap.end() || p->first != ident) { p = servantMapMap.find(ident); } if(p == servantMapMap.end() || (q = p->second.find(facet)) == p->second.end()) { return 0; } else { _servantMapMapHint = p; return q->second; } } FacetMap IceInternal::ServantManager::findAllFacets(const Identity& ident) const { IceUtil::Mutex::Lock sync(*this); assert(_instance); // Must not be called after destruction. ServantMapMap::iterator p = _servantMapMapHint; ServantMapMap& servantMapMap = const_cast(_servantMapMap); if(p == servantMapMap.end() || p->first != ident) { p = servantMapMap.find(ident); } if(p == servantMapMap.end()) { return FacetMap(); } else { _servantMapMapHint = p; return p->second; } } bool IceInternal::ServantManager::hasServant(const Identity& ident) const { IceUtil::Mutex::Lock sync(*this); // // This assert is not valid if the adapter dispatch incoming // requests from bidir connections. This method might be called if // requests are received over the bidir connection after the // adapter was deactivated. // //assert(_instance); // Must not be called after destruction. ServantMapMap::iterator p = _servantMapMapHint; ServantMapMap& servantMapMap = const_cast(_servantMapMap); if(p == servantMapMap.end() || p->first != ident) { p = servantMapMap.find(ident); } if(p == servantMapMap.end()) { return false; } else { _servantMapMapHint = p; assert(!p->second.empty()); return true; } } IceInternal::ServantManager::ServantManager(const InstancePtr& instance, const string& adapterName) : _instance(instance), _adapterName(adapterName), _servantMapMapHint(_servantMapMap.end()) { } IceInternal::ServantManager::~ServantManager() { // // Don't check whether destroy() has been called. It might have // not been called if the associated object adapter was not // properly deactivated. // //assert(!_instance); } void IceInternal::ServantManager::destroy() { ServantMapMap servantMapMap; { IceUtil::Mutex::Lock sync(*this); assert(_instance); // Must not be called after destruction. servantMapMap.swap(_servantMapMap); _servantMapMapHint = _servantMapMap.end(); _instance = 0; } // // We clear the maps outside the synchronization as we don't want to // hold any internal Ice mutex while running user code (such as servant // or servant locator destructors). // servantMapMap.clear(); } IceE-1.2.0/src/IceE/LocatorInfo.cpp0000644000076400007640000003100310602152305016541 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_LOCATOR #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(LocatorManager* p) { return p; } IceUtil::Shared* IceInternal::upCast(LocatorInfo* p) { return p; } IceUtil::Shared* IceInternal::upCast(LocatorTable* p) { return p; } IceInternal::LocatorManager::LocatorManager() : _tableHint(_table.end()) { } void IceInternal::LocatorManager::destroy() { IceUtil::Mutex::Lock sync(*this); for_each(_table.begin(), _table.end(), Ice::secondVoidMemFun(&LocatorInfo::destroy)); _table.clear(); _tableHint = _table.end(); _locatorTables.clear(); } LocatorInfoPtr IceInternal::LocatorManager::get(const LocatorPrx& loc) { if(!loc) { return 0; } LocatorPrx locator = LocatorPrx::uncheckedCast(loc->ice_locator(0)); // The locator can't be located. // // TODO: reap unused locator info objects? // IceUtil::Mutex::Lock sync(*this); map::iterator p = _table.end(); if(_tableHint != _table.end()) { if(_tableHint->first == locator) { p = _tableHint; } } if(p == _table.end()) { p = _table.find(locator); } if(p == _table.end()) { // // Rely on locator identity for the adapter table. We want to // have only one table per locator (not one per locator // proxy). // map::iterator t = _locatorTables.find(locator->ice_getIdentity()); if(t == _locatorTables.end()) { t = _locatorTables.insert(_locatorTables.begin(), pair(locator->ice_getIdentity(), new LocatorTable())); } _tableHint = _table.insert(_tableHint, pair(locator, new LocatorInfo(locator, t->second))); } else { _tableHint = p; } return _tableHint->second; } IceInternal::LocatorTable::LocatorTable() { } void IceInternal::LocatorTable::clear() { IceUtil::Mutex::Lock sync(*this); _adapterEndpointsMap.clear(); _objectMap.clear(); } bool IceInternal::LocatorTable::getAdapterEndpoints(const string& adapter, vector& endpoints) const { IceUtil::Mutex::Lock sync(*this); map >::const_iterator p = _adapterEndpointsMap.find(adapter); if(p != _adapterEndpointsMap.end()) { endpoints = p->second; return true; } else { return false; } } void IceInternal::LocatorTable::addAdapterEndpoints(const string& adapter, const vector& endpoints) { IceUtil::Mutex::Lock sync(*this); _adapterEndpointsMap.insert(make_pair(adapter, endpoints)); } vector IceInternal::LocatorTable::removeAdapterEndpoints(const string& adapter) { IceUtil::Mutex::Lock sync(*this); map >::iterator p = _adapterEndpointsMap.find(adapter); if(p == _adapterEndpointsMap.end()) { return vector(); } vector endpoints = p->second; _adapterEndpointsMap.erase(p); return endpoints; } bool IceInternal::LocatorTable::getProxy(const Identity& id, ObjectPrx& proxy) const { IceUtil::Mutex::Lock sync(*this); map::const_iterator p = _objectMap.find(id); if(p != _objectMap.end()) { proxy = p->second; return true; } else { return false; } } void IceInternal::LocatorTable::addProxy(const Identity& id, const ObjectPrx& proxy) { IceUtil::Mutex::Lock sync(*this); _objectMap.insert(make_pair(id, proxy)); } ObjectPrx IceInternal::LocatorTable::removeProxy(const Identity& id) { IceUtil::Mutex::Lock sync(*this); map::iterator p = _objectMap.find(id); if(p == _objectMap.end()) { return 0; } ObjectPrx proxy = p->second; _objectMap.erase(p); return proxy; } IceInternal::LocatorInfo::LocatorInfo(const LocatorPrx& locator, const LocatorTablePtr& table) : _locator(locator), _table(table) { assert(_locator); assert(_table); } void IceInternal::LocatorInfo::destroy() { IceUtil::Mutex::Lock sync(*this); _locatorRegistry = 0; _table->clear(); } bool IceInternal::LocatorInfo::operator==(const LocatorInfo& rhs) const { return _locator == rhs._locator; } bool IceInternal::LocatorInfo::operator!=(const LocatorInfo& rhs) const { return _locator != rhs._locator; } bool IceInternal::LocatorInfo::operator<(const LocatorInfo& rhs) const { return _locator < rhs._locator; } LocatorPrx IceInternal::LocatorInfo::getLocator() const { // // No mutex lock necessary, _locator is immutable. // return _locator; } LocatorRegistryPrx IceInternal::LocatorInfo::getLocatorRegistry() { IceUtil::Mutex::Lock sync(*this); if(!_locatorRegistry) // Lazy initialization. { _locatorRegistry = _locator->getRegistry(); // // The locator registry can't be located. // _locatorRegistry = LocatorRegistryPrx::uncheckedCast(_locatorRegistry->ice_locator(0)); } return _locatorRegistry; } vector IceInternal::LocatorInfo::getEndpoints(const IndirectReferencePtr& ref, bool& cached) { vector endpoints; ObjectPrx object; cached = true; try { if(!ref->getAdapterId().empty()) { if(!_table->getAdapterEndpoints(ref->getAdapterId(), endpoints)) { cached = false; if(ref->getInstance()->traceLevels()->location >= 1) { Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat); out << "searching for adapter by id" << "\n"; out << "adapter = " << ref->getAdapterId(); } object = _locator->findAdapterById(ref->getAdapterId()); if(object) { endpoints = object->__reference()->getEndpoints(); _table->addAdapterEndpoints(ref->getAdapterId(), endpoints); } } } else { bool objectCached = true; if(!_table->getProxy(ref->getIdentity(), object)) { if(ref->getInstance()->traceLevels()->location >= 1) { Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat); out << "searching for object by id" << "\n"; out << "object = " << ref->getInstance()->identityToString(ref->getIdentity()); } objectCached = false; object = _locator->findObjectById(ref->getIdentity()); } bool endpointsCached = true; if(object) { DirectReferencePtr odr = DirectReferencePtr::dynamicCast(object->__reference()); if(odr) { endpointsCached = false; endpoints = odr->getEndpoints(); } else { IndirectReferencePtr oir = IndirectReferencePtr::dynamicCast(object->__reference()); assert(oir); if(!oir->getAdapterId().empty()) { endpoints = getEndpoints(oir, endpointsCached); } } } if(!objectCached && !endpoints.empty()) { _table->addProxy(ref->getIdentity(), object); } cached = objectCached || endpointsCached; } } catch(const AdapterNotFoundException&) { if(ref->getInstance()->traceLevels()->location >= 1) { Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat); out << "adapter not found" << "\n"; out << "adapter = " << ref->getAdapterId(); } NotRegisteredException ex(__FILE__, __LINE__); ex.kindOfObject = "object adapter"; ex.id = ref->getAdapterId(); throw ex; } catch(const ObjectNotFoundException&) { if(ref->getInstance()->traceLevels()->location >= 1) { Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat); out << "object not found" << "\n"; out << "object = " << ref->getInstance()->identityToString(ref->getIdentity()); } NotRegisteredException ex(__FILE__, __LINE__); ex.kindOfObject = "object"; ex.id = ref->getInstance()->identityToString(ref->getIdentity()); throw ex; } catch(const NotRegisteredException&) { throw; } catch(const LocalException& ex) { if(ref->getInstance()->traceLevels()->location >= 1) { Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat); out << "couldn't contact the locator to retrieve adapter endpoints\n"; if(!ref) { out << "object = " << ref->getInstance()->identityToString(ref->getIdentity()) << "\n"; } else { out << "adapter = " << ref->getAdapterId() << "\n"; } out << "reason = " << ex.toString(); } throw; } if(ref->getInstance()->traceLevels()->location >= 1) { if(!endpoints.empty()) { if(cached) { trace("found endpoints in locator table", ref, endpoints); } else { trace("retrieved endpoints from locator, adding to locator table", ref, endpoints); } } else { Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat); out << "no endpoints configured for "; if(ref->getAdapterId().empty()) { out << "object\n"; out << "object = " << ref->getInstance()->identityToString(ref->getIdentity()); } else { out << "adapter\n"; out << "adapter = " << ref->getAdapterId(); } } } return endpoints; } void IceInternal::LocatorInfo::clearObjectCache(const IndirectReferencePtr& ref) { if(ref->getAdapterId().empty()) { ObjectPrx object = _table->removeProxy(ref->getIdentity()); if(object) { IndirectReferencePtr oir = IndirectReferencePtr::dynamicCast(object->__reference()); if(oir) { if(!oir->getAdapterId().empty()) { clearCache(oir); } } else { if(ref->getInstance()->traceLevels()->location >= 2) { trace("removed endpoints from locator table", ref, object->__reference()->getEndpoints()); } } } } } void IceInternal::LocatorInfo::clearCache(const IndirectReferencePtr& ref) { if(!ref->getAdapterId().empty()) { vector endpoints = _table->removeAdapterEndpoints(ref->getAdapterId()); if(!endpoints.empty() && ref->getInstance()->traceLevels()->location >= 2) { trace("removed endpoints from locator table", ref, endpoints); } } else { ObjectPrx object = _table->removeProxy(ref->getIdentity()); if(object) { IndirectReferencePtr oir = IndirectReferencePtr::dynamicCast(object->__reference()); if(oir) { if(!oir->getAdapterId().empty()) { clearCache(oir); } } else { if(ref->getInstance()->traceLevels()->location >= 2) { trace("removed endpoints from locator table", ref, object->__reference()->getEndpoints()); } } } } } void IceInternal::LocatorInfo::trace(const string& msg, const IndirectReferencePtr& ref, const vector& endpoints) { Trace out(ref->getInstance()->initializationData().logger, ref->getInstance()->traceLevels()->locationCat); out << msg << "\n"; if(!ref->getAdapterId().empty()) { out << "adapter = " << ref->getAdapterId() << "\n"; } else { out << "object = " << ref->getInstance()->identityToString(ref->getIdentity()) << "\n"; } const char* sep = endpoints.size() > 1 ? ":" : ""; out << "endpoints = "; for(unsigned int i = 0; i < endpoints.size(); ++i) { out << endpoints[i]->toString() << sep; } } #endif IceE-1.2.0/src/IceE/Time.cpp0000644000076400007640000000427110576536574015257 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #ifndef _WIN32_WCE # if defined(_WIN32) # include # include # else # include # endif #endif using namespace IceUtil; IceUtil::Time::Time() : _usec(0) { } Time IceUtil::Time::now() { #if defined(_WIN32_WCE) // // Note that GetTickCount returns the number of ms since the // device was started. Time cannot be used to represent an // absolute time on CE since GetLocalTime doesn't have millisecond // resolution. // return Time(static_cast(GetTickCount()) * 1000); #elif defined(_WIN32) struct _timeb tb; _ftime(&tb); return Time(tb.time * static_cast(1000000) + tb.millitm * static_cast(1000)); #else struct timeval tv; gettimeofday(&tv, 0); return Time(tv.tv_sec * static_cast(1000000) + tv.tv_usec); #endif } Time IceUtil::Time::seconds(Int64 t) { return Time(t * static_cast(1000000)); } Time IceUtil::Time::milliSeconds(Int64 t) { return Time(t * static_cast(1000)); } Time IceUtil::Time::microSeconds(Int64 t) { return Time(t); } #ifndef _WIN32 IceUtil::Time::operator timeval() const { timeval tv; tv.tv_sec = static_cast(_usec / 1000000); tv.tv_usec = static_cast(_usec % 1000000); return tv; } #endif Int64 IceUtil::Time::toSeconds() const { return _usec / 1000000; } Int64 IceUtil::Time::toMilliSeconds() const { return _usec / 1000; } Int64 IceUtil::Time::toMicroSeconds() const { return _usec; } double IceUtil::Time::toSecondsDouble() const { return _usec / 1000000.0; } double IceUtil::Time::toMilliSecondsDouble() const { return _usec / 1000.0; } double IceUtil::Time::toMicroSecondsDouble() const { return static_cast(_usec); } Time::Time(Int64 usec) : _usec(usec) { } IceE-1.2.0/src/IceE/RouterInfo.h0000644000076400007640000000404110605173676016106 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ROUTER_INFO_H #define ICEE_ROUTER_INFO_H #include #ifdef ICEE_HAS_ROUTER #include #include #ifndef ICEE_PURE_CLIENT # include #endif #include #include #include #include namespace IceInternal { class RouterManager : public IceUtil::Shared, public IceUtil::Mutex { public: RouterManager(); void destroy(); // // Returns router info for a given router. Automatically creates // the router info if it doesn't exist yet. // RouterInfoPtr get(const Ice::RouterPrx&); RouterInfoPtr erase(const Ice::RouterPrx&); private: std::map _table; std::map::iterator _tableHint; }; class RouterInfo : public IceUtil::Shared, public IceUtil::Mutex { public: RouterInfo(const Ice::RouterPrx&); void destroy(); bool operator==(const RouterInfo&) const; bool operator!=(const RouterInfo&) const; bool operator<(const RouterInfo&) const; Ice::RouterPrx getRouter() const; std::vector getClientEndpoints(); std::vector getServerEndpoints(); void addProxy(const Ice::ObjectPrx&); #ifndef ICEE_PURE_CLIENT void setAdapter(const Ice::ObjectAdapterPtr&); Ice::ObjectAdapterPtr getAdapter() const; #endif private: const Ice::RouterPrx _router; std::vector _clientEndpoints; std::vector _serverEndpoints; #ifndef ICEE_PURE_CLIENT Ice::ObjectAdapterPtr _adapter; #endif std::set _identities; }; } #endif #endif IceE-1.2.0/src/IceE/SafeStdio.cpp0000755000076400007640000000137710576536574016251 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; string Ice::printfToString(const char* fmt, ...) { va_list ap; va_start(ap, fmt); char buf[1024]; #if defined(_WIN32) _vsnprintf(buf, sizeof(buf)-1, fmt, ap); #else vsnprintf(buf, sizeof(buf)-1, fmt, ap); #endif buf[sizeof(buf)-1] = '\0'; va_end(ap); return buf; } IceE-1.2.0/src/IceE/TraceUtil.cpp0000644000076400007640000001634310601756535016246 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; static void printIdentityFacetOperation(string& s, BasicStream& stream) { Identity identity; identity.__read(&stream); s += "\nidentity = "; s += stream.instance()->identityToString(identity); vector facet; stream.read(facet); s += "\nfacet = "; if(!facet.empty()) { s += IceUtil::escapeString(facet[0], ""); } string operation; stream.read(operation); s += "\noperation = "; s += operation; } static void printRequestHeader(string& s, BasicStream& stream) { printIdentityFacetOperation(s, stream); Byte mode; stream.read(mode); s += Ice::printfToString("\nmode = %d ", static_cast(mode)); switch(mode) { case Normal: { s += "(normal)"; break; } case Nonmutating: { s += "(nonmutating)"; break; } case Idempotent: { s += "(idempotent)"; break; } default: { s += "(unknown)"; break; } } Int sz; stream.readSize(sz); s += "\ncontext = "; while(sz--) { pair pair; stream.read(pair.first); stream.read(pair.second); s += pair.first; s += "/"; s += pair.second; if(sz) { s += ", "; } } } static void printHeader(string& s, BasicStream& stream) { Byte magicNumber; stream.read(magicNumber); // Don't bother printing the magic number stream.read(magicNumber); stream.read(magicNumber); stream.read(magicNumber); Byte pMajor; Byte pMinor; stream.read(pMajor); stream.read(pMinor); //Ice::printfToString("\nprotocol version = %d.%d", static_cast(pMajor), //static_cast(pMinor); Byte eMajor; Byte eMinor; stream.read(eMajor); stream.read(eMinor); //Ice::printfToString("\nencoding version = %d.%d", static_cast(eMajor), //static_cast(eMinor); Byte type; stream.read(type); s += Ice::printfToString("\nmessage type = %d ", static_cast(type)); switch(type) { case requestMsg: { s += "(request)"; break; } case requestBatchMsg: { s += "(batch request)"; break; } case replyMsg: { s += "(reply)"; break; } case closeConnectionMsg: { s += "(close connection)"; break; } case validateConnectionMsg: { s += "(validate connection)"; break; } default: { s += "(unknown)"; break; } } Byte compress; stream.read(compress); s += Ice::printfToString("\ncompression status = %d ", static_cast(compress)); switch(compress) { case 0: { s += "(not compressed; do not compress response, if any)"; break; } case 1: { s += "(not compressed; compress response, if any)"; break; } case 2: { s += "(compressed; compress response, if any)"; break; } default: { s += "(unknown)"; break; } } Int size; stream.read(size); s += Ice::printfToString("\nmessage size = %d", size); } void IceInternal::traceHeader(const char* heading, const BasicStream& str, const LoggerPtr& logger, const TraceLevelsPtr& tl) { BasicStream& stream = const_cast(str); BasicStream::Container::iterator p = stream.i; stream.i = stream.b.begin(); string s(heading); printHeader(s, stream); logger->trace(tl->protocolCat, s); stream.i = p; } void IceInternal::traceRequest(const char* heading, const BasicStream& str, const LoggerPtr& logger, const TraceLevelsPtr& tl) { BasicStream& stream = const_cast(str); BasicStream::Container::iterator p = stream.i; stream.i = stream.b.begin(); string s(heading); printHeader(s, stream); Int requestId; stream.read(requestId); s += Ice::printfToString("\nrequest id = %d", requestId); if(requestId == 0) { s += " (oneway)"; } printRequestHeader(s, stream); logger->trace(tl->protocolCat, s); stream.i = p; } #ifdef ICEE_HAS_BATCH void IceInternal::traceBatchRequest(const char* heading, const BasicStream& str, const LoggerPtr& logger, const TraceLevelsPtr& tl) { BasicStream& stream = const_cast(str); BasicStream::Container::iterator p = stream.i; stream.i = stream.b.begin(); string s(heading); printHeader(s, stream); int batchRequestNum; stream.read(batchRequestNum); s += Ice::printfToString("\nnumber of requests = %d", batchRequestNum); for(int i = 0; i < batchRequestNum; ++i) { s += Ice::printfToString("\nrequest #%d:", i); printRequestHeader(s, stream); stream.skipEncaps(); } logger->trace(tl->protocolCat, s); stream.i = p; } #endif void IceInternal::traceReply(const char* heading, const BasicStream& str, const LoggerPtr& logger, const TraceLevelsPtr& tl) { BasicStream& stream = const_cast(str); BasicStream::Container::iterator p = stream.i; stream.i = stream.b.begin(); string s(heading); printHeader(s, stream); Int requestId; stream.read(requestId); s += Ice::printfToString("\nrequest id = %d", requestId); Byte status; stream.read(status); s += Ice::printfToString("\nreply status = %d ", static_cast(status)); switch(static_cast(status)) { case DispatchOK: { s += "(ok)"; break; } case DispatchUserException: { s += "(user exception)"; break; } case DispatchObjectNotExist: case DispatchFacetNotExist: case DispatchOperationNotExist: { switch(static_cast(status)) { case DispatchObjectNotExist: { s += "(object not exist)"; break; } case DispatchFacetNotExist: { s += "(facet not exist)"; break; } case DispatchOperationNotExist: { s += "(operation not exist)"; break; } default: { assert(false); break; } } printIdentityFacetOperation(s, stream); break; } case DispatchUnknownException: case DispatchUnknownLocalException: case DispatchUnknownUserException: { switch(static_cast(status)) { case DispatchUnknownException: { s += "(unknown exception)"; break; } case DispatchUnknownLocalException: { s += "(unknown local exception)"; break; } case DispatchUnknownUserException: { s += "(unknown user exception)"; break; } default: { assert(false); break; } } string unknown; stream.read(unknown); s += "\nunknown = "; s += unknown; break; } default: { s += "(unknown)"; break; } } logger->trace(tl->protocolCat, s); stream.i = p; } IceE-1.2.0/src/IceE/Transceiver.h0000644000076400007640000000346310614125577016303 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_TRANSCEIVER_H #define ICEE_TRANSCEIVER_H #include #include #include #include #include #ifdef _WIN32 # include typedef int ssize_t; #else # define SOCKET int #endif namespace IceInternal { class Connector; class Acceptor; class Buffer; class Transceiver : public ::IceUtil::Shared { public: void setTimeouts(int, int); SOCKET fd(); void close(); void shutdownWrite(); void shutdownReadWrite(); void writeWithTimeout(Buffer&, int); void readWithTimeout(Buffer&, int); void write(Buffer& buf) { writeWithTimeout(buf, _writeTimeout); } void read(Buffer& buf) { readWithTimeout(buf, _readTimeout); } std::string type() const; std::string toString() const; private: Transceiver(const InstancePtr&, SOCKET); virtual ~Transceiver(); friend class Connector; friend class Acceptor; #ifdef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS void doSelect(bool, int); #endif const TraceLevelsPtr _traceLevels; const Ice::LoggerPtr _logger; SOCKET _fd; int _readTimeout; int _writeTimeout; #ifdef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS #ifdef _WIN32 WSAEVENT _event; WSAEVENT _readEvent; WSAEVENT _writeEvent; #else fd_set _wFdSet; fd_set _rFdSet; #endif #endif const std::string _desc; #ifdef _WIN32 const bool _isPeerLocal; #endif }; } #endif IceE-1.2.0/src/IceE/UnknownEndpoint.h0000644000076400007640000000266110616637156017160 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_UNKNOWN_ENDPOINT_H #define ICEE_UNKNOWN_ENDPOINT_H #include namespace IceInternal { class UnknownEndpoint : public Endpoint { public: UnknownEndpoint(Ice::Short, BasicStream*); virtual void streamWrite(BasicStream*) const; virtual std::string toString() const; virtual Ice::Short type() const; virtual Ice::Int timeout() const; virtual EndpointPtr timeout(Ice::Int) const; virtual bool secure() const; virtual bool datagram() const; virtual bool unknown() const; virtual ConnectorPtr connector() const; #ifndef ICEE_PURE_CLIENT virtual AcceptorPtr acceptor(EndpointPtr&) const; virtual bool publish() const; #endif virtual std::vector expand(bool) const; virtual bool operator==(const Endpoint&) const; virtual bool operator!=(const Endpoint&) const; virtual bool operator<(const Endpoint&) const; private: // // All members are const, because endpoints are immutable. // const InstancePtr _instance; Ice::Short _type; const std::vector _rawBytes; }; } #endif IceE-1.2.0/src/IceE/EndpointFactory.h0000644000076400007640000000157310614125577017126 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ENDPOINT_FACTORY_H #define ICEE_ENDPOINT_FACTORY_H #include #include #include #include namespace IceInternal { class BasicStream; class EndpointFactory : public ::IceUtil::Shared { public: ~EndpointFactory(); EndpointPtr create(const std::string&) const; EndpointPtr read(BasicStream*) const; void destroy(); protected: EndpointFactory(const InstancePtr&); friend class Instance; InstancePtr _instance; }; } #endif IceE-1.2.0/src/IceE/Properties.cpp0000644000076400007640000002004110616161100016454 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(::Ice::Properties* p) { return p; } string Ice::Properties::getProperty(const string& key) { IceUtil::Mutex::Lock sync(*this); map::const_iterator p = _properties.find(key); if(p != _properties.end()) { return p->second; } else { return string(); } } string Ice::Properties::getPropertyWithDefault(const string& key, const string& value) { IceUtil::Mutex::Lock sync(*this); map::const_iterator p = _properties.find(key); if(p != _properties.end()) { return p->second; } else { return value; } } Int Ice::Properties::getPropertyAsInt(const string& key) { return getPropertyAsIntWithDefault(key, 0); } Int Ice::Properties::getPropertyAsIntWithDefault(const string& key, Int value) { IceUtil::Mutex::Lock sync(*this); map::const_iterator p = _properties.find(key); if(p != _properties.end()) { value = atoi(p->second.c_str()); } return value; } PropertyDict Ice::Properties::getPropertiesForPrefix(const string& prefix) { IceUtil::Mutex::Lock sync(*this); PropertyDict result; map::const_iterator p; for(p = _properties.begin(); p != _properties.end(); ++p) { if(prefix.empty() || p->first.compare(0, prefix.size(), prefix) == 0) { result.insert(*p); } } return result; } void Ice::Properties::setProperty(const string& key, const string& value) { if(key.empty()) { return; } IceUtil::Mutex::Lock sync(*this); // // Set or clear the property. // if(!value.empty()) { _properties[key] = value; } else { _properties.erase(key); } } StringSeq Ice::Properties::getCommandLineOptions() { IceUtil::Mutex::Lock sync(*this); StringSeq result; result.reserve(_properties.size()); map::const_iterator p; for(p = _properties.begin(); p != _properties.end(); ++p) { result.push_back("--" + p->first + "=" + p->second); } return result; } StringSeq Ice::Properties::parseCommandLineOptions(const string& prefix, const StringSeq& options) { string pfx = prefix; if(!pfx.empty() && pfx[pfx.size() - 1] != '.') { pfx += '.'; } pfx = "--" + pfx; StringSeq result; StringSeq::size_type i; for(i = 0; i < options.size(); i++) { string opt = options[i]; if(opt.find(pfx) == 0) { if(opt.find('=') == string::npos) { opt += "=1"; } parseLine(opt.substr(2) #ifdef ICEE_HAS_WSTRING , 0 #endif ); } else { result.push_back(opt); } } return result; } StringSeq Ice::Properties::parseIceCommandLineOptions(const StringSeq& options) { return parseCommandLineOptions("Ice", options); } void Ice::Properties::load(const std::string& file) { FILE* in = fopen(file.c_str(), "r"); if(!in) { FileException ex(__FILE__, __LINE__); ex.path = file; ex.error = getSystemErrno(); throw ex; } char line[1024]; while(fgets(line, 1024, in) != NULL) { parseLine(line #ifdef ICEE_HAS_WSTRING , _converter #endif ); } fclose(in); } PropertiesPtr Ice::Properties::clone() { IceUtil::Mutex::Lock sync(*this); return new Properties(this); } Ice::Properties::Properties(const Properties* p) : _properties(p->_properties) #ifdef ICEE_HAS_WSTRING , _converter(p->_converter) #endif { } Ice::Properties::Properties( #ifdef ICEE_HAS_WSTRING const StringConverterPtr& converter) : _converter(converter) #else ) #endif { } Ice::Properties::Properties(StringSeq& args, const PropertiesPtr& defaults #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& converter) : _converter(converter) #else ) #endif { if(defaults != 0) { _properties = defaults->getPropertiesForPrefix(""); } StringSeq::iterator q = args.begin(); if(q != args.end()) { // // Use the first argument as the value for Ice.ProgramName. Replace // any backslashes in this value with forward slashes, in case this // value is used by the event logger. // string name = *q; replace(name.begin(), name.end(), '\\', '/'); setProperty("Ice.ProgramName", name); } StringSeq tmp; bool loadConfigFiles = false; while(q != args.end()) { string s = *q; if(s.find("--Ice.Config") == 0) { if(s.find('=') == string::npos) { s += "=1"; } parseLine(s.substr(2) #ifdef ICEE_HAS_WSTRING , 0 #endif ); loadConfigFiles = true; } else { tmp.push_back(s); } ++q; } args = tmp; if(!loadConfigFiles) { // // If Ice.Config is not set, load from ICE_CONFIG (if set) // loadConfigFiles = (_properties.find("Ice.Config") == _properties.end()); } if(loadConfigFiles) { loadConfig(); } args = parseIceCommandLineOptions(args); } void Ice::Properties::parseLine(const string& line #ifdef ICEE_HAS_WSTRING , const StringConverterPtr& converter #endif ) { const string delim = " \t\r\n"; string s = line; string::size_type idx = s.find('#'); if(idx != string::npos) { s.erase(idx); } idx = s.find_last_not_of(delim); if(idx != string::npos && idx + 1 < s.length()) { s.erase(idx + 1); } string::size_type beg = s.find_first_not_of(delim); if(beg == string::npos) { return; } string::size_type end = s.find_first_of(delim + "=", beg); if(end == string::npos) { return; } string key = s.substr(beg, end - beg); end = s.find('=', end); if(end == string::npos) { return; } ++end; string value; beg = s.find_first_not_of(delim, end); if(beg != string::npos) { end = s.length(); value = s.substr(beg, end - beg); } #ifdef ICEE_HAS_WSTRING if(converter) { string tmp; converter->fromUTF8(reinterpret_cast(key.data()), reinterpret_cast(key.data() + key.size()), tmp); key.swap(tmp); converter->fromUTF8(reinterpret_cast(value.data()), reinterpret_cast(value.data() + value.size()), tmp); value.swap(tmp); } #endif setProperty(key, value); } void Ice::Properties::loadConfig() { string value = getProperty("Ice.Config"); #ifndef _WIN32_WCE if(value.empty() || value == "1") { const char* s = getenv("ICE_CONFIG"); if(s && *s != '\0') { value = s; } } #endif if(!value.empty()) { const string delim = " \t\r\n"; string::size_type beg = value.find_first_not_of(delim); while(beg != string::npos) { string::size_type end = value.find(",", beg); string file; if(end == string::npos) { file = value.substr(beg); beg = end; } else { file = value.substr(beg, end - beg); beg = value.find_first_not_of("," + delim, end); } load(file); } } setProperty("Ice.Config", value); } IceE-1.2.0/src/IceE/ObjectAdapterFactory.cpp0000644000076400007640000001115010602152305020362 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(ObjectAdapterFactory* p) { return p; } void IceInternal::ObjectAdapterFactory::shutdown() { map adapters; { IceUtil::Monitor::Lock sync(*this); // // Ignore shutdown requests if the object adapter factory has // already been shut down. // if(!_instance) { return; } adapters = _adapters; _instance = 0; _communicator = 0; notifyAll(); } // // Deactivate outside the thread synchronization, to avoid // deadlocks. // //for_each(adapters.begin(), adapters.end(), //Ice::secondVoidMemFun(&ObjectAdapter::deactivate)); for(map::const_iterator p = adapters.begin(); p != adapters.end(); ++p) { p->second->deactivate(); } } void IceInternal::ObjectAdapterFactory::waitForShutdown() { { IceUtil::Monitor::Lock sync(*this); // // First we wait for the shutdown of the factory itself. // while(_instance) { wait(); } // // If some other thread is currently shutting down, we wait // until this thread is finished. // while(_waitForShutdown) { wait(); } _waitForShutdown = true; } // // Now we wait for deactivation of each object adapter. // for(map::const_iterator p = _adapters.begin(); p != _adapters.end(); ++p) { p->second->waitForDeactivate(); } { IceUtil::Monitor::Lock sync(*this); // // Signal that waiting is complete. // _waitForShutdown = false; notifyAll(); } } bool IceInternal::ObjectAdapterFactory::isShutdown() const { IceUtil::Monitor::Lock sync(*this); return _instance == 0; } void IceInternal::ObjectAdapterFactory::destroy() { // // First wait for shutdown to finish. // waitForShutdown(); map adapters; { IceUtil::Monitor::Lock sync(*this); adapters = _adapters; _adapters.clear(); } // // Now we destroy each object adapter. // for(map::const_iterator p = adapters.begin(); p != adapters.end(); ++p) { p->second->destroy(); } } ObjectAdapterPtr IceInternal::ObjectAdapterFactory::createObjectAdapter(const string& name, const string& endpoints #ifdef ICEE_HAS_ROUTER , const RouterPrx& router #endif ) { IceUtil::Monitor::Lock sync(*this); if(!_instance) { throw ObjectAdapterDeactivatedException(__FILE__, __LINE__); } map::iterator p = _adapters.find(name); if(p != _adapters.end()) { throw AlreadyRegisteredException(__FILE__, __LINE__, "object adapter", name); } ObjectAdapterPtr adapter = new ObjectAdapter(_instance, _communicator, this, name, endpoints #ifdef ICEE_HAS_ROUTER , router #endif ); _adapters.insert(make_pair(name, adapter)); return adapter; } void IceInternal::ObjectAdapterFactory::removeObjectAdapter(const string& name) { IceUtil::Monitor::Lock sync(*this); if(_waitForShutdown) { return; } _adapters.erase(name); } namespace IceInternal { struct FlushAdapter { void operator() (ObjectAdapterPtr p) { p->flushBatchRequests(); } }; } void IceInternal::ObjectAdapterFactory::flushBatchRequests() const { list a; { IceUtil::Monitor::Lock sync(*this); for(map::const_iterator p = _adapters.begin(); p != _adapters.end(); ++p) { a.push_back(p->second); } } for_each(a.begin(), a.end(), FlushAdapter()); } IceInternal::ObjectAdapterFactory::ObjectAdapterFactory(const InstancePtr& instance, const CommunicatorPtr& communicator) : _instance(instance), _communicator(communicator), _waitForShutdown(false) { } IceInternal::ObjectAdapterFactory::~ObjectAdapterFactory() { assert(!_instance); assert(!_communicator); assert(_adapters.empty()); assert(!_waitForShutdown); } IceE-1.2.0/src/IceE/Endpoint.cpp0000644000076400007640000000077410602152305016115 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(Endpoint* p) { return p; } IceE-1.2.0/src/IceE/OperationMode.cpp0000644000076400007640000000130210576536574017116 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include void Ice::__write(::IceInternal::BasicStream* __os, ::Ice::OperationMode v) { __os->write(static_cast< ::Ice::Byte>(v)); } void Ice::__read(::IceInternal::BasicStream* __is, ::Ice::OperationMode& v) { ::Ice::Byte val; __is->read(val); v = static_cast< ::Ice::OperationMode>(val); } IceE-1.2.0/src/IceE/Makefile0000644000076400007640000000556210616637156015312 0ustar matthewmatthew# ********************************************************************** # # Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. # # This copy of Ice-E is licensed to you under the terms described in the # ICEE_LICENSE file included in this distribution. # # ********************************************************************** top_srcdir = ../.. LIBFILENAME = $(call mklibfilename,IceE,$(VERSION)) SONAME = $(call mksoname,IceE,$(SOVERSION)) LIBNAME = $(call mklibname,IceE) TARGETS = $(call mklibtargets,$(libdir)/$(LIBFILENAME),$(libdir)/$(SONAME),$(libdir)/$(LIBNAME)) TRANSPORT_DIR = $(top_srcdir)/src/TcpTransport %.o: $(TRANSPORT_DIR)/%.cpp $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< TRANSPORT_OBJS = Acceptor.o \ Connector.o \ EndpointFactory.o \ TcpEndpoint.o \ Transceiver.o LOCAL_OBJS = BasicStream.o \ Buffer.o \ BuiltinSequences.o \ Communicator.o \ Cond.o \ Connection.o \ ConvertUTF.o \ Current.o \ DefaultsAndOverrides.o \ Endpoint.o \ ExceptionBase.o \ FactoryTable.o \ FactoryTableDef.o \ Identity.o \ Incoming.o \ IncomingConnectionFactory.o \ Initialize.o \ Instance.o \ LocalException.o \ Locator.o \ LocatorInfo.o \ Logger.o \ LoggerI.o \ LoggerUtil.o \ Network.o \ Object.o \ ObjectAdapter.o \ ObjectAdapterFactory.o \ OperationMode.o \ Outgoing.o \ OutgoingConnectionFactory.o \ Properties.o \ Protocol.o \ Proxy.o \ ProxyFactory.o \ RecMutex.o \ Reference.o \ ReferenceFactory.o \ Router.o \ RouterInfo.o \ SafeStdio.o \ ServantManager.o \ Shared.o \ StaticMutex.o \ StringConverter.o \ StringUtil.o \ Thread.o \ ThreadException.o \ Time.o \ TraceLevels.o \ TraceUtil.o \ UnknownEndpoint.o \ Unicode.o \ UUID.o OBJS = $(LOCAL_OBJS) $(TRANSPORT_OBJS) SRCS = $(LOCAL_OBJS:.o=.cpp) \ $(patsubst %.o,$(TRANSPORT_DIR)/%.cpp,$(TRANSPORT_OBJS)) SLICE_SRCS = $(SDIR)/BuiltinSequences.ice \ $(SDIR)/Identity.ice \ $(SDIR)/LocatorF.ice \ $(SDIR)/Locator.ice \ $(SDIR)/RouterF.ice \ $(SDIR)/Router.ice HDIR = $(includedir)/IceE SDIR = $(slicedir)/IceE include $(top_srcdir)/config/Make.rules CPPFLAGS := -I.. $(CPPFLAGS) -DICE_API_EXPORTS SLICE2CPPEFLAGS := --ice --include-dir IceE --dll-export ICE_API $(SLICE2CPPEFLAGS) LINKWITH := $(ICE_OS_LIBS) ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) rm -f $@ $(call mklib,$@,$(OBJS)) else $(libdir)/$(LIBFILENAME): $(OBJS) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) $(libdir)/$(SONAME): $(libdir)/$(LIBFILENAME) rm -f $@ ln -s $(LIBFILENAME) $@ $(libdir)/$(LIBNAME): $(libdir)/$(SONAME) rm -f $@ ln -s $(SONAME) $@ endif install:: all $(call installlib,$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) include .depend IceE-1.2.0/src/IceE/Reference.h0000644000076400007640000002161710616576164015721 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_REFERENCE_H #define ICEE_REFERENCE_H #include #include #include #include #ifdef ICEE_HAS_ROUTER # include # include #endif #ifdef ICEE_HAS_LOCATOR # include # include #endif #include #include #include #include namespace IceInternal { class BasicStream; class Reference : public IceUtil::Shared { public: enum Type { TypeDirect, TypeIndirect, TypeFixed }; // // The reference mode in Ice-E is defined in ReferenceF.h to allow the proxy // to inline methods such as ice_twoway, ice_isTwoway, etc. // // enum Mode // { // ModeTwoway, // ModeOneway, // ModeBatchOneway, // ModeDatagram, // ModeBatchDatagram, // ModeLast = ModeBatchDatagram // }; ReferenceMode getMode() const { return _mode; } bool getSecure() const { return _secure; }; const Ice::Identity& getIdentity() const { return _identity; } const std::string& getFacet() const { return _facet; } const InstancePtr& getInstance() const { return _instance; } const Ice::Context* getContext() const { return &_context; } Ice::CommunicatorPtr getCommunicator() const; virtual Type getType() const = 0; virtual std::vector getEndpoints() const = 0; #ifdef ICEE_HAS_ROUTER virtual RouterInfoPtr getRouterInfo() const { return 0; } #endif #ifdef ICEE_HAS_LOCATOR virtual std::string getAdapterId() const = 0; virtual LocatorInfoPtr getLocatorInfo() const { return 0; } #endif // // The change* methods (here and in derived classes) create // a new reference based on the existing one, with the // corresponding value changed. // ReferencePtr changeContext(const Ice::Context&) const; ReferencePtr changeMode(ReferenceMode) const; ReferencePtr changeSecure(bool) const; ReferencePtr changeIdentity(const Ice::Identity&) const; ReferencePtr changeFacet(const std::string&) const; #ifdef ICEE_HAS_ROUTER virtual ReferencePtr changeRouter(const Ice::RouterPrx&) const = 0; #endif #ifdef ICEE_HAS_LOCATOR virtual ReferencePtr changeAdapterId(const std::string&) const = 0; virtual ReferencePtr changeLocator(const Ice::LocatorPrx&) const = 0; #endif virtual ReferencePtr changeTimeout(int) const; int hash() const; // Conceptually const. // // Marshal the reference. // virtual void streamWrite(BasicStream*) const; // // Convert the reference to its string form. // virtual std::string toString() const; // // Get a suitable connection for this reference. // virtual Ice::ConnectionPtr getConnection() const = 0; virtual bool operator==(const Reference&) const = 0; virtual bool operator<(const Reference&) const = 0; virtual ReferencePtr clone() const = 0; protected: Reference(const InstancePtr&, const Ice::CommunicatorPtr&, const Ice::Identity&, const Ice::Context&, const std::string&, ReferenceMode, bool); Reference(const Reference&); void applyOverrides(std::vector&) const; IceUtil::RecMutex _hashMutex; // For lazy initialization of hash value. mutable Ice::Int _hashValue; mutable bool _hashInitialized; private: const InstancePtr _instance; const Ice::CommunicatorPtr _communicator; ReferenceMode _mode; bool _secure; Ice::Identity _identity; Ice::Context _context; std::string _facet; // // NOTE: The override timeout should theoritically be in // RoutableReference. However, since RoutableReference is only // defined if the ICEE_HAS_ROUTER macro is defined, it would also // have to be conditionally defined here. To simplify, we just // define it here. // bool _overrideTimeout; int _timeout; // Only used if _overrideTimeout == true }; class FixedReference : public Reference { public: FixedReference(const InstancePtr&, const Ice::CommunicatorPtr&, const Ice::Identity&, const Ice::Context&, const std::string&, ReferenceMode, const std::vector&); virtual Type getType() const; virtual std::vector getEndpoints() const; #ifdef ICEE_HAS_ROUTER virtual ReferencePtr changeRouter(const Ice::RouterPrx&) const; #endif #ifdef ICEE_HAS_LOCATOR virtual std::string getAdapterId() const; virtual ReferencePtr changeAdapterId(const std::string&) const; virtual ReferencePtr changeLocator(const Ice::LocatorPrx&) const; #endif virtual ReferencePtr changeTimeout(int) const; virtual void streamWrite(BasicStream*) const; virtual std::string toString() const; virtual Ice::ConnectionPtr getConnection() const; virtual bool operator==(const Reference&) const; virtual bool operator<(const Reference&) const; virtual ReferencePtr clone() const; protected: FixedReference(const FixedReference&); private: std::vector _fixedConnections; }; #ifdef ICEE_HAS_ROUTER class RoutableReference : public Reference { public: virtual RouterInfoPtr getRouterInfo() const { return _routerInfo; } std::vector getRoutedEndpoints() const; virtual ReferencePtr changeRouter(const Ice::RouterPrx&) const; virtual Ice::ConnectionPtr getConnection() const = 0; int hash() const; // Conceptually const. virtual bool operator==(const Reference&) const = 0; virtual bool operator<(const Reference&) const = 0; virtual ReferencePtr clone() const = 0; protected: RoutableReference(const InstancePtr&, const Ice::CommunicatorPtr&, const Ice::Identity&, const Ice::Context&, const std::string&, ReferenceMode, bool, const RouterInfoPtr&); RoutableReference(const RoutableReference&); private: RouterInfoPtr _routerInfo; // Null if no router is used. }; #endif class DirectReference : #ifdef ICEE_HAS_ROUTER public RoutableReference #else public Reference #endif { public: DirectReference(const InstancePtr&, const Ice::CommunicatorPtr&, const Ice::Identity&, const Ice::Context&, const std::string&, ReferenceMode, bool, const std::vector& #ifdef ICEE_HAS_ROUTER , const RouterInfoPtr& #endif ); virtual Type getType() const; virtual std::vector getEndpoints() const; #ifdef ICEE_HAS_LOCATOR virtual std::string getAdapterId() const; virtual ReferencePtr changeAdapterId(const std::string&) const; virtual ReferencePtr changeLocator(const Ice::LocatorPrx&) const; #endif virtual ReferencePtr changeTimeout(int) const; virtual void streamWrite(BasicStream*) const; virtual std::string toString() const; virtual Ice::ConnectionPtr getConnection() const; virtual bool operator==(const Reference&) const; virtual bool operator<(const Reference&) const; virtual ReferencePtr clone() const; protected: DirectReference(const DirectReference&); private: std::vector _endpoints; #ifdef ICEE_HAS_ROUTER typedef RoutableReference Parent; #else typedef Reference Parent; #endif }; #ifdef ICEE_HAS_LOCATOR class IndirectReference : #ifdef ICEE_HAS_ROUTER public RoutableReference #else public Reference #endif { public: IndirectReference(const InstancePtr&, const Ice::CommunicatorPtr&, const Ice::Identity&, const Ice::Context&, const std::string&, ReferenceMode, bool, const std::string& #ifdef ICEE_HAS_ROUTER , const RouterInfoPtr& #endif , const LocatorInfoPtr&); virtual LocatorInfoPtr getLocatorInfo() const { return _locatorInfo; } virtual Type getType() const; virtual std::vector getEndpoints() const; virtual std::string getAdapterId() const; virtual ReferencePtr changeAdapterId(const std::string&) const; virtual ReferencePtr changeLocator(const Ice::LocatorPrx&) const; virtual void streamWrite(BasicStream*) const; virtual std::string toString() const; virtual Ice::ConnectionPtr getConnection() const; int hash() const; // Conceptually const. virtual bool operator==(const Reference&) const; virtual bool operator<(const Reference&) const; virtual ReferencePtr clone() const; protected: IndirectReference(const IndirectReference&); private: std::string _adapterId; LocatorInfoPtr _locatorInfo; #ifdef ICEE_HAS_ROUTER typedef RoutableReference Parent; #else typedef Reference Parent; #endif }; #endif // ICEE_HAS_LOCATOR std::vector filterEndpoints(const std::vector&, ReferenceMode, bool); } #endif IceE-1.2.0/src/IceE/OutgoingConnectionFactory.cpp0000755000076400007640000002524010605173676021517 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include #include #ifdef ICEE_HAS_ROUTER # include #endif #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(OutgoingConnectionFactory* p) { return p; } void IceInternal::OutgoingConnectionFactory::destroy() { IceUtil::Monitor::Lock sync(*this); if(_destroyed) { return; } #ifdef _STLP_BEGIN_NAMESPACE // voidbind2nd is an STLport extension for broken compilers in IceE/Functional.h for_each(_connections.begin(), _connections.end(), voidbind2nd(Ice::secondVoidMemFun1 (&Connection::destroy), Connection::CommunicatorDestroyed)); #else for_each(_connections.begin(), _connections.end(), bind2nd(Ice::secondVoidMemFun1 (&Connection::destroy), Connection::CommunicatorDestroyed)); #endif _destroyed = true; notifyAll(); } void IceInternal::OutgoingConnectionFactory::waitUntilFinished() { multimap connections; { IceUtil::Monitor::Lock sync(*this); // // First we wait until the factory is destroyed. We also wait // until there are no pending connections anymore. Only then // we can be sure the _connections contains all connections. // while(!_destroyed || !_pending.empty()) { wait(); } // // We want to wait until all connections are finished outside the // thread synchronization. // connections.swap(_connections); } for_each(connections.begin(), connections.end(), Ice::secondVoidMemFun(&Connection::waitUntilFinished)); } ConnectionPtr IceInternal::OutgoingConnectionFactory::create(const vector& endpts) { assert(!endpts.empty()); vector endpoints = endpts; { IceUtil::Monitor::Lock sync(*this); if(_destroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } // // Reap connections for which destruction has completed. // std::multimap::iterator p = _connections.begin(); while(p != _connections.end()) { if(p->second->isFinished()) { _connections.erase(p++); } else { ++p; } } // // Modify endpoints with overrides. // vector::iterator q; for(q = endpoints.begin(); q != endpoints.end(); ++q) { if(_instance->defaultsAndOverrides()->overrideTimeout) { *q = (*q)->timeout(_instance->defaultsAndOverrides()->overrideTimeoutValue); } } // // Search for existing connections. // vector::const_iterator r; for(q = endpoints.begin(), r = endpts.begin(); q != endpoints.end(); ++q, ++r) { pair::iterator, multimap::iterator> pr = _connections.equal_range(*q); while(pr.first != pr.second) { // // Don't return connections for which destruction has // been initiated. // if(!pr.first->second->isDestroyed()) { return pr.first->second; } ++pr.first; } } // // If some other thread is currently trying to establish a // connection to any of our endpoints, we wait until this // thread is finished. // bool searchAgain = false; while(!_destroyed) { for(q = endpoints.begin(); q != endpoints.end(); ++q) { if(_pending.find(*q) != _pending.end()) { break; } } if(q == endpoints.end()) { break; } searchAgain = true; wait(); } if(_destroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } // // Search for existing connections again if we waited above, // as new connections might have been added in the meantime. // if(searchAgain) { for(q = endpoints.begin(), r = endpts.begin(); q != endpoints.end(); ++q, ++r) { pair::iterator, multimap::iterator> pr = _connections.equal_range(*q); while(pr.first != pr.second) { // // Don't return connections for which destruction has // been initiated. // if(!pr.first->second->isDestroyed()) { return pr.first->second; } ++pr.first; } } } // // No connection to any of our endpoints exists yet, so we // will try to create one. To avoid that other threads try to // create connections to the same endpoints, we add our // endpoints to _pending. // _pending.insert(endpoints.begin(), endpoints.end()); } ConnectionPtr connection; auto_ptr exception; vector::const_iterator q; vector::const_iterator r; for(q = endpoints.begin(), r = endpts.begin(); q != endpoints.end(); ++q, ++r) { EndpointPtr endpoint = *q; try { ConnectorPtr connector = endpoint->connector(); assert(connector); Int timeout; if(_instance->defaultsAndOverrides()->overrideConnectTimeout) { timeout = _instance->defaultsAndOverrides()->overrideConnectTimeoutValue; } // It is not necessary to check for overrideTimeout, // the endpoint has already been modified with this // override, if set. else { timeout = endpoint->timeout(); } TransceiverPtr transceiver = connector->connect(timeout); assert(transceiver); #ifdef ICEE_PURE_CLIENT connection = new Connection(_instance, transceiver, endpoint); #else connection = new Connection(_instance, transceiver, endpoint, 0); #endif // // Wait for the connection to be validated by the // connection thread. Once the connection has been // validated it will be activated also. // connection->waitForValidation(); break; } catch(const LocalException& ex) { exception.reset(dynamic_cast(ex.ice_clone())); // // If a connection object was constructed, then validate() // must have raised the exception. // if(connection) { connection->waitUntilFinished(); // We must call waitUntilFinished() for cleanup. connection = 0; } } TraceLevelsPtr traceLevels = _instance->traceLevels(); if(traceLevels->retry >= 2) { Trace out(_instance->initializationData().logger, traceLevels->retryCat); out << "connection to endpoint failed"; if(q + 1 != endpoints.end()) { out << ", trying next endpoint\n"; } else { out << " and no more endpoints to try\n"; } out << (*exception.get()).toString(); } } { IceUtil::Monitor::Lock sync(*this); // // Signal other threads that we are done with trying to // establish connections to our endpoints. // for(q = endpoints.begin(); q != endpoints.end(); ++q) { _pending.erase(*q); } notifyAll(); if(!connection) { assert(exception.get()); exception->ice_throw(); } else { _connections.insert(_connections.end(), pair(connection->endpoint(), connection)); if(_destroyed) { connection->destroy(Connection::CommunicatorDestroyed); throw CommunicatorDestroyedException(__FILE__, __LINE__); } } } assert(connection); return connection; } #ifdef ICEE_HAS_ROUTER void IceInternal::OutgoingConnectionFactory::setRouterInfo(const RouterInfoPtr& routerInfo) { IceUtil::Monitor::Lock sync(*this); if(_destroyed) { throw CommunicatorDestroyedException(__FILE__, __LINE__); } assert(routerInfo); // // Search for connections to the router's client proxy // endpoints, and update the object adapter for such // connections, so that callbacks from the router can be // received over such connections. // #ifndef ICEE_PURE_CLIENT ObjectAdapterPtr adapter = routerInfo->getAdapter(); #endif vector endpoints = routerInfo->getClientEndpoints(); vector::const_iterator p; for(p = endpoints.begin(); p != endpoints.end(); ++p) { EndpointPtr endpoint = *p; // // Modify endpoints with overrides. // if(_instance->defaultsAndOverrides()->overrideTimeout) { endpoint = endpoint->timeout(_instance->defaultsAndOverrides()->overrideTimeoutValue); } #ifndef ICEE_PURE_CLIENT pair::iterator, multimap::iterator> pr = _connections.equal_range(endpoint); while(pr.first != pr.second) { try { pr.first->second->setAdapter(adapter); } catch(const Ice::LocalException&) { // // Ignore, the connection is being closed or closed. // } ++pr.first; } #endif } } #endif #ifdef ICEE_HAS_BATCH void IceInternal::OutgoingConnectionFactory::flushBatchRequests() { list c; { IceUtil::Monitor::Lock sync(*this); for(std::multimap::const_iterator p = _connections.begin(); p != _connections.end(); ++p) { c.push_back(p->second); } } for(list::const_iterator p = c.begin(); p != c.end(); ++p) { try { (*p)->flushBatchRequests(); } catch(const LocalException&) { // Ignore. } } } #endif IceInternal::OutgoingConnectionFactory::OutgoingConnectionFactory(const InstancePtr& instance) : _instance(instance), _destroyed(false) { } IceInternal::OutgoingConnectionFactory::~OutgoingConnectionFactory() { assert(_destroyed); assert(_connections.empty()); } #ifndef ICEE_PURE_CLIENT void IceInternal::OutgoingConnectionFactory::removeAdapter(const ObjectAdapterPtr& adapter) { IceUtil::Monitor::Lock sync(*this); if(_destroyed) { return; } for(multimap::const_iterator p = _connections.begin(); p != _connections.end(); ++p) { if(p->second->getAdapter() == adapter) { try { p->second->setAdapter(0); } catch(const Ice::LocalException&) { // // Ignore, the connection is being closed or closed. // } } } } #endif IceE-1.2.0/src/IceE/Reference.cpp0000644000076400007640000007500210616576164016251 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #ifdef ICEE_HAS_ROUTER # include # include #endif #ifdef ICEE_HAS_LOCATOR # include # include #endif #include #include #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(IceInternal::Reference* p) { return p; } class ConnectionIsDatagram : public unary_function { public: bool operator()(ConnectionPtr p) const { return p->endpoint()->datagram(); } }; class ConnectionIsSecure : public unary_function { public: bool operator()(ConnectionPtr p) const { return p->endpoint()->secure(); } }; CommunicatorPtr IceInternal::Reference::getCommunicator() const { return _communicator; } ReferencePtr IceInternal::Reference::changeContext(const Context& newContext) const { ReferencePtr r = _instance->referenceFactory()->copy(this); r->_context = newContext; return r; } ReferencePtr IceInternal::Reference::changeMode(ReferenceMode newMode) const { if(newMode == _mode) { return ReferencePtr(const_cast(this)); } ReferencePtr r = _instance->referenceFactory()->copy(this); r->_mode = newMode; return r; } ReferencePtr IceInternal::Reference::changeSecure(bool newSecure) const { if(newSecure == _secure) { return ReferencePtr(const_cast(this)); } ReferencePtr r = _instance->referenceFactory()->copy(this); r->_secure = newSecure; return r; } ReferencePtr IceInternal::Reference::changeIdentity(const Identity& newIdentity) const { if(newIdentity == _identity) { return ReferencePtr(const_cast(this)); } ReferencePtr r = _instance->referenceFactory()->copy(this); r->_identity = newIdentity; return r; } ReferencePtr IceInternal::Reference::changeFacet(const string& newFacet) const { if(newFacet == _facet) { return ReferencePtr(const_cast(this)); } ReferencePtr r = _instance->referenceFactory()->copy(this); r->_facet = newFacet; return r; } ReferencePtr IceInternal::Reference::changeTimeout(int newTimeout) const { if(_overrideTimeout && newTimeout == _timeout) { return ReferencePtr(const_cast(this)); } ReferencePtr r = getInstance()->referenceFactory()->copy(this); r->_timeout = newTimeout; r->_overrideTimeout = true; return r; } Int Reference::hash() const { IceUtil::RecMutex::Lock sync(_hashMutex); if(_hashInitialized) { return _hashValue; } string::const_iterator p; Context::const_iterator q; Int h = static_cast(_mode); for(p = _identity.name.begin(); p != _identity.name.end(); ++p) { h = 5 * h + *p; } for(p = _identity.category.begin(); p != _identity.category.end(); ++p) { h = 5 * h + *p; } for(q = _context.begin(); q != _context.end(); ++q) { for(p = q->first.begin(); p != q->first.end(); ++p) { h = 5 * h + *p; } for(p = q->second.begin(); p != q->second.end(); ++p) { h = 5 * h + *p; } } for(p = _facet.begin(); p != _facet.end(); ++p) { h = 5 * h + *p; } h = 5 * h + static_cast(getSecure()); _hashValue = h; _hashInitialized = true; return h; } void IceInternal::Reference::streamWrite(BasicStream* s) const { // // Don't write the identity here. Operations calling streamWrite // write the identity. // // // For compatibility with the old FacetPath. // if(_facet.empty()) { s->write(static_cast(0), static_cast(0)); } else { s->write(&_facet, &_facet + 1); } s->write(static_cast(_mode)); s->write(getSecure()); // Derived class writes the remainder of the reference. } string IceInternal::Reference::toString() const { string s; // // If the encoded identity string contains characters which // the reference parser uses as separators, then we enclose // the identity string in quotes. // string id = _instance->identityToString(_identity); if(id.find_first_of(" :@") != string::npos) { s += "\""; s += id; s += "\""; } else { s += id; } if(!_facet.empty()) { s += " -f "; // // If the encoded facet string contains characters which // the reference parser uses as separators, then we enclose // the facet string in quotes. // string fs = _facet; #ifdef ICEE_HAS_WSTRING if(_instance->initializationData().stringConverter) { UTF8BufferI buffer; Byte* last = _instance->initializationData().stringConverter->toUTF8(fs.data(), fs.data() + fs.size(), buffer); fs = string(reinterpret_cast(buffer.getBuffer()), last - buffer.getBuffer()); } #endif fs = IceUtil::escapeString(fs, ""); if(fs.find_first_of(" :@") != string::npos) { s += "\""; s += fs; s += "\""; } else { s += fs; } } switch(_mode) { case ReferenceModeTwoway: { s += " -t"; break; } case ReferenceModeOneway: { s += " -o"; break; } case ReferenceModeBatchOneway: { s += " -O"; break; } case ReferenceModeDatagram: { s += " -d"; break; } case ReferenceModeBatchDatagram: { s += " -D"; break; } } if(getSecure()) { s += " -s"; } return s; // Derived class writes the remainder of the string. } bool IceInternal::Reference::operator==(const Reference& r) const { // // Note: if(this == &r) test is performed by each non-abstract derived class. // if(getType() != r.getType()) { return false; } if(_mode != r._mode) { return false; } if(_secure != r._secure) { return false; } if(_identity != r._identity) { return false; } if(_context != r._context) { return false; } if(_facet != r._facet) { return false; } if(_overrideTimeout != r._overrideTimeout || _overrideTimeout && _timeout != r._timeout) { return false; } return true; } bool IceInternal::Reference::operator<(const Reference& r) const { // // Note: if(this == &r) test is performed by each non-abstract derived class. // if(_mode < r._mode) { return true; } else if(r._mode < _mode) { return false; } if(!_secure && r._secure) { return true; } else if(r._secure < _secure) { return false; } if(_identity < r._identity) { return true; } else if(r._identity < _identity) { return false; } if(_context < r._context) { return true; } else if(r._context < _context) { return false; } if(_facet < r._facet) { return true; } else if(r._facet < _facet) { return false; } if(!_overrideTimeout && r._overrideTimeout) { return true; } else if(r._overrideTimeout < _overrideTimeout) { return false; } else if(_overrideTimeout) { if(_timeout < r._timeout) { return true; } else if(r._timeout < _timeout) { return false; } } if(getType() < r.getType()) { return true; } else if(r.getType() < getType()) { return false; } return false; } IceInternal::Reference::Reference(const InstancePtr& inst, const CommunicatorPtr& com, const Identity& ident, const Context& context, const string& fs, ReferenceMode md, bool sec) : _hashInitialized(false), _instance(inst), _communicator(com), _mode(md), _secure(sec), _identity(ident), _context(context), _facet(fs), _overrideTimeout(false), _timeout(-1) { } IceInternal::Reference::Reference(const Reference& r) : _hashInitialized(false), _instance(r._instance), _communicator(r._communicator), _mode(r._mode), _secure(r._secure), _identity(r._identity), _context(r._context), _facet(r._facet), _overrideTimeout(r._overrideTimeout), _timeout(r._timeout) { } void IceInternal::Reference::applyOverrides(vector& endpts) const { // // Apply the endpoint overrides to each endpoint. // for(vector::iterator p = endpts.begin(); p != endpts.end(); ++p) { if(_overrideTimeout) { *p = (*p)->timeout(_timeout); } } } IceUtil::Shared* IceInternal::upCast(IceInternal::FixedReference* p) { return p; } IceInternal::FixedReference::FixedReference(const InstancePtr& inst, const CommunicatorPtr& com, const Identity& ident, const Context& context, const string& fs, ReferenceMode md, const vector& fixedConns) : Reference(inst, com, ident, context, fs, md, false), _fixedConnections(fixedConns) { } Reference::Type IceInternal::FixedReference::getType() const { return TypeFixed; } vector IceInternal::FixedReference::getEndpoints() const { return vector(); } #ifdef ICEE_HAS_ROUTER ReferencePtr IceInternal::FixedReference::changeRouter(const RouterPrx&) const { throw FixedProxyException(__FILE__, __LINE__); return 0; // Keep the compiler happy. } #endif #ifdef ICEE_HAS_LOCATOR string IceInternal::FixedReference::getAdapterId() const { return string(); } ReferencePtr IceInternal::FixedReference::changeAdapterId(const std::string&) const { throw FixedProxyException(__FILE__, __LINE__); return 0; // Keep the compiler happy. } ReferencePtr IceInternal::FixedReference::changeLocator(const LocatorPrx&) const { throw FixedProxyException(__FILE__, __LINE__); return 0; // Keep the compiler happy. } #endif ReferencePtr IceInternal::FixedReference::changeTimeout(int) const { throw FixedProxyException(__FILE__, __LINE__); return 0; // Keep the compiler happy. } void IceInternal::FixedReference::streamWrite(BasicStream* s) const { throw FixedProxyException(__FILE__, __LINE__); } string IceInternal::FixedReference::toString() const { throw FixedProxyException(__FILE__, __LINE__); return string(); // To keep the compiler from complaining. } ConnectionPtr IceInternal::FixedReference::getConnection() const { vector connections = _fixedConnections; switch(getMode()) { case ReferenceModeTwoway: case ReferenceModeOneway: #ifdef ICEE_HAS_BATCH case ReferenceModeBatchOneway: #endif { // // Filter out datagram connections. // connections.erase(remove_if(connections.begin(), connections.end(), ConnectionIsDatagram()), connections.end()); break; } case ReferenceModeDatagram: #ifdef ICEE_HAS_BATCH case ReferenceModeBatchDatagram: #endif { // // Filter out non-datagram connections. // connections.erase(remove_if(connections.begin(), connections.end(), not1(ConnectionIsDatagram())), connections.end()); break; } #ifndef ICEE_HAS_BATCH case ReferenceModeBatchDatagram: case ReferenceModeBatchOneway: { throw FeatureNotSupportedException(__FILE__, __LINE__, "batch proxy mode"); } #endif } // // Randomize the order of connections. // random_shuffle(connections.begin(), connections.end()); // // If a secure connection is requested or secure overrides is set, // remove all non-secure connections. Otherwise make non-secure // connections preferred over secure connections by partitioning // the connection vector, so that non-secure connections come // first. // // NOTE: we don't use the stable_partition algorithm from STL to // keep the code size down. // vector::iterator p = connections.begin(); vector secureConnections; while(p != connections.end()) { if((*p)->endpoint()->secure()) { secureConnections.push_back(*p); p = connections.erase(p); } else { ++p; } } if(getSecure()) { connections.swap(secureConnections); } else { connections.insert(connections.end(), secureConnections.begin(), secureConnections.end()); } if(connections.empty()) { throw NoEndpointException(__FILE__, __LINE__); // No stringified representation for fixed proxies. } ConnectionPtr connection = connections[0]; assert(connection); connection->throwException(); // Throw in case our connection is already destroyed. return connection; } bool IceInternal::FixedReference::operator==(const Reference& r) const { if(this == &r) { return true; } const FixedReference* rhs = dynamic_cast(&r); if(!rhs || !Reference::operator==(r)) { return false; } return _fixedConnections == rhs->_fixedConnections; } bool IceInternal::FixedReference::operator<(const Reference& r) const { if(this == &r) { return false; } if(Reference::operator<(r)) { return true; } if(Reference::operator==(r)) { const FixedReference* rhs = dynamic_cast(&r); assert(rhs); return _fixedConnections < rhs->_fixedConnections; } return false; } ReferencePtr IceInternal::FixedReference::clone() const { return new FixedReference(*this); } IceInternal::FixedReference::FixedReference(const FixedReference& r) : Reference(r), _fixedConnections(r._fixedConnections) { } #ifdef ICEE_HAS_ROUTER IceUtil::Shared* IceInternal::upCast(IceInternal::RoutableReference* p) { return p; } vector IceInternal::RoutableReference::getRoutedEndpoints() const { if(_routerInfo) { // // If we route, we send everything to the router's client // proxy endpoints. // return _routerInfo->getClientEndpoints(); } return vector(); } ReferencePtr IceInternal::RoutableReference::changeRouter(const RouterPrx& newRouter) const { RouterInfoPtr newRouterInfo = getInstance()->routerManager()->get(newRouter); if(newRouterInfo == _routerInfo) { return RoutableReferencePtr(const_cast(this)); } RoutableReferencePtr r = RoutableReferencePtr::dynamicCast(getInstance()->referenceFactory()->copy(this)); r->_routerInfo = newRouterInfo; return r; } int IceInternal::RoutableReference::hash() const { return Reference::hash(); } bool IceInternal::RoutableReference::operator==(const Reference& r) const { // // Note: if(this == &r) test is performed by each non-abstract derived class. // const RoutableReference* rhs = dynamic_cast(&r); if(!rhs || !Reference::operator==(r)) { return false; } return _routerInfo == rhs->_routerInfo; } bool IceInternal::RoutableReference::operator<(const Reference& r) const { if(this == &r) { return false; } if(Reference::operator<(r)) { return true; } if(Reference::operator==(r)) { const RoutableReference* rhs = dynamic_cast(&r); assert(rhs); return _routerInfo < rhs->_routerInfo; } return false; } IceInternal::RoutableReference::RoutableReference(const InstancePtr& inst, const CommunicatorPtr& com, const Identity& ident, const Context& context, const string& fs, ReferenceMode md, bool sec, const RouterInfoPtr& rtrInfo) : Reference(inst, com, ident, context, fs, md, sec), _routerInfo(rtrInfo) { } IceInternal::RoutableReference::RoutableReference(const RoutableReference& r) : Reference(r), _routerInfo(r._routerInfo) { } #endif IceUtil::Shared* IceInternal::upCast(IceInternal::DirectReference* p) { return p; } #ifdef ICEE_HAS_ROUTER IceInternal::DirectReference::DirectReference(const InstancePtr& inst, const CommunicatorPtr& com, const Identity& ident, const Context& context, const string& fs, ReferenceMode md, bool sec, const vector& endpts, const RouterInfoPtr& rtrInfo) : RoutableReference(inst, com, ident, context, fs, md, sec, rtrInfo), _endpoints(endpts) { } #else IceInternal::DirectReference::DirectReference(const InstancePtr& inst, const CommunicatorPtr& com, const Identity& ident, const Context& context, const string& fs, ReferenceMode md, bool sec, const vector& endpts) : Reference(inst, com, ident, context, fs, md, sec), _endpoints(endpts) { } #endif Reference::Type IceInternal::DirectReference::getType() const { return TypeDirect; } vector IceInternal::DirectReference::getEndpoints() const { return _endpoints; } #ifdef ICEE_HAS_LOCATOR string IceInternal::DirectReference::getAdapterId() const { return string(); } ReferencePtr DirectReference::changeAdapterId(const string& newAdapterId) const { if(!newAdapterId.empty()) { LocatorInfoPtr locatorInfo = getInstance()->locatorManager()->get(getInstance()->referenceFactory()->getDefaultLocator()); return getInstance()->referenceFactory()->create(getIdentity(), *getContext(), getFacet(), getMode(), getSecure(), newAdapterId, #ifdef ICEE_HAS_ROUTER getRouterInfo(), #endif locatorInfo); } else { return DirectReferencePtr(const_cast(this)); } } ReferencePtr IceInternal::DirectReference::changeLocator(const LocatorPrx& newLocator) const { return DirectReferencePtr(const_cast(this)); } #endif ReferencePtr IceInternal::DirectReference::changeTimeout(int newTimeout) const { DirectReferencePtr r = DirectReferencePtr::dynamicCast(Parent::changeTimeout(newTimeout)); if(r.get() != this) // Also override the timeout on the endpoints if it was updated. { vector newEndpoints; for(vector::const_iterator p = _endpoints.begin(); p != _endpoints.end(); ++p) { newEndpoints.push_back((*p)->timeout(newTimeout)); } r->_endpoints = newEndpoints; } return r; } void IceInternal::DirectReference::streamWrite(BasicStream* s) const { Parent::streamWrite(s); Int sz = static_cast(_endpoints.size()); s->writeSize(sz); if(sz) { for(vector::const_iterator p = _endpoints.begin(); p != _endpoints.end(); ++p) { (*p)->streamWrite(s); } } else { s->write(string("")); // Adapter id. } } string IceInternal::DirectReference::toString() const { string result = Parent::toString(); vector::const_iterator p; for(p = _endpoints.begin(); p != _endpoints.end(); ++p) { string endp = (*p)->toString(); if(!endp.empty()) { result.append(":"); result.append(endp); } } return result; } ConnectionPtr IceInternal::DirectReference::getConnection() const { #ifdef ICEE_HAS_ROUTER vector endpts = Parent::getRoutedEndpoints(); applyOverrides(endpts); if(endpts.empty()) { endpts = _endpoints; // Endpoint overrides are already applied on these endpoints. } #else vector endpts = _endpoints; #endif vector filteredEndpoints = filterEndpoints(endpts, getMode(), getSecure()); if(filteredEndpoints.empty()) { throw NoEndpointException(__FILE__, __LINE__, toString()); } OutgoingConnectionFactoryPtr factory = getInstance()->outgoingConnectionFactory(); ConnectionPtr connection = factory->create(filteredEndpoints); assert(connection); #if defined(ICEE_HAS_ROUTER) && !defined(ICEE_PURE_CLIENT) // // If we have a router, set the object adapter for this router // (if any) to the new connection, so that callbacks from the // router can be received over this new connection. // if(getRouterInfo()) { connection->setAdapter(getRouterInfo()->getAdapter()); } #endif return connection; } bool IceInternal::DirectReference::operator==(const Reference& r) const { if(this == &r) { return true; } const DirectReference* rhs = dynamic_cast(&r); if(!rhs || !Parent::operator==(r)) { return false; } return _endpoints == rhs->_endpoints; } bool IceInternal::DirectReference::operator<(const Reference& r) const { if(this == &r) { return false; } if(Parent::operator<(r)) { return true; } if(Parent::operator==(r)) { const DirectReference* rhs = dynamic_cast(&r); assert(rhs); return _endpoints < rhs->_endpoints; } return false; } ReferencePtr IceInternal::DirectReference::clone() const { return new DirectReference(*this); } IceInternal::DirectReference::DirectReference(const DirectReference& r) : Parent(r), _endpoints(r._endpoints) { } #ifdef ICEE_HAS_LOCATOR IceUtil::Shared* IceInternal::upCast(IceInternal::IndirectReference* p) { return p; } #ifdef ICEE_HAS_ROUTER IceInternal::IndirectReference::IndirectReference(const InstancePtr& inst, const CommunicatorPtr& com, const Identity& ident, const Context& context, const string& fs, ReferenceMode md, bool sec, const string& adptid, const RouterInfoPtr& rtrInfo, const LocatorInfoPtr& locInfo) : RoutableReference(inst, com, ident, context, fs, md, sec, rtrInfo), _adapterId(adptid), _locatorInfo(locInfo) { } #else IceInternal::IndirectReference::IndirectReference(const InstancePtr& inst, const CommunicatorPtr& com, const Identity& ident, const Context& context, const string& fs, ReferenceMode md, bool sec, const string& adptid, const LocatorInfoPtr& locInfo) : Reference(inst, com, ident, context, fs, md, sec), _adapterId(adptid), _locatorInfo(locInfo) { } #endif Reference::Type IceInternal::IndirectReference::getType() const { return TypeIndirect; } vector IceInternal::IndirectReference::getEndpoints() const { return vector(); } string IceInternal::IndirectReference::getAdapterId() const { return _adapterId; } ReferencePtr IceInternal::IndirectReference::changeAdapterId(const string& newAdapterId) const { if(newAdapterId == _adapterId) { return IndirectReferencePtr(const_cast(this)); } IndirectReferencePtr r = IndirectReferencePtr::dynamicCast(getInstance()->referenceFactory()->copy(this)); r->_adapterId = newAdapterId; return r; } ReferencePtr IceInternal::IndirectReference::changeLocator(const LocatorPrx& newLocator) const { LocatorInfoPtr newLocatorInfo = getInstance()->locatorManager()->get(newLocator); if(newLocatorInfo == _locatorInfo) { return IndirectReferencePtr(const_cast(this)); } IndirectReferencePtr r = IndirectReferencePtr::dynamicCast(getInstance()->referenceFactory()->copy(this)); r->_locatorInfo = newLocatorInfo; return r; } void IceInternal::IndirectReference::streamWrite(BasicStream* s) const { Parent::streamWrite(s); s->writeSize(0); s->write(_adapterId); } string IceInternal::IndirectReference::toString() const { string result = Parent::toString(); if(_adapterId.empty()) { return result; } result.append(" @ "); // // If the encoded adapter id string contains characters which the // reference parser uses as separators, then we enclose the // adapter id string in quotes. // string a = _adapterId; #ifdef ICEE_HAS_WSTRING if(getInstance()->initializationData().stringConverter) { UTF8BufferI buffer; Byte* last = getInstance()->initializationData().stringConverter->toUTF8(a.data(), a.data() + a.size(), buffer); a = string(reinterpret_cast(buffer.getBuffer()), last - buffer.getBuffer()); } #endif a = IceUtil::escapeString(a, ""); if(a.find_first_of(" ") != string::npos) { result.append("\""); result.append(a); result.append("\""); } else { result.append(_adapterId); } return result; } ConnectionPtr IceInternal::IndirectReference::getConnection() const { ConnectionPtr connection; while(true) { #ifdef ICEE_HAS_ROUTER vector endpts = Parent::getRoutedEndpoints(); #else vector endpts; #endif bool cached = false; if(endpts.empty() && _locatorInfo) { const IndirectReferencePtr self = const_cast(this); endpts = _locatorInfo->getEndpoints(self, cached); } applyOverrides(endpts); vector filteredEndpoints = filterEndpoints(endpts, getMode(), getSecure()); if(filteredEndpoints.empty()) { throw NoEndpointException(__FILE__, __LINE__, toString()); } try { OutgoingConnectionFactoryPtr factory = getInstance()->outgoingConnectionFactory(); connection = factory->create(filteredEndpoints); assert(connection); } catch(const LocalException& ex) { #ifdef ICEE_HAS_ROUTER if(!getRouterInfo()) #endif { assert(_locatorInfo); const IndirectReferencePtr self = const_cast(this); _locatorInfo->clearCache(self); if(cached) { TraceLevelsPtr traceLevels = getInstance()->traceLevels(); if(traceLevels->retry >= 2) { Trace out(getInstance()->initializationData().logger, traceLevels->retryCat); out << "connection to cached endpoints failed\n" << "removing endpoints from cache and trying one more time\n" << ex.toString(); } continue; } } throw; } break; } #if defined(ICEE_HAS_ROUTER) && !defined(ICEE_PURE_CLIENT) // // If we have a router, set the object adapter for this router // (if any) to the new connection, so that callbacks from the // router can be received over this new connection. // if(getRouterInfo()) { connection->setAdapter(getRouterInfo()->getAdapter()); } #endif assert(connection); return connection; } int IceInternal::IndirectReference::hash() const { IceUtil::RecMutex::Lock sync(_hashMutex); if(_hashInitialized) { return _hashValue; } #ifdef ICEE_HAS_ROUTER RoutableReference::hash(); // Initializes _hashValue. #else Reference::hash(); // Initializes _hashValue. #endif // Add hash of adapter ID to base hash for(string::const_iterator p = _adapterId.begin(); p != _adapterId.end(); ++p) { _hashValue = 5 * _hashValue + *p; } return _hashValue; } bool IceInternal::IndirectReference::operator==(const Reference& r) const { if(this == &r) { return true; } const IndirectReference* rhs = dynamic_cast(&r); if(!rhs || !Parent::operator==(r)) { return false; } return _adapterId == rhs->_adapterId && _locatorInfo == rhs->_locatorInfo; } bool IceInternal::IndirectReference::operator<(const Reference& r) const { if(this == &r) { return false; } if(Parent::operator<(r)) { return true; } if(Parent::operator==(r)) { const IndirectReference* rhs = dynamic_cast(&r); assert(rhs); if(_adapterId < rhs->_adapterId) { return true; } else if(rhs->_adapterId < _adapterId) { return false; } return _locatorInfo < rhs->_locatorInfo; } return false; } ReferencePtr IceInternal::IndirectReference::clone() const { return new IndirectReference(*this); } IceInternal::IndirectReference::IndirectReference(const IndirectReference& r) : Parent(r), _adapterId(r._adapterId), _locatorInfo(r._locatorInfo) { } #endif // ICEE_HAS_LOCATOR vector IceInternal::filterEndpoints(const vector& allEndpoints, ReferenceMode m, bool sec) { vector endpoints = allEndpoints; // // Filter out unknown endpoints. // endpoints.erase(remove_if(endpoints.begin(), endpoints.end(), Ice::constMemFun(&Endpoint::unknown)), endpoints.end()); // // Filter out endpoints according to the mode of the reference. // switch(m) { case ReferenceModeTwoway: case ReferenceModeOneway: #ifdef ICEE_HAS_BATCH case ReferenceModeBatchOneway: #endif { // // Filter out datagram endpoints. // endpoints.erase(remove_if(endpoints.begin(), endpoints.end(), Ice::constMemFun(&Endpoint::datagram)), endpoints.end()); break; } case ReferenceModeDatagram: #ifdef ICEE_HAS_BATCH case ReferenceModeBatchDatagram: #endif { // // Filter out non-datagram endpoints. // endpoints.erase(remove_if(endpoints.begin(), endpoints.end(), not1(Ice::constMemFun(&Endpoint::datagram))), endpoints.end()); break; } #ifndef ICEE_HAS_BATCH case ReferenceModeBatchDatagram: case ReferenceModeBatchOneway: { throw FeatureNotSupportedException(__FILE__, __LINE__, "batch proxy mode"); } #endif } // // Randomize the order of endpoints. // random_shuffle(endpoints.begin(), endpoints.end()); // // If a secure connection is requested or secure overrides is set, // remove all non-secure endpoints. Otherwise make non-secure // endpoints preferred over secure endpoints by partitioning // the endpoint vector, so that non-secure endpoints come // first. // // NOTE: we don't use the stable_partition algorithm from STL to // keep the code size down. // vector::iterator p = endpoints.begin(); vector secureEndpoints; while(p != endpoints.end()) { if((*p)->secure()) { secureEndpoints.push_back(*p); p = endpoints.erase(p); } else { ++p; } } if(sec) { endpoints.swap(secureEndpoints); } else { endpoints.insert(endpoints.end(), secureEndpoints.begin(), secureEndpoints.end()); } return endpoints; } IceE-1.2.0/src/IceE/FactoryTable.cpp0000644000076400007640000000223010576536574016731 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include // // This constructor initializes the single global Ice::factoryTable instance // from the outside (if it hasn't been initialized yet). The constructor here // is triggered by a file-static instance of FactoryTable in each // slice2cpp-generated header file that uses non-local exceptions or non-abstract classes. // This ensures that Ice::factoryTable is always initialized before it is used. // IceInternal::FactoryTable::FactoryTable() { IceInternal::factoryTableWrapper.initialize(); } // // Similarly, the destructor calls the finalize() method on the factory table wrapper which, // once the tables reference count drops to zero, deletes the table. // IceInternal::FactoryTable::~FactoryTable() { IceInternal::factoryTableWrapper.finalize(); } IceE-1.2.0/src/IceE/LoggerI.h0000644000076400007640000000141710576536574015355 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOGGER_I_H #define ICEE_LOGGER_I_H #include #include namespace Ice { class LoggerI : public Logger { public: LoggerI(const std::string&); virtual void print(const std::string&); virtual void trace(const std::string&, const std::string&); virtual void warning(const std::string&); virtual void error(const std::string&); private: std::string _prefix; }; } #endif IceE-1.2.0/src/IceE/Unicode.cpp0000644000076400007640000001504710616505646015741 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #if defined(ICEE_HAS_WSTRING) #include #include using namespace std; using namespace IceUtil; namespace { // // Helper class, base never defined // Usage: WstringHelper::toUTF8 and fromUTF8. // template struct WstringHelper { static ConversionResult toUTF8( const wchar_t*& sourceStart, const wchar_t* sourceEnd, Byte*& targetStart, Byte* targetEnd, ConversionFlags flags); static ConversionResult fromUTF8( const Byte*& sourceStart, const Byte* sourceEnd, wchar_t*& targetStart, wchar_t* targetEnd, ConversionFlags flags); }; template<> struct WstringHelper<2> { static ConversionResult toUTF8( const wchar_t*& sourceStart, const wchar_t* sourceEnd, Byte*& targetStart, Byte* targetEnd, ConversionFlags flags) { return ConvertUTF16toUTF8( reinterpret_cast(&sourceStart), reinterpret_cast(sourceEnd), &targetStart, targetEnd, flags); } static ConversionResult fromUTF8( const Byte*& sourceStart, const Byte* sourceEnd, wchar_t*& targetStart, wchar_t* targetEnd, ConversionFlags flags) { return ConvertUTF8toUTF16( &sourceStart, sourceEnd, reinterpret_cast(&targetStart), reinterpret_cast(targetEnd), flags); } }; template<> struct WstringHelper<4> { static ConversionResult toUTF8( const wchar_t*& sourceStart, const wchar_t* sourceEnd, Byte*& targetStart, Byte* targetEnd, ConversionFlags flags) { return ConvertUTF32toUTF8( reinterpret_cast(&sourceStart), reinterpret_cast(sourceEnd), &targetStart, targetEnd, flags); } static ConversionResult fromUTF8( const Byte*& sourceStart, const Byte* sourceEnd, wchar_t*& targetStart, wchar_t* targetEnd, ConversionFlags flags) { return ConvertUTF8toUTF32( &sourceStart, sourceEnd, reinterpret_cast(&targetStart), reinterpret_cast(targetEnd), flags); } }; } // // convertXXX functions // ConversionResult IceUtil::convertUTFWstringToUTF8( const wchar_t*& sourceStart, const wchar_t* sourceEnd, Byte*& targetStart, Byte* targetEnd, ConversionFlags flags) { return WstringHelper::toUTF8( sourceStart, sourceEnd, targetStart, targetEnd, flags); } ConversionResult IceUtil::convertUTF8ToUTFWstring( const Byte*& sourceStart, const Byte* sourceEnd, wchar_t*& targetStart, wchar_t* targetEnd, ConversionFlags flags) { return WstringHelper::fromUTF8( sourceStart, sourceEnd, targetStart, targetEnd, flags); } ConversionResult IceUtil::convertUTF8ToUTFWstring(const Byte*& sourceStart, const Byte* sourceEnd, std::wstring& target, ConversionFlags flags) { // // Could be reimplemented without this temporary wchar_t buffer // size_t size = static_cast(sourceEnd - sourceStart); wchar_t* outBuf = new wchar_t[size]; wchar_t* targetStart = outBuf; wchar_t* targetEnd = targetStart + size; ConversionResult result = convertUTF8ToUTFWstring(sourceStart, sourceEnd, targetStart, targetEnd, flags); if(result == conversionOK) { std::wstring s(outBuf, static_cast(targetStart - outBuf)); s.swap(target); } delete[] outBuf; return result; } // // wstringToString and stringToWstring // const char* IceUtil::UTFConversionException::_name = "IceUtil::UTFConversionException"; IceUtil::UTFConversionException::UTFConversionException(const char* file, int line, ConversionResult cr): Exception(file, line), _conversionResult(cr) {} string IceUtil::UTFConversionException::ice_name() const { return _name; } string IceUtil::UTFConversionException::toString() const { string str = Exception::toString(); switch(_conversionResult) { case sourceExhausted: str += ": source exhausted"; break; case targetExhausted: str += ": target exhausted"; break; case sourceIllegal: str += ": illegal source"; break; default: assert(0); break; }; return str; } IceUtil::Exception* IceUtil::UTFConversionException::ice_clone() const { return new UTFConversionException(*this); } void IceUtil::UTFConversionException::ice_throw() const { throw *this; } IceUtil::ConversionResult IceUtil::UTFConversionException::conversionResult() const { return _conversionResult; } string IceUtil::wstringToString(const wstring& wstr) { string target; size_t size = wstr.size() * 3 * (sizeof(wchar_t) / 2); Byte* outBuf = new Byte[size]; Byte* targetStart = outBuf; Byte* targetEnd = outBuf + size; const wchar_t* sourceStart = wstr.data(); ConversionResult cr = convertUTFWstringToUTF8( sourceStart, sourceStart + wstr.size(), targetStart, targetEnd, lenientConversion); if(cr != conversionOK) { delete[] outBuf; throw UTFConversionException(__FILE__, __LINE__, cr); } string s(reinterpret_cast(outBuf), static_cast(targetStart - outBuf)); s.swap(target); delete[] outBuf; return target; } wstring IceUtil::stringToWstring(const string& str) { wstring result; const Byte* sourceStart = reinterpret_cast(str.data()); ConversionResult cr = convertUTF8ToUTFWstring(sourceStart, sourceStart + str.size(), result, lenientConversion); if(cr != conversionOK) { throw UTFConversionException(__FILE__, __LINE__, cr); } return result; } #if defined(_MSC_VER) && (_MSC_VER >= 1300) // // See comments in IceUtil/Unicode.h // # if _MSC_VER < 1400 string IceUtil::wstringToString(const basic_string<__wchar_t>& str) { return wstringToString(*reinterpret_cast(&str)); } basic_string<__wchar_t> IceUtil::stringToNativeWstring(const string& str) { return reinterpret_cast& >(stringToWstring(str)); } # else string IceUtil::wstringToString(const basic_string& str) { return wstringToString(*reinterpret_cast(&str)); } basic_string IceUtil::stringToTypedefWstring(const string& str) { return reinterpret_cast& >(stringToWstring(str)); } # endif #endif #endif IceE-1.2.0/src/IceE/DefaultsAndOverridesF.h0000644000076400007640000000121210602152305020151 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_DEFAULTS_AND_OVERRIDES_F_H #define ICEE_DEFAULTS_AND_OVERRIDES_F_H #include #include namespace IceInternal { class DefaultsAndOverrides; IceUtil::Shared* upCast(DefaultsAndOverrides*); typedef Handle DefaultsAndOverridesPtr; } #endif IceE-1.2.0/src/IceE/Thread.cpp0000644000076400007640000002216610576536574015573 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #ifdef _WIN32 IceUtil::ThreadControl::ThreadControl() : _handle(0), _id(GetCurrentThreadId()) { } IceUtil::ThreadControl::ThreadControl(HANDLE handle, IceUtil::ThreadControl::ID id) : _handle(handle), _id(id) { } bool IceUtil::ThreadControl::operator==(const ThreadControl& rhs) const { return _id == rhs._id; } bool IceUtil::ThreadControl::operator!=(const ThreadControl& rhs) const { return _id != rhs._id; } void IceUtil::ThreadControl::join() { if(_handle == 0) { throw BadThreadControlException(__FILE__, __LINE__); } int rc = WaitForSingleObject(_handle, INFINITE); if(rc != WAIT_OBJECT_0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } detach(); } void IceUtil::ThreadControl::detach() { if(_handle == 0) { throw BadThreadControlException(__FILE__, __LINE__); } if(CloseHandle(_handle) == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } IceUtil::ThreadControl::ID IceUtil::ThreadControl::id() const { return _id; } void IceUtil::ThreadControl::sleep(const Time& timeout) { Sleep(static_cast(timeout.toMilliSeconds())); } void IceUtil::ThreadControl::yield() { // // A value of zero causes the thread to relinquish the remainder // of its time slice to any other thread of equal priority that is // ready to run. // Sleep(0); } IceUtil::Thread::Thread() : _started(false), _running(false), _handle(0), _id(0) { } IceUtil::Thread::~Thread() { } #ifdef _WIN32_WCE static DWORD #else static unsigned int #endif WINAPI startHook(void* arg) { // Ensure that the thread doesn't go away until run() has // completed. // IceUtil::ThreadPtr thread; try { IceUtil::Thread* rawThread = static_cast(arg); // // Initialize the random number generator in each thread. // unsigned int seed = static_cast(IceUtil::Time::now().toMicroSeconds()); srand(seed); // // Ensure that the thread doesn't go away until run() has // completed. // thread = rawThread; // // See the comment in IceUtil::Thread::start() for details. // rawThread->__decRef(); thread->run(); } catch(const IceUtil::Exception& e) { fprintf(stderr, "IceUtil::Thread::run(): uncaught exception: %s\n", e.toString().c_str()); } catch(...) { fprintf(stderr, "IceUtil::Thread::run(): uncaught exception\n"); } thread->_done(); return 0; } #ifndef _WIN32_WCE # include #endif IceUtil::ThreadControl IceUtil::Thread::start(size_t stackSize) { // // Keep this alive for the duration of start // IceUtil::ThreadPtr keepMe = this; IceUtil::Mutex::Lock lock(_stateMutex); if(_started) { throw ThreadStartedException(__FILE__, __LINE__); } // // It's necessary to increment the reference count since // pthread_create won't necessarily call the thread function until // later. If the user does (new MyThread)->start() then the thread // object could be deleted before the thread object takes // ownership. It's also necessary to increment the reference count // prior to calling pthread_create since the thread itself calls // __decRef(). // __incRef(); #ifdef _WIN32_WCE _handle = CreateThread(0, stackSize, startHook, this, 0, &_id); #else unsigned int id; _handle = reinterpret_cast( _beginthreadex(0, static_cast(stackSize), startHook, this, 0, &id)); _id = id; #endif if(_handle == 0) { __decRef(); throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } _started = true; _running = true; return ThreadControl(_handle, _id); } IceUtil::ThreadControl IceUtil::Thread::getThreadControl() const { IceUtil::Mutex::Lock lock(_stateMutex); if(!_started) { throw ThreadNotStartedException(__FILE__, __LINE__); } return ThreadControl(_handle, _id); } bool IceUtil::Thread::operator==(const Thread& rhs) const { return this == &rhs; } bool IceUtil::Thread::operator!=(const Thread& rhs) const { return this != &rhs; } bool IceUtil::Thread::operator<(const Thread& rhs) const { return this < &rhs; } bool IceUtil::Thread::isAlive() const { IceUtil::Mutex::Lock lock(_stateMutex); return _running; } void IceUtil::Thread::_done() { IceUtil::Mutex::Lock lock(_stateMutex); _running = false; } #else IceUtil::ThreadControl::ThreadControl(pthread_t thread) : _thread(thread), _detachable(true) { } IceUtil::ThreadControl::ThreadControl() : _thread(pthread_self()), _detachable(false) { } bool IceUtil::ThreadControl::operator==(const ThreadControl& rhs) const { return pthread_equal(_thread, rhs._thread) != 0; } bool IceUtil::ThreadControl::operator!=(const ThreadControl& rhs) const { return !operator==(rhs); } void IceUtil::ThreadControl::join() { if(!_detachable) { throw BadThreadControlException(__FILE__, __LINE__); } void* ignore = 0; int rc = pthread_join(_thread, &ignore); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } void IceUtil::ThreadControl::detach() { if(!_detachable) { throw BadThreadControlException(__FILE__, __LINE__); } int rc = pthread_detach(_thread); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } IceUtil::ThreadControl::ID IceUtil::ThreadControl::id() const { return _thread;; } void IceUtil::ThreadControl::sleep(const Time& timeout) { struct timeval tv = timeout; struct timespec ts; ts.tv_sec = tv.tv_sec; ts.tv_nsec = tv.tv_usec * 1000L; nanosleep(&ts, 0); } void IceUtil::ThreadControl::yield() { sched_yield(); } IceUtil::Thread::Thread() : _started(false), _running(false) { } IceUtil::Thread::~Thread() { } extern "C" { static void* startHook(void* arg) { // // Ensure that the thread doesn't go away until run() has // completed. // IceUtil::ThreadPtr thread; try { IceUtil::Thread* rawThread = static_cast(arg); thread = rawThread; // // See the comment in IceUtil::Thread::start() for details. // rawThread->__decRef(); thread->run(); } catch(const IceUtil::Exception& e) { fprintf(stderr, "IceUtil::Thread::run(): uncaught exception: %s\n", e.toString().c_str()); } catch(...) { fprintf(stderr, "IceUtil::Thread::run(): uncaught exception\n"); } thread->_done(); return 0; } } IceUtil::ThreadControl IceUtil::Thread::start(size_t stackSize) { // // Keep this alive for the duration of start // IceUtil::ThreadPtr keepMe = this; IceUtil::Mutex::Lock lock(_stateMutex); if(_started) { throw ThreadStartedException(__FILE__, __LINE__); } // // It's necessary to increment the reference count since // pthread_create won't necessarily call the thread function until // later. If the user does (new MyThread)->start() then the thread // object could be deleted before the thread object takes // ownership. It's also necessary to increment the reference count // prior to calling pthread_create since the thread itself calls // __decRef(). // __incRef(); if(stackSize > 0) { pthread_attr_t attr; int rc = pthread_attr_init(&attr); if(rc != 0) { __decRef(); throw ThreadSyscallException(__FILE__, __LINE__, rc); } rc = pthread_attr_setstacksize(&attr, stackSize); if(rc != 0) { __decRef(); throw ThreadSyscallException(__FILE__, __LINE__, rc); } rc = pthread_create(&_thread, &attr, startHook, this); if(rc != 0) { __decRef(); throw ThreadSyscallException(__FILE__, __LINE__, rc); } } else { int rc = pthread_create(&_thread, 0, startHook, this); if(rc != 0) { __decRef(); throw ThreadSyscallException(__FILE__, __LINE__, rc); } } _started = true; _running = true; return ThreadControl(_thread); } IceUtil::ThreadControl IceUtil::Thread::getThreadControl() const { IceUtil::Mutex::Lock lock(_stateMutex); if(!_started) { throw ThreadNotStartedException(__FILE__, __LINE__); } return ThreadControl(_thread); } bool IceUtil::Thread::operator==(const Thread& rhs) const { return this == &rhs; } bool IceUtil::Thread::operator!=(const Thread& rhs) const { return this != &rhs; } bool IceUtil::Thread::operator<(const Thread& rhs) const { return this < &rhs; } bool IceUtil::Thread::isAlive() const { IceUtil::Mutex::Lock lock(_stateMutex); return _running; } void IceUtil::Thread::_done() { IceUtil::Mutex::Lock lock(_stateMutex); _running = false; } #endif IceE-1.2.0/src/IceE/ConvertUTF.h0000755000076400007640000001302110616505646016010 0ustar matthewmatthew#include /* * Copyright 2001-2004 Unicode, Inc. * * Disclaimer * * This source code is provided as is by Unicode, Inc. No claims are * made as to fitness for any particular purpose. No warranties of any * kind are expressed or implied. The recipient agrees to determine * applicability of information provided. If this file has been * purchased on magnetic or optical media from Unicode, Inc., the * sole remedy for any claim will be exchange of defective media * within 90 days of receipt. * * Limitations on Rights to Redistribute This Code * * Unicode, Inc. hereby grants the right to freely use the information * supplied in this file in the creation of products supporting the * Unicode Standard, and to make copies of this file in any form * for internal or external distribution as long as this notice * remains attached. */ // ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_CONVERT_UTF_H #define ICEE_CONVERT_UTF_H #include /* --------------------------------------------------------------------- Conversions between UTF32, UTF-16, and UTF-8. Header file. Several funtions are included here, forming a complete set of conversions between the three formats. UTF-7 is not included here, but is handled in a separate source file. Each of these routines takes pointers to input buffers and output buffers. The input buffers are const. Each routine converts the text between *sourceStart and sourceEnd, putting the result into the buffer between *targetStart and targetEnd. Note: the end pointers are *after* the last item: e.g. *(sourceEnd - 1) is the last item. The return result indicates whether the conversion was successful, and if not, whether the problem was in the source or target buffers. (Only the first encountered problem is indicated.) After the conversion, *sourceStart and *targetStart are both updated to point to the end of last text successfully converted in the respective buffers. Input parameters: sourceStart - pointer to a pointer to the source buffer. The contents of this are modified on return so that it points at the next thing to be converted. targetStart - similarly, pointer to pointer to the target buffer. sourceEnd, targetEnd - respectively pointers to the ends of the two buffers, for overflow checking only. These conversion functions take a ConversionFlags argument. When this flag is set to strict, both irregular sequences and isolated surrogates will cause an error. When the flag is set to lenient, both irregular sequences and isolated surrogates are converted. Whether the flag is strict or lenient, all illegal sequences will cause an error return. This includes sequences such as: , , or in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code must check for illegal sequences. When the flag is set to lenient, characters over 0x10FFFF are converted to the replacement character; otherwise (when the flag is set to strict) they constitute an error. Output parameters: The value "sourceIllegal" is returned from some routines if the input sequence is malformed. When "sourceIllegal" is returned, the source value will point to the illegal value that caused the problem. E.g., in UTF-8 when a sequence is malformed, it points to the start of the malformed sequence. Author: Mark E. Davis, 1994. Rev History: Rick McGowan, fixes & updates May 2001. Fixes & updates, Sept 2001. ------------------------------------------------------------------------ */ /* --------------------------------------------------------------------- The following 4 definitions are compiler-specific. The C standard does not guarantee that wchar_t has at least 16 bits, so wchar_t is no less portable than unsigned short! All should be unsigned values to avoid sign extension during bit mask & shift operations. ------------------------------------------------------------------------ */ namespace IceUtil { typedef unsigned int UTF32; /* at least 32 bits */ typedef unsigned short UTF16; /* at least 16 bits */ typedef unsigned char UTF8; /* typically 8 bits */ typedef bool Boolean; /* 0 or 1 */ /* Some fundamental constants */ #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD #define UNI_MAX_BMP (UTF32)0x0000FFFF #define UNI_MAX_UTF16 (UTF32)0x0010FFFF #define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF #define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF ConversionResult ConvertUTF8toUTF16( const UTF8** sourceStart, const UTF8* sourceEnd, UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); ConversionResult ConvertUTF16toUTF8 ( const UTF16** sourceStart, const UTF16* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); ConversionResult ConvertUTF8toUTF32( const UTF8** sourceStart, const UTF8* sourceEnd, UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); ConversionResult ConvertUTF32toUTF8( const UTF32** sourceStart, const UTF32* sourceEnd, UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); // // isLegalUTFSequence is declared in IceUtil/Unicode.h // /* --------------------------------------------------------------------- */ } #endif IceE-1.2.0/src/IceE/Acceptor.h0000644000076400007640000000236710614125577015560 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ACCEPTOR_H #define ICEE_ACCEPTOR_H #include #include #include #include #include #include #ifdef _WIN32 # include typedef int ssize_t; #else # define SOCKET int # include // For struct sockaddr_in #endif namespace IceInternal { class Endpoint; class Acceptor : public ::IceUtil::Shared { public: SOCKET fd(); void close(); void listen(); TransceiverPtr accept(); void connectToSelf(); std::string toString() const; int effectivePort(); private: Acceptor(const InstancePtr&, const std::string&, int); virtual ~Acceptor(); friend class TcpEndpoint; InstancePtr _instance; TraceLevelsPtr _traceLevels; ::Ice::LoggerPtr _logger; SOCKET _fd; int _backlog; struct sockaddr_in _addr; }; } #endif IceE-1.2.0/src/IceE/Connection.cpp0000755000076400007640000012603710616576164016462 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include #include #include #include #include #include #include #include #include #include // For createProxy(). #include // For createProxy(). #include #include #ifndef ICEE_PURE_CLIENT # include #endif using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(Connection* p) { return p; } void Ice::Connection::waitForValidation() { IceUtil::Monitor::Lock sync(*this); while(_state == StateNotValidated) { wait(); } if(_state >= StateClosing) { assert(_exception.get()); _exception->ice_throw(); } } void Ice::Connection::activate() { IceUtil::Monitor::Lock sync(*this); setState(StateActive); } #ifndef ICEE_PURE_CLIENT void Ice::Connection::hold() { IceUtil::Monitor::Lock sync(*this); setState(StateHolding); } #endif void Ice::Connection::destroy(DestructionReason reason) { IceUtil::Monitor::Lock sync(*this); switch(reason) { #ifndef ICEE_PURE_CLIENT case ObjectAdapterDeactivated: { setState(StateClosing, ObjectAdapterDeactivatedException(__FILE__, __LINE__)); break; } #endif case CommunicatorDestroyed: { setState(StateClosing, CommunicatorDestroyedException(__FILE__, __LINE__)); break; } } } void Ice::Connection::close(bool force) { IceUtil::Monitor::Lock sync(*this); if(force) { setState(StateClosed, ForcedCloseConnectionException(__FILE__, __LINE__)); } else { #ifndef ICEE_PURE_BLOCKING_CLIENT // // If we do a graceful shutdown, then we wait until all // outstanding requests have been completed. Otherwise, the // CloseConnectionException will cause all outstanding // requests to be retried, regardless of whether the server // has processed them or not. // while(!_requests.empty()) { wait(); } #endif setState(StateClosing, CloseConnectionException(__FILE__, __LINE__)); } } bool Ice::Connection::isDestroyed() const { // // We can not use trylock here, otherwise the outgoing connection // factory might return destroyed (closing or closed) connections, // resulting in connection retry exhaustion. // IceUtil::Monitor::Lock sync(*this); return _state >= StateClosing; } bool Ice::Connection::isFinished() const { #ifndef ICEE_PURE_BLOCKING_CLIENT IceUtil::ThreadPtr threadPerConnection; #endif { // // We can use trylock here, because as long as there are still // threads operating in this connection object, connection // destruction is considered as not yet finished. // IceUtil::Monitor::TryLock sync(*this); if(!sync.acquired()) { return false; } if(_transceiver != 0 #ifndef ICEE_PURE_BLOCKING_CLIENT || _dispatchCount != 0 || (_threadPerConnection && _threadPerConnection->isAlive()) #endif ) { return false; } assert(_state == StateClosed); #ifndef ICEE_PURE_BLOCKING_CLIENT threadPerConnection = _threadPerConnection; _threadPerConnection = 0; #endif } #ifndef ICEE_PURE_BLOCKING_CLIENT if(threadPerConnection) { threadPerConnection->getThreadControl().join(); } #endif return true; } void Ice::Connection::throwException() const { IceUtil::Monitor::Lock sync(*this); if(_exception.get()) { assert(_state >= StateClosing); _exception->ice_throw(); } } #ifndef ICEE_PURE_CLIENT void Ice::Connection::waitUntilHolding() const { IceUtil::Monitor::Lock sync(*this); while(_state < StateHolding || _dispatchCount > 0) { wait(); } } #endif void Ice::Connection::waitUntilFinished() { #ifndef ICEE_PURE_BLOCKING_CLIENT IceUtil::ThreadPtr threadPerConnection; #endif { IceUtil::Monitor::Lock sync(*this); // // We wait indefinitely until connection closing has been // initiated. We also wait indefinitely until all outstanding // requests are completed. Otherwise we couldn't guarantee // that there are no outstanding calls when deactivate() is // called on the servant locators. // while(_state < StateClosing || _dispatchCount > 0) { wait(); } // // Now we must wait until close() has been called on the // transceiver. // while(_transceiver) { if(_state != StateClosed && _endpoint->timeout() >= 0) { IceUtil::Time timeout = IceUtil::Time::milliSeconds(_endpoint->timeout()); IceUtil::Time waitTime = _stateTime + timeout - IceUtil::Time::now(); if(waitTime > IceUtil::Time()) { // // We must wait a bit longer until we close this // connection. // if(!timedWait(waitTime)) { setState(StateClosed, CloseTimeoutException(__FILE__, __LINE__)); } } else { // // We already waited long enough, so let's close this // connection! // setState(StateClosed, CloseTimeoutException(__FILE__, __LINE__)); } // // No return here, we must still wait until close() is // called on the _transceiver. // } else { wait(); } } assert(_state == StateClosed); #ifndef ICEE_PURE_BLOCKING_CLIENT threadPerConnection = _threadPerConnection; _threadPerConnection = 0; #endif } #ifndef ICEE_PURE_BLOCKING_CLIENT if(threadPerConnection) { threadPerConnection->getThreadControl().join(); } #endif } void Ice::Connection::sendRequest(BasicStream* os, Outgoing* out) { bool requestSent = false; try { Lock sendSync(_sendMonitor); if(!_transceiver) { assert(_exception.get()); // // If the connection is closed before we even have a chance // to send our request, we always try to send the request // again. // throw LocalExceptionWrapper(*_exception.get(), true); } Int requestId; if(out) { // // Create a new unique request ID. // requestId = _nextRequestId++; if(requestId <= 0) { _nextRequestId = 1; requestId = _nextRequestId++; } // // Fill in the request ID. // Byte* dest = &(os->b[0]) + headerSize; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&requestId) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&requestId); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif #ifndef ICEE_PURE_BLOCKING_CLIENT if(!_blocking) { _requestsHint = _requests.insert(_requests.end(), pair(requestId, out)); } #endif } // // Fill in the message size. // const Int sz = static_cast(os->b.size()); Byte* dest = &(os->b[0]) + 10; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&sz) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&sz); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif // // Send the request. // os->i = os->b.begin(); if(_traceLevels->protocol >= 1) { traceRequest("sending request", *os, _logger, _traceLevels); } _transceiver->write(*os); requestSent = true; if(!out) { return; } #ifndef ICEE_PURE_BLOCKING_CLIENT if(_blocking) { #endif // // Re-use the stream for reading the reply. // os->reset(); Int receivedRequestId = 0; #ifndef ICEE_PURE_CLIENT Int invokeNum = 0; readStreamAndParseMessage(*os, receivedRequestId, invokeNum); if(invokeNum > 0) { throwUnknownMessageException(__FILE__, __LINE__); } else if(requestId != receivedRequestId) { throwUnknownRequestIdException(__FILE__, __LINE__); } #else readStreamAndParseMessage(*os, receivedRequestId); if(requestId != receivedRequestId) { throwUnknownRequestIdException(__FILE__, __LINE__); } #endif out->finished(*os); #ifndef ICEE_PURE_BLOCKING_CLIENT } else { // // Wait until the request has completed, or until the request times out. // Int tout = timeout(); IceUtil::Time expireTime; if(tout > 0) { expireTime = IceUtil::Time::now() + IceUtil::Time::milliSeconds(tout); } while(out->state() == Outgoing::StateInProgress) { if(tout > 0) { IceUtil::Time now = IceUtil::Time::now(); if(now < expireTime) { _sendMonitor.timedWait(expireTime - now); } // // Make sure we woke up because of timeout and not another response. // if(out->state() == Outgoing::StateInProgress && IceUtil::Time::now() > expireTime) { throw TimeoutException(__FILE__, __LINE__); } } else { _sendMonitor.wait(); } } } #endif } catch(const LocalException& ex) { { IceUtil::Monitor::Lock sync(*this); setState(StateClosed, ex); assert(_exception.get()); if(!requestSent) { _exception->ice_throw(); } } // // If the request was already sent, we don't throw directly // but instead we set the Outgoing object exception with // finished(). Throwing directly would break "at-most-once" // (see also comment in Outgoing.invoke()) // IceUtil::Monitor::Lock sendSync(_sendMonitor); #ifndef ICEE_PURE_BLOCKING_CLIENT if(_blocking) { #endif out->finished(ex); #ifndef ICEE_PURE_BLOCKING_CLIENT } else { while(out->state() == Outgoing::StateInProgress) { _sendMonitor.wait(); // Wait for the thread to propagate the exception to the Outgoing object. } } #endif } } #ifdef ICEE_HAS_BATCH void Ice::Connection::prepareBatchRequest(BasicStream* os) { IceUtil::Monitor::Lock sync(*this); // // Wait if flushing is currently in progress. // while(_batchStreamInUse && !_exception.get()) { wait(); } if(_exception.get()) { _exception->ice_throw(); } assert(_state > StateNotValidated); assert(_state < StateClosing); if(_batchStream.b.empty()) { try { _batchStream.writeBlob(requestBatchHdr, sizeof(requestBatchHdr)); } catch(const LocalException& ex) { setState(StateClosed, ex); ex.ice_throw(); } } _batchStreamInUse = true; _batchMarker = _batchStream.b.size(); _batchStream.swap(*os); // // The batch stream now belongs to the caller, until // finishBatchRequest() or abortBatchRequest() is called. // } void Ice::Connection::finishBatchRequest(BasicStream* os) { bool autoflush = false; vector lastRequest; { IceUtil::Monitor::Lock sync(*this); // // Get the batch stream back. // _batchStream.swap(*os); if(_batchAutoFlush) { Lock sendSync(_sendMonitor); if(!_transceiver) { assert(_exception.get()); _exception->ice_throw(); // The exception is immutable at this point. } // // Throw memory limit exception if the first message added causes us to // go over limit. Otherwise put aside the marshalled message that caused // limit to be exceeded and rollback stream to the marker. // if(_batchStream.b.size() > _instance->messageSizeMax()) { if(_batchRequestNum == 0) { resetBatch(true); throwMemoryLimitException(__FILE__, __LINE__); } vector(_batchStream.b.begin() + _batchMarker, _batchStream.b.end()).swap(lastRequest); _batchStream.b.resize(_batchMarker); autoflush = true; } } if(!autoflush) { // // Increment the number of requests in the batch. // ++_batchRequestNum; // // Notify about the batch stream not being in use anymore. // assert(_batchStreamInUse); _batchStreamInUse = false; notifyAll(); } } if(autoflush) { // // We have to keep _batchStreamInUse set until after we insert the // saved marshalled data into a new stream. // flushBatchRequestsInternal(true); IceUtil::Monitor::Lock sync(*this); // // Throw memory limit exception if the message that caused us to go over // limit causes us to exceed the limit by itself. // if(sizeof(requestBatchHdr) + lastRequest.size() > _instance->messageSizeMax()) { resetBatch(true); throwMemoryLimitException(__FILE__, __LINE__); } // // Start a new batch with the last message that caused us to // go over the limit. // try { _batchStream.writeBlob(requestBatchHdr, sizeof(requestBatchHdr)); _batchStream.writeBlob(&lastRequest[0], lastRequest.size()); } catch(const LocalException& ex) { setState(StateClosed, ex); ex.ice_throw(); } // // Notify that the batch stream not in use anymore. // ++_batchRequestNum; _batchStreamInUse = false; notifyAll(); } } void Ice::Connection::abortBatchRequest() { IceUtil::Monitor::Lock sync(*this); // // Reset the batch stream. We cannot save old requests // in the batch stream, as they might be corrupted due to // incomplete marshaling. // resetBatch(true); } void Ice::Connection::flushBatchRequests() { flushBatchRequestsInternal(false); } void Ice::Connection::flushBatchRequestsInternal(bool ignoreInUse) { { IceUtil::Monitor::Lock sync(*this); if(!ignoreInUse) { while(_batchStreamInUse && !_exception.get()) { wait(); } } if(_exception.get()) { _exception->ice_throw(); } if(_batchStream.b.empty()) { return; // Nothing to do. } assert(_state > StateNotValidated); assert(_state < StateClosing); _batchStream.i = _batchStream.b.begin(); // // Prevent that new batch requests are added while we are // flushing. // _batchStreamInUse = true; } try { Lock sendSync(_sendMonitor); if(!_transceiver) // Has the transceiver already been closed? { assert(_exception.get()); _exception->ice_throw(); // The exception is immutable at this point. } // // Fill in the number of requests in the batch. // Byte* dest = &(_batchStream.b[0]) + headerSize; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&_batchRequestNum) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&_batchRequestNum); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif const Int sz = static_cast(_batchStream.b.size()); dest = &(_batchStream.b[0]) + 10; #ifdef ICE_BIG_ENDIAN src = reinterpret_cast(&sz) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else src = reinterpret_cast(&sz); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif // // Send the batch request. // _batchStream.i = _batchStream.b.begin(); if(_traceLevels->protocol >= 1) { traceBatchRequest("sending batch request", _batchStream, _logger, _traceLevels); } _transceiver->write(_batchStream); } catch(const LocalException& ex) { IceUtil::Monitor::Lock sync(*this); setState(StateClosed, ex); assert(_exception.get()); // // Since batch requests are all oneways, we // must report the exception to the caller. // _exception->ice_throw(); } { IceUtil::Monitor::Lock sync(*this); // // Reset the batch stream, and notify that flushing is over. // resetBatch(!ignoreInUse); } } void Ice::Connection::resetBatch(bool resetInUse) { BasicStream dummy(_instance.get(), _instance->messageSizeMax(), #ifdef ICEE_HAS_WSTRING _instance->initializationData().stringConverter, _instance->initializationData().wstringConverter, #endif _batchAutoFlush); _batchStream.swap(dummy); _batchRequestNum = 0; _batchMarker = 0; // // Notify about the batch stream not being in use // anymore. // if(resetInUse) { assert(_batchStreamInUse); _batchStreamInUse = false; notifyAll(); } } #endif #ifndef ICEE_PURE_CLIENT void Ice::Connection::sendResponse(BasicStream* os) { try { Lock sendSync(_sendMonitor); if(!_transceiver) // Has the transceiver already been closed? { assert(_exception.get()); _exception->ice_throw(); // The exception is immutable at this point. } const Int sz = static_cast(os->b.size()); Byte* dest = &(os->b[0]) + 10; #ifdef ICE_BIG_ENDIAN const Byte* src = reinterpret_cast(&sz) + sizeof(Ice::Int) - 1; *dest++ = *src--; *dest++ = *src--; *dest++ = *src--; *dest = *src; #else const Byte* src = reinterpret_cast(&sz); *dest++ = *src++; *dest++ = *src++; *dest++ = *src++; *dest = *src; #endif // // Send the reply. // os->i = os->b.begin(); if(_traceLevels->protocol >= 1) { traceReply("sending reply", *os, _logger, _traceLevels); } _transceiver->write(*os); } catch(const LocalException& ex) { IceUtil::Monitor::Lock sync(*this); setState(StateClosed, ex); } { IceUtil::Monitor::Lock sync(*this); assert(_state > StateNotValidated); try { assert(_dispatchCount > 0); if(--_dispatchCount == 0) { notifyAll(); } if(_state == StateClosing && _dispatchCount == 0) { initiateShutdown(); } } catch(const LocalException& ex) { setState(StateClosed, ex); } } } void Ice::Connection::sendNoResponse() { IceUtil::Monitor::Lock sync(*this); assert(_state > StateNotValidated); try { assert(_dispatchCount > 0); if(--_dispatchCount == 0) { notifyAll(); } if(_state == StateClosing && _dispatchCount == 0) { initiateShutdown(); } } catch(const LocalException& ex) { setState(StateClosed, ex); } } #endif EndpointPtr Ice::Connection::endpoint() const { return _endpoint; // No mutex protection necessary, _endpoint is immutable. } #ifndef ICEE_PURE_CLIENT void Ice::Connection::setAdapter(const ObjectAdapterPtr& adapter) { IceUtil::Monitor::Lock sync(*this); if(_blocking) { throw FeatureNotSupportedException(__FILE__, __LINE__, "setAdapter with blocking connection"); } // // Wait for all the incoming to be dispatched. We can't modify the // _adapter and _servantManager if there's incoming because the // Incoming object is using plain pointers for these objects. // while(_dispatchCount > 0) { wait(); } if(_exception.get()) { _exception->ice_throw(); } assert(_state < StateClosing); _in.setAdapter(adapter); } ObjectAdapterPtr Ice::Connection::getAdapter() const { IceUtil::Monitor::Lock sync(*this); return _in.getAdapter(); } ObjectPrx Ice::Connection::createProxy(const Identity& ident) const { // // Create a reference and return a reverse proxy for this // reference. // vector connections; connections.push_back(const_cast(this)); ReferencePtr ref = _instance->referenceFactory()->create(ident, Ice::Context(), "", ReferenceModeTwoway, connections); return _instance->proxyFactory()->referenceToProxy(ref); } #endif string Ice::Connection::type() const { return _type; // No mutex lock, _type is immutable. } Ice::Int Ice::Connection::timeout() const { return _endpoint->timeout(); // No mutex lock, _endpoint is immutable. } string Ice::Connection::toString() const { return _desc; // No mutex lock, _desc is immutable. } #ifndef ICEE_PURE_CLIENT Ice::Connection::Connection(const InstancePtr& instance, const TransceiverPtr& transceiver, const EndpointPtr& endpoint, const ObjectAdapterPtr& adapter) : #else Ice::Connection::Connection(const InstancePtr& instance, const TransceiverPtr& transceiver, const EndpointPtr& endpoint) : #endif _instance(instance), _transceiver(transceiver), _desc(transceiver->toString()), _type(transceiver->type()), _endpoint(endpoint), _logger(_instance->initializationData().logger), // Cached for better performance. _traceLevels(_instance->traceLevels()), // Cached for better performance. _warn(_instance->initializationData().properties->getPropertyAsInt("Ice.Warn.Connections") > 0), #ifndef ICEE_PURE_CLIENT _in(_instance.get(), this, _stream, adapter), #endif #ifndef ICEE_PURE_BLOCKING_CLIENT _stream(_instance.get(), _instance->messageSizeMax() #ifdef ICEE_HAS_WSTRING , _instance->initializationData().stringConverter, _instance->initializationData().wstringConverter #endif ), #endif #ifdef ICEE_HAS_BATCH _batchAutoFlush( _instance->initializationData().properties->getPropertyAsIntWithDefault("Ice.BatchAutoFlush", 1) > 0), _batchStream(_instance.get(), _instance->messageSizeMax(), #ifdef ICEE_HAS_WSTRING _instance->initializationData().stringConverter, _instance->initializationData().wstringConverter, #endif _batchAutoFlush), _batchStreamInUse(false), _batchRequestNum(0), _batchMarker(0), #endif _dispatchCount(0), _state(StateNotValidated), _stateTime(IceUtil::Time::now()), _nextRequestId(1) #ifndef ICEE_PURE_BLOCKING_CLIENT , _requestsHint(_requests.end()) #endif { #ifndef ICEE_PURE_BLOCKING_CLIENT # ifdef ICEE_PURE_CLIENT _blocking = _instance->initializationData().properties->getPropertyAsInt("Ice.Blocking") > 0; # else _blocking = _instance->initializationData().properties->getPropertyAsInt("Ice.Blocking") > 0 && !adapter; # endif if(_blocking) { _transceiver->setTimeouts(_endpoint->timeout(), _endpoint->timeout()); } else { #ifdef _WIN32 // // On Windows, the recv() call doesn't return if the socket is // shutdown. We use the timeout to not block indefinitely. // _transceiver->setTimeouts(_endpoint->timeout(), _endpoint->timeout()); #else _transceiver->setTimeouts(-1, _endpoint->timeout()); #endif } #else _transceiver->setTimeouts(_endpoint->timeout(), _endpoint->timeout()); #endif #ifdef ICEE_PURE_BLOCKING_CLIENT validate(); #else if(_blocking) { validate(); } else { __setNoDelete(true); try { // // If we are in thread per connection mode, create the thread // for this connection. // _threadPerConnection = new ThreadPerConnection(this); _threadPerConnection->start(_instance->threadPerConnectionStackSize()); } catch(const Ice::Exception& ex) { { Error out(_logger); out << "cannot create thread for connection:\n" << ex.toString(); } try { _transceiver->close(); } catch(const LocalException&) { // Here we ignore any exceptions in close(). } __setNoDelete(false); ex.ice_throw(); } __setNoDelete(false); } #endif } Ice::Connection::~Connection() { IceUtil::Monitor::Lock sync(*this); assert(_state == StateClosed); assert(!_transceiver); assert(_dispatchCount == 0); #ifndef ICEE_PURE_BLOCKING_CLIENT assert(!_threadPerConnection); #endif } void Ice::Connection::validate() { #ifndef ICEE_PURE_CLIENT bool active; { IceUtil::Monitor::Lock sync(*this); // // The connection might already be closed (e.g.: the communicator // was destroyed or object adapter deactivated.) // assert(_state == StateNotValidated || _state == StateClosed); if(_state == StateClosed) { assert(_exception.get()); _exception->ice_throw(); } if(_in.getAdapter()) { active = true; // The server side has the active role for connection validation. } else { active = false; // The client side has the passive role for connection validation. } } #endif try { Int timeout; if(_instance->defaultsAndOverrides()->overrideConnectTimeout) { timeout = _instance->defaultsAndOverrides()->overrideConnectTimeoutValue; } else { timeout = _endpoint->timeout(); } #ifndef ICEE_PURE_CLIENT if(active) { BasicStream os(_instance.get(), _instance->messageSizeMax() #ifdef ICEE_HAS_WSTRING , _instance->initializationData().stringConverter, _instance->initializationData().wstringConverter #endif ); os.write(magic[0]); os.write(magic[1]); os.write(magic[2]); os.write(magic[3]); os.write(protocolMajor); os.write(protocolMinor); os.write(encodingMajor); os.write(encodingMinor); os.write(validateConnectionMsg); os.write(static_cast(0)); // Compression status (always zero for validate connection). os.write(headerSize); // Message size. os.i = os.b.begin(); if(_traceLevels->protocol >= 1) { traceHeader("sending validate connection", os, _logger, _traceLevels); } try { _transceiver->writeWithTimeout(os, timeout); } catch(const TimeoutException&) { throw ConnectTimeoutException(__FILE__, __LINE__); } } else #endif { BasicStream is(_instance.get(), _instance->messageSizeMax() #ifdef ICEE_HAS_WSTRING , _instance->initializationData().stringConverter, _instance->initializationData().wstringConverter #endif ); is.b.resize(headerSize); is.i = is.b.begin(); try { _transceiver->readWithTimeout(is, timeout); } catch(const TimeoutException&) { throw ConnectTimeoutException(__FILE__, __LINE__); } assert(is.i == is.b.end()); is.i = is.b.begin(); Ice::Byte m[4]; is.read(m[0]); is.read(m[1]); is.read(m[2]); is.read(m[3]); if(m[0] != magic[0] || m[1] != magic[1] || m[2] != magic[2] || m[3] != magic[3]) { throwBadMagicException(__FILE__, __LINE__, Ice::ByteSeq(&m[0], &m[0] + sizeof(m))); } Byte pMajor; Byte pMinor; is.read(pMajor); is.read(pMinor); if(pMajor != protocolMajor) { throwUnsupportedProtocolException(__FILE__, __LINE__, pMajor, pMinor, protocolMajor, protocolMinor); } Byte eMajor; Byte eMinor; is.read(eMajor); is.read(eMinor); if(eMajor != encodingMajor) { throwUnsupportedEncodingException(__FILE__, __LINE__, eMajor, eMinor, encodingMajor, encodingMinor); } Byte messageType; is.read(messageType); if(messageType != validateConnectionMsg) { throwConnectionNotValidatedException(__FILE__, __LINE__); } Byte compress; is.read(compress); // Ignore compression status for validate connection. Int size; is.read(size); if(size != headerSize) { throwIllegalMessageSizeException(__FILE__, __LINE__); } if(_traceLevels->protocol >= 1) { traceHeader("received validate connection", is, _logger, _traceLevels); } } } catch(const LocalException& ex) { IceUtil::Monitor::Lock sync(*this); setState(StateClosed, ex); assert(_exception.get()); _exception->ice_throw(); } #ifdef ICEE_PURE_CLIENT activate(); #else hold(); #endif } void Ice::Connection::setState(State state, const LocalException& ex) { // // If setState() is called with an exception, then only closed and // closing states are permissible. // assert(state == StateClosing || state == StateClosed); if(_state == state) // Don't switch twice. { return; } if(!_exception.get()) { // // If we are in closed state, an exception must be set. // assert(_state != StateClosed); _exception.reset(dynamic_cast(ex.ice_clone())); if(_warn) { // // We don't warn if we are not validated. // if(_state > StateNotValidated) { // // Don't warn about certain expected exceptions. // if(!(dynamic_cast(_exception.get()) || dynamic_cast(_exception.get()) || dynamic_cast(_exception.get()) || #ifndef ICEE_PURE_CLIENT dynamic_cast(_exception.get()) || #endif (dynamic_cast(_exception.get()) && _state == StateClosing))) { Warning out(_logger); out << "connection exception:\n" << (*_exception.get()).toString() << "\n" << _desc; } } } } // // We must set the new state before we notify requests of any // exceptions. Otherwise new requests may retry on a connection // that is not yet marked as closed or closing. // setState(state); } void Ice::Connection::setState(State state) { if(_state == state) // Don't switch twice. { return; } switch(state) { case StateNotValidated: { assert(false); break; } case StateActive: { // // Can only switch from holding or not validated to // active. // #ifdef ICEE_PURE_CLIENT if(_state != StateNotValidated) { return; } #else if(_state != StateHolding && _state != StateNotValidated) { return; } #endif break; } #ifndef ICEE_PURE_CLIENT case StateHolding: { // // Can only switch from active or not validated to // holding. // if(_state != StateActive && _state != StateNotValidated) { return; } break; } #endif case StateClosing: { // // Can't change back from closed. // if(_state == StateClosed) { return; } break; } case StateClosed: { // // We shutdown both for reading and writing. This will // unblock and read call with an exception. The thread // per connection then closes the transceiver. // _transceiver->shutdownReadWrite(); // // In blocking mode, we close the transceiver now. // #ifndef ICEE_PURE_BLOCKING_CLIENT if(_blocking) #endif { Lock sync(_sendMonitor); try { _transceiver->close(); } catch(const Ice::LocalException&) { } _transceiver = 0; } break; } } _state = state; _stateTime = IceUtil::Time::now(); notifyAll(); if(_state == StateClosing && _dispatchCount == 0) { try { initiateShutdown(); #ifndef ICEE_PURE_BLOCKING_CLIENT if(_blocking) #endif { setState(StateClosed); } } catch(const LocalException& ex) { setState(StateClosed, ex); } } } void Ice::Connection::initiateShutdown() const { assert(_state == StateClosing); assert(_dispatchCount == 0); Lock sendSync(_sendMonitor); // // Before we shut down, we send a close connection message. // BasicStream os(_instance.get(), _instance->messageSizeMax() #ifdef ICEE_HAS_WSTRING , _instance->initializationData().stringConverter, _instance->initializationData().wstringConverter #endif ); os.write(magic[0]); os.write(magic[1]); os.write(magic[2]); os.write(magic[3]); os.write(protocolMajor); os.write(protocolMinor); os.write(encodingMajor); os.write(encodingMinor); os.write(closeConnectionMsg); os.write((Byte)0); // Compression status: compression not supported. os.write(headerSize); // Message size. // // Send the message. // os.i = os.b.begin(); if(_traceLevels->protocol >= 1) { traceHeader("sending close connection", os, _logger, _traceLevels); } _transceiver->write(os); // // The CloseConnection message should be sufficient. Closing the // write end of the socket is probably an artifact of how things // were done in IIOP. In fact, shutting down the write end of the // socket causes problems on Windows by preventing the peer from // using the socket. For example, the peer is no longer able to // continue writing a large message after the socket is shutdown. // //_transceiver->shutdownWrite(); } void #ifndef ICEE_PURE_CLIENT Ice::Connection::readStreamAndParseMessage(IceInternal::BasicStream& stream, Int& requestId, Int& invokeNum) #else Ice::Connection::readStreamAndParseMessage(IceInternal::BasicStream& stream, Int& requestId) #endif { // // Read the header. // stream.b.resize(headerSize); stream.i = stream.b.begin(); _transceiver->read(stream); ptrdiff_t pos = stream.i - stream.b.begin(); assert(pos >= headerSize); stream.i = stream.b.begin(); const Ice::Byte* header; stream.readBlob(header, headerSize); if(header[0] != magic[0] || header[1] != magic[1] || header[2] != magic[2] || header[3] != magic[3]) { throwBadMagicException(__FILE__, __LINE__, Ice::ByteSeq(&header[0], &header[0] + sizeof(magic))); } if(header[4] != protocolMajor) { throwUnsupportedProtocolException(__FILE__, __LINE__, header[4], header[5], protocolMajor, protocolMinor); } if(header[6] != encodingMajor) { throwUnsupportedEncodingException(__FILE__, __LINE__, header[6], header[7], encodingMajor, encodingMinor); } const Byte messageType = header[8]; if(header[9] == 2) { throw FeatureNotSupportedException(__FILE__, __LINE__, "compression"); } Int size; stream.i -= sizeof(Int); stream.read(size); if(size < headerSize) { throwIllegalMessageSizeException(__FILE__, __LINE__); } if(size > static_cast(_instance->messageSizeMax())) { throwMemoryLimitException(__FILE__, __LINE__); } if(size > static_cast(stream.b.size())) { stream.b.resize(size); } stream.i = stream.b.begin() + pos; if(stream.i != stream.b.end()) { _transceiver->read(stream); } assert(stream.i == stream.b.end()); stream.i = stream.b.begin() + headerSize; switch(messageType) { case closeConnectionMsg: { if(_traceLevels->protocol >= 1) { traceHeader("received close connection", stream, _logger, _traceLevels); } throw CloseConnectionException(__FILE__, __LINE__); break; } case replyMsg: { if(_traceLevels->protocol >= 1) { traceReply("received reply", stream, _logger, _traceLevels); } stream.read(requestId); break; } #ifndef ICEE_PURE_CLIENT case requestMsg: { if(_traceLevels->protocol >= 1) { traceRequest("received request", stream, _logger, _traceLevels); } stream.read(requestId); invokeNum = 1; break; } case requestBatchMsg: { if(_traceLevels->protocol >= 1) { traceBatchRequest("received batch request", stream, _logger, _traceLevels); } stream.read(invokeNum); if(invokeNum < 0) { invokeNum = 0; throwNegativeSizeException(__FILE__, __LINE__); } break; } #endif case validateConnectionMsg: { if(_traceLevels->protocol >= 1) { traceHeader("received validate connection", stream, _logger, _traceLevels); } if(_warn) { Warning out(_logger); out << "ignoring unexpected validate connection message:\n" << _desc; } break; } default: { if(_traceLevels->protocol >= 1) { traceHeader("received unknown message\n(invalid, closing connection)", stream, _logger, _traceLevels); } throwUnknownMessageException(__FILE__, __LINE__); break; } } } #ifndef ICEE_PURE_BLOCKING_CLIENT void Ice::Connection::run() { // // The thread-per-connection must validate and activate this connection, // and not in the connection factory. Please see the comments in the connection // factory for details. // try { validate(); } catch(const LocalException&) { Lock sync(*this); assert(_state == StateClosed); Lock sendSync(_sendMonitor); try { _transceiver->close(); } catch(const LocalException&) { // Here we ignore any exceptions in close(). } _transceiver = 0; notifyAll(); return; } activate(); bool closed = false; while(!closed) { Int requestId = 0; #ifndef ICEE_PURE_CLIENT Int invokeNum = 0; _in.os()->reset(); #endif _stream.reset(); // // Read and parse the next message. We don't need to lock the // send monitor here as we have the guarantee that // _transceiver won't be set to 0 by another thread, the // thread per connection is the only thread that can set // _transceiver to 0. // try { #ifndef ICEE_PURE_CLIENT readStreamAndParseMessage(_stream, requestId, invokeNum); #else readStreamAndParseMessage(_stream, requestId); #endif } #ifdef _WIN32 catch(const Ice::TimeoutException&) { // // See the comment in the Connection constructor. This is // necessary to not block in recv() indefinitely. // continue; } #endif catch(const Ice::LocalException& ex) { IceUtil::Monitor::Lock sync(*this); setState(StateClosed, ex); } { IceUtil::Monitor::Lock sync(*this); if(_state != StateClosed) { #ifndef ICEE_PURE_CLIENT if(invokeNum > 0) // We received a request or a batch request { if(_state == StateClosing) { if(_traceLevels->protocol >= 1) { string req = invokeNum > 1 ? "received batch request" : "received request"; req += " during closing\n(ignored by server, client will retry)"; traceRequest( req.c_str(), _stream, _logger, _traceLevels); } invokeNum = 0; } _dispatchCount += invokeNum; } else #endif if(requestId > 0) { // // The message is a reply, we search the Outgoing object waiting // for this reply and pass it the stream before to notify the // send monitor to wake up threads waiting for replies. // try { Lock sync(_sendMonitor); map::iterator p = _requests.end(); if(p != _requestsHint) { if(_requestsHint->first == requestId) { p = _requestsHint; } } if(p == _requests.end()) { p = _requests.find(requestId); } if(p == _requests.end()) { throwUnknownRequestIdException(__FILE__, __LINE__); } p->second->finished(_stream); if(p == _requestsHint) { _requests.erase(p++); _requestsHint = p; } else { _requests.erase(p); } _sendMonitor.notifyAll(); // Wake up threads waiting in sendRequest() } catch(const Ice::LocalException& ex) { setState(StateClosed, ex); } } } #ifndef ICEE_PURE_CLIENT while(_state == StateHolding) { wait(); } #endif if(_state == StateClosed) { Lock sync(_sendMonitor); try { _transceiver->close(); } catch(const LocalException&) { } _transceiver = 0; notifyAll(); // // We cannot simply return here. We have to make sure // that all requests are notified about the closed // connection below. // closed = true; } if(_state == StateClosed || _state == StateClosing) { Lock sync(_sendMonitor); assert(_exception.get()); for(map::iterator p = _requests.begin(); p != _requests.end(); ++p) { p->second->finished(*_exception.get()); // The exception is immutable at this point. } _requests.clear(); _sendMonitor.notifyAll(); // Wake up threads waiting in sendRequest() } } // // Method invocation (or multiple invocations for batch // messages) must be done outside the thread synchronization, // so that nested calls are possible. // #ifndef ICEE_PURE_CLIENT try { for(;invokeNum > 0; --invokeNum) { // // Prepare the response if necessary. // const bool response = requestId != 0; if(response) { assert(invokeNum == 1); // No further invocations if a response is expected. // // Add the reply header and request id. // BasicStream* os = _in.os(); os->writeBlob(replyHdr, sizeof(replyHdr)); os->write(requestId); } // // Dispatch the incoming request. // _in.invoke(response, requestId); } } catch(const LocalException& ex) { IceUtil::Monitor::Lock sync(*this); setState(StateClosed, ex); } catch(const std::exception& ex) { IceUtil::Monitor::Lock sync(*this); UnknownException uex(__FILE__, __LINE__); uex.unknown = string("std::exception: ") + ex.what(); setState(StateClosed, uex); } catch(...) { IceUtil::Monitor::Lock sync(*this); UnknownException uex(__FILE__, __LINE__); uex.unknown = "unknown c++ exception"; setState(StateClosed, uex); } // // If invoke() above raised an exception, and therefore neither // sendResponse() nor sendNoResponse() has been called, then we // must decrement _dispatchCount here. // if(invokeNum > 0) { IceUtil::Monitor::Lock sync(*this); assert(_dispatchCount > 0); _dispatchCount -= invokeNum; assert(_dispatchCount >= 0); if(_dispatchCount == 0) { notifyAll(); } } #endif } } Ice::Connection::ThreadPerConnection::ThreadPerConnection(const ConnectionPtr& connection) : _connection(connection) { } void Ice::Connection::ThreadPerConnection::run() { try { _connection->run(); } catch(const Exception& ex) { Error out(_connection->_logger); out << "exception in thread per connection:\n" << _connection->toString() << ex.toString(); } catch(const std::exception& ex) { Error out(_connection->_logger); out << "std::exception in thread per connection:\n" << _connection->toString() << ex.what(); } catch(...) { Error out(_connection->_logger); out << "unknown exception in thread per connection:\n" << _connection->toString(); } _connection = 0; // Resolve cyclic dependency. } #endif // ICEE_PURE_BLOCKING_CLIENT IceE-1.2.0/src/IceE/ObjectAdapterFactory.h0000644000076400007640000000272110576536574020063 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OBJECT_ADAPTER_FACTORY_H #define ICEE_OBJECT_ADAPTER_FACTORY_H #include #ifdef ICEE_HAS_ROUTER # include #endif #include #include #include #include #include #include namespace IceInternal { class ObjectAdapterFactory : public ::IceUtil::Shared, public ::IceUtil::Monitor< ::IceUtil::Mutex> { public: void shutdown(); void waitForShutdown(); bool isShutdown() const; void destroy(); ::Ice::ObjectAdapterPtr createObjectAdapter(const std::string&, const std::string& #ifdef ICEE_HAS_ROUTER , const ::Ice::RouterPrx& #endif ); void removeObjectAdapter(const std::string&); void flushBatchRequests() const; private: ObjectAdapterFactory(const InstancePtr&, const ::Ice::CommunicatorPtr&); virtual ~ObjectAdapterFactory(); friend class Instance; InstancePtr _instance; ::Ice::CommunicatorPtr _communicator; std::map _adapters; bool _waitForShutdown; }; } #endif IceE-1.2.0/src/IceE/Instance.h0000644000076400007640000000675710616161100015553 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_INSTANCE_H #define ICEE_INSTANCE_H #include #include #include #include #include #include #include #include #include #include #include #ifndef ICEE_PURE_CLIENT # include #endif #include #include #include #include namespace IceInternal { class Instance : public IceUtil::Shared, public IceUtil::RecMutex { public: bool destroyed() const; const Ice::InitializationData& initializationData() const { return _initData; } TraceLevelsPtr traceLevels() const; DefaultsAndOverridesPtr defaultsAndOverrides() const; #ifdef ICEE_HAS_ROUTER RouterManagerPtr routerManager() const; #endif #ifdef ICEE_HAS_LOCATOR LocatorManagerPtr locatorManager() const; #endif ReferenceFactoryPtr referenceFactory() const; ProxyFactoryPtr proxyFactory() const; OutgoingConnectionFactoryPtr outgoingConnectionFactory() const; EndpointFactoryPtr endpointFactory() const; size_t messageSizeMax() const { return _messageSizeMax; /* Immutable */ } // Inlined for performance reasons. Ice::Int connectionIdleTime() const; #ifdef ICEE_HAS_BATCH void flushBatchRequests(); #endif #ifndef ICEE_PURE_BLOCKING_CLIENT size_t threadPerConnectionStackSize() const; #endif #ifndef ICEE_PURE_CLIENT ObjectAdapterFactoryPtr objectAdapterFactory() const; #endif Ice::Identity stringToIdentity(const std::string&) const; std::string identityToString(const Ice::Identity&) const; private: Instance(const Ice::CommunicatorPtr&, const Ice::InitializationData&); virtual ~Instance(); void finishSetup(int&, char*[]); void destroy(); friend class Ice::Communicator; enum State { StateActive, StateDestroyInProgress, StateDestroyed }; State _state; Ice::InitializationData _initData; // Immutable, not reset by destroy(). const TraceLevelsPtr _traceLevels; // Immutable, not reset by destroy(). const DefaultsAndOverridesPtr _defaultsAndOverrides; // Immutable, not reset by destroy(). const size_t _messageSizeMax; // Immutable, not reset by destroy(). #ifndef ICEE_PURE_BLOCKING_CLIENT const size_t _threadPerConnectionStackSize; #endif #ifdef ICEE_HAS_ROUTER RouterManagerPtr _routerManager; #endif #ifdef ICEE_HAS_LOCATOR LocatorManagerPtr _locatorManager; #endif ReferenceFactoryPtr _referenceFactory; ProxyFactoryPtr _proxyFactory; OutgoingConnectionFactoryPtr _outgoingConnectionFactory; EndpointFactoryPtr _endpointFactory; #ifndef ICEE_PURE_CLIENT ObjectAdapterFactoryPtr _objectAdapterFactory; #endif }; #ifdef ICEE_HAS_WSTRING class UTF8BufferI : public Ice::UTF8Buffer { public: UTF8BufferI(); ~UTF8BufferI(); Ice::Byte* getMoreBytes(size_t howMany, Ice::Byte* firstUnused); Ice::Byte* getBuffer(); void reset(); private: Ice::Byte* _buffer; size_t _offset; }; #endif } #endif IceE-1.2.0/src/IceE/RouterInfo.cpp0000644000076400007640000001350310605173676016444 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_ROUTER #include #include #include #include #include // For ice_getConnection()->timeout(). #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(RouterManager* p) { return p; } IceUtil::Shared* IceInternal::upCast(RouterInfo* p) { return p; } IceInternal::RouterManager::RouterManager() : _tableHint(_table.end()) { } void IceInternal::RouterManager::destroy() { IceUtil::Mutex::Lock sync(*this); for_each(_table.begin(), _table.end(), Ice::secondVoidMemFun(&RouterInfo::destroy)); _table.clear(); _tableHint = _table.end(); } RouterInfoPtr IceInternal::RouterManager::get(const RouterPrx& rtr) { if(!rtr) { return 0; } RouterPrx router = RouterPrx::uncheckedCast(rtr->ice_router(0)); // The router cannot be routed. IceUtil::Mutex::Lock sync(*this); map::iterator p = _table.end(); if(_tableHint != _table.end()) { if(_tableHint->first == router) { p = _tableHint; } } if(p == _table.end()) { p = _table.find(router); } if(p == _table.end()) { _tableHint = _table.insert(_tableHint, pair(router, new RouterInfo(router))); } else { _tableHint = p; } return _tableHint->second; } RouterInfoPtr IceInternal::RouterManager::erase(const RouterPrx& rtr) { RouterInfoPtr info; if(rtr) { RouterPrx router = RouterPrx::uncheckedCast(rtr->ice_router(0)); // The router cannot be routed. IceUtil::Mutex::Lock sync(*this); map::iterator p = _table.end(); if(_tableHint != _table.end() && _tableHint->first == router) { p = _tableHint; _tableHint = _table.end(); } if(p == _table.end()) { p = _table.find(router); } if(p != _table.end()) { info = p->second; _table.erase(p); } } return info; } IceInternal::RouterInfo::RouterInfo(const RouterPrx& router) : _router(router) { assert(_router); } void IceInternal::RouterInfo::destroy() { IceUtil::Mutex::Lock sync(*this); _clientEndpoints.clear(); _serverEndpoints.clear(); #ifndef ICEE_PURE_CLIENT _adapter = 0; #endif _identities.clear(); } bool IceInternal::RouterInfo::operator==(const RouterInfo& rhs) const { return _router == rhs._router; } bool IceInternal::RouterInfo::operator!=(const RouterInfo& rhs) const { return _router != rhs._router; } bool IceInternal::RouterInfo::operator<(const RouterInfo& rhs) const { return _router < rhs._router; } RouterPrx IceInternal::RouterInfo::getRouter() const { // // No mutex lock necessary, _router is immutable. // return _router; } vector IceInternal::RouterInfo::getClientEndpoints() { IceUtil::Mutex::Lock sync(*this); if(_clientEndpoints.size() == 0) // Lazy initialization. { ObjectPrx clientProxy = _router->getClientProxy(); if(!clientProxy) { // // If getClientProxy() return nil, use router endpoints. // _clientEndpoints = _router->__reference()->getEndpoints(); } else { clientProxy = clientProxy->ice_router(0); // The client proxy cannot be routed. // // In order to avoid creating a new connection to the router, // we must use the same timeout as the already existing // connection. // clientProxy = clientProxy->ice_timeout(_router->ice_getConnection()->timeout()); _clientEndpoints = clientProxy->__reference()->getEndpoints(); } } return _clientEndpoints; } vector IceInternal::RouterInfo::getServerEndpoints() { IceUtil::Mutex::Lock sync(*this); if(_serverEndpoints.size() == 0) // Lazy initialization. { ObjectPrx serverProxy = _router->getServerProxy(); if(!serverProxy) { throw NoEndpointException(__FILE__, __LINE__); } serverProxy = serverProxy->ice_router(0); // The server proxy cannot be routed. _serverEndpoints = serverProxy->__reference()->getEndpoints(); } return _serverEndpoints; } void IceInternal::RouterInfo::addProxy(const ObjectPrx& proxy) { assert(proxy); // Must not be called for null proxies. IceUtil::Mutex::Lock sync(*this); set::iterator p = _identities.find(proxy->ice_getIdentity()); if(p == _identities.end()) { // // Only add the proxy to the router if it's not already in our local map. // ObjectProxySeq proxies; proxies.push_back(proxy); ObjectProxySeq evictedProxies = _router->addProxies(proxies); // // If we successfully added the proxy to the router, we add it to our local map. // _identities.insert(_identities.begin(), proxy->ice_getIdentity()); // // We also must remove whatever proxies the router evicted. // for(ObjectProxySeq::iterator q = evictedProxies.begin(); q != evictedProxies.end(); ++q) { _identities.erase((*q)->ice_getIdentity()); } } } #ifndef ICEE_PURE_CLIENT void IceInternal::RouterInfo::setAdapter(const ObjectAdapterPtr& adapter) { IceUtil::Mutex::Lock sync(*this); _adapter = adapter; } ObjectAdapterPtr IceInternal::RouterInfo::getAdapter() const { IceUtil::Mutex::Lock sync(*this); return _adapter; } #endif #endif IceE-1.2.0/src/IceE/Connector.h0000755000076400007640000000212310614125577015743 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_CONNECTOR_H #define ICEE_CONNECTOR_H #include #include #include #include #include #include #ifdef _WIN32 # include #else # include // For struct sockaddr_in #endif namespace IceInternal { class Endpoint; class Connector : public ::IceUtil::Shared { public: TransceiverPtr connect(int); std::string toString() const; private: Connector(const InstancePtr&, const std::string&, int); virtual ~Connector(); friend class TcpEndpoint; InstancePtr _instance; TraceLevelsPtr _traceLevels; ::Ice::LoggerPtr _logger; struct sockaddr_in _addr; }; } #endif IceE-1.2.0/src/IceE/ConnectorF.h0000644000076400007640000000110410614125577016044 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_CONNECTOR_F_H #define ICEE_CONNECTOR_F_H #include #include namespace IceInternal { class Connector; IceUtil::Shared* upCast(Connector*); typedef Handle ConnectorPtr; } #endif IceE-1.2.0/src/IceE/OutgoingConnectionFactory.h0000755000076400007640000000302010616127727021152 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_OUTGOING_CONNECTION_FACTORY_H #define ICEE_OUTGOING_CONNECTION_FACTORY_H #include #include #include #include #include #ifdef ICEE_HAS_ROUTER # include #endif #include #include #include #include namespace IceInternal { class OutgoingConnectionFactory : public IceUtil::Shared, public IceUtil::Monitor { public: void destroy(); void waitUntilFinished(); Ice::ConnectionPtr create(const std::vector&); #ifdef ICEE_HAS_ROUTER void setRouterInfo(const RouterInfoPtr&); #endif void removeAdapter(const ::Ice::ObjectAdapterPtr&); #ifdef ICEE_HAS_BATCH void flushBatchRequests(); #endif private: OutgoingConnectionFactory(const InstancePtr&); virtual ~OutgoingConnectionFactory(); friend class Instance; const InstancePtr _instance; bool _destroyed; std::multimap _connections; std::set _pending; // Endpoints for which connection establishment is pending. }; } #endif IceE-1.2.0/src/IceE/Endpoint.h0000644000076400007640000000551210616576164015577 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_ENDPOINT_H #define ICEE_ENDPOINT_H #include #include #include #include #ifndef ICEE_PURE_CLIENT # include #endif #include namespace IceInternal { class BasicStream; class Endpoint : public IceUtil::Shared { public: // // Marshal the endpoint. // virtual void streamWrite(BasicStream*) const = 0; // // Convert the endpoint to its string form. // virtual std::string toString() const = 0; // // Return the endpoint type. // virtual Ice::Short type() const = 0; // // Return the timeout for the endpoint in milliseconds. 0 means // non-blocking, -1 means no timeout. // virtual Ice::Int timeout() const = 0; // // Return a new endpoint with a different timeout value, provided // that timeouts are supported by the endpoint. Otherwise the same // endpoint is returned. // virtual EndpointPtr timeout(Ice::Int) const = 0; // // Return true if the endpoint is datagram-based. // virtual bool datagram() const = 0; // // Return true if the endpoint is secure. // virtual bool secure() const = 0; // // Return true if the endpoint type is unknown. // virtual bool unknown() const = 0; // // Return a connector for this endpoint, or null if no connector // is available. // virtual ConnectorPtr connector() const = 0; // // Return an acceptor for this endpoint, or null if no acceptors // is available. In case an acceptor is created, this operation // also returns a new "effective" endpoint, which might differ // from this endpoint, for example, if a dynamic port number is // assigned. // #ifndef ICEE_PURE_CLIENT virtual AcceptorPtr acceptor(EndpointPtr&) const = 0; #endif // // Expand endpoint out in to separate endpoints for each local // host if endpoint was configured with no host set. // virtual std::vector expand(bool) const = 0; // // Return whether the endpoint should be published in proxies // created by the Object Adapter. // #ifndef ICEE_PURE_CLIENT virtual bool publish() const = 0; #endif // // Compare endpoints for sorting purposes. // virtual bool operator==(const Endpoint&) const = 0; virtual bool operator!=(const Endpoint&) const = 0; virtual bool operator<(const Endpoint&) const = 0; }; } #endif IceE-1.2.0/src/IceE/LocalException.cpp0000755000076400007640000013342410616576164017272 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; Ice::LocalException::LocalException(const char* file, int line) : Exception(file, line) { } Ice::LocalException::~LocalException() throw() { } Ice::AlreadyRegisteredException::AlreadyRegisteredException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::AlreadyRegisteredException::AlreadyRegisteredException(const char* __file, int __line, const ::std::string& __kindOfObject, const ::std::string& __id) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif kindOfObject(__kindOfObject), id(__id) { } Ice::AlreadyRegisteredException::~AlreadyRegisteredException() throw() { } static const char* __Ice__AlreadyRegisteredException_name = "Ice::AlreadyRegisteredException"; ::std::string Ice::AlreadyRegisteredException::ice_name() const { return __Ice__AlreadyRegisteredException_name; } ::Ice::Exception* Ice::AlreadyRegisteredException::ice_clone() const { return new AlreadyRegisteredException(*this); } void Ice::AlreadyRegisteredException::ice_throw() const { throw *this; } Ice::NotRegisteredException::NotRegisteredException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::NotRegisteredException::NotRegisteredException(const char* __file, int __line, const ::std::string& __kindOfObject, const ::std::string& __id) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif kindOfObject(__kindOfObject), id(__id) { } Ice::NotRegisteredException::~NotRegisteredException() throw() { } static const char* __Ice__NotRegisteredException_name = "Ice::NotRegisteredException"; ::std::string Ice::NotRegisteredException::ice_name() const { return __Ice__NotRegisteredException_name; } ::Ice::Exception* Ice::NotRegisteredException::ice_clone() const { return new NotRegisteredException(*this); } void Ice::NotRegisteredException::ice_throw() const { throw *this; } Ice::TwowayOnlyException::TwowayOnlyException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::TwowayOnlyException::TwowayOnlyException(const char* __file, int __line, const ::std::string& __operation) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif operation(__operation) { } Ice::TwowayOnlyException::~TwowayOnlyException() throw() { } static const char* __Ice__TwowayOnlyException_name = "Ice::TwowayOnlyException"; ::std::string Ice::TwowayOnlyException::ice_name() const { return __Ice__TwowayOnlyException_name; } ::Ice::Exception* Ice::TwowayOnlyException::ice_clone() const { return new TwowayOnlyException(*this); } void Ice::TwowayOnlyException::ice_throw() const { throw *this; } Ice::CloneNotImplementedException::CloneNotImplementedException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::CloneNotImplementedException::~CloneNotImplementedException() throw() { } static const char* __Ice__CloneNotImplementedException_name = "Ice::CloneNotImplementedException"; ::std::string Ice::CloneNotImplementedException::ice_name() const { return __Ice__CloneNotImplementedException_name; } ::Ice::Exception* Ice::CloneNotImplementedException::ice_clone() const { return new CloneNotImplementedException(*this); } void Ice::CloneNotImplementedException::ice_throw() const { throw *this; } Ice::UnknownException::UnknownException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::UnknownException::UnknownException(const char* __file, int __line, const ::std::string& __unknown) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif unknown(__unknown) { } Ice::UnknownException::~UnknownException() throw() { } static const char* __Ice__UnknownException_name = "Ice::UnknownException"; ::std::string Ice::UnknownException::ice_name() const { return __Ice__UnknownException_name; } ::Ice::Exception* Ice::UnknownException::ice_clone() const { return new UnknownException(*this); } void Ice::UnknownException::ice_throw() const { throw *this; } Ice::UnknownLocalException::UnknownLocalException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug UnknownException(__file, __line) #else ::Ice::UnknownException(__file, __line) #endif { } Ice::UnknownLocalException::UnknownLocalException(const char* __file, int __line, const ::std::string& __unknown) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug UnknownException(__file, __line, __unknown) #else ::Ice::UnknownException(__file, __line, __unknown) #endif { } Ice::UnknownLocalException::~UnknownLocalException() throw() { } static const char* __Ice__UnknownLocalException_name = "Ice::UnknownLocalException"; ::std::string Ice::UnknownLocalException::ice_name() const { return __Ice__UnknownLocalException_name; } ::Ice::Exception* Ice::UnknownLocalException::ice_clone() const { return new UnknownLocalException(*this); } void Ice::UnknownLocalException::ice_throw() const { throw *this; } Ice::UnknownUserException::UnknownUserException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug UnknownException(__file, __line) #else ::Ice::UnknownException(__file, __line) #endif { } Ice::UnknownUserException::UnknownUserException(const char* __file, int __line, const ::std::string& __unknown) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug UnknownException(__file, __line, __unknown) #else ::Ice::UnknownException(__file, __line, __unknown) #endif { } Ice::UnknownUserException::~UnknownUserException() throw() { } static const char* __Ice__UnknownUserException_name = "Ice::UnknownUserException"; ::std::string Ice::UnknownUserException::ice_name() const { return __Ice__UnknownUserException_name; } ::Ice::Exception* Ice::UnknownUserException::ice_clone() const { return new UnknownUserException(*this); } void Ice::UnknownUserException::ice_throw() const { throw *this; } Ice::VersionMismatchException::VersionMismatchException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::VersionMismatchException::~VersionMismatchException() throw() { } static const char* __Ice__VersionMismatchException_name = "Ice::VersionMismatchException"; ::std::string Ice::VersionMismatchException::ice_name() const { return __Ice__VersionMismatchException_name; } ::Ice::Exception* Ice::VersionMismatchException::ice_clone() const { return new VersionMismatchException(*this); } void Ice::VersionMismatchException::ice_throw() const { throw *this; } Ice::CommunicatorDestroyedException::CommunicatorDestroyedException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::CommunicatorDestroyedException::~CommunicatorDestroyedException() throw() { } static const char* __Ice__CommunicatorDestroyedException_name = "Ice::CommunicatorDestroyedException"; ::std::string Ice::CommunicatorDestroyedException::ice_name() const { return __Ice__CommunicatorDestroyedException_name; } ::Ice::Exception* Ice::CommunicatorDestroyedException::ice_clone() const { return new CommunicatorDestroyedException(*this); } void Ice::CommunicatorDestroyedException::ice_throw() const { throw *this; } #ifndef ICEE_PURE_CLIENT Ice::ObjectAdapterDeactivatedException::ObjectAdapterDeactivatedException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::ObjectAdapterDeactivatedException::ObjectAdapterDeactivatedException(const char* __file, int __line, const ::std::string& __name) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif name(__name) { } Ice::ObjectAdapterDeactivatedException::~ObjectAdapterDeactivatedException() throw() { } static const char* __Ice__ObjectAdapterDeactivatedException_name = "Ice::ObjectAdapterDeactivatedException"; ::std::string Ice::ObjectAdapterDeactivatedException::ice_name() const { return __Ice__ObjectAdapterDeactivatedException_name; } ::Ice::Exception* Ice::ObjectAdapterDeactivatedException::ice_clone() const { return new ObjectAdapterDeactivatedException(*this); } void Ice::ObjectAdapterDeactivatedException::ice_throw() const { throw *this; } string Ice::ObjectAdapterDeactivatedException::toString() const { string out = Exception::toString(); out += ":\nobject adapter `"; out += name; out += "' deactivated"; return out; } Ice::ObjectAdapterIdInUseException::ObjectAdapterIdInUseException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::ObjectAdapterIdInUseException::ObjectAdapterIdInUseException(const char* __file, int __line, const ::std::string& __id) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif id(__id) { } Ice::ObjectAdapterIdInUseException::~ObjectAdapterIdInUseException() throw() { } static const char* __Ice__ObjectAdapterIdInUseException_name = "Ice::ObjectAdapterIdInUseException"; ::std::string Ice::ObjectAdapterIdInUseException::ice_name() const { return __Ice__ObjectAdapterIdInUseException_name; } ::Ice::Exception* Ice::ObjectAdapterIdInUseException::ice_clone() const { return new ObjectAdapterIdInUseException(*this); } void Ice::ObjectAdapterIdInUseException::ice_throw() const { throw *this; } string Ice::ObjectAdapterIdInUseException::toString() const { #ifdef ICEE_HAS_LOCATOR string out = Exception::toString(); out += ":\nobject adapter with id `"; out += id; out += "' is already in use"; return out; #else return string(""); #endif } #endif // ICEE_PURE_CLIENT Ice::NoEndpointException::NoEndpointException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::NoEndpointException::NoEndpointException(const char* __file, int __line, const ::std::string& __proxy) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif proxy(__proxy) { } Ice::NoEndpointException::~NoEndpointException() throw() { } static const char* __Ice__NoEndpointException_name = "Ice::NoEndpointException"; ::std::string Ice::NoEndpointException::ice_name() const { return __Ice__NoEndpointException_name; } ::Ice::Exception* Ice::NoEndpointException::ice_clone() const { return new NoEndpointException(*this); } void Ice::NoEndpointException::ice_throw() const { throw *this; } Ice::EndpointParseException::EndpointParseException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::EndpointParseException::EndpointParseException(const char* __file, int __line, const ::std::string& __str) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif str(__str) { } Ice::EndpointParseException::~EndpointParseException() throw() { } static const char* __Ice__EndpointParseException_name = "Ice::EndpointParseException"; ::std::string Ice::EndpointParseException::ice_name() const { return __Ice__EndpointParseException_name; } ::Ice::Exception* Ice::EndpointParseException::ice_clone() const { return new EndpointParseException(*this); } void Ice::EndpointParseException::ice_throw() const { throw *this; } Ice::IdentityParseException::IdentityParseException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::IdentityParseException::IdentityParseException(const char* __file, int __line, const ::std::string& __str) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif str(__str) { } Ice::IdentityParseException::~IdentityParseException() throw() { } static const char* __Ice__IdentityParseException_name = "Ice::IdentityParseException"; ::std::string Ice::IdentityParseException::ice_name() const { return __Ice__IdentityParseException_name; } ::Ice::Exception* Ice::IdentityParseException::ice_clone() const { return new IdentityParseException(*this); } void Ice::IdentityParseException::ice_throw() const { throw *this; } Ice::ProxyParseException::ProxyParseException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::ProxyParseException::ProxyParseException(const char* __file, int __line, const ::std::string& __str) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif str(__str) { } Ice::ProxyParseException::~ProxyParseException() throw() { } static const char* __Ice__ProxyParseException_name = "Ice::ProxyParseException"; ::std::string Ice::ProxyParseException::ice_name() const { return __Ice__ProxyParseException_name; } ::Ice::Exception* Ice::ProxyParseException::ice_clone() const { return new ProxyParseException(*this); } void Ice::ProxyParseException::ice_throw() const { throw *this; } Ice::IllegalIdentityException::IllegalIdentityException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::IllegalIdentityException::IllegalIdentityException(const char* __file, int __line, const ::Ice::Identity& __id) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif id(__id) { } Ice::IllegalIdentityException::~IllegalIdentityException() throw() { } static const char* __Ice__IllegalIdentityException_name = "Ice::IllegalIdentityException"; ::std::string Ice::IllegalIdentityException::ice_name() const { return __Ice__IllegalIdentityException_name; } ::Ice::Exception* Ice::IllegalIdentityException::ice_clone() const { return new IllegalIdentityException(*this); } void Ice::IllegalIdentityException::ice_throw() const { throw *this; } Ice::RequestFailedException::RequestFailedException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::RequestFailedException::RequestFailedException(const char* __file, int __line, const ::Ice::Identity& __id, const ::std::string& __facet, const ::std::string& __operation) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif id(__id), facet(__facet), operation(__operation) { } Ice::RequestFailedException::~RequestFailedException() throw() { } static const char* __Ice__RequestFailedException_name = "Ice::RequestFailedException"; ::std::string Ice::RequestFailedException::ice_name() const { return __Ice__RequestFailedException_name; } ::Ice::Exception* Ice::RequestFailedException::ice_clone() const { return new RequestFailedException(*this); } void Ice::RequestFailedException::ice_throw() const { throw *this; } Ice::ObjectNotExistException::ObjectNotExistException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug RequestFailedException(__file, __line) #else ::Ice::RequestFailedException(__file, __line) #endif { } Ice::ObjectNotExistException::ObjectNotExistException(const char* __file, int __line, const ::Ice::Identity& __id, const ::std::string& __facet, const ::std::string& __operation) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug RequestFailedException(__file, __line, __id, __facet, __operation) #else ::Ice::RequestFailedException(__file, __line, __id, __facet, __operation) #endif { } Ice::ObjectNotExistException::~ObjectNotExistException() throw() { } static const char* __Ice__ObjectNotExistException_name = "Ice::ObjectNotExistException"; ::std::string Ice::ObjectNotExistException::ice_name() const { return __Ice__ObjectNotExistException_name; } ::Ice::Exception* Ice::ObjectNotExistException::ice_clone() const { return new ObjectNotExistException(*this); } void Ice::ObjectNotExistException::ice_throw() const { throw *this; } Ice::FacetNotExistException::FacetNotExistException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug RequestFailedException(__file, __line) #else ::Ice::RequestFailedException(__file, __line) #endif { } Ice::FacetNotExistException::FacetNotExistException(const char* __file, int __line, const ::Ice::Identity& __id, const ::std::string& __facet, const ::std::string& __operation) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug RequestFailedException(__file, __line, __id, __facet, __operation) #else ::Ice::RequestFailedException(__file, __line, __id, __facet, __operation) #endif { } Ice::FacetNotExistException::~FacetNotExistException() throw() { } static const char* __Ice__FacetNotExistException_name = "Ice::FacetNotExistException"; ::std::string Ice::FacetNotExistException::ice_name() const { return __Ice__FacetNotExistException_name; } ::Ice::Exception* Ice::FacetNotExistException::ice_clone() const { return new FacetNotExistException(*this); } void Ice::FacetNotExistException::ice_throw() const { throw *this; } Ice::OperationNotExistException::OperationNotExistException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug RequestFailedException(__file, __line) #else ::Ice::RequestFailedException(__file, __line) #endif { } Ice::OperationNotExistException::OperationNotExistException(const char* __file, int __line, const ::Ice::Identity& __id, const ::std::string& __facet, const ::std::string& __operation) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug RequestFailedException(__file, __line, __id, __facet, __operation) #else ::Ice::RequestFailedException(__file, __line, __id, __facet, __operation) #endif { } Ice::OperationNotExistException::~OperationNotExistException() throw() { } static const char* __Ice__OperationNotExistException_name = "Ice::OperationNotExistException"; ::std::string Ice::OperationNotExistException::ice_name() const { return __Ice__OperationNotExistException_name; } ::Ice::Exception* Ice::OperationNotExistException::ice_clone() const { return new OperationNotExistException(*this); } void Ice::OperationNotExistException::ice_throw() const { throw *this; } Ice::SyscallException::SyscallException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::SyscallException::SyscallException(const char* __file, int __line, ::Ice::Int __error) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif error(__error) { } Ice::SyscallException::~SyscallException() throw() { } static const char* __Ice__SyscallException_name = "Ice::SyscallException"; ::std::string Ice::SyscallException::ice_name() const { return __Ice__SyscallException_name; } ::Ice::Exception* Ice::SyscallException::ice_clone() const { return new SyscallException(*this); } void Ice::SyscallException::ice_throw() const { throw *this; } Ice::SocketException::SocketException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SyscallException(__file, __line) #else ::Ice::SyscallException(__file, __line) #endif { } Ice::SocketException::SocketException(const char* __file, int __line, ::Ice::Int __error) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SyscallException(__file, __line, __error) #else ::Ice::SyscallException(__file, __line, __error) #endif { } Ice::SocketException::~SocketException() throw() { } static const char* __Ice__SocketException_name = "Ice::SocketException"; ::std::string Ice::SocketException::ice_name() const { return __Ice__SocketException_name; } ::Ice::Exception* Ice::SocketException::ice_clone() const { return new SocketException(*this); } void Ice::SocketException::ice_throw() const { throw *this; } Ice::FileException::FileException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SyscallException(__file, __line) #else ::Ice::SyscallException(__file, __line) #endif { } Ice::FileException::FileException(const char* __file, int __line, ::Ice::Int __error, const ::std::string& __path) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SyscallException(__file, __line, __error), #else ::Ice::SyscallException(__file, __line, __error), #endif path(__path) { } Ice::FileException::~FileException() throw() { } static const char* __Ice__FileException_name = "Ice::FileException"; ::std::string Ice::FileException::ice_name() const { return __Ice__FileException_name; } ::Ice::Exception* Ice::FileException::ice_clone() const { return new FileException(*this); } void Ice::FileException::ice_throw() const { throw *this; } Ice::ConnectFailedException::ConnectFailedException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SocketException(__file, __line) #else ::Ice::SocketException(__file, __line) #endif { } Ice::ConnectFailedException::ConnectFailedException(const char* __file, int __line, ::Ice::Int __error) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SocketException(__file, __line, __error) #else ::Ice::SocketException(__file, __line, __error) #endif { } Ice::ConnectFailedException::~ConnectFailedException() throw() { } static const char* __Ice__ConnectFailedException_name = "Ice::ConnectFailedException"; ::std::string Ice::ConnectFailedException::ice_name() const { return __Ice__ConnectFailedException_name; } ::Ice::Exception* Ice::ConnectFailedException::ice_clone() const { return new ConnectFailedException(*this); } void Ice::ConnectFailedException::ice_throw() const { throw *this; } Ice::ConnectionRefusedException::ConnectionRefusedException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug ConnectFailedException(__file, __line) #else ::Ice::ConnectFailedException(__file, __line) #endif { } Ice::ConnectionRefusedException::ConnectionRefusedException(const char* __file, int __line, ::Ice::Int __error) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug ConnectFailedException(__file, __line, __error) #else ::Ice::ConnectFailedException(__file, __line, __error) #endif { } Ice::ConnectionRefusedException::~ConnectionRefusedException() throw() { } static const char* __Ice__ConnectionRefusedException_name = "Ice::ConnectionRefusedException"; ::std::string Ice::ConnectionRefusedException::ice_name() const { return __Ice__ConnectionRefusedException_name; } ::Ice::Exception* Ice::ConnectionRefusedException::ice_clone() const { return new ConnectionRefusedException(*this); } void Ice::ConnectionRefusedException::ice_throw() const { throw *this; } Ice::ConnectionLostException::ConnectionLostException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SocketException(__file, __line) #else ::Ice::SocketException(__file, __line) #endif { } Ice::ConnectionLostException::ConnectionLostException(const char* __file, int __line, ::Ice::Int __error) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug SocketException(__file, __line, __error) #else ::Ice::SocketException(__file, __line, __error) #endif { } Ice::ConnectionLostException::~ConnectionLostException() throw() { } static const char* __Ice__ConnectionLostException_name = "Ice::ConnectionLostException"; ::std::string Ice::ConnectionLostException::ice_name() const { return __Ice__ConnectionLostException_name; } ::Ice::Exception* Ice::ConnectionLostException::ice_clone() const { return new ConnectionLostException(*this); } void Ice::ConnectionLostException::ice_throw() const { throw *this; } Ice::DNSException::DNSException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::DNSException::DNSException(const char* __file, int __line, ::Ice::Int __error, const ::std::string& __host) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif error(__error), host(__host) { } Ice::DNSException::~DNSException() throw() { } static const char* __Ice__DNSException_name = "Ice::DNSException"; ::std::string Ice::DNSException::ice_name() const { return __Ice__DNSException_name; } ::Ice::Exception* Ice::DNSException::ice_clone() const { return new DNSException(*this); } void Ice::DNSException::ice_throw() const { throw *this; } Ice::TimeoutException::TimeoutException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::TimeoutException::~TimeoutException() throw() { } static const char* __Ice__TimeoutException_name = "Ice::TimeoutException"; ::std::string Ice::TimeoutException::ice_name() const { return __Ice__TimeoutException_name; } ::Ice::Exception* Ice::TimeoutException::ice_clone() const { return new TimeoutException(*this); } void Ice::TimeoutException::ice_throw() const { throw *this; } Ice::ConnectTimeoutException::ConnectTimeoutException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug TimeoutException(__file, __line) #else ::Ice::TimeoutException(__file, __line) #endif { } Ice::ConnectTimeoutException::~ConnectTimeoutException() throw() { } static const char* __Ice__ConnectTimeoutException_name = "Ice::ConnectTimeoutException"; ::std::string Ice::ConnectTimeoutException::ice_name() const { return __Ice__ConnectTimeoutException_name; } ::Ice::Exception* Ice::ConnectTimeoutException::ice_clone() const { return new ConnectTimeoutException(*this); } void Ice::ConnectTimeoutException::ice_throw() const { throw *this; } Ice::CloseTimeoutException::CloseTimeoutException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug TimeoutException(__file, __line) #else ::Ice::TimeoutException(__file, __line) #endif { } Ice::CloseTimeoutException::~CloseTimeoutException() throw() { } static const char* __Ice__CloseTimeoutException_name = "Ice::CloseTimeoutException"; ::std::string Ice::CloseTimeoutException::ice_name() const { return __Ice__CloseTimeoutException_name; } ::Ice::Exception* Ice::CloseTimeoutException::ice_clone() const { return new CloseTimeoutException(*this); } void Ice::CloseTimeoutException::ice_throw() const { throw *this; } Ice::ProtocolException::ProtocolException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::ProtocolException::ProtocolException(const char* __file, int __line, const ::std::string& __reason) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif reason(__reason) { } Ice::ProtocolException::~ProtocolException() throw() { } static const char* __Ice__ProtocolException_name = "Ice::ProtocolException"; ::std::string Ice::ProtocolException::ice_name() const { return __Ice__ProtocolException_name; } ::Ice::Exception* Ice::ProtocolException::ice_clone() const { return new ProtocolException(*this); } void Ice::ProtocolException::ice_throw() const { throw *this; } Ice::CloseConnectionException::CloseConnectionException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug ProtocolException(__file, __line) #else ::Ice::ProtocolException(__file, __line) #endif { } Ice::CloseConnectionException::~CloseConnectionException() throw() { } static const char* __Ice__CloseConnectionException_name = "Ice::CloseConnectionException"; ::std::string Ice::CloseConnectionException::ice_name() const { return __Ice__CloseConnectionException_name; } ::Ice::Exception* Ice::CloseConnectionException::ice_clone() const { return new CloseConnectionException(*this); } void Ice::CloseConnectionException::ice_throw() const { throw *this; } Ice::ForcedCloseConnectionException::ForcedCloseConnectionException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug ProtocolException(__file, __line) #else ::Ice::ProtocolException(__file, __line) #endif { } Ice::ForcedCloseConnectionException::~ForcedCloseConnectionException() throw() { } static const char* __Ice__ForcedCloseConnectionException_name = "Ice::ForcedCloseConnectionException"; ::std::string Ice::ForcedCloseConnectionException::ice_name() const { return __Ice__ForcedCloseConnectionException_name; } ::Ice::Exception* Ice::ForcedCloseConnectionException::ice_clone() const { return new ForcedCloseConnectionException(*this); } void Ice::ForcedCloseConnectionException::ice_throw() const { throw *this; } void Ice::throwBadMagicException(const char* file, int line, const ::Ice::ByteSeq& badMagic) { string out = "unknown magic number: "; out += Ice::printfToString("0x%2X, 0x%2X, 0x%2X, 0x%2X", badMagic[0], badMagic[1], badMagic[2], badMagic[3]); throw ProtocolException(__FILE__, __LINE__, out); } void Ice::throwUnsupportedProtocolException(const char* file, int line, Int badMajor, Int badMinor, Int major, Int minor) { string out = "unsupported protocol version: "; out += Ice::printfToString("%d.%d", badMajor, badMinor); out += "\n(can only support protocols compatible with version "; out += Ice::printfToString("%d.%d", major, minor) + ")"; throw ProtocolException(__FILE__, __LINE__, out); } void Ice::throwUnsupportedEncodingException(const char* file, int line, Int badMajor, Int badMinor, Int major, Int minor) { string out = "unsupported encoding version: "; out += Ice::printfToString("%d.%d", badMajor, badMinor); out += "\n(can only support protocols compatible with version "; out += Ice::printfToString("%d.%d", major, minor) + ")"; throw ProtocolException(__FILE__, __LINE__, out); } Ice::MarshalException::MarshalException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug ProtocolException(__file, __line) #else ::Ice::ProtocolException(__file, __line) #endif { } Ice::MarshalException::MarshalException(const char* __file, int __line, const ::std::string& __reason) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug ProtocolException(__file, __line, __reason) #else ::Ice::ProtocolException(__file, __line, __reason) #endif { } Ice::MarshalException::~MarshalException() throw() { } static const char* __Ice__MarshalException_name = "Ice::MarshalException"; ::std::string Ice::MarshalException::ice_name() const { return __Ice__MarshalException_name; } ::Ice::Exception* Ice::MarshalException::ice_clone() const { return new MarshalException(*this); } void Ice::MarshalException::ice_throw() const { throw *this; } Ice::MemoryLimitException::MemoryLimitException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug MarshalException(__file, __line) #else ::Ice::MarshalException(__file, __line) #endif { } Ice::MemoryLimitException::MemoryLimitException(const char* __file, int __line, const ::std::string& __reason) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug MarshalException(__file, __line, __reason) #else ::Ice::MarshalException(__file, __line, __reason) #endif { } Ice::MemoryLimitException::~MemoryLimitException() throw() { } static const char* __Ice__MemoryLimitException_name = "Ice::MemoryLimitException"; ::std::string Ice::MemoryLimitException::ice_name() const { return __Ice__MemoryLimitException_name; } ::Ice::Exception* Ice::MemoryLimitException::ice_clone() const { return new MemoryLimitException(*this); } void Ice::MemoryLimitException::ice_throw() const { throw *this; } void Ice::throwMemoryLimitException(const char* file, int line) { throw MemoryLimitException(file, line); } void Ice::throwUnmarshalOutOfBoundsException(const char* file, int line) { throw MarshalException(file, line, "out of bounds during unmarshaling"); } void Ice::throwNegativeSizeException(const char* file, int line) { throw MarshalException(file, line, "negative size for sequence, dictionary, etc."); } Ice::FeatureNotSupportedException::FeatureNotSupportedException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::FeatureNotSupportedException::FeatureNotSupportedException(const char* __file, int __line, const string& __unsupportedFeature) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line), #else ::Ice::LocalException(__file, __line), #endif unsupportedFeature(__unsupportedFeature) { } Ice::FeatureNotSupportedException::~FeatureNotSupportedException() throw() { } static const char* __Ice__FeatureNotSupportedException_name = "Ice::FeatureNotSupportedException"; ::std::string Ice::FeatureNotSupportedException::ice_name() const { return __Ice__FeatureNotSupportedException_name; } ::Ice::Exception* Ice::FeatureNotSupportedException::ice_clone() const { return new FeatureNotSupportedException(*this); } void Ice::FeatureNotSupportedException::ice_throw() const { throw *this; } Ice::FixedProxyException::FixedProxyException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug LocalException(__file, __line) #else ::Ice::LocalException(__file, __line) #endif { } Ice::FixedProxyException::~FixedProxyException() throw() { } static const char* __Ice__FixedProxyException_name = "Ice::FixedProxyException"; ::std::string Ice::FixedProxyException::ice_name() const { return __Ice__FixedProxyException_name; } ::Ice::Exception* Ice::FixedProxyException::ice_clone() const { return new FixedProxyException(*this); } void Ice::FixedProxyException::ice_throw() const { throw *this; } #ifdef ICEE_HAS_WSTRING Ice::StringConversionException::StringConversionException(const char* __file, int __line) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug MarshalException(__file, __line) #else ::Ice::MarshalException(__file, __line) #endif { } Ice::StringConversionException::StringConversionException(const char* __file, int __line, const ::std::string& __reason) : #if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug MarshalException(__file, __line, __reason) #else ::Ice::MarshalException(__file, __line, __reason) #endif { } Ice::StringConversionException::~StringConversionException() throw() { } static const char* __Ice__StringConversionException_name = "Ice::StringConversionException"; ::std::string Ice::StringConversionException::ice_name() const { return __Ice__StringConversionException_name; } ::Ice::Exception* Ice::StringConversionException::ice_clone() const { return new StringConversionException(*this); } void Ice::StringConversionException::ice_throw() const { throw *this; } #endif string Ice::UnknownException::toString() const { string out = Exception::toString(); out += ":\nunknown exception"; if(!unknown.empty()) { out += ":\n"; out += unknown; } return out; } string Ice::UnknownLocalException::toString() const { string out = Exception::toString(); out += ":\nunknown local exception"; if(!unknown.empty()) { out += ":\n"; out += unknown; } return out; } string Ice::UnknownUserException::toString() const { string out = Exception::toString(); out += ":\nunknown user exception"; if(!unknown.empty()) { out += ":\n"; out += unknown; } return out; } string Ice::VersionMismatchException::toString() const { string out = Exception::toString(); out += ":\nIce library version mismatch"; return out; } string Ice::CommunicatorDestroyedException::toString() const { string out = Exception::toString(); out += ":\ncommunicator object destroyed"; return out; } #ifdef never #endif string Ice::NoEndpointException::toString() const { string out = Exception::toString(); out += ":\nno suitable endpoint available for proxy `"; out += proxy; out += "'"; return out; } string Ice::EndpointParseException::toString() const { string out = Exception::toString(); out += ":\nerror while parsing endpoint `"; out += str; out += "'"; return out; } string Ice::IdentityParseException::toString() const { string out = Exception::toString(); out += ":\nerror while parsing identity `"; out += str; out += "'"; return out; } string Ice::ProxyParseException::toString() const { string out = Exception::toString(); out += ":\nerror while parsing proxy `"; out += str; out += "'"; return out; } string Ice::IllegalIdentityException::toString() const { string out = Exception::toString(); out += ":\nillegal identity: `"; if(id.category.empty()) { out += IceUtil::escapeString(id.name, "/"); } else { out += IceUtil::escapeString(id.category, "/") + '/' + IceUtil::escapeString(id.name, "/"); } out += "'"; return out; } static void printFailedRequestData(string& out, const RequestFailedException& ex) { out += "\nidentity: "; if(ex.id.category.empty()) { out += IceUtil::escapeString(ex.id.name, "/"); } else { out += IceUtil::escapeString(ex.id.category, "/") + '/' + IceUtil::escapeString(ex.id.name, "/"); } out += "\nfacet: "; out += ex.facet; out += "\noperation: "; out += ex.operation; } string Ice::RequestFailedException::toString() const { string out = Exception::toString(); out += ":\nrequest failed"; printFailedRequestData(out, *this); return out; } string Ice::ObjectNotExistException::toString() const { string out = Exception::toString(); out += ":\nobject does not exist"; printFailedRequestData(out, *this); return out; } string Ice::FacetNotExistException::toString() const { string out = Exception::toString(); out += ":\nfacet does not exist"; printFailedRequestData(out, *this); return out; } string Ice::OperationNotExistException::toString() const { string out = Exception::toString(); out += ":\noperation does not exist"; printFailedRequestData(out, *this); return out; } string Ice::SyscallException::toString() const { string out = Exception::toString(); if(error != 0) { out += ":\nsyscall exception: "; out += errorToString(error); } return out; } string Ice::SocketException::toString() const { string out = Exception::toString(); out += ":\nsocket exception: "; out += errorToString(error); return out; } string Ice::FileException::toString() const { string out = Exception::toString(); out += ":\nfile exception: "; out += errorToString(error); if(!path.empty()) { out += "\npath: "; out += path; } return out; } string Ice::ConnectFailedException::toString() const { string out = Exception::toString(); out += ":\nconnect failed: "; out += errorToString(error); return out; } string Ice::ConnectionRefusedException::toString() const { string out = Exception::toString(); out += ":\nconnection refused: "; out += errorToString(error); return out; } string Ice::ConnectionLostException::toString() const { string out = Exception::toString(); out += ":\nconnection lost: "; if(error == 0) { out += "recv() returned zero"; } else { out += errorToString(error); } return out; } string Ice::DNSException::toString() const { string out = Exception::toString(); out += ":\nDNS error: "; out += errorToStringDNS(error); out += "\nhost: "; out += host; return out; } string Ice::TimeoutException::toString() const { string out = Exception::toString(); out += ":\ntimeout while sending or receiving data"; return out; } string Ice::ConnectTimeoutException::toString() const { string out = Exception::toString(); out += ":\ntimeout while establishing a connection"; return out; } string Ice::CloseTimeoutException::toString() const { string out = Exception::toString(); out += ":\ntimeout while closing a connection"; return out; } string Ice::ProtocolException::toString() const { string out = Exception::toString(); out += ":\nprotocol error: "; if(!reason.empty()) { out += reason; } else { out += "unknown protocol exception"; } return out; } string Ice::CloseConnectionException::toString() const { string out = Exception::toString(); out += ":\nprotocol error: connection closed"; return out; } string Ice::ForcedCloseConnectionException::toString() const { string out = Exception::toString(); out += ":\nprotocol error: connection forcefully closed"; return out; } string Ice::FeatureNotSupportedException::toString() const { string out = Exception::toString(); out += ":\nfeature not supported"; if(!unsupportedFeature.empty()) { out += ": "; out += unsupportedFeature; } return out; } string Ice::MarshalException::toString() const { string out = Exception::toString(); out += ":\nprotocol error: error during marshaling or unmarshaling"; if(!reason.empty()) { out += ":\n"; out += reason; } return out; } string Ice::MemoryLimitException::toString() const { string out = Exception::toString(); out += ":\nprotocol error: memory limit exceeded"; return out; } string Ice::AlreadyRegisteredException::toString() const { string out = Exception::toString(); out += ":\n"; out += kindOfObject; out += " with id `"; out += id; out += "' is already registered"; return out; } string Ice::NotRegisteredException::toString() const { string out = Exception::toString(); out += ":\n no "; out += kindOfObject; out += " with id `"; out += id; out += "' is registered"; return out; } string Ice::TwowayOnlyException::toString() const { string out = Exception::toString(); out += ":\n operation `"; out += operation; out += "' can only be invoked as a twoway request"; return out; } string Ice::CloneNotImplementedException::toString() const { string out = Exception::toString(); out += ":\n ice_clone() must be implemented in classes derived from abstract base classes"; return out; } string Ice::FixedProxyException::toString() const { string out = Exception::toString(); out += ":\nfixed proxy exception"; return out; } #ifdef ICEE_HAS_WSTRING string Ice::StringConversionException::toString() const { string out = Exception::toString(); out += ":\nprotocol error: string conversion failed"; return out; } #endif IceE-1.2.0/src/IceE/Current.cpp0000755000076400007640000000355010576536574016005 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include bool Ice::Current::operator==(const Current& __rhs) const { return !operator!=(__rhs); } bool Ice::Current::operator!=(const Current& __rhs) const { if(this == &__rhs) { return false; } if(adapter != __rhs.adapter) { return true; } if(con != __rhs.con) { return true; } if(id != __rhs.id) { return true; } if(facet != __rhs.facet) { return true; } if(operation != __rhs.operation) { return true; } if(mode != __rhs.mode) { return true; } if(ctx != __rhs.ctx) { return true; } return false; } bool Ice::Current::operator<(const Current& __rhs) const { if(this == &__rhs) { return false; } if(adapter < __rhs.adapter) { return true; } else if(__rhs.adapter < adapter) { return false; } if(con < __rhs.con) { return true; } else if(__rhs.con < con) { return false; } if(id < __rhs.id) { return true; } else if(__rhs.id < id) { return false; } if(facet < __rhs.facet) { return true; } else if(__rhs.facet < facet) { return false; } if(operation < __rhs.operation) { return true; } else if(__rhs.operation < operation) { return false; } if(mode < __rhs.mode) { return true; } else if(__rhs.mode < mode) { return false; } if(ctx < __rhs.ctx) { return true; } else if(__rhs.ctx < ctx) { return false; } return false; } IceE-1.2.0/src/IceE/ReferenceFactory.h0000644000076400007640000000502510616576164017244 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_REFERENCE_FACTORY_H #define ICEE_REFERENCE_FACTORY_H #include #include #include #include #include // For ReferenceMode namespace IceInternal { class ReferenceFactory : public ::IceUtil::Shared, public ::IceUtil::Mutex { public: // // Make a polymorphic copy of a reference. // ReferencePtr copy(const Reference* r) const; // // Create a direct reference. // ReferencePtr create(const ::Ice::Identity&, const Ice::Context&, const ::std::string&, ReferenceMode, bool, const ::std::vector& #ifdef ICEE_HAS_ROUTER , const RouterInfoPtr& #endif ); // // Create an indirect reference. // #ifdef ICEE_HAS_LOCATOR ReferencePtr create(const ::Ice::Identity&, const Ice::Context&, const ::std::string&, ReferenceMode, bool, const ::std::string& #ifdef ICEE_HAS_ROUTER , const RouterInfoPtr& #endif , const LocatorInfoPtr&); #endif // // Create a fixed reference. // ReferencePtr create(const ::Ice::Identity&, const Ice::Context&, const ::std::string&, ReferenceMode, const ::std::vector< ::Ice::ConnectionPtr>&); // // Create a reference from a string. // ReferencePtr create(const ::std::string&); // // Create a reference by unmarshaling it from a stream. // ReferencePtr create(const ::Ice::Identity&, BasicStream*); // // Create a reference from a property set. // ReferencePtr createFromProperties(const ::std::string&); #ifdef ICEE_HAS_ROUTER void setDefaultRouter(const ::Ice::RouterPrx&); ::Ice::RouterPrx getDefaultRouter() const; #endif #ifdef ICEE_HAS_LOCATOR void setDefaultLocator(const ::Ice::LocatorPrx&); ::Ice::LocatorPrx getDefaultLocator() const; #endif private: ReferenceFactory(const InstancePtr&, const Ice::CommunicatorPtr&); void destroy(); friend class Instance; InstancePtr _instance; Ice::CommunicatorPtr _communicator; #ifdef ICEE_HAS_ROUTER ::Ice::RouterPrx _defaultRouter; #endif #ifdef ICEE_HAS_LOCATOR ::Ice::LocatorPrx _defaultLocator; #endif }; } #endif IceE-1.2.0/src/IceE/Object.cpp0000644000076400007640000001073610616161100015540 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #include #include using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(Object* p) { return p; } bool Ice::Object::operator==(const Object& r) const { return this == &r; } bool Ice::Object::operator<(const Object& r) const { return this < &r; } Int Ice::Object::ice_hash() const { return static_cast(reinterpret_cast(this) >> 4); } static const string __Ice__Object_ids[] = { "::Ice::Object" }; bool Ice::Object::ice_isA(const string& s, const Current&) const { return s == __Ice__Object_ids[0]; } void Ice::Object::ice_ping(const Current&) const { // Nothing to do. } vector Ice::Object::ice_ids(const Current&) const { return vector(&__Ice__Object_ids[0], &__Ice__Object_ids[1]); } const string& Ice::Object::ice_id(const Current&) const { return __Ice__Object_ids[0]; } const ::std::string& Ice::Object::ice_staticId() { return __Ice__Object_ids[0]; } ObjectPtr Ice::Object::ice_clone() const { throw new CloneNotImplementedException(__FILE__, __LINE__); } DispatchStatus Ice::Object::___ice_isA(Incoming& __inS, const Current& __current) { BasicStream* __is = __inS.is(); BasicStream* __os = __inS.os(); string __id; __is->read(__id, false); bool __ret = ice_isA(__id, __current); __os->write(__ret); return DispatchOK; } DispatchStatus Ice::Object::___ice_ping(Incoming&, const Current& __current) { ice_ping(__current); return DispatchOK; } DispatchStatus Ice::Object::___ice_ids(Incoming& __inS, const Current& __current) { BasicStream* __os = __inS.os(); vector __ret = ice_ids(__current); __os->write(&__ret[0], &__ret[0] + __ret.size(), false); return DispatchOK; } DispatchStatus Ice::Object::___ice_id(Incoming& __inS, const Current& __current) { BasicStream* __os = __inS.os(); string __ret = ice_id(__current); __os->write(__ret, false); return DispatchOK; } string Ice::Object::__all[] = { "ice_id", "ice_ids", "ice_isA", "ice_ping" }; DispatchStatus Ice::Object::__dispatch(Incoming& in, const Current& current) { pair r = equal_range(__all, __all + sizeof(__all) / sizeof(string), current.operation); if(r.first == r.second) { return DispatchOperationNotExist; } switch(r.first - __all) { case 0: { return ___ice_id(in, current); } case 1: { return ___ice_ids(in, current); } case 2: { return ___ice_isA(in, current); } case 3: { return ___ice_ping(in, current); } } assert(false); return DispatchOperationNotExist; } static const char* operationModeToString(OperationMode mode) { switch(mode) { case Normal: return "::Ice::Normal"; case Nonmutating: return "::Ice::Nonmutating"; case Idempotent: return "::Ice::Idempotent"; } return "???"; } void Ice::Object::__invalidMode(OperationMode expected, OperationMode received) { assert(expected != received); if(expected == Idempotent && received == Nonmutating) { // // Fine: typically an old client still using the deprecated nonmutating keyword // // // Note that expected == Nonmutating and received == Idempotent is not ok: // the server may still use the deprecated nonmutating keyword to detect updates // and the client should not break this (deprecated) feature. // } else { Ice::MarshalException ex(__FILE__, __LINE__); ex.reason = Ice::printfToString("unexpected operation mode. expected = %s received = %s", operationModeToString(expected), operationModeToString(received)); throw ex; } } DispatchStatus Ice::Blobject::__dispatch(Incoming& in, const Current& current) { vector inParams; vector outParams; Int sz = in.is()->getReadEncapsSize(); in.is()->readBlob(inParams, sz); bool ok = ice_invoke(inParams, outParams, current); in.os()->writeBlob(outParams); if(ok) { return DispatchOK; } else { return DispatchUserException; } } IceE-1.2.0/src/IceE/RecMutex.cpp0000644000076400007640000001255310576536574016117 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; #ifdef _WIN32 # if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0400 IceUtil::RecMutex::RecMutex() : _count(0) { InitializeCriticalSection(&_mutex); } IceUtil::RecMutex::~RecMutex() { assert(_count == 0); DeleteCriticalSection(&_mutex); } void IceUtil::RecMutex::lock() const { EnterCriticalSection(&_mutex); if(++_count > 1) { LeaveCriticalSection(&_mutex); } } bool IceUtil::RecMutex::tryLock() const { if(!TryEnterCriticalSection(&_mutex)) { return false; } if(++_count > 1) { LeaveCriticalSection(&_mutex); } return true; } void IceUtil::RecMutex::unlock() const { if(--_count == 0) { LeaveCriticalSection(&_mutex); } } void IceUtil::RecMutex::unlock(LockState& state) const { state.count = _count; _count = 0; LeaveCriticalSection(&_mutex); } void IceUtil::RecMutex::lock(LockState& state) const { EnterCriticalSection(&_mutex); _count = state.count; } # else IceUtil::RecMutex::RecMutex() : _count(0) { _mutex = CreateMutex(0, false, 0); if(_mutex == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } IceUtil::RecMutex::~RecMutex() { assert(_count == 0); BOOL rc = CloseHandle(_mutex); if(rc == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } void IceUtil::RecMutex::lock() const { DWORD rc = WaitForSingleObject(_mutex, INFINITE); if(rc != WAIT_OBJECT_0) { if(rc == WAIT_FAILED) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } else { throw ThreadSyscallException(__FILE__, __LINE__, 0); } } if(++_count > 1) { BOOL rc2 = ReleaseMutex(_mutex); if(rc2 == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } } bool IceUtil::RecMutex::tryLock() const { DWORD rc = WaitForSingleObject(_mutex, 0); if(rc != WAIT_OBJECT_0) { return false; } if(++_count > 1) { BOOL rc2 = ReleaseMutex(_mutex); if(rc2 == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } return true; } void IceUtil::RecMutex::unlock() const { if(--_count == 0) { BOOL rc = ReleaseMutex(_mutex); if(rc == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } } void IceUtil::RecMutex::unlock(LockState& state) const { state.count = _count; _count = 0; BOOL rc = ReleaseMutex(_mutex); if(rc == 0) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } } void IceUtil::RecMutex::lock(LockState& state) const { DWORD rc = WaitForSingleObject(_mutex, INFINITE); if(rc != WAIT_OBJECT_0) { if(rc == WAIT_FAILED) { throw ThreadSyscallException(__FILE__, __LINE__, GetLastError()); } else { throw ThreadSyscallException(__FILE__, __LINE__, 0); } } _count = state.count; } # endif #else IceUtil::RecMutex::RecMutex() : _count(0) { int rc; #if defined(__linux) && !defined(__USE_UNIX98) const pthread_mutexattr_t attr = { PTHREAD_MUTEX_RECURSIVE_NP }; #else pthread_mutexattr_t attr; rc = pthread_mutexattr_init(&attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } #endif rc = pthread_mutex_init(&_mutex, &attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } #if defined(__linux) && !defined(__USE_UNIX98) // Nothing to do #else rc = pthread_mutexattr_destroy(&attr); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } #endif } IceUtil::RecMutex::~RecMutex() { assert(_count == 0); int rc = 0; rc = pthread_mutex_destroy(&_mutex); assert(rc == 0); } void IceUtil::RecMutex::lock() const { int rc = pthread_mutex_lock(&_mutex); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } if(++_count > 1) { rc = pthread_mutex_unlock(&_mutex); assert(rc == 0); } } bool IceUtil::RecMutex::tryLock() const { int rc = pthread_mutex_trylock(&_mutex); bool result = (rc == 0); if(!result) { if(rc != EBUSY) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } else if(++_count > 1) { rc = pthread_mutex_unlock(&_mutex); if(rc != 0) { throw ThreadSyscallException(__FILE__, __LINE__, rc); } } return result; } void IceUtil::RecMutex::unlock() const { if(--_count == 0) { int rc = 0; // Prevent warnings when NDEBUG is defined. rc = pthread_mutex_unlock(&_mutex); assert(rc == 0); } } void IceUtil::RecMutex::unlock(LockState& state) const { state.mutex = &_mutex; state.count = _count; _count = 0; } void IceUtil::RecMutex::lock(LockState& state) const { _count = state.count; } #endif bool IceUtil::RecMutex::willUnlock() const { return _count == 1; } IceE-1.2.0/src/IceE/ThreadException.cpp0000644000076400007640000000747610576536574017461 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; IceUtil::ThreadSyscallException::ThreadSyscallException(const char* file, int line, int err ): Exception(file, line), _error(err) { } const char* IceUtil::ThreadSyscallException::_name = "IceUtil::ThreadSyscallException"; string IceUtil::ThreadSyscallException::ice_name() const { return _name; } string IceUtil::ThreadSyscallException::toString() const { string out = Exception::toString(); if(_error != 0) { out += ":\nthread syscall exception: "; #ifdef _WIN32_WCE out += Ice::printfToString("thread error: %d", _error); #elif defined(_WIN32) LPVOID lpMsgBuf = 0; DWORD ok = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, _error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPTSTR)&lpMsgBuf, 0, NULL); if(ok) { LPCTSTR msg = (LPCTSTR)lpMsgBuf; assert(msg && strlen((char*)msg) > 0); out += reinterpret_cast(msg); LocalFree(lpMsgBuf); } else { out += "unknown thread error: "; out += Ice::printfToString("error=%d", _error); } #else out += strerror(_error); #endif } return out; } IceUtil::Exception* IceUtil::ThreadSyscallException::ice_clone() const { return new ThreadSyscallException(*this); } void IceUtil::ThreadSyscallException::ice_throw() const { throw *this; } int IceUtil::ThreadSyscallException::error() const { return _error; } IceUtil::ThreadLockedException::ThreadLockedException(const char* file, int line) : Exception(file, line) { } const char* IceUtil::ThreadLockedException::_name = "IceUtil::ThreadLockedException"; string IceUtil::ThreadLockedException::ice_name() const { return _name; } IceUtil::Exception* IceUtil::ThreadLockedException::ice_clone() const { return new ThreadLockedException(*this); } void IceUtil::ThreadLockedException::ice_throw() const { throw *this; } IceUtil::ThreadStartedException::ThreadStartedException(const char* file, int line) : Exception(file, line) { } const char* IceUtil::ThreadStartedException::_name = "IceUtil::ThreadStartedException"; string IceUtil::ThreadStartedException::ice_name() const { return _name; } IceUtil::Exception* IceUtil::ThreadStartedException::ice_clone() const { return new ThreadStartedException(*this); } void IceUtil::ThreadStartedException::ice_throw() const { throw *this; } IceUtil::ThreadNotStartedException::ThreadNotStartedException(const char* file, int line) : Exception(file, line) { } const char* IceUtil::ThreadNotStartedException::_name = "IceUtil::ThreadNotStartedException"; string IceUtil::ThreadNotStartedException::ice_name() const { return _name; } IceUtil::Exception* IceUtil::ThreadNotStartedException::ice_clone() const { return new ThreadNotStartedException(*this); } void IceUtil::ThreadNotStartedException::ice_throw() const { throw *this; } IceUtil::BadThreadControlException::BadThreadControlException(const char* file, int line) : Exception(file, line) { } const char* IceUtil::BadThreadControlException::_name = "IceUtil::BadThreadControlException"; string IceUtil::BadThreadControlException::ice_name() const { return _name; } IceUtil::Exception* IceUtil::BadThreadControlException::ice_clone() const { return new BadThreadControlException(*this); } void IceUtil::BadThreadControlException::ice_throw() const { throw *this; } IceE-1.2.0/src/IceE/Logger.cpp0000755000076400007640000000066710616652361015574 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include IceUtil::Shared* IceInternal::upCast(::Ice::Logger* p) { return p; } IceE-1.2.0/src/IceE/DefaultsAndOverrides.h0000644000076400007640000000170710576536574020104 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_DEFAULTS_AND_OVERRIDES_H #define ICEE_DEFAULTS_AND_OVERRIDES_H #include #include #include namespace IceInternal { class DefaultsAndOverrides : public ::IceUtil::Shared { public: DefaultsAndOverrides(const ::Ice::PropertiesPtr&); std::string defaultHost; #ifdef ICEE_HAS_ROUTER std::string defaultRouter; #endif #ifdef ICEE_HAS_LOCATOR std::string defaultLocator; #endif bool overrideTimeout; Ice::Int overrideTimeoutValue; bool overrideConnectTimeout; Ice::Int overrideConnectTimeoutValue; }; } #endif IceE-1.2.0/src/IceE/StaticMutex.cpp0000644000076400007640000000241610576536574016632 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef _WIN32 void IceUtil::StaticMutex::initialize() const { // // First we create the new critical section // CRITICAL_SECTION* newCriticalSection = new CRITICAL_SECTION; InitializeCriticalSection(newCriticalSection); // // Then assign it to _mutex // Note that Windows performs a full memory barrier before the assignment; // this ensures we write the initialized critical section before we write _mutex. // if(InterlockedCompareExchangePointer(reinterpret_cast(&_mutex), newCriticalSection, 0) != 0) { // // Another thread was doing the same thing // DeleteCriticalSection(newCriticalSection); delete newCriticalSection; } // // This implementation does not attempt to clean up the initialized and assigned critical sections: // they leak // } #endif IceUtil::StaticMutex IceUtil::globalMutex = ICE_STATIC_MUTEX_INITIALIZER; IceE-1.2.0/src/IceE/StringUtil.cpp0000644000076400007640000001737010576536574016471 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace IceUtil; static string toOctalString(unsigned int n) { string s; s.resize(32); string::size_type charPos = 32; const int radix = 1 << 3; int mask = radix - 1; do { s[--charPos] = '0' + (n & mask); n >>= 3; } while(n != 0); return string(s, charPos, (32 - charPos)); } // // Write the byte b as an escape sequence if it isn't a printable ASCII // character and append the escape sequence to s. Additional characters // that should be escaped can be passed in special. If b is any of these // characters, b is preceded by a backslash in s. // static void encodeChar(string::value_type b, string& s, const string& special) { switch(b) { case '\\': { s.append("\\\\"); break; } case '\'': { s.append("\\'"); break; } case '"': { s.append("\\\""); break; } case '\b': { s.append("\\b"); break; } case '\f': { s.append("\\f"); break; } case '\n': { s.append("\\n"); break; } case '\r': { s.append("\\r"); break; } case '\t': { s.append("\\t"); break; } default: { unsigned char i = static_cast(b); if(!(i >= 32 && i <= 126)) { s.push_back('\\'); string octal = toOctalString(i); // // Add leading zeroes so that we avoid problems during // decoding. For example, consider the escaped string // \0013 (i.e., a character with value 1 followed by the // character '3'). If the leading zeroes were omitted, the // result would be incorrectly interpreted as a single // character with value 11. // for(string::size_type j = octal.size(); j < 3; j++) { s.push_back('0'); } s.append(octal); } else if(special.find(b) != string::npos) { s.push_back('\\'); s.push_back(b); } else { s.push_back(b); } break; } } } // // Add escape sequences (such as "\n", or "\007") to make a string // readable in ASCII. Any characters that appear in special are // prefixed with a backslash in the returned string. // string IceUtil::escapeString(const string& s, const string& special) { string::size_type i; for(i = 0; i < special.size(); ++i) { if(static_cast(special[i]) < 32 || static_cast(special[i]) > 126) { throw IllegalArgumentException(__FILE__, __LINE__, "special characters must be in ASCII range 32-126"); } } string result; for(i = 0; i < s.size(); ++i) { encodeChar(s[i], result, special); } return result; } static char checkChar(char c) { if(!(static_cast(c) >= 32 && static_cast(c) <= 126)) { throw IllegalArgumentException(__FILE__, __LINE__, "illegal input character"); } return c; } // // Decode the character or escape sequence starting at start and return it. // end marks the one-past-the-end position of the substring to be scanned. // nextStart is set to the index of the first character following the decoded // character or escape sequence. // static char decodeChar(const string& s, string::size_type start, string::size_type end, string::size_type& nextStart) { assert(start >= 0); assert(start < end); assert(end <= s.size()); char c; if(s[start] != '\\') { c = checkChar(s[start++]); } else { if(start + 1 == end) { throw IllegalArgumentException(__FILE__, __LINE__, "trailing backslash in argument"); } switch(s[++start]) { case '\\': case '\'': case '"': { c = s[start++]; break; } case 'b': { ++start; c = '\b'; break; } case 'f': { ++start; c = '\f'; break; } case 'n': { ++start; c = '\n'; break; } case 'r': { ++start; c = '\r'; break; } case 't': { ++start; c = '\t'; break; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': { int oct = 0; for(int j = 0; j < 3 && start < end; ++j) { int charVal = s[start++] - '0'; if(charVal < 0 || charVal > 7) { --start; break; } oct = oct * 8 + charVal; } if(oct > 255) { throw IllegalArgumentException(__FILE__, __LINE__, "octal value out of range"); } c = (char)oct; break; } default: { c = checkChar(s[start++]); break; } } } nextStart = start; return c; } // // Remove escape sequences from s and append the result to sb. // Return true if successful, false otherwise. // static void decodeString(const string& s, string::size_type start, string::size_type end, string& sb) { while(start < end) { sb.push_back(decodeChar(s, start, end, start)); } } // // Remove escape sequences added by escapeString. // bool IceUtil::unescapeString(const string& s, string::size_type start, string::size_type end, string& result) { if(start < 0) { throw IllegalArgumentException(__FILE__, __LINE__, "start offset must be >= 0"); } if(end > s.size()) { throw IllegalArgumentException(__FILE__, __LINE__, "end offset must be <= s.size()"); } if(start > end) { throw IllegalArgumentException(__FILE__, __LINE__, "start offset must <= end offset"); } result.reserve(end - start); try { result.clear(); decodeString(s, start, end, result); return true; } catch(...) { return false; } } // // If a single or double quotation mark is found at the start position, // then the position of the matching closing quote is returned. If no // quotation mark is found at the start position, then 0 is returned. // If no matching closing quote is found, then -1 is returned. // string::size_type IceUtil::checkQuote(const string& s, string::size_type start) { string::value_type quoteChar = s[start]; if(quoteChar == '"' || quoteChar == '\'') { start++; string::size_type pos; while(start < s.size() && (pos = s.find(quoteChar, start)) != string::npos) { if(s[pos - 1] != '\\') { return pos; } start = pos + 1; } return string::npos; // Unmatched quote. } return 0; // Not quoted. } // // Match `s' against the pattern `pat'. A * in the pattern acts // as a wildcard: it matches any non-empty sequence of characters // other than a period (`.'). We match by hand here because // it's portable across platforms (whereas regex() isn't). // bool IceUtil::match(const string& s, const string& pat, bool matchPeriod) { assert(!s.empty()); assert(!pat.empty()); if(pat.find('*') == string::npos) { return s == pat; } string::size_type sIndex = 0; string::size_type patIndex = 0; do { if(pat[patIndex] == '*') { // // Don't allow matching x..y against x.*.y if requested -- star matches non-empty sequence only. // if(!matchPeriod && s[sIndex] == '.') { return false; } while(sIndex < s.size() && (matchPeriod || s[sIndex] != '.')) { ++sIndex; } patIndex++; } else { if(pat[patIndex] != s[sIndex]) { return false; } ++sIndex; ++patIndex; } } while(sIndex < s.size() && patIndex < pat.size()); return sIndex == s.size() && patIndex == pat.size(); } IceE-1.2.0/src/IceE/FactoryTableDef.cpp0000644000076400007640000000711610576536574017360 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include #ifdef __APPLE__ # include #endif namespace IceInternal { FactoryTableWrapper factoryTableWrapper; // Single global instance of the wrapper object that // initializes factoryTable. ICE_API FactoryTableDef* factoryTable; // Single global instance of the factory table for // non-local exceptions and non-abstract classes } // // Add a factory to the exception factory table. // If the factory is present already, increment its reference count. // void IceInternal::FactoryTableDef::addExceptionFactory(const std::string& t, const IceInternal::UserExceptionFactoryPtr& f) { IceUtil::Mutex::Lock lock(_m); EFTable::iterator i = _eft.find(t); if(i == _eft.end()) { _eft[t] = EFPair(f, 1); } else { i->second.second++; } } // // Return the exception factory for a given type ID // IceInternal::UserExceptionFactoryPtr IceInternal::FactoryTableDef::getExceptionFactory(const std::string& t) const { IceUtil::Mutex::Lock lock(_m); EFTable::const_iterator i = _eft.find(t); #ifdef __APPLE__ if(i == _eft.end()) { lock.release(); // // Try to find the symbol, if found this should trigger the // object static constructors to be called. // std::string symbol = "__F"; for(std::string::const_iterator p = t.begin(); p != t.end(); ++p) { symbol += ((*p) == ':') ? '_' : *p; } symbol += "__initializer"; dlsym(RTLD_DEFAULT, symbol.c_str()); lock.acquire(); i = _eft.find(t); } #endif return i != _eft.end() ? i->second.first : IceInternal::UserExceptionFactoryPtr(); } // // Remove a factory from the exception factory table. If the factory // is not present, do nothing; otherwise, decrement the factory's // reference count; if the count drops to zero, remove the factory's // entry from the table. // void IceInternal::FactoryTableDef::removeExceptionFactory(const std::string& t) { IceUtil::Mutex::Lock lock(_m); EFTable::iterator i = _eft.find(t); if(i != _eft.end()) { if(--i->second.second == 0) { _eft.erase(i); } } } // // The code generated by slice2cpp contains a file static instance of FactoryTable. // The constructor of FactoryTable calls initialize(), as does the constructor of // FactoryTableWrapper. This ensures that the global factoryTable variable is initialized // before it can be used, regardless of the order of initialization of global objects. // IceInternal::FactoryTableWrapper::FactoryTableWrapper() { initialize(); } IceInternal::FactoryTableWrapper::~FactoryTableWrapper() { finalize(); } // // Initialize the single global instance of the factory table, counting // the number of calls made. // void IceInternal::FactoryTableWrapper::initialize() { IceUtil::StaticMutex::Lock lock(_m); if(_initCount == 0) { factoryTable = new FactoryTableDef; } ++_initCount; } // // Delete the table if its reference count drops to zero. // void IceInternal::FactoryTableWrapper::finalize() { IceUtil::StaticMutex::Lock lock(_m); if(--_initCount == 0) { delete factoryTable; } } IceUtil::StaticMutex IceInternal::FactoryTableWrapper::_m = ICE_STATIC_MUTEX_INITIALIZER; int IceInternal::FactoryTableWrapper::_initCount = 0; // Initialization count IceE-1.2.0/src/IceE/LocatorInfo.h0000644000076400007640000000516210576536574016245 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_LOCATOR_INFO_H #define ICEE_LOCATOR_INFO_H #include #ifdef ICEE_HAS_LOCATOR #include #include #include #include #include #include namespace IceInternal { class LocatorManager : public IceUtil::Shared, public IceUtil::Mutex { public: LocatorManager(); void destroy(); // // Returns locator info for a given locator. Automatically creates // the locator info if it doesn't exist yet. // LocatorInfoPtr get(const Ice::LocatorPrx&); private: std::map _table; std::map::iterator _tableHint; std::map _locatorTables; }; class LocatorTable : public IceUtil::Shared, public IceUtil::Mutex { public: LocatorTable(); void clear(); bool getAdapterEndpoints(const std::string&, ::std::vector&) const; void addAdapterEndpoints(const std::string&, const ::std::vector&); ::std::vector removeAdapterEndpoints(const std::string&); bool getProxy(const Ice::Identity&, Ice::ObjectPrx&) const; void addProxy(const Ice::Identity&, const Ice::ObjectPrx&); Ice::ObjectPrx removeProxy(const Ice::Identity&); private: std::map > _adapterEndpointsMap; std::map _objectMap; }; class LocatorInfo : public IceUtil::Shared, public IceUtil::Mutex { public: LocatorInfo(const Ice::LocatorPrx&, const LocatorTablePtr&); void destroy(); bool operator==(const LocatorInfo&) const; bool operator!=(const LocatorInfo&) const; bool operator<(const LocatorInfo&) const; Ice::LocatorPrx getLocator() const; Ice::LocatorRegistryPrx getLocatorRegistry(); std::vector getEndpoints(const IndirectReferencePtr&, bool&); void clearCache(const IndirectReferencePtr&); void clearObjectCache(const IndirectReferencePtr&); private: void trace(const std::string&, const IndirectReferencePtr&, const std::vector&); const Ice::LocatorPrx _locator; Ice::LocatorRegistryPrx _locatorRegistry; const LocatorTablePtr _table; }; } #endif #endif IceE-1.2.0/src/IceE/Network.h0000644000076400007640000000470310607167246015446 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #ifndef ICEE_NETWORK_H #define ICEE_NETWORK_H #ifdef __hpux # define _XOPEN_SOURCE_EXTENDED #endif #include #ifdef _WIN32 # include typedef int ssize_t; #else # include # include # include # if defined(__hpux) # include # else # include # endif # include # include # include # include #endif #ifdef _WIN32 typedef int socklen_t; #endif #ifndef _WIN32 # define SOCKET int # define SOCKET_ERROR -1 # define INVALID_SOCKET -1 #endif #ifndef SHUT_RD # define SHUT_RD 0 #endif #ifndef SHUT_WR # define SHUT_WR 1 #endif #ifndef SHUT_RDWR # define SHUT_RDWR 2 #endif #ifndef NETDB_INTERNAL # define NETDB_INTERNAL -1 #endif #ifndef NETDB_SUCCESS # define NETDB_SUCCESS 0 #endif namespace IceInternal { bool interrupted(); bool acceptInterrupted(); bool noBuffers(); bool wouldBlock(); bool timedout(); bool connectFailed(); bool connectionRefused(); bool connectInProgress(); bool connectionLost(); bool notConnected(); SOCKET createSocket(); void closeSocket(SOCKET); void shutdownSocketWrite(SOCKET); void shutdownSocketReadWrite(SOCKET); void setBlock(SOCKET, bool); #ifndef ICEE_USE_SELECT_OR_POLL_FOR_TIMEOUTS void setTimeout(SOCKET, bool, int); #endif void setTcpNoDelay(SOCKET); void setKeepAlive(SOCKET); void setSendBufferSize(SOCKET, int); void doBind(SOCKET, struct sockaddr_in&); void doListen(SOCKET, int); void doConnect(SOCKET, struct sockaddr_in&, int); SOCKET doAccept(SOCKET); void getAddress(const std::string&, int, struct sockaddr_in&); bool compareAddress(const struct sockaddr_in&, const struct sockaddr_in&); std::string errorToString(int); std::string errorToStringDNS(int); std::string lastErrorToString(); std::string fdToString(SOCKET); std::string addrToString(const struct sockaddr_in&); std::vector getLocalHosts(); #ifdef _WIN32 std::vector getLocalAddresses(); bool isLocalAddress(const struct sockaddr_in&); bool isPeerLocal(SOCKET); #endif int getSocketErrno(); } #endif IceE-1.2.0/src/IceE/LoggerI.cpp0000644000076400007640000000306610576536574015712 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #include using namespace std; using namespace Ice; using namespace IceInternal; static IceUtil::StaticMutex globalMutex = ICE_STATIC_MUTEX_INITIALIZER; Ice::LoggerI::LoggerI(const string& prefix) { if(!prefix.empty()) { _prefix = prefix + ": "; } } void Ice::LoggerI::print(const string& message) { IceUtil::StaticMutex::Lock sync(globalMutex); fprintf(stderr, "%s\n", message.c_str()); } void Ice::LoggerI::trace(const string& category, const string& message) { string s = "[ "; s += _prefix; if(!category.empty()) { s += category + ": "; } s += message + " ]"; string::size_type idx = 0; while((idx = s.find("\n", idx)) != string::npos) { s.insert(idx + 1, " "); ++idx; } IceUtil::StaticMutex::Lock sync(globalMutex); fprintf(stderr, "%s\n", s.c_str()); } void Ice::LoggerI::warning(const string& message) { IceUtil::StaticMutex::Lock sync(globalMutex); fprintf(stderr, "%swarning: %s\n", _prefix.c_str(), message.c_str()); } void Ice::LoggerI::error(const string& message) { IceUtil::StaticMutex::Lock sync(globalMutex); fprintf(stderr, "%serror: %s\n", _prefix.c_str(), message.c_str()); } IceE-1.2.0/src/IceE/Communicator.cpp0000755000076400007640000001016610616403646017010 0ustar matthewmatthew// ********************************************************************** // // Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. // // This copy of Ice-E is licensed to you under the terms described in the // ICEE_LICENSE file included in this distribution. // // ********************************************************************** #include #ifdef ICEE_HAS_ROUTER # include #endif #ifdef ICEE_HAS_LOCATOR # include #endif #include #include #include #include #include #include #ifndef ICEE_PURE_CLIENT # include #endif using namespace std; using namespace Ice; using namespace IceInternal; IceUtil::Shared* IceInternal::upCast(::Ice::Communicator* p) { return p; } void Ice::Communicator::destroy() { _instance->destroy(); } #ifndef ICEE_PURE_CLIENT void Ice::Communicator::shutdown() { _instance->objectAdapterFactory()->shutdown(); } void Ice::Communicator::waitForShutdown() { _instance->objectAdapterFactory()->waitForShutdown(); } bool Ice::Communicator::isShutdown() const { return _instance->objectAdapterFactory()->isShutdown(); } #endif ObjectPrx Ice::Communicator::stringToProxy(const string& s) const { return _instance->proxyFactory()->stringToProxy(s); } string Ice::Communicator::proxyToString(const ObjectPrx& proxy) const { return _instance->proxyFactory()->proxyToString(proxy); } ObjectPrx Ice::Communicator::propertyToProxy(const string& p) const { return _instance->proxyFactory()->propertyToProxy(p); } Identity Ice::Communicator::stringToIdentity(const string& s) const { return _instance->stringToIdentity(s); } string Ice::Communicator::identityToString(const Identity& ident) const { return _instance->identityToString(ident); } #ifndef ICEE_PURE_CLIENT ObjectAdapterPtr Ice::Communicator::createObjectAdapter(const string& name) { return createObjectAdapterWithEndpoints(name, getProperties()->getProperty(name + ".Endpoints")); } ObjectAdapterPtr Ice::Communicator::createObjectAdapterWithEndpoints(const string& name, const string& endpoints) { return _instance->objectAdapterFactory()->createObjectAdapter(name, endpoints #ifdef ICEE_HAS_ROUTER , 0 # endif ); } #ifdef ICEE_HAS_ROUTER ObjectAdapterPtr Ice::Communicator::createObjectAdapterWithRouter(const string& name, const RouterPrx& router) { return _instance->objectAdapterFactory()->createObjectAdapter(name, "", router); } #endif #endif PropertiesPtr Ice::Communicator::getProperties() const { return _instance->initializationData().properties; } LoggerPtr Ice::Communicator::getLogger() const { return _instance->initializationData().logger; } #ifdef ICEE_HAS_ROUTER RouterPrx Ice::Communicator::getDefaultRouter() const { return _instance->referenceFactory()->getDefaultRouter(); } void Ice::Communicator::setDefaultRouter(const RouterPrx& router) { _instance->referenceFactory()->setDefaultRouter(router); } #endif #ifdef ICEE_HAS_LOCATOR LocatorPrx Ice::Communicator::getDefaultLocator() const { return _instance->referenceFactory()->getDefaultLocator(); } void Ice::Communicator::setDefaultLocator(const LocatorPrx& locator) { _instance->referenceFactory()->setDefaultLocator(locator); } #endif #ifdef ICEE_HAS_BATCH void Ice::Communicator::flushBatchRequests() { _instance->flushBatchRequests(); } #endif Ice::Communicator::Communicator(const InitializationData& initData) { __setNoDelete(true); try { const_cast(_instance) = new Instance(this, initData); } catch(...) { __setNoDelete(false); throw; } __setNoDelete(false); } Ice::Communicator::~Communicator() { if(!_instance->destroyed()) { Warning out(_instance->initializationData().logger); out << "Ice::Communicator::destroy() has not been called"; } } void Ice::Communicator::finishSetup(int& argc, char* argv[]) { try { _instance->finishSetup(argc, argv); } catch(...) { _instance->destroy(); throw; } } IceE-1.2.0/ICEE_LICENSE0000644000076400007640000000256110615746261014041 0ustar matthewmatthewCopyright (c) 2003-2007 ZeroC, Inc. All rights reserved. This copy of Ice-E is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Ice-E is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. The GNU General Public License is often shipped with GNU software, and is generally kept in a file called COPYING or LICENSE. If you do not have a copy of the license, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. In addition, as a special exception, ZeroC, Inc. gives permission to link Ice-E with any Orca library (http://orca-robotics.sourceforge.net/) licensed under the GNU Lesser General Public License (LGPL), version 2.1 (http://www.gnu.org/licenses/lgpl.html) and distribute linked combinations of Ice with any of these libraries. You must obey the GNU General Public License version 2 in all respects for all of the code used other than these libraries. If you modify this copy of Ice-E, you may extend this exception to your version of Ice, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.