diff options
Diffstat (limited to 'qpid/cpp/bindings/qpid')
207 files changed, 27967 insertions, 0 deletions
diff --git a/qpid/cpp/bindings/qpid/dotnet/CMakeLists.txt b/qpid/cpp/bindings/qpid/dotnet/CMakeLists.txt new file mode 100644 index 0000000000..4f66c80498 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/CMakeLists.txt @@ -0,0 +1,200 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# Configure Visual Studio version-specific files into build tree + +MACRO (select_msvc9_files) + set (sln_proj_SOURCES + examples/msvc9/csharp.example.drain/csharp.example.drain.csproj + examples/msvc9/csharp.example.spout/csharp.example.spout.csproj + examples/msvc9/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj + examples/msvc9/csharp.map.callback.sender/csharp.map.callback.sender.csproj + msvc9/org.apache.qpid.messaging.sessionreceiver.sln + msvc9/org.apache.qpid.messaging.sln + src/msvc9/org.apache.qpid.messaging.vcproj + src/sessionreceiver/msvc9/org.apache.qpid.messaging.sessionreceiver.csproj + test/messaging.test/msvc9/messaging.test.csproj + winsdk_sources/msvc9/winsdk_dotnet_examples.sln + winsdk_sources/msvc9/examples/csharp.direct.receiver/csharp.direct.receiver.csproj + winsdk_sources/msvc9/examples/csharp.direct.sender/csharp.direct.sender.csproj + winsdk_sources/msvc9/examples/csharp.example.client/csharp.example.client.csproj + winsdk_sources/msvc9/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj + winsdk_sources/msvc9/examples/csharp.example.drain/csharp.example.drain.csproj + winsdk_sources/msvc9/examples/csharp.example.helloworld/csharp.example.helloworld.csproj + winsdk_sources/msvc9/examples/csharp.example.server/csharp.example.server.csproj + winsdk_sources/msvc9/examples/csharp.example.spout/csharp.example.spout.csproj + winsdk_sources/msvc9/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj + winsdk_sources/msvc9/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj + winsdk_sources/msvc9/examples/csharp.map.receiver/csharp.map.receiver.csproj + winsdk_sources/msvc9/examples/csharp.map.sender/csharp.map.sender.csproj) + + # Base path from any example project + file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/examples/msvc9/csharp.direct.receiver" DOTNET_src) + # to source root + file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/examples" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToSrc ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToSrc} DOTNET_exampleRelPathToSrc) + + # to org.apache.qpid.messaging.dll through a project reference + file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/src/msvc9/org.apache.qpid.messaging.vcxproj" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToBindingProj ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToBindingProj} DOTNET_exampleRelPathToBindingProj) + + # to org.apache.qpid.messaging.sessionreceiver.dll through a project reference + file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/src/sessionreceiver/msvc9/org.apache.qpid.messaging.sessionreceiver.csproj" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToSessionreceiverProj ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToSessionreceiverProj} DOTNET_exampleRelPathToSessionreceiverProj) + + # to app.config file + file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/examples/msvc9/app.config" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToAppConfig ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToAppConfig} DOTNET_exampleRelPathToAppConfig) +ENDMACRO (select_msvc9_files) + +MACRO (select_msvcx_files) + set (sln_proj_SOURCES + examples/msvcx/csharp.example.drain/csharp.example.drain.csproj + examples/msvcx/csharp.example.spout/csharp.example.spout.csproj + examples/msvcx/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj + examples/msvcx/csharp.map.callback.sender/csharp.map.callback.sender.csproj + msvcx/org.apache.qpid.messaging.sessionreceiver.sln + msvcx/org.apache.qpid.messaging.sln + src/msvcx/org.apache.qpid.messaging.vcxproj + src/sessionreceiver/msvcx/org.apache.qpid.messaging.sessionreceiver.csproj + test/messaging.test/msvcx/messaging.test.csproj + winsdk_sources/msvcx/winsdk_dotnet_examples.sln + winsdk_sources/msvcx/examples/csharp.direct.receiver/csharp.direct.receiver.csproj + winsdk_sources/msvcx/examples/csharp.direct.sender/csharp.direct.sender.csproj + winsdk_sources/msvcx/examples/csharp.example.client/csharp.example.client.csproj + winsdk_sources/msvcx/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj + winsdk_sources/msvcx/examples/csharp.example.drain/csharp.example.drain.csproj + winsdk_sources/msvcx/examples/csharp.example.helloworld/csharp.example.helloworld.csproj + winsdk_sources/msvcx/examples/csharp.example.server/csharp.example.server.csproj + winsdk_sources/msvcx/examples/csharp.example.spout/csharp.example.spout.csproj + winsdk_sources/msvcx/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj + winsdk_sources/msvcx/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj + winsdk_sources/msvcx/examples/csharp.map.receiver/csharp.map.receiver.csproj + winsdk_sources/msvcx/examples/csharp.map.sender/csharp.map.sender.csproj) + + # Base path from any example project + file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/examples/msvcx/csharp.direct.receiver" DOTNET_src) + # to source root + file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/examples" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToSrc ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToSrc} DOTNET_exampleRelPathToSrc) + + # to org.apache.qpid.messaging.dll through a project reference + file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/src/msvcx/org.apache.qpid.messaging.vcxproj" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToBindingProj ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToBindingProj} DOTNET_exampleRelPathToBindingProj) + + # to org.apache.qpid.messaging.sessionreceiver.dll through a project reference + file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/src/sessionreceiver/msvcx/org.apache.qpid.messaging.sessionreceiver.csproj" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToSessionreceiverProj ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToSessionreceiverProj} DOTNET_exampleRelPathToSessionreceiverProj) + + # to app.config file + file(TO_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/examples/msvcx/app.config" DOTNET_tgt) + file(RELATIVE_PATH DOTNET_exampleRelPathToAppConfig ${DOTNET_src} ${DOTNET_tgt}) + file(TO_NATIVE_PATH ${DOTNET_exampleRelPathToAppConfig} DOTNET_exampleRelPathToAppConfig) +ENDMACRO (select_msvcx_files) + +MACRO (configure_example_project msvc9_or_x name guid) + set(DOTNET_projectName ${name}) + set(DOTNET_projectGuid ${guid}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/examples/${msvc9_or_x}/anyproject.csproj.in + ${CMAKE_CURRENT_BINARY_DIR}/examples/${msvc9_or_x}/${DOTNET_projectName}/${DOTNET_projectName}.csproj) +ENDMACRO (configure_example_project DOTNET_projectName DOTNET_projectGuid) + +MACRO (configure_example_projects msvc9_or_x) + configure_example_project(${msvc9_or_x} "csharp.direct.receiver" "52F880E7-D677-4C91-8516-D679CE0F46A8") + configure_example_project(${msvc9_or_x} "csharp.direct.sender" "7B71CE78-8E78-4632-ADBE-F4D5DFAE0068") + configure_example_project(${msvc9_or_x} "csharp.example.client" "0DE01712-C2D1-4CA4-B42C-5856456A8696") + configure_example_project(${msvc9_or_x} "csharp.example.declare_queues" "E31B349C-830C-4583-8BD9-30DA4398349F") + configure_example_project(${msvc9_or_x} "csharp.example.helloworld" "8CC1C265-0507-44A3-9483-8FAF48513F4D") + configure_example_project(${msvc9_or_x} "csharp.example.server" "090A081D-E8B5-4949-AA43-EE182B7101E3") + configure_example_project(${msvc9_or_x} "csharp.map.receiver" "AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9") + configure_example_project(${msvc9_or_x} "csharp.map.sender" "5D8252F5-E1D3-44A0-94C7-7CB75E843C10") +ENDMACRO (configure_example_projects msvc9_or_x) + +if (MSVC) + # Source and binary folders must be on the same drive so that + # relative paths between the two are possible. + # Note that this is for the DOTNET binding only and does not apply to the qpid-cpp main build. + string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} 0 1 srcDriveLetter) + string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 1 binDriveLetter) + if (NOT (${srcDriveLetter} STREQUAL ${binDriveLetter})) + message(FATAL_ERROR "Windows DOTNET binding builds must have source and binary folders on same drive.") + endif() + + # General top level folders + file(TO_NATIVE_PATH ${CMAKE_CURRENT_BINARY_DIR} DOTNET_currentBinaryDir) + file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} DOTNET_currentSourceDir) + file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} DOTNET_projectBinaryDir) + file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} DOTNET_projectSourceDir) + + # relative path from top-level binary back to top-level source + if (${CMAKE_CURRENT_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) + set (DOTNET_relPathToSrc ".\\") + else() + file(RELATIVE_PATH DOTNET_relPathToSrc "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}") + file(TO_NATIVE_PATH ${DOTNET_relPathToSrc} DOTNET_relPathToSrc) + endif() + + if((${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008") OR + (${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008 Win64")) + # Visual Studio 2008 + select_msvc9_files() + set(DOTNET_MSVC_SELECT "msvc9") + set(DOTNET_SLN_FILE_FORMAT "10.00") + set(DOTNET_SLN_VISUAL_STUDIO "Visual Studio 2008") + set(DOTNET_TARGET_FRAMEWORK_VERSION "v3.5") + set(DOTNET_PLATFORM_TOOLSET "") + + elseif((${CMAKE_GENERATOR} STREQUAL "Visual Studio 10") OR + (${CMAKE_GENERATOR} STREQUAL "Visual Studio 10 Win64")) + # Visual Studio 2010 + select_msvcx_files() + set(DOTNET_MSVC_SELECT "msvcx") + set(DOTNET_SLN_FILE_FORMAT "11.00") + set(DOTNET_SLN_VISUAL_STUDIO "Visual Studio 2010") + set(DOTNET_TARGET_FRAMEWORK_VERSION "v4.0") + set(DOTNET_PLATFORM_TOOLSET "") + + elseif((${CMAKE_GENERATOR} STREQUAL "Visual Studio 11") OR + (${CMAKE_GENERATOR} STREQUAL "Visual Studio 11 Win64")) + # Visual Studio 2012 + select_msvcx_files() + set(DOTNET_MSVC_SELECT "msvcx") + set(DOTNET_SLN_FILE_FORMAT "12.00") + set(DOTNET_SLN_VISUAL_STUDIO "Visual Studio 2012") + set(DOTNET_TARGET_FRAMEWORK_VERSION "v4.5") + set(DOTNET_PLATFORM_TOOLSET "<PlatformToolset>v110</PlatformToolset>") + + else() + message(FATAL_ERROR "No DOTNET binding support available for ${CMAKE_GENERATOR}") + endif() + + # Configure common examples and individual files + configure_example_projects( ${DOTNET_MSVC_SELECT} ) + foreach(slnProjFile ${sln_proj_SOURCES}) + set (iFile "${slnProjFile}.in") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${iFile} ${CMAKE_CURRENT_BINARY_DIR}/${slnProjFile}) + endforeach() +endif (MSVC) diff --git a/qpid/cpp/bindings/qpid/dotnet/ReadMe.txt b/qpid/cpp/bindings/qpid/dotnet/ReadMe.txt new file mode 100644 index 0000000000..c709a27637 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/ReadMe.txt @@ -0,0 +1,91 @@ +#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+Qpid.cpp.bindings.qpid.dotnet binding package.
+
+1. Features
+===========
+
+A. This binding package provides a .NET Interop wrapper around the
+ Qpid C++ Messaging interface. It exposes the Messaging interface through
+ a series of managed code classes that may be used by any .NET language.
+
+B. A sessionreceiver assembly provides session message callback functionality.
+
+2. Prerequisites
+================
+
+A. From a fresh check-out of Qpid sources, execute an in-source CMake.
+ This command puts the CMake output files in the same directories
+ as the Qpid source files.
+
+ > cd cpp
+ > cmake -i
+
+
+B. Build the qpid-cpp solution.
+
+ > qpid-cpp.sln
+ Select Configuration Debug
+ Select Platform Win32
+ Compile the ALL_BUILD project
+
+3. Building the Dotnet Binding solution
+=======================================
+
+A. Open solution file cpp\bindings\qpid\dotnet\org.apache.qpid.messaging.sln
+ Select Configuration Debug
+ Select Platform x86
+ Compile the solution
+
+
+4. Running the examples
+=======================
+
+A. csharp.direct.receiver
+B. csharp.direct.sender
+
+C. csharp.map.receiver
+D. csharp.map.sender
+
+E. csharp.map.callback.receiver
+F. csharp.map.callback.sender
+
+G. csharp.example.server
+H. visualbasic.example.server
+I. csharp.example.client
+
+J. csharp.example.drain
+K. csharp.example.spout
+L. csharp.example.declare_queues
+
+M. csharp.example.helloworld
+N. powershell.example.helloworld
+
+
+5. Running the tests
+====================
+
+A. TBD
+
+
+6. Notes
+========
+
+TBD
diff --git a/qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1 b/qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1 new file mode 100644 index 0000000000..a698dc88ba --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1 @@ -0,0 +1,675 @@ +#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+Set-PSDebug -Trace 0
+Set-PSDebug -strict
+$ErrorActionPreference='Stop'
+
+$global:usageText = @("#
+# configure-windows.ps1 [studio-and-architecture [boost-root-directory]]
+#
+# This script configures a qpid\cpp developer build environment under Windows
+# to enable working with cpp\bindings\qpid\dotnet binding source code.
+#
+# ARG PROCESSING
+# ==============
+# All arguments may be specified on the command line. If not then this
+# script will prompt the user for choices.
+#
+# * studio-and-architecture
+# User chooses a version of Visual Studio and a target platform:
+# 2012-x86
+# 2012-x64
+# 2010-x86
+# 2010-x64
+# 2008-x86
+# 2008-x64
+#
+# * boost-root-directory
+# The path to the version of boost to be used in this build
+#
+# CONFIGURATION OUTPUT
+# ====================
+# This script uses these build and install directories for the build:
+# build_2008_x86 install_2008_x86
+# build_2010_x86 install_2010_x86
+# build_2008_x64 install_2008_x64
+# build_2010_x64 install_2010_x64
+#
+#
+# PROTON AMQP 1.0
+# ===============
+# Proton is included automatically by having previously executed proton's
+# ""make install"" to the install_xx_xxxx directory that qpid is about to use.
+#
+# Prerequisites
+# =============
+# 1. Powershell must be installed.
+# 2. 32-bit and/or 64-bit Boost libraries must be installed in separate
+# directories. A user system may have any number of Boost library
+# versions installed on it as long as each may be referred to through
+# a separate BOOST_ROOT directory path.
+# 3. CMake 2.8 (or later) must be installed. The cmake\bin directory
+# must be in the user's path.
+# 4. Boost library specifications may or may not be in the user's path.
+# The script author recommends not to have Boost in the path and only
+# allow the Boost path to be specified by generated command procedures.
+# 5. Visual Studio build environment must be installed.
+#
+#
+# Use case: Create a new build environment
+# ========================================
+#
+# Required VS2010 Boost:
+# 32-bit library - C:\Boost
+# 64-bit library - D:\Boost_64
+#
+# Required Qpid checkout tree
+# C:\svn\qpid\...
+#
+# Run this script, select VS2010 compiler, x86 platform:
+#
+# configure-windows.ps1 2010-x86 C:\Boost
+#
+# This script will automatically create build directory
+# C:\svn\qpid\build_2010_x86
+#
+# Next this script runs CMake.
+#
+# * This step creates qpid-cpp.sln and related project files.
+# C:\svn\qpid\build_2010_x86\qpid-cpp.sln
+#
+# This script generates several other helper scripts:
+#
+# C:\svn\qpid\build_2010_x86\start-devenv-messaging-x86-32bit.ps1
+# C:\svn\qpid\build_2010_x86\start-devenv-messaging-x86-32bit.bat
+# C:\svn\qpid\build_2010_x86\setenv-messaging-x86-32bit.bat
+# C:\svn\qpid\build_2010_x86\run-cmake.bat
+# C:\svn\qpid\build_2010_x86\run-qpid-devenv-debug.bat
+")
+
+#############################
+# global strings to be written to script files
+#
+$global:txtPath = '$env:PATH'
+$global:txtQR = '$env:QPID_BUILD_ROOT'
+$global:txtWH = 'Write-Host'
+
+#############################
+# Visual Studio version selection dialog items and choice
+#
+[array]$global:VsVersionCmakeChoiceList = `
+ "Visual Studio 2012 - x86", `
+ "Visual Studio 2012 - x64", `
+ "Visual Studio 2010 - x86", `
+ "Visual Studio 2010 - x64", `
+ "Visual Studio 2008 - x86", `
+ "Visual Studio 2008 - x64"
+$global:vsSelectedOption = ''
+$global:vsVersion = '' # "Visual Studio 2010"
+$global:vsShortName = '' # "2010"
+$global:cmakeGenerator = '' # "Visual Studio 10"
+$global:vsSubdir = '' # "msvc10"
+$global:vsSubdirX = '' # "msvc9" or "msvcx"
+$global:cmakeCompiler = '' # "-vc100"
+$global:build32or64 = '' # "32" or "64"
+$global:buildPathSizeId = '' # "x86" or "x64"
+$global:vsEnvironment = '' # ""%VS100COMNTOOLS%..\..\vcvarsall.bat" x86"
+$global:vsBuildTarget = '' # "Debug|Win32"
+
+$global:cmakeCommandLine = ''
+
+$global:boostRootPath = ''
+
+#############################
+# Usage
+#
+function Usage
+{
+ Write-Host $global:usageText
+}
+
+#############################
+# Select-Folder
+# Return a folder or null
+#
+function Select-Folder ($message="Select a folder", $path=0)
+{
+ $shellApp = New-Object -comObject Shell.Application
+ $folder = $shellApp.BrowseForFolder(0, $message, 0, $path)
+ if ($folder -ne $null) {
+ $folder.self.Path
+ }
+}
+
+
+#############################
+# AskYesOrNo
+# Show modal dialog messagebox and return yes or no
+#
+function AskYesOrNo ($Question="No question?", $Title="No Title?")
+{
+ $dlg = [Windows.Forms.MessageBox]::Show($Question, $Title, `
+ [Windows.Forms.MessageBoxButtons]::YesNo, `
+ [Windows.Forms.MessageBoxIcon]::Question)
+
+ $result = $dlg -eq [Windows.Forms.DialogResult]::Yes
+
+ $result
+}
+
+
+#############################
+# SanityCheckBoostPath
+# A path is a "boost path" if it contains
+# both lib and include subdirectories.
+#
+function SanityCheckBoostPath ($path=0)
+{
+ $result = 1
+ $displayPath = ""
+
+ if ($path -ne $null) {
+ $displayPath = $path
+
+ $toTest = ('include', 'lib')
+ foreach ($pattern in $toTest) {
+ $target = Join-Path $path $pattern
+ if (!(Test-Path -path $target)) {
+ $result = 0
+ }
+ }
+ } else {
+ $result = 0
+ }
+
+ if (! $result) {
+ Write-Host "The path ""$displayPath"" does not appear to be a Boost root path."
+ }
+ $result
+}
+
+
+#############################
+# SanityCheckBuildPath
+# A path is a "build path" if it contains
+# various subdirectories.
+#
+function SanityCheckBuildPath ($path=0)
+{
+ $result = 1
+ $displayPath = ""
+ if ($path -ne $null) {
+ $displayPath = $path
+
+ $toTest = ('CMakeFiles', 'docs', 'etc', 'examples', 'include',
+ 'managementgen', 'src')
+ foreach ($pattern in $toTest) {
+ $target = Join-Path $path $pattern
+ if (!(Test-Path -path $target)) {
+ $result = 0
+ }
+ }
+ } else {
+ $result = 0
+ }
+ if (! $result) {
+ Write-Host "The path ""$displayPath"" does not appear to be a Qpid C++ build root path."
+ }
+ $result
+}
+
+
+#############################
+# WriteDotnetBindingSlnLauncherPs1
+# Write a powershell script that sets up the environment
+# and then launches Visual Studio solution file.
+#
+function WriteDotnetBindingSlnLauncherPs1
+{
+ param
+ (
+ [string] $slnName,
+ [string] $boostRoot,
+ [string] $buildRoot,
+ [string] $cppDir,
+ [string] $vsPlatform,
+ [string] $nBits,
+ [string] $outfileName,
+ [string] $studioVersion,
+ [string] $studioSubdir
+ )
+
+ $out = @("#
+# Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment
+#
+$global:txtPath = ""$boostRoot\lib;$global:txtPath""
+$global:txtQR = ""$buildRoot""
+$global:txtWH ""Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment.""
+$buildRoot\bindings\qpid\dotnet\$vsSubdirX\$slnName
+")
+ Write-Host " $buildRoot\$outfileName"
+ $out | Out-File "$buildRoot\$outfileName" -encoding ASCII
+}
+
+
+#############################
+# WriteDotnetBindingSlnLauncherBat
+# Write a batch file that
+# launches a powershell script.
+#
+function WriteDotnetBindingSlnLauncherBat
+{
+ param
+ (
+ [string] $slnName,
+ [string] $buildRoot,
+ [string] $vsPlatform,
+ [string] $nBits,
+ [string] $psScriptName,
+ [string] $outfileName,
+ [string] $studioVersion,
+ [string] $studioSubdir
+ )
+
+ $out = @("@ECHO OFF
+REM
+REM Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment
+REM
+ECHO Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment
+powershell $buildRoot\$psScriptName
+")
+ Write-Host " $buildRoot\$outfileName"
+ $out | Out-File "$buildRoot\$outfileName" -encoding ASCII
+}
+
+
+#############################
+# WriteDotnetBindingEnvSetupBat
+# Write a batch file that sets the desired environment into
+# the user's current environment settings.
+#
+function WriteDotnetBindingEnvSetupBat
+{
+ param
+ (
+ [string] $slnName,
+ [string] $boostRoot,
+ [string] $buildRoot,
+ [string] $vsPlatform,
+ [string] $nBits,
+ [string] $outfileName,
+ [string] $studioVersion,
+ [string] $studioSubdir,
+ [string] $cmakeLine
+ )
+
+ $out = @("@ECHO OFF
+REM
+REM Call this command procedure from a command prompt to set up a
+REM $studioVersion $vsPlatform ($nBits-bit)
+REM $slnName environment
+REM
+REM > call $outfileName
+REM >
+REM
+REM The solution was generated with cmake command line:
+REM $cmakeLine
+ECHO %PATH% | FINDSTR /I boost > NUL
+IF %ERRORLEVEL% EQU 0 ECHO WARNING: Boost is defined in your path multiple times!
+SET PATH=$boostRoot\lib;%PATH%
+SET QPID_BUILD_ROOT=$buildRoot
+ECHO Environment set for $slnName $studioVersion $vsPlatform $nBits-bit development.
+")
+ Write-Host " $buildRoot\$outfileName"
+ $out | Out-File "$buildRoot\$outfileName" -encoding ASCII
+}
+
+#############################
+# WriteCmakeRerunnerBat
+# Write a batch file that runs cmake again
+#
+function WriteCmakeRerunnerBat
+{
+ param
+ (
+ [string] $slnName,
+ [string] $boostRoot,
+ [string] $buildRoot,
+ [string] $vsPlatform,
+ [string] $nBits,
+ [string] $outfileName,
+ [string] $studioVersion,
+ [string] $studioSubdir,
+ [string] $cmakeLine
+ )
+
+ $out = @("@ECHO OFF
+REM
+REM Call this command procedure from a command prompt to rerun cmake
+REM $studioVersion $vsPlatform ($nBits-bit)
+REM
+$cmakeLine
+")
+ Write-Host " $buildRoot\$outfileName"
+ $out | Out-File "$buildRoot\$outfileName" -encoding ASCII
+}
+
+#############################
+# WriteMakeInstallBat
+# Write a batch file that runs "make install" for debug build
+#
+function WriteMakeInstallBat
+{
+ param
+ (
+ [string] $buildRoot,
+ [string] $outfileName,
+ [string] $varfileName,
+ [string] $vsEnvironment,
+ [string] $vsBuildTarget
+ )
+
+ $out = @("@ECHO OFF
+REM
+REM Call this command procedure from a command prompt to run 'make install'
+REM
+setlocal
+call $varfileName
+call $vsEnvironment
+devenv qpid-cpp.sln /build $vsBuildTarget /project INSTALL
+endlocal
+")
+ Write-Host " $buildRoot\$outfileName"
+ $out | Out-File "$buildRoot\$outfileName" -encoding ASCII
+}
+
+#############################
+# Given a visual studio selection from command line or selection list
+# Return the visual studio and architecture settings or exit
+#
+function ParseStudioSelection
+{
+ param
+ (
+ [string] $vsSelection
+ )
+ Write-Host "Checking studio version: $vsSelection"
+ if ($vsSelection.Contains("2012")) {
+ $global:vsVersion = "Visual Studio 2012"
+ $global:cmakeGenerator = "Visual Studio 11"
+ $global:vsSubdir = "msvc11"
+ $global:vsSubdirX = "msvcx"
+ $global:cmakeCompiler = "-vc110"
+ $global:vsShortName = "2012"
+ $global:vsEnvironment = """%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"""
+ } elseif ($vsSelection.Contains("2010")) {
+ $global:vsVersion = "Visual Studio 2010"
+ $global:cmakeGenerator = "Visual Studio 10"
+ $global:vsSubdir = "msvc10"
+ $global:vsSubdirX = "msvcx"
+ $global:cmakeCompiler = "-vc100"
+ $global:vsShortName = "2010"
+ $global:vsEnvironment = """%VS100COMNTOOLS%..\..\VC\vcvarsall.bat"""
+ } elseif ($vsSelection.Contains("2008")) {
+ $global:vsVersion = "Visual Studio 2008"
+ $global:cmakeGenerator = "Visual Studio 9 2008"
+ $global:vsSubdir = "msvc9"
+ $global:vsSubdirX = "msvc9"
+ $global:cmakeCompiler = "-vc90"
+ $global:vsShortName = "2008"
+ $global:vsEnvironment = """%VS90COMNTOOLS%..\..\VC\vcvarsall.bat"""
+ } else {
+ Write-Host "Visual Studio must be 2008, 2010, or 2012"
+ exit
+ }
+ $global:vsSelectedOption = $vsSelection
+
+ if ($vsSelection.Contains("x86")) {
+ $global:buildPathSizeId = "x86"
+ $global:build32or64 = "32"
+ $global:vsEnvironment += " x86"
+ $global:vsBuildTarget = """Debug|Win32"""
+ } elseif ($vsSelection.Contains("x64")) {
+ $global:buildPathSizeId = "x64"
+ $global:build32or64 = "64"
+ $global:vsEnvironment += " amd64"
+ $global:vsBuildTarget = """Debug|x64"""
+ # Promote CMAKE generator to 64 bit variant
+ $global:cmakeGenerator += " Win64"
+ } else {
+ Write-Host "Studio selection must contain x86 or x64"
+ exit
+ }
+}
+
+#############################
+# When the user presses 'select' then this function handles it.
+# Return the visual studio and architecture.
+# Close the form.
+#
+function SelectVisualStudio {
+ if ($DropDown.SelectedItem -ne $null) {
+ $vsVersion = $DropDown.SelectedItem.ToString()
+
+ ParseStudioSelection $vsVersion
+
+ $Form.Close() 2> $null
+ Write-Host "Selected generator: $global:cmakeGenerator"
+ }
+}
+
+#############################
+# Create the Visual Studio version form and launch it
+#
+function SelectVisualStudioVersion {
+
+ $Form = New-Object System.Windows.Forms.Form
+
+ $Form.width = 350
+ $Form.height = 150
+ $Form.Text = "Select Visual Studio Version and platform"
+
+ $DropDown = new-object System.Windows.Forms.ComboBox
+ $DropDown.Location = new-object System.Drawing.Size(120,10)
+ $DropDown.Size = new-object System.Drawing.Size(150,30)
+
+ ForEach ($Item in $global:VsVersionCmakeChoiceList) {
+ [void] $DropDown.Items.Add($Item)
+ }
+ $DropDown.SelectedIndex = 0
+
+ $Form.Controls.Add($DropDown)
+
+ $Button = new-object System.Windows.Forms.Button
+ $Button.Location = new-object System.Drawing.Size(120,50)
+ $Button.Size = new-object System.Drawing.Size(120,20)
+ $Button.Text = "Select"
+ $Button.Add_Click({SelectVisualStudio})
+ $form.Controls.Add($Button)
+
+ $Form.Add_Shown({$Form.Activate()})
+ $Form.ShowDialog()
+}
+
+
+#############################
+# Main
+#############################
+#
+# curDir is qpid\cpp\bindings\qpid\dotnet.
+#
+[string] $curDir = Split-Path -parent $MyInvocation.MyCommand.Definition
+[string] $projRoot = Resolve-Path (Join-Path $curDir "..\..\..\..")
+[string] $cppDir = Resolve-Path (Join-Path $curDir "..\..\..")
+
+[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
+[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null
+
+#############################
+# Get command line args
+#
+if ($args.Length -ge 1) {
+ if (($args[0].Contains("help")) -or ($args[0].Contains("-h"))) {
+ Usage
+ exit
+ }
+
+ $vsVer = $args[0]
+ ParseStudioSelection $vsVer
+}
+
+if ($args.Length -ge 2) {
+ $global:boostRootPath = $args[1]
+}
+
+#############################
+# User dialog to select a version of Visual Studio as CMake generator
+#
+if ($global:vsVersion -eq '') {
+ SelectVisualStudioVersion
+}
+
+#############################
+# User dialog to get boost paths
+#
+if ($global:boostRootPath -eq '') {
+ $global:boostRootPath = Select-Folder -message "Select BOOST_ROOT folder for $global:vsSelectedOption build. Press CANCEL to quit"
+}
+
+#############################
+# Decide to run cmake or not.
+# If the build directory is absent the run cmake
+# If the build directory already exists then it's the user's choice
+#
+$make = 0
+$defined = ($global:boostRootPath -ne $null) -and ($global:boostRootPath -ne '')
+if ($defined) {
+ $found = SanityCheckBoostPath $global:boostRootPath
+ if (! $found) {
+ exit
+ }
+
+ $build = Join-Path $projRoot "build_${global:vsShortName}_${global:buildPathSizeId}"
+ $install = Join-Path $projRoot "install_${global:vsShortName}_${global:buildPathSizeId}"
+
+ $found = SanityCheckBuildPath $build
+ if ($found) {
+ $make = AskYesOrNo "build directory ""$build"" appears to have run cmake already. Run cmake again?"
+ } else {
+ $make = 1
+ }
+}
+
+if (! $make) {
+ exit
+}
+
+#############################
+# run CMake
+#
+if(!(Test-Path -Path $build)) {
+ New-Item -ItemType directory -Path $build
+}
+cd "$build"
+$global:cmakeCommandLine = "CMake -G ""$global:cmakeGenerator"" "
+$global:cmakeCommandLine += """-DBUILD_DOCS=No"" "
+$global:cmakeCommandLine += """-DCMAKE_INSTALL_PREFIX=$install"" "
+$global:cmakeCommandLine += """-DBoost_COMPILER=$global:cmakeCompiler"" "
+$global:cmakeCommandLine += """-DBOOST_ROOT=$global:boostRootPath"" "
+$global:cmakeCommandLine += """-DINSTALL_QMFGEN=No"" "
+$global:cmakeCommandLine += $cppDir
+Write-Host "Running CMake in $build : $global:cmakeCommandLine"
+& cmd /c "$global:cmakeCommandLine 2>&1"
+
+
+#############################
+# Emit scripts
+#
+Write-Host "Writing helper scripts..."
+
+###########
+# Powershell script to launch org.apache.qpid.messaging.sln
+#
+WriteDotnetBindingSlnLauncherPs1 -slnName "org.apache.qpid.messaging.sln" `
+ -boostRoot "$global:boostRootPath" `
+ -buildRoot "$build" `
+ -cppDir "$cppDir" `
+ -vsPlatform $global:buildPathSizeId `
+ -nBits $global:build32or64 `
+ -outfileName "start-devenv-messaging-$global:vsSubdir-$global:buildPathSizeId-$global:build32or64-bit.ps1" `
+ -studioVersion "$global:vsVersion" `
+ -studioSubdir "$global:vsSubdir"
+
+###########
+# Batch script (that you doubleclick) to launch powershell script
+# that launches org.apache.qpid.messaging.sln.
+#
+WriteDotnetBindingSlnLauncherBat -slnName "org.apache.qpid.messaging.sln" `
+ -buildRoot "$build" `
+ -vsPlatform $global:buildPathSizeId `
+ -nBits $global:build32or64 `
+ -psScriptName "start-devenv-messaging-$global:vsSubdir-$global:buildPathSizeId-$global:build32or64-bit.ps1" `
+ -outfileName "start-devenv-messaging-$global:vsSubdir-$global:buildPathSizeId-$global:build32or64-bit.bat" `
+ -studioVersion "$global:vsVersion" `
+ -studioSubdir "$global:vsSubdir"
+
+###########
+# Batch script (that you CALL from a command prompt)
+# to establish the org.apache.qpid.messaging.sln build environment.
+#
+WriteDotnetBindingEnvSetupBat -slnName "org.apache.qpid.messaging.sln" `
+ -boostRoot "$global:boostRootPath" `
+ -buildRoot "$build" `
+ -vsPlatform $global:buildPathSizeId `
+ -nBits $global:build32or64 `
+ -outfileName "setenv-messaging-$global:vsSubdir-$global:buildPathSizeId-$global:build32or64-bit.bat" `
+ -studioVersion "$global:vsVersion" `
+ -studioSubdir "$global:vsSubdir" `
+ -cmakeLine "$global:cmakeCommandLine"
+
+###########
+# Batch script to re-run cmake
+#
+WriteCmakeRerunnerBat -slnName "org.apache.qpid.messaging.sln" `
+ -boostRoot ""$global:boostRootPath"" `
+ -buildRoot "$build" `
+ -vsPlatform $global:buildPathSizeId `
+ -nBits $global:build32or64 `
+ -outfileName "run-cmake.bat" `
+ -studioVersion "$global:vsVersion" `
+ -studioSubdir "$global:vsSubdir" `
+ -cmakeLine "$global:cmakeCommandLine"
+
+###########
+# Batch script to do command line "make install"
+#
+WriteMakeInstallBat -buildRoot "$build" `
+ -outfileName "make-install.bat" `
+ -varfileName "setenv-messaging-$global:vsSubdir-$global:buildPathSizeId-$global:build32or64-bit.bat" `
+ -vsEnvironment $global:vsEnvironment `
+ -vsBuildTarget $global:vsBuildTarget
+
+#############################
+# Pause on exit. If user ran this script through a graphical launch and there's
+# an error then the window closes and the user never sees the error. This pause
+# gives him a chance to figure it out.
+#
+#Write-Host "Press any key to continue ..."
+#[void] $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..6976be5d02 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.direct.receiver")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.direct.receiver")]
+[assembly: AssemblyCopyright("Copyright 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs new file mode 100644 index 0000000000..592a05ab29 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs @@ -0,0 +1,79 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using Org.Apache.Qpid.Messaging;
+
+namespace CSharpDirect
+{
+ class Program
+ {
+ // Direct receiver example
+ //
+ // Receive 10 messages from localhost:5672, amq.direct/key
+ // Messages are assumed to be printable strings.
+ //
+ static int Main(string[] args)
+ {
+ String host = "localhost:5672";
+ String addr = "amq.direct/key";
+ Int32 nMsg = 10;
+
+ if (args.Length > 0)
+ host = args[0];
+ if (args.Length > 1)
+ addr = args[1];
+ if (args.Length > 2)
+ nMsg = Convert.ToInt32(args[2]);
+
+ Console.WriteLine("csharp.direct.receiver");
+ Console.WriteLine("host : {0}", host);
+ Console.WriteLine("addr : {0}", addr);
+ Console.WriteLine("nMsg : {0}", nMsg);
+ Console.WriteLine();
+
+ Connection connection = null;
+ try
+ {
+ connection = new Connection(host);
+ connection.Open();
+ if (!connection.IsOpen) {
+ Console.WriteLine("Failed to open connection to host : {0}", host);
+ } else {
+ Session session = connection.CreateSession();
+ Receiver receiver = session.CreateReceiver(addr);
+ Message message = new Message("");
+ for (int i = 0; i < nMsg; i++) {
+ Message msg2 = receiver.Fetch(DurationConstants.FORVER);
+ Console.WriteLine("Rcvd msg {0} : {1}", i, msg2.GetContent());
+ }
+ connection.Close();
+ return 0;
+ }
+ } catch (Exception e) {
+ Console.WriteLine("Exception {0}.", e);
+ if (null != connection)
+ connection.Close();
+ }
+ return 1;
+ }
+ }
+}
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..12368def8e --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.direct.sender")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.direct.sender")]
+[assembly: AssemblyCopyright("Copyright 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("19ce67e4-db90-4480-88c4-3721f47634c7")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs new file mode 100644 index 0000000000..a0ac742a45 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs @@ -0,0 +1,80 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using Org.Apache.Qpid.Messaging;
+
+namespace csharp.direct.sender
+{
+ class Program
+ {
+ // Direct sender example
+ //
+ // Send 10 messages from localhost:5672, amq.direct/key
+ // Messages are assumed to be printable strings.
+ //
+ static int Main(string[] args)
+ {
+ String host = "localhost:5672";
+ String addr = "amq.direct/key";
+ Int32 nMsg = 10;
+
+ if (args.Length > 0)
+ host = args[0];
+ if (args.Length > 1)
+ addr = args[1];
+ if (args.Length > 2)
+ nMsg = Convert.ToInt32(args[2]);
+
+ Console.WriteLine("csharp.direct.sender");
+ Console.WriteLine("host : {0}", host);
+ Console.WriteLine("addr : {0}", addr);
+ Console.WriteLine("nMsg : {0}", nMsg);
+ Console.WriteLine();
+
+ Connection connection = null;
+ try
+ {
+ connection = new Connection(host);
+ connection.Open();
+
+ if (!connection.IsOpen) {
+ Console.WriteLine("Failed to open connection to host : {0}", host);
+ } else {
+ Session session = connection.CreateSession();
+ Sender sender = session.CreateSender(addr);
+ for (int i = 0; i < nMsg; i++) {
+ Message message = new Message(String.Format("Test Message {0}", i));
+ sender.Send(message);
+ }
+ session.Sync();
+ connection.Close();
+ return 0;
+ }
+ } catch (Exception e) {
+ Console.WriteLine("Exception {0}.", e);
+ if (null != connection)
+ connection.Close();
+ }
+ return 1;
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.client/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.client/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..eddb759ef1 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.client/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.example.client")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.example.client")]
+[assembly: AssemblyCopyright("Copyright ? 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.client/csharp.example.client.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.client/csharp.example.client.cs new file mode 100644 index 0000000000..19a5267297 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.client/csharp.example.client.cs @@ -0,0 +1,75 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.Examples {
+ class Client {
+ static int Main(string[] args) {
+ String url = "amqp:tcp:127.0.0.1:5672";
+ String connectionOptions = "";
+
+ if (args.Length > 0)
+ url = args[0];
+ if (args.Length > 1)
+ connectionOptions = args[1];
+
+ Connection connection = new Connection(url, connectionOptions);
+ try
+ {
+ connection.Open();
+
+ Session session = connection.CreateSession();
+
+ Sender sender = session.CreateSender("service_queue");
+
+ Address responseQueue = new Address("#response-queue; {create:always, delete:always}");
+ Receiver receiver = session.CreateReceiver(responseQueue);
+
+ String[] s = new String[] {
+ "Twas brillig, and the slithy toves",
+ "Did gire and gymble in the wabe.",
+ "All mimsy were the borogroves,",
+ "And the mome raths outgrabe."
+ };
+
+ Message request = new Message("");
+ request.ReplyTo = responseQueue;
+
+ for (int i = 0; i < s.Length; i++) {
+ request.SetContent(s[i]);
+ sender.Send(request);
+ Message response = receiver.Fetch();
+ Console.WriteLine("{0} -> {1}", request.GetContent(), response.GetContent());
+ }
+ connection.Close();
+ return 0;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Exception {0}.", e);
+ connection.Close();
+ }
+ return 1;
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.declare_queues/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.declare_queues/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..4e065803f6 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.declare_queues/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.example.declare_queues")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.example.declare_queues")]
+[assembly: AssemblyCopyright("Copyright ? 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.declare_queues/csharp.example.declare_queues.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.declare_queues/csharp.example.declare_queues.cs new file mode 100644 index 0000000000..06267bf719 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.declare_queues/csharp.example.declare_queues.cs @@ -0,0 +1,60 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.Examples {
+ class DeclareQueues {
+ //
+ // Sample invocation: csharp.example.declare_queues.exe localhost:5672 my-queue
+ //
+ static int Main(string[] args) {
+ string addr = "localhost:5672";
+ string queue = "my-queue";
+
+ if (args.Length > 0)
+ addr = args[0];
+ if (args.Length > 1)
+ queue = args[1];
+
+ Connection connection = null;
+ try
+ {
+ connection = new Connection(addr);
+ connection.Open();
+ Session session = connection.CreateSession();
+ String queueName = queue + "; {create: always}";
+ Sender sender = session.CreateSender(queueName);
+ session.Close();
+ connection.Close();
+ return 0;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Exception {0}.", e);
+ if (null != connection)
+ connection.Close();
+ }
+ return 1;
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/Options.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/Options.cs new file mode 100644 index 0000000000..6059f76442 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/Options.cs @@ -0,0 +1,175 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+namespace Org.Apache.Qpid.Messaging.Examples
+{
+ using System;
+
+ public class Options
+ {
+ private string url;
+ private string address;
+ private UInt64 timeout;
+ private int count;
+ private string id;
+ private string replyTo;
+ //private string[] properties;
+ //private string[] entries;
+ private string content;
+ private string connectionOptions;
+ private bool forever;
+
+ public Options(string[] args)
+ {
+ this.url = "amqp:tcp:127.0.0.1:5672";
+ this.address = "";
+ this.timeout = 0;
+ this.count = 1;
+ this.id = "";
+ this.replyTo = "";
+ this.content = "";
+ this.connectionOptions = "";
+ this.forever = false;
+ Parse(args);
+ }
+
+ private void Parse(string[] args)
+ {
+ int argCount = args.Length;
+ int current = 0;
+
+ while ((current + 1) < argCount)
+ {
+ string arg = args[current];
+ if (arg == "--broker")
+ {
+ this.url = args[++current];
+ }
+ else if (arg == "--address")
+ {
+ this.address = args[++current];
+ }
+ else if (arg == "--timeout")
+ {
+ arg = args[++current];
+ UInt64 i = UInt64.Parse(arg);
+ if (i >= 0)
+ {
+ this.timeout = i;
+ }
+ }
+ else if (arg == "--count")
+ {
+ arg = args[++current];
+ int i = int.Parse(arg);
+ if (i >= 0)
+ {
+ this.count = i;
+ }
+ }
+ else if (arg == "--id")
+ {
+ this.id = args[++current];
+ }
+ else if (arg == "--reply-to")
+ {
+ this.replyTo = args[++current];
+ }
+ else if (arg == "--properties")
+ {
+ throw new ArgumentException("TODO: properties not implemented");
+ }
+ else if (arg == "--entries")
+ {
+ throw new ArgumentException("TODO: entries not implemented");
+ }
+ else if (arg == "--content")
+ {
+ this.content = args[++current];
+ }
+ else if (arg == "--connection-options")
+ {
+ this.connectionOptions = args[++current];
+ }
+ else if (arg == "--forever")
+ {
+ this.forever = true;
+ }
+ else
+ {
+ throw new ArgumentException(String.Format("unknown argument \"{0}\"", arg));
+ }
+
+ current++;
+ }
+
+ if (current == argCount)
+ {
+ throw new ArgumentException("missing argument: address");
+ }
+
+ address = args[current];
+ }
+
+ public string Url
+ {
+ get { return this.url; }
+ }
+
+ public string Address
+ {
+ get { return this.address; }
+ }
+
+ public UInt64 Timeout
+ {
+ get { return this.timeout; }
+ }
+
+ public int Count
+ {
+ get { return this.count; }
+ }
+
+ public string Id
+ {
+ get { return this.id; }
+ }
+
+ public string ReplyTo
+ {
+ get { return this.replyTo; }
+ }
+
+ public string Content
+ {
+ get { return content; }
+ }
+
+ public string ConnectionOptions
+ {
+ get { return this.connectionOptions; }
+ }
+
+ public bool Forever
+ {
+ get { return this.forever; }
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..d949dde644 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.example.drain")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.example.drain")]
+[assembly: AssemblyCopyright("Copyright ? 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs new file mode 100644 index 0000000000..da8218bbf7 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs @@ -0,0 +1,88 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.Examples {
+ class Drain {
+ //
+ // Sample invocation: csharp.example.drain.exe --broker localhost:5672 --timeout 30 my-queue
+ //
+ static int Main(string[] args) {
+ Options options = new Options(args);
+
+ Connection connection = null;
+ try
+ {
+ connection = new Connection(options.Url, options.ConnectionOptions);
+ connection.Open();
+ Session session = connection.CreateSession();
+ Receiver receiver = session.CreateReceiver(options.Address);
+ Duration timeout = options.Forever ?
+ DurationConstants.FORVER :
+ DurationConstants.SECOND * options.Timeout;
+ Message message = new Message();
+
+ while (receiver.Fetch(ref message, timeout))
+ {
+ Dictionary<string, object> properties = new Dictionary<string, object>();
+ properties = message.Properties;
+ Console.Write("Message(properties={0}, content='",
+ message.MapAsString(properties));
+
+ if ("amqp/map" == message.ContentType)
+ {
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ message.GetContent(content);
+ Console.Write(message.MapAsString(content));
+ }
+ else if ("amqp/list" == message.ContentType)
+ {
+ Collection<object> content = new Collection<object>();
+ message.GetContent(content);
+ Console.Write(message.ListAsString(content));
+ }
+ else
+ {
+ Console.Write(message.GetContent());
+ }
+ Console.WriteLine("')");
+ session.Acknowledge();
+ }
+ receiver.Close();
+ session.Close();
+ connection.Close();
+ return 0;
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine("Exception {0}.", e);
+ if (null != connection)
+ connection.Close();
+ }
+ return 1;
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.helloworld/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.helloworld/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..17bbd842b0 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.helloworld/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.example.helloworld")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.example.helloworld")]
+[assembly: AssemblyCopyright("Copyright ? 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("19ce67e4-db90-4480-88c4-3721f47634c7")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.helloworld/csharp.example.helloworld.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.helloworld/csharp.example.helloworld.cs new file mode 100644 index 0000000000..336970a3ba --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.helloworld/csharp.example.helloworld.cs @@ -0,0 +1,55 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging {
+ class Program {
+ static void Main(string[] args) {
+ String broker = args.Length > 0 ? args[0] : "localhost:5672";
+ String address = args.Length > 1 ? args[1] : "amq.topic";
+
+ Connection connection = null;
+ try {
+ connection = new Connection(broker);
+ connection.Open();
+ Session session = connection.CreateSession();
+
+ Receiver receiver = session.CreateReceiver(address);
+ Sender sender = session.CreateSender(address);
+
+ sender.Send(new Message("Hello world!"));
+
+ Message message = new Message();
+ message = receiver.Fetch(DurationConstants.SECOND * 1);
+ Console.WriteLine("{0}", message.GetContent());
+ session.Acknowledge();
+
+ connection.Close();
+ } catch (Exception e) {
+ Console.WriteLine("Exception {0}.", e);
+ if (null != connection)
+ connection.Close();
+ }
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.server/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.server/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..7f0fd52997 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.server/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.example.server")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.example.server")]
+[assembly: AssemblyCopyright("Copyright ? 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.server/csharp.example.server.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.server/csharp.example.server.cs new file mode 100644 index 0000000000..7e0b259a23 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.server/csharp.example.server.cs @@ -0,0 +1,66 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.Examples {
+ class Server {
+ static int Main(string[] args) {
+ // Usage: csharp.example.server [url [connectionOptions]]
+ string url = "amqp:tcp:127.0.0.1:5672";
+ string connectionOptions = "";
+
+ if (args.Length > 0)
+ url = args[0];
+ if (args.Length > 1)
+ connectionOptions = args[1];
+
+ try {
+ Connection connection = new Connection(url, connectionOptions);
+ connection.Open();
+ Session session = connection.CreateSession();
+ Receiver receiver = session.CreateReceiver("service_queue; {create: always}");
+
+ while (true) {
+ Message request = receiver.Fetch();
+ Address address = request.ReplyTo;
+
+ if (null != address) {
+ Sender sender = session.CreateSender(address);
+ String s = request.GetContent();
+ Message response = new Message(s.ToUpper());
+ sender.Send(response);
+ Console.WriteLine("Processed request: {0} -> {1}", request.GetContent(), response.GetContent());
+ session.Acknowledge();
+ } else {
+ Console.WriteLine("Error: no reply address specified for request: {0}", request.GetContent());
+ session.Reject(request);
+ }
+ }
+ // connection.Close(); // unreachable in this example
+ } catch (Exception e) {
+ Console.WriteLine("Exception {0}.", e);
+ }
+ return 1;
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/Options.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/Options.cs new file mode 100644 index 0000000000..9ceb11e520 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/Options.cs @@ -0,0 +1,185 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+namespace Org.Apache.Qpid.Messaging.Examples
+{
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+
+ public class Options
+ {
+ private string url;
+ private string address;
+ private int timeout;
+ private int count;
+ private string id;
+ private string replyTo;
+ private Collection<string> properties;
+ private Collection<string> entries;
+ private string content;
+ private string connectionOptions;
+ private bool forever;
+
+ public Options(string[] args)
+ {
+ this.url = "amqp:tcp:127.0.0.1:5672";
+ this.address = "";
+ this.timeout = 0;
+ this.count = 1;
+ this.id = "";
+ this.replyTo = "";
+ properties = new Collection<string>();
+ entries = new Collection<string>();
+ this.content = "";
+ this.connectionOptions = "";
+ this.forever = false;
+ Parse(args);
+ }
+
+ private void Parse(string[] args)
+ {
+ int argCount = args.Length;
+ int current = 0;
+
+ while ((current + 1) < argCount)
+ {
+ string arg = args[current];
+ if (arg == "--broker")
+ {
+ this.url = args[++current];
+ }
+ else if (arg == "--address")
+ {
+ this.address = args[++current];
+ }
+ else if (arg == "--timeout")
+ {
+ arg = args[++current];
+ int i = int.Parse(arg);
+ if (i >= 0)
+ {
+ this.timeout = i;
+ }
+ }
+ else if (arg == "--count")
+ {
+ arg = args[++current];
+ int i = int.Parse(arg);
+ if (i >= 0)
+ {
+ this.count = i;
+ }
+ }
+ else if (arg == "--id")
+ {
+ this.id = args[++current];
+ }
+ else if (arg == "--reply-to")
+ {
+ this.replyTo = args[++current];
+ }
+ else if (arg == "--properties")
+ {
+ this.properties.Add(args[++current]);
+ }
+ else if (arg == "--map")
+ {
+ this.entries.Add(args[++current]);
+ }
+ else if (arg == "--content")
+ {
+ this.content = args[++current];
+ }
+ else if (arg == "--connection-options")
+ {
+ this.connectionOptions = args[++current];
+ }
+ else if (arg == "--forever")
+ {
+ this.forever = true;
+ }
+ else
+ {
+ throw new ArgumentException(String.Format("unknown argument \"{0}\"", arg));
+ }
+
+ current++;
+ }
+
+ if (current == argCount)
+ {
+ throw new ArgumentException("missing argument: address");
+ }
+
+ address = args[current];
+ }
+
+ public string Url
+ {
+ get { return this.url; }
+ }
+
+ public string Address
+ {
+ get { return this.address; }
+ }
+
+ public int Timeout
+ {
+ get { return this.timeout; }
+ }
+
+ public int Count
+ {
+ get { return this.count; }
+ }
+
+ public string Id
+ {
+ get { return this.id; }
+ }
+
+ public string ReplyTo
+ {
+ get { return this.replyTo; }
+ }
+
+ public Collection<string> Entries
+ {
+ get { return this.entries; }
+ }
+
+ public string Content
+ {
+ get { return content; }
+ }
+
+ public string ConnectionOptions
+ {
+ get { return this.connectionOptions; }
+ }
+
+ public bool Forever
+ {
+ get { return this.forever; }
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..f07c780571 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.example.spout")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.example.spout")]
+[assembly: AssemblyCopyright("Copyright ? 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/csharp.example.spout.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/csharp.example.spout.cs new file mode 100644 index 0000000000..531abadd4c --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.example.spout/csharp.example.spout.cs @@ -0,0 +1,120 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using System.Diagnostics;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.Examples {
+ class Spout {
+ //
+ // Sample invocation: csharp.example.spout.exe --broker localhost:5672 my-queue
+ //
+ static bool NameVal(string In, out string nameOut, out string valueOut)
+ {
+ int pos = In.IndexOf("=");
+ if (-1 == pos) {
+ nameOut = In;
+ valueOut = "";
+ return false;
+ } else {
+ nameOut = In.Substring(0, pos);
+ if (pos + 1 < In.Length) {
+ valueOut = In.Substring(pos + 1);
+ return true;
+ } else {
+ valueOut = "";
+ return false;
+ }
+ }
+ }
+
+ static void SetEntries(Collection<string> entries, Dictionary<string, object> content)
+ {
+ foreach (String entry in entries)
+ {
+ string name = "";
+ string value = "";
+ if (NameVal(entry, out name, out value))
+ content.Add(name, value);
+ else
+ content.Add(name, "");
+ }
+ }
+
+ static int Main(string[] args) {
+ Options options = new Options(args);
+
+ Connection connection = null;
+ try
+ {
+ connection = new Connection(options.Url, options.ConnectionOptions);
+ connection.Open();
+ Session session = connection.CreateSession();
+ Sender sender = session.CreateSender(options.Address);
+ Message message;
+ if (options.Entries.Count > 0)
+ {
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ SetEntries(options.Entries, content);
+ message = new Message(content);
+ }
+ else
+ {
+ message = new Message(options.Content);
+ message.ContentType = "text/plain";
+ }
+ Address replyToAddr = new Address(options.ReplyTo);
+
+ Stopwatch stopwatch = new Stopwatch();
+ TimeSpan timespan = new TimeSpan(0,0,options.Timeout);
+ stopwatch.Start();
+ for (int count = 0;
+ (0 == options.Count || count < options.Count) &&
+ (0 == options.Timeout || stopwatch.Elapsed <= timespan);
+ count++)
+ {
+ if ("" != options.ReplyTo) message.ReplyTo = replyToAddr;
+ string id = options.Id ;
+ if ("" == id) {
+ Guid g = Guid.NewGuid();
+ id = g.ToString();
+ }
+ string spoutid = id + ":" + count;
+ message.SetProperty("spout-id", spoutid);
+ sender.Send(message);
+ }
+ session.Sync();
+ connection.Close();
+ return 0;
+ } catch (Exception e) {
+ Console.WriteLine("Exception {0}.", e);
+ if (null != connection)
+ connection.Close();
+ }
+ return 1;
+ }
+ }
+}
+
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..459130ec6c --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.map.callback.receiver")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.map.callback.receiver")]
+[assembly: AssemblyCopyright("Copyright 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("002049f9-41c5-420f-9ff6-45bb652dded6")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs new file mode 100644 index 0000000000..3bc22b2ce8 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs @@ -0,0 +1,310 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using Org.Apache.Qpid.Messaging;
+using Org.Apache.Qpid.Messaging.SessionReceiver;
+
+namespace Org.Apache.Qpid.Messaging.Examples
+{
+ /// <summary>
+ /// A class with functions to display structured messages.
+ /// </summary>
+ public static class MessageViewer
+ {
+ /// <summary>
+ /// A Function to display a amqp/map message packaged as a Dictionary.
+ /// </summary>
+ /// <param name="dict">The AMQP map</param>
+ /// <param name="level">Nested depth</param>
+ public static void ShowDictionary(Dictionary<string, object> dict, int level)
+ {
+ foreach (KeyValuePair<string, object> kvp in dict)
+ {
+ Console.Write(new string(' ', level * 4));
+
+ if (QpidTypeCheck.ObjectIsMap(kvp.Value))
+ {
+ Console.WriteLine("Key: {0}, Value: Dictionary", kvp.Key);
+ ShowDictionary((Dictionary<string, object>)kvp.Value, level + 1);
+ }
+ else if (QpidTypeCheck.ObjectIsList(kvp.Value))
+ {
+ Console.WriteLine("Key: {0}, Value: List", kvp.Key);
+ ShowList((Collection<object>)kvp.Value, level + 1);
+ }
+ else
+ Console.WriteLine("Key: {0}, Value: {1}, Type: {2}",
+ kvp.Key, kvp.Value, kvp.Value.GetType().ToString());
+ }
+ }
+
+ /// <summary>
+ /// A function to display a ampq/list message packaged as a List.
+ /// </summary>
+ /// <param name="list">The AMQP list</param>
+ /// <param name="level">Nested depth</param>
+ public static void ShowList(Collection<object> list, int level)
+ {
+ foreach (object obj in list)
+ {
+ Console.Write(new string(' ', level * 4));
+
+ if (QpidTypeCheck.ObjectIsMap(obj))
+ {
+ Console.WriteLine("Dictionary");
+ ShowDictionary((Dictionary<string, object>)obj, level + 1);
+ }
+ else if (QpidTypeCheck.ObjectIsList(obj))
+ {
+ Console.WriteLine("List");
+ ShowList((Collection<object>)obj, level + 1);
+ }
+ else
+ Console.WriteLine("Value: {0}, Type: {1}",
+ obj.ToString(), obj.GetType().ToString());
+ }
+ }
+
+ /// <summary>
+ /// A function to diplay a Message. The native Object type is
+ /// decomposed into AMQP types.
+ /// </summary>
+ /// <param name="message">The Message</param>
+ public static void ShowMessage(Message message)
+ {
+ if ("amqp/map" == message.ContentType)
+ {
+ Console.WriteLine("Received a Dictionary");
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ message.GetContent(content);
+ ShowDictionary(content, 0);
+ }
+ else if ("amqp/list" == message.ContentType)
+ {
+ Console.WriteLine("Received a List");
+ Collection<object> content = new Collection<object>();
+ message.GetContent(content);
+ ShowList(content, 0);
+ }
+ else
+ {
+ Console.WriteLine("Received a String");
+ Console.WriteLine(message.GetContent());
+ }
+ }
+ }
+
+
+
+ /// <summary>
+ /// A model class to demonstrate how a user may use the Qpid Messaging
+ /// interface to receive Session messages using a callback.
+ /// </summary>
+ class ReceiverProcess : ISessionReceiver
+ {
+ UInt32 messagesReceived = 0;
+
+ /// <summary>
+ /// SessionReceiver implements the ISessionReceiver interface.
+ /// It is the callback function that receives all messages for a Session.
+ /// It may be called any time server is running.
+ /// It is always called on server's private thread.
+ /// </summary>
+ /// <param name="receiver">The Receiver associated with the message.</param>
+ /// <param name="message">The Message</param>
+ public void SessionReceiver(Receiver receiver, Message message)
+ {
+ //
+ // Indicate message reception
+ //
+ Console.WriteLine("--- Message {0}", ++messagesReceived);
+
+ //
+ // Display the received message
+ //
+ MessageViewer.ShowMessage(message);
+
+ //
+ // Acknowledge the receipt of all received messages.
+ //
+ receiver.Session.Acknowledge();
+ }
+
+
+ /// <summary>
+ /// SessionReceiver implements the ISessionReceiver interface.
+ /// It is the exception function that receives all exception messages
+ /// It may be called any time server is running.
+ /// It is always called on server's private thread.
+ /// After this is called then the sessionReceiver and private thread are closed.
+ /// </summary>
+ /// <param name="exception">The exception.</param>
+ public void SessionException(Exception exception)
+ {
+ // A typical application will take more action here.
+ Console.WriteLine("{0} Exception caught.", exception.ToString());
+ }
+
+
+ /// <summary>
+ /// Usage
+ /// </summary>
+ /// <param name="url">Connection target</param>
+ /// <param name="addr">Address: broker exchange + routing key</param>
+ /// <param name="nSec">n seconds to keep callback open</param>
+ static void usage(string url, string addr, int nSec)
+ {
+
+ Console.WriteLine("usage: {0} [url [addr [nSec]]]",
+ System.Diagnostics.Process.GetCurrentProcess().ProcessName);
+ Console.WriteLine();
+ Console.WriteLine("A program to connect to a broker and receive");
+ Console.WriteLine("messages from a named exchange with a routing key.");
+ Console.WriteLine("The receiver uses a session callback and keeps the callback");
+ Console.WriteLine("server open for so many seconds.");
+ Console.WriteLine("The details of the message body's types and values are shown.");
+ Console.WriteLine();
+ Console.WriteLine(" url = target address for 'new Connection(url)'");
+ Console.WriteLine(" addr = address for 'session.CreateReceiver(addr)'");
+ Console.WriteLine(" nSec = time in seconds to keep the receiver callback open");
+ Console.WriteLine();
+ Console.WriteLine("Default values:");
+ Console.WriteLine(" {0} {1} {2} {3}",
+ System.Diagnostics.Process.GetCurrentProcess().ProcessName,
+ url, addr, nSec);
+ }
+
+
+ /// <summary>
+ /// A function to illustrate how to open a Session callback and
+ /// receive messages.
+ /// </summary>
+ /// <param name="args">Main program arguments</param>
+ public int TestProgram(string[] args)
+ {
+ string url = "amqp:tcp:localhost:5672";
+ string addr = "amq.direct/map_example";
+ int nSec = 30;
+ string connectionOptions = "";
+
+ if (1 == args.Length)
+ {
+ if (args[0].Equals("-h") || args[0].Equals("-H") || args[0].Equals("/?"))
+ {
+ usage(url, addr, nSec);
+ return 1;
+ }
+ }
+
+ if (args.Length > 0)
+ url = args[0];
+ if (args.Length > 1)
+ addr = args[1];
+ if (args.Length > 2)
+ nSec = System.Convert.ToInt32(args[2]);
+ if (args.Length > 3)
+ connectionOptions = args[3];
+
+ //
+ // Create and open an AMQP connection to the broker URL
+ //
+ Connection connection = new Connection(url, connectionOptions);
+ connection.Open();
+
+ //
+ // Create a session.
+ //
+ Session session = connection.CreateSession();
+
+ //
+ // Receive through callback
+ //
+ // Create callback server and implicitly start it
+ //
+ SessionReceiver.CallbackServer cbServer =
+ new SessionReceiver.CallbackServer(session, this);
+
+ //
+ // The callback server is running and executing callbacks on a
+ // separate thread.
+ //
+
+ //
+ // Create a receiver for the direct exchange using the
+ // routing key "map_example".
+ //
+ Receiver receiver = session.CreateReceiver(addr);
+
+ //
+ // Establish a capacity
+ //
+ receiver.Capacity = 100;
+
+ //
+ // Wait so many seconds for messages to arrive.
+ //
+ System.Threading.Thread.Sleep(nSec * 1000); // in mS
+
+ //
+ // Stop the callback server.
+ //
+ cbServer.Close();
+
+ //
+ // Close the receiver and the connection.
+ //
+ try
+ {
+ receiver.Close();
+ connection.Close();
+ }
+ catch (Exception exception)
+ {
+ // receiver or connection may throw if they closed in error.
+ // A typical application will take more action here.
+ Console.WriteLine("{0} Closing exception caught.", exception.ToString());
+ }
+ return 0;
+ }
+ }
+
+
+ class MapCallbackReceiverMain
+ {
+ /// <summary>
+ /// Main program
+ /// </summary>
+ /// <param name="args">Main prgram args</param>
+ static int Main(string[] args)
+ {
+ // Invoke 'TestProgram' as non-static class.
+ ReceiverProcess mainProc = new ReceiverProcess();
+
+ int result = mainProc.TestProgram(args);
+
+ return result;
+ }
+ }
+}
+
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..2be4011f19 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs @@ -0,0 +1,54 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.map.callback.sender")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.map.callback.sender")]
+[assembly: AssemblyCopyright("Copyright 2010")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1eec2eca-adbd-4394-8b01-f4c4645bb122")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs new file mode 100644 index 0000000000..4cc88564e7 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs @@ -0,0 +1,194 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.Examples
+{
+ class MapSender
+ {
+ //
+ // usage
+ //
+ static void usage(string url, string addr, UInt32 count, string connOpts)
+ {
+
+ Console.WriteLine("usage: {0} [url [addr [count]]]",
+ System.Diagnostics.Process.GetCurrentProcess().ProcessName);
+ Console.WriteLine();
+ Console.WriteLine("A program to connect to a broker and send N");
+ Console.WriteLine("messages to a named exchange with a routing key.");
+ Console.WriteLine();
+ Console.WriteLine(" url = target address for 'new Connection(url)'");
+ Console.WriteLine(" addr = address for 'session.CreateReceiver(addr)'");
+ Console.WriteLine(" count = number of messages to send");
+ Console.WriteLine(" connectionOptions = options list");
+ Console.WriteLine();
+ Console.WriteLine("Default values:");
+ Console.WriteLine(" {0} {1} {2} {3} {4}",
+ System.Diagnostics.Process.GetCurrentProcess().ProcessName,
+ url, addr, count, connOpts);
+ }
+
+
+ //
+ // TestProgram
+ //
+ public int TestProgram(string[] args)
+ {
+ string url = "amqp:tcp:localhost:5672";
+ string addr = "amq.direct/map_example";
+ UInt32 count = 1;
+ string connectionOptions = "";
+
+ if (1 == args.Length)
+ {
+ if (args[0].Equals("-h") || args[0].Equals("-H") || args[0].Equals("/?"))
+ {
+ usage(url, addr, count, connectionOptions);
+ return 1;
+ }
+ }
+
+ if (args.Length > 0)
+ url = args[0];
+ if (args.Length > 1)
+ addr = args[1];
+ if (args.Length > 2)
+ count = System.Convert.ToUInt32(args[2]);
+ if (args.Length > 3)
+ connectionOptions = args[3];
+
+ //
+ // Create and open an AMQP connection to the broker URL
+ //
+ Connection connection = new Connection(url, connectionOptions);
+ connection.Open();
+
+ //
+ // Create a session and a sender to the direct exchange using the
+ // routing key "map_example".
+ //
+ Session session = connection.CreateSession();
+ Sender sender = session.CreateSender(addr);
+
+ //
+ // Create structured content for the message. This example builds a
+ // map of items including a nested map and a list of values.
+ //
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ Dictionary<string, object> subMap = new Dictionary<string, object>();
+ Collection<object> colors = new Collection<object>();
+
+ // add simple types
+ content["id"] = 987654321;
+ content["name"] = "Widget";
+ content["percent"] = 0.99;
+
+ // add nested amqp/map
+ subMap["name"] = "Smith";
+ subMap["number"] = 354;
+ content["nestedMap"] = subMap;
+
+ // add an amqp/list
+ colors.Add("red");
+ colors.Add("green");
+ colors.Add("white");
+ content["colorsList"] = colors;
+
+ // add one of each supported amqp data type
+ bool mybool = true;
+ content["mybool"] = mybool;
+
+ byte mybyte = 4;
+ content["mybyte"] = mybyte;
+
+ UInt16 myUInt16 = 5;
+ content["myUInt16"] = myUInt16;
+
+ UInt32 myUInt32 = 6;
+ content["myUInt32"] = myUInt32;
+
+ UInt64 myUInt64 = 7;
+ content["myUInt64"] = myUInt64;
+
+ char mychar = 'h';
+ content["mychar"] = mychar;
+
+ Int16 myInt16 = 9;
+ content["myInt16"] = myInt16;
+
+ Int32 myInt32 = 10;
+ content["myInt32"] = myInt32;
+
+ Int64 myInt64 = 11;
+ content["myInt64"] = myInt64;
+
+ Single mySingle = (Single)12.12;
+ content["mySingle"] = mySingle;
+
+ Double myDouble = 13.13;
+ content["myDouble"] = myDouble;
+
+ Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f");
+ content["myGuid"] = myGuid;
+
+ //
+ // Construct a message with the map content and send it synchronously
+ // via the sender.
+ //
+ Message message = new Message(content);
+ for (UInt32 i = 0; i<count; i++)
+ sender.Send(message, true);
+
+ //
+ // Wait until broker receives all messages.
+ //
+ session.Sync();
+
+ //
+ // Close the connection.
+ //
+ connection.Close();
+
+ return 0;
+ }
+ }
+
+ class MapSenderMain
+ {
+ //
+ // Main
+ //
+ static int Main(string[] args)
+ {
+ // Invoke 'TestProgram' as non-static class.
+ MapSender mainProc = new MapSender();
+
+ int result = mainProc.TestProgram(args);
+
+ return result;
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..f11ce8c220 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.map.receiver")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.map.receiver")]
+[assembly: AssemblyCopyright("Copyright 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("002049f9-41c5-420f-9ff6-45bb652dded6")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.cs new file mode 100644 index 0000000000..f8bd9e9294 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.cs @@ -0,0 +1,87 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.examples
+{
+ class MapReceiver
+ {
+ // csharp.map.receiver example
+ //
+ // Send an amqp/map message to amqp:tcp:localhost:5672 amq.direct/map_example
+ // The map message
+ //
+ static int Main(string[] args)
+ {
+ string url = "amqp:tcp:localhost:5672";
+ string address = "message_queue; {create: always}";
+ string connectionOptions = "";
+
+ if (args.Length > 0)
+ url = args[0];
+ if (args.Length > 1)
+ address = args[1];
+ if (args.Length > 2)
+ connectionOptions = args[2];
+
+ //
+ // Create and open an AMQP connection to the broker URL
+ //
+ Connection connection = new Connection(url);
+ connection.Open();
+
+ //
+ // Create a session and a receiver fir the direct exchange using the
+ // routing key "map_example".
+ //
+ Session session = connection.CreateSession();
+ Receiver receiver = session.CreateReceiver(address);
+
+ //
+ // Fetch the message from the broker
+ //
+ Message message = receiver.Fetch(DurationConstants.MINUTE);
+
+ //
+ // Extract the structured content from the message.
+ //
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ message.GetContent(content);
+ Console.WriteLine("{0}", message.AsString(content));
+
+ //
+ // Acknowledge the receipt of all received messages.
+ //
+ session.Acknowledge();
+
+ //
+ // Close the receiver and the connection.
+ //
+ receiver.Close();
+ connection.Close();
+ return 0;
+ }
+ }
+}
+
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..ee09057f18 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("csharp.map.sender")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("csharp.map.sender")]
+[assembly: AssemblyCopyright("Copyright 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1eec2eca-adbd-4394-8b01-f4c4645bb122")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs new file mode 100644 index 0000000000..9001eb8e0b --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs @@ -0,0 +1,146 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.examples
+{
+ class MapSender
+ {
+ // csharp.map.sender example
+ //
+ // Send an amqp/map message to amqp:tcp:localhost:5672 amq.direct/map_example
+ // The map message contains simple types, a nested amqp/map,
+ // an ampq/list, and specific instances of each supported type.
+ //
+ static int Main(string[] args)
+ {
+ string url = "amqp:tcp:localhost:5672";
+ string address = "message_queue; {create: always}";
+ string connectionOptions = "";
+
+ if (args.Length > 0)
+ url = args[0];
+ if (args.Length > 1)
+ address = args[1];
+ if (args.Length > 2)
+ connectionOptions = args[2];
+
+ //
+ // Create and open an AMQP connection to the broker URL
+ //
+ Connection connection = new Connection(url, connectionOptions);
+ connection.Open();
+
+ //
+ // Create a session and a sender to the direct exchange
+ //
+ Session session = connection.CreateSession();
+ Sender sender = session.CreateSender(address);
+
+ //
+ // Create structured content for the message. This example builds a
+ // map of items including a nested map and a list of values.
+ //
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ Dictionary<string, object> subMap = new Dictionary<string, object>();
+ Collection<object> colors = new Collection<object>();
+
+ // add simple types
+ content["id"] = 987654321;
+ content["name"] = "Widget";
+ content["percent"] = 0.99;
+
+ // add nested amqp/map
+ subMap["name"] = "Smith";
+ subMap["number"] = 354;
+ content["nestedMap"] = subMap;
+
+ // add an amqp/list
+ colors.Add("red");
+ colors.Add("green");
+ colors.Add("white");
+ // list contains null value
+ colors.Add(null);
+ content["colorsList"] = colors;
+
+ // add one of each supported amqp data type
+ bool mybool = true;
+ content["mybool"] = mybool;
+
+ byte mybyte = 4;
+ content["mybyte"] = mybyte;
+
+ UInt16 myUInt16 = 5 ;
+ content["myUInt16"] = myUInt16;
+
+ UInt32 myUInt32 = 6;
+ content["myUInt32"] = myUInt32;
+
+ UInt64 myUInt64 = 7;
+ content["myUInt64"] = myUInt64;
+
+ char mychar = 'h';
+ content["mychar"] = mychar;
+
+ Int16 myInt16 = 9;
+ content["myInt16"] = myInt16;
+
+ Int32 myInt32 = 10;
+ content["myInt32"] = myInt32;
+
+ Int64 myInt64 = 11;
+ content["myInt64"] = myInt64;
+
+ Single mySingle = (Single)12.12;
+ content["mySingle"] = mySingle;
+
+ Double myDouble = 13.13;
+ content["myDouble"] = myDouble;
+
+ Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f");
+ content["myGuid"] = myGuid;
+
+ content["myNull"] = null;
+
+ //
+ // Construct a message with the map content and send it synchronously
+ // via the sender.
+ //
+ Message message = new Message(content);
+ sender.Send(message, true);
+
+ //
+ // Wait until broker receives all messages.
+ //
+ session.Sync();
+
+ //
+ // Close the connection.
+ //
+ connection.Close();
+ return 0;
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/anyproject.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/anyproject.csproj.in new file mode 100644 index 0000000000..349708b026 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/anyproject.csproj.in @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{${DOTNET_projectGuid}}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>${DOTNET_projectName}</RootNamespace> + <AssemblyName>${DOTNET_projectName}</AssemblyName> + <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Compile Include="${DOTNET_exampleRelPathToSrc}/${DOTNET_projectName}/${DOTNET_projectName}.cs" /> + <Compile Include="${DOTNET_exampleRelPathToSrc}/${DOTNET_projectName}/Properties/AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}"> + <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project> + <Name>Org.Apache.Qpid.Messaging</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.example.drain/csharp.example.drain.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.example.drain/csharp.example.drain.csproj.in new file mode 100644 index 0000000000..b88171db68 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.example.drain/csharp.example.drain.csproj.in @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C43DEB69-8088-420B-B0CA-C699535E6D08}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.drain</RootNamespace>
+ <AssemblyName>csharp.example.drain</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.drain\csharp.example.drain.cs" />
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.drain\Options.cs" />
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.drain\Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.example.spout/csharp.example.spout.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.example.spout/csharp.example.spout.csproj.in new file mode 100644 index 0000000000..d6c7d43a56 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.example.spout/csharp.example.spout.csproj.in @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{EB36626D-36C2-41B3-B65E-762BAF27F137}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.spout</RootNamespace>
+ <AssemblyName>csharp.example.spout</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.spout\csharp.example.spout.cs" />
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.spout\Options.cs" />
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.spout\Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in new file mode 100644 index 0000000000..ee851d39f1 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{68A43817-2358-4A31-8FDF-FE21722BFBCF}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.receiver</RootNamespace>
+ <AssemblyName>csharp.map.callback.receiver</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.receiver\csharp.map.callback.receiver.cs" />
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.receiver\Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ <ProjectReference Include="${DOTNET_exampleRelPathToSessionreceiverProj}">
+ <Project>{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}</Project>
+ <Name>org.apache.qpid.messaging.sessionreceiver</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in new file mode 100644 index 0000000000..2fa6a63072 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{12F1C14F-5C7D-4075-9BAE-C091394FF99A}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.sender</RootNamespace>
+ <AssemblyName>csharp.map.callback.sender</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.sender\csharp.map.callback.sender.cs" />
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.sender\Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/anyproject.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/anyproject.csproj.in new file mode 100644 index 0000000000..34fad8d9c3 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/anyproject.csproj.in @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{${DOTNET_projectGuid}}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>${DOTNET_projectName}</RootNamespace> + <AssemblyName>${DOTNET_projectName}</AssemblyName> + <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <FileUpgradeFlags> + </FileUpgradeFlags> + <OldToolsVersion>3.5</OldToolsVersion> + <UpgradeBackupLocation /> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' "> + <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x64</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Compile Include="${DOTNET_exampleRelPathToSrc}\${DOTNET_projectName}\${DOTNET_projectName}.cs"> + <Link>${DOTNET_projectName}.cs</Link> + </Compile> + <Compile Include="${DOTNET_exampleRelPathToSrc}\${DOTNET_projectName}\Properties\AssemblyInfo.cs"> + <Link>AssemblyInfo.cs</Link> + </Compile> + </ItemGroup> + <ItemGroup> + <None Include="${DOTNET_exampleRelPathToAppConfig}"> + <Link>app.config</Link> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}"> + <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project> + <Name>Org.Apache.Qpid.Messaging</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/app.config b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/app.config new file mode 100644 index 0000000000..a1ff128fab --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/app.config @@ -0,0 +1,21 @@ +<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.example.drain/csharp.example.drain.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.example.drain/csharp.example.drain.csproj.in new file mode 100644 index 0000000000..704dab73fd --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.example.drain/csharp.example.drain.csproj.in @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C43DEB69-8088-420B-B0CA-C699535E6D08}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.drain</RootNamespace>
+ <AssemblyName>csharp.example.drain</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.drain\csharp.example.drain.cs">
+ <Link>csharp.example.drain.cs</Link>
+ </Compile>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.drain\Options.cs">
+ <Link>Options.cs</Link>
+ </Compile>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.drain\Properties\AssemblyInfo.cs">
+ <Link>AssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="${DOTNET_exampleRelPathToAppConfig}">
+ <Link>App.Config</Link>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.example.spout/csharp.example.spout.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.example.spout/csharp.example.spout.csproj.in new file mode 100644 index 0000000000..492459b96a --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.example.spout/csharp.example.spout.csproj.in @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{EB36626D-36C2-41B3-B65E-762BAF27F137}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.spout</RootNamespace>
+ <AssemblyName>csharp.example.spout</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.spout\csharp.example.spout.cs">
+ <Link>csharp.example.spout.cs</Link>
+ </Compile>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.spout\Options.cs">
+ <Link>Options.cs</Link>
+ </Compile>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.example.spout\Properties\AssemblyInfo.cs">
+ <Link>AssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="${DOTNET_exampleRelPathToAppConfig}">
+ <Link>App.Config</Link>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in new file mode 100644 index 0000000000..bf9beef133 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{68A43817-2358-4A31-8FDF-FE21722BFBCF}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.receiver</RootNamespace>
+ <AssemblyName>csharp.map.callback.receiver</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.receiver\csharp.map.callback.receiver.cs">
+ <Link>csharp.map.callback.receiver.cs</Link>
+ </Compile>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.receiver\Properties\AssemblyInfo.cs">
+ <Link>AssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ <ProjectReference Include="${DOTNET_exampleRelPathToSessionreceiverProj}">
+ <Project>{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}</Project>
+ <Name>org.apache.qpid.messaging.sessionreceiver</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="${DOTNET_exampleRelPathToAppConfig}">
+ <Link>App.Config</Link>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in new file mode 100644 index 0000000000..f475921566 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/examples/msvcx/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{12F1C14F-5C7D-4075-9BAE-C091394FF99A}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.sender</RootNamespace>
+ <AssemblyName>csharp.map.callback.sender</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.sender\csharp.map.callback.sender.cs">
+ <Link>csharp.map.callback.sender.cs</Link>
+ </Compile>
+ <Compile Include="${DOTNET_exampleRelPathToSrc}\csharp.map.callback.sender\Properties\AssemblyInfo.cs">
+ <Link>AssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="${DOTNET_exampleRelPathToAppConfig}">
+ <Link>App.Config</Link>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sessionreceiver.sln.in b/qpid/cpp/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sessionreceiver.sln.in new file mode 100644 index 0000000000..5e754aa752 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sessionreceiver.sln.in @@ -0,0 +1,76 @@ +Microsoft Visual Studio Solution File, Format Version ${DOTNET_SLN_FILE_FORMAT}
+# ${DOTNET_SLN_VISUAL_STUDIO}
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Org.Apache.Qpid.Messaging", "${CMAKE_CURRENT_BINARY_DIR}\src\msvc9\org.apache.qpid.messaging.vcproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "${CMAKE_CURRENT_BINARY_DIR}\src\sessionreceiver\msvc9\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ RelWithDebInfo|Win32 = RelWithDebInfo|Win32
+ RelWithDebInfo|x64 = RelWithDebInfo|x64
+ RelWithDebInfo|x86 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.Build.0 = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Win32
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/qpid/cpp/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sln.in b/qpid/cpp/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sln.in new file mode 100644 index 0000000000..7ebbe7c9e0 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sln.in @@ -0,0 +1,346 @@ +Microsoft Visual Studio Solution File, Format Version ${DOTNET_SLN_FILE_FORMAT}
+# ${DOTNET_SLN_VISUAL_STUDIO}
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Org.Apache.Qpid.Messaging", "${CMAKE_CURRENT_BINARY_DIR}\src\msvc9\org.apache.qpid.messaging.vcproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{34C477FB-B0CC-4AB9-A346-EA7B055469AC}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Direct", "Direct", "{DE58D329-10DC-4C8D-9EFA-230A57314089}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Pub-Sub", "Pub-Sub", "{878FDDF8-A870-41D6-9E36-0A050EC5ACAB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "messaging.test", "${CMAKE_CURRENT_BINARY_DIR}\test\messaging.test\msvc9\messaging.test.csproj", "{AF2FBC78-266C-430C-BC29-9477AB596A36}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StructuredMessage", "StructuredMessage", "{E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "${CMAKE_CURRENT_BINARY_DIR}\src\sessionreceiver\msvc9\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client-Server", "Client-Server", "{9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Drain-Spout", "Drain-Spout", "{89CE04CB-21DE-4ABB-9236-50529DD8C022}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hello World", "Hello World", "{4408A2DA-ED2D-44AE-A465-0B6D75E1FF86}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "${CMAKE_CURRENT_BINARY_DIR}\examples\msvc9\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ RelWithDebInfo|Win32 = RelWithDebInfo|Win32
+ RelWithDebInfo|x64 = RelWithDebInfo|x64
+ RelWithDebInfo|x86 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|Win32.ActiveCfg = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|Win32.ActiveCfg = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|Win32.ActiveCfg = Debug|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.ActiveCfg = Debug|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.Build.0 = Debug|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.ActiveCfg = Debug|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.Build.0 = Debug|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|Win32.ActiveCfg = Release|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.ActiveCfg = Release|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.Build.0 = Release|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.ActiveCfg = Release|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.Build.0 = Release|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|Win32.ActiveCfg = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|Win32.ActiveCfg = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|Win32.ActiveCfg = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|Win32.ActiveCfg = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|Win32.ActiveCfg = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|Win32.ActiveCfg = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|Win32.ActiveCfg = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|Win32.ActiveCfg = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {DE58D329-10DC-4C8D-9EFA-230A57314089} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {878FDDF8-A870-41D6-9E36-0A050EC5ACAB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {89CE04CB-21DE-4ABB-9236-50529DD8C022} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} = {DE58D329-10DC-4C8D-9EFA-230A57314089}
+ {52F880E7-D677-4C91-8516-D679CE0F46A8} = {DE58D329-10DC-4C8D-9EFA-230A57314089}
+ {AF2FBC78-266C-430C-BC29-9477AB596A36} = {39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A}
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}
+ {090A081D-E8B5-4949-AA43-EE182B7101E3} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}
+ {C43DEB69-8088-420B-B0CA-C699535E6D08} = {89CE04CB-21DE-4ABB-9236-50529DD8C022}
+ {EB36626D-36C2-41B3-B65E-762BAF27F137} = {89CE04CB-21DE-4ABB-9236-50529DD8C022}
+ {E31B349C-830C-4583-8BD9-30DA4398349F} = {89CE04CB-21DE-4ABB-9236-50529DD8C022}
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D} = {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86}
+ EndGlobalSection
+EndGlobal
diff --git a/qpid/cpp/bindings/qpid/dotnet/msvcx/org.apache.qpid.messaging.sessionreceiver.sln.in b/qpid/cpp/bindings/qpid/dotnet/msvcx/org.apache.qpid.messaging.sessionreceiver.sln.in new file mode 100644 index 0000000000..2909a66784 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/msvcx/org.apache.qpid.messaging.sessionreceiver.sln.in @@ -0,0 +1,77 @@ +Microsoft Visual Studio Solution File, Format Version ${DOTNET_SLN_FILE_FORMAT}
+# ${DOTNET_SLN_VISUAL_STUDIO}
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "org.apache.qpid.messaging", "${DOTNET_currentBinaryDir}\src\msvcx\org.apache.qpid.messaging.vcxproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "${DOTNET_currentBinaryDir}\src\sessionreceiver\msvcx\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ RelWithDebInfo|Win32 = RelWithDebInfo|Win32
+ RelWithDebInfo|x64 = RelWithDebInfo|x64
+ RelWithDebInfo|x86 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.Build.0 = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Win32
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/qpid/cpp/bindings/qpid/dotnet/msvcx/org.apache.qpid.messaging.sln.in b/qpid/cpp/bindings/qpid/dotnet/msvcx/org.apache.qpid.messaging.sln.in new file mode 100644 index 0000000000..aa1820c54a --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/msvcx/org.apache.qpid.messaging.sln.in @@ -0,0 +1,344 @@ +Microsoft Visual Studio Solution File, Format Version ${DOTNET_SLN_FILE_FORMAT}
+# ${DOTNET_SLN_VISUAL_STUDIO}
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{34C477FB-B0CC-4AB9-A346-EA7B055469AC}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Direct", "Direct", "{DE58D329-10DC-4C8D-9EFA-230A57314089}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Pub-Sub", "Pub-Sub", "{878FDDF8-A870-41D6-9E36-0A050EC5ACAB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StructuredMessage", "StructuredMessage", "{E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client-Server", "Client-Server", "{9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Drain-Spout", "Drain-Spout", "{89CE04CB-21DE-4ABB-9236-50529DD8C022}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "org.apache.qpid.messaging", "${DOTNET_currentBinaryDir}\src\msvcx\org.apache.qpid.messaging.vcxproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "messaging.test", "${DOTNET_currentBinaryDir}\test\messaging.test\msvcx\messaging.test.csproj", "{AF2FBC78-266C-430C-BC29-9477AB596A36}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D}
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "${DOTNET_currentBinaryDir}\src\sessionreceiver\msvcx\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "${DOTNET_currentBinaryDir}\examples\msvcx\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ RelWithDebInfo|Win32 = RelWithDebInfo|Win32
+ RelWithDebInfo|x64 = RelWithDebInfo|x64
+ RelWithDebInfo|x86 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|Win32.ActiveCfg = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|Win32.ActiveCfg = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|Win32.ActiveCfg = Debug|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.ActiveCfg = Debug|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.Build.0 = Debug|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.ActiveCfg = Debug|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.Build.0 = Debug|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|Win32.ActiveCfg = Release|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.ActiveCfg = Release|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.Build.0 = Release|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.ActiveCfg = Release|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.Build.0 = Release|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|Win32.ActiveCfg = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|Win32.ActiveCfg = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|Win32.ActiveCfg = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|Win32.ActiveCfg = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|Win32.ActiveCfg = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|Win32.ActiveCfg = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|Win32.ActiveCfg = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|Win32.ActiveCfg = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {DE58D329-10DC-4C8D-9EFA-230A57314089} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {878FDDF8-A870-41D6-9E36-0A050EC5ACAB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {89CE04CB-21DE-4ABB-9236-50529DD8C022} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC}
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} = {DE58D329-10DC-4C8D-9EFA-230A57314089}
+ {52F880E7-D677-4C91-8516-D679CE0F46A8} = {DE58D329-10DC-4C8D-9EFA-230A57314089}
+ {AF2FBC78-266C-430C-BC29-9477AB596A36} = {39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A}
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}
+ {090A081D-E8B5-4949-AA43-EE182B7101E3} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}
+ {C43DEB69-8088-420B-B0CA-C699535E6D08} = {89CE04CB-21DE-4ABB-9236-50529DD8C022}
+ {EB36626D-36C2-41B3-B65E-762BAF27F137} = {89CE04CB-21DE-4ABB-9236-50529DD8C022}
+ {E31B349C-830C-4583-8BD9-30DA4398349F} = {89CE04CB-21DE-4ABB-9236-50529DD8C022}
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D} = {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86}
+ EndGlobalSection
+EndGlobal
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp new file mode 100644 index 0000000000..e47db9f925 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Address.cpp @@ -0,0 +1,273 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Address.h"
+
+#include "Address.h"
+#include "QpidMarshal.h"
+#include "QpidTypeCheck.h"
+#include "TypeTranslator.h"
+#include "QpidException.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Address is a managed wrapper for a qpid::messaging::Address
+ /// </summary>
+
+ // Disallow access if object has been destroyed.
+ void Address::ThrowIfDisposed()
+ {
+ if (IsDisposed)
+ throw gcnew ObjectDisposedException (GetType()->FullName);
+ }
+
+
+ // Create empty
+ Address::Address()
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Address(QpidMarshal::ToNative(""));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Create string address
+ Address::Address(System::String ^ address)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Address(QpidMarshal::ToNative(address));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Create with options
+ Address::Address(System::String ^ name,
+ System::String ^ subject,
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ options)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Address();
+
+ Name = name;
+ Subject = subject;
+ Options = options;
+ Type = "";
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Create with options and type
+ Address::Address(System::String ^ name,
+ System::String ^ subject,
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ options,
+ System::String ^ type)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Address();
+
+ Name = name;
+ Subject = subject;
+ Options = options;
+ Type = type;
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Copy constructor look-alike (C#)
+ Address::Address(const Address ^ address)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Address(
+ *(const_cast<Address ^>(address)->NativeAddress));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Copy constructor implicitly dereferenced (C++)
+ Address::Address(const Address % address)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Address(
+ *(const_cast<Address %>(address).NativeAddress));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // unmanaged clone
+ Address::Address(const ::qpid::messaging::Address & addrp)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Address(addrp);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Destructor
+ Address::~Address()
+ {
+ this->!Address();
+ }
+
+
+ // Finalizer
+ Address::!Address()
+ {
+ if (NULL != nativeObjPtr)
+ {
+ msclr::lock lk(privateLock);
+
+ if (NULL != nativeObjPtr)
+ {
+ delete nativeObjPtr;
+ nativeObjPtr = NULL;
+ }
+ }
+ }
+
+ //
+ // ToString
+ //
+ System::String ^ Address::ToStr()
+ {
+ System::String ^ result = nullptr;
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ result = gcnew System::String(nativeObjPtr->str().c_str());
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ return result;
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Address.h b/qpid/cpp/bindings/qpid/dotnet/src/Address.h new file mode 100644 index 0000000000..108a265923 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Address.h @@ -0,0 +1,232 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Address.h"
+
+#include "QpidMarshal.h"
+#include "QpidTypeCheck.h"
+#include "TypeTranslator.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Address is a managed wrapper for a qpid::messaging::Address
+ /// </summary>
+
+ public ref class Address
+ {
+ private:
+ // The kept object in the Messaging C++ DLL
+ ::qpid::messaging::Address * nativeObjPtr;
+
+ // per-instance lock object
+ System::Object ^ privateLock;
+
+ // Disallow use after object is destroyed
+ void ThrowIfDisposed();
+
+ public:
+ Address();
+
+ Address(System::String ^ address);
+
+ Address(System::String ^ name,
+ System::String ^ subject,
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ options);
+
+ Address(System::String ^ name,
+ System::String ^ subject,
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ options,
+ System::String ^ type);
+
+ // copy constructor
+ Address(const Address ^ address);
+ Address(const Address % address);
+
+ // unmanaged clone
+ Address(const ::qpid::messaging::Address & addrp);
+
+ // System destructor/finalizer entry points
+ ~Address();
+ !Address();
+
+ // assignment operator
+ Address % operator=(const Address % rhs)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ if (NULL != nativeObjPtr)
+ delete nativeObjPtr;
+ nativeObjPtr = new ::qpid::messaging::Address(
+ *(const_cast<Address %>(rhs).NativeAddress) );
+ }
+ return *this;
+ }
+
+ //
+ // IsDisposed
+ //
+ property bool IsDisposed
+ {
+ bool get()
+ {
+ return NULL == nativeObjPtr;
+ }
+ }
+
+
+ //
+ // NativeAddress
+ //
+ property ::qpid::messaging::Address * NativeAddress
+ {
+ ::qpid::messaging::Address * get ()
+ {
+ return nativeObjPtr;
+ }
+ }
+
+ //
+ // name
+ //
+ property System::String ^ Name
+ {
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew System::String(nativeObjPtr->getName().c_str());
+ }
+
+ void set (System::String ^ name)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->::qpid::messaging::Address::setName(QpidMarshal::ToNative(name));
+ }
+ }
+
+
+ //
+ // subject
+ //
+ property System::String ^ Subject
+ {
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew System::String(nativeObjPtr->getSubject().c_str());
+ }
+
+ void set (System::String ^ subject)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setSubject(QpidMarshal::ToNative(subject));
+ }
+ }
+
+
+ //
+ // options
+ //
+ property System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ Options
+ {
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ ::qpid::types::Variant::Map map;
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ newMap =
+ gcnew System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^>;
+ map = nativeObjPtr->getOptions();
+ TypeTranslator::NativeToManaged(map, newMap);
+ return newMap;
+ }
+
+
+ void set (System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ options)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ ::qpid::types::Variant::Map map;
+ TypeTranslator::ManagedToNative(options, map);
+ nativeObjPtr->setOptions(map);
+ }
+ }
+
+
+ //
+ // type
+ //
+ property System::String ^ Type
+ {
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew System::String(nativeObjPtr->getType().c_str());
+ }
+
+
+ void set (System::String ^ type)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setType(QpidMarshal::ToNative(type));
+ }
+ }
+
+ System::String ^ ToStr();
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp b/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp new file mode 100644 index 0000000000..00d50900f6 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/AssemblyInfo-template.cpp @@ -0,0 +1,58 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+using namespace System;
+using namespace System::Reflection;
+using namespace System::Runtime::CompilerServices;
+using namespace System::Runtime::InteropServices;
+using namespace System::Security::Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly:AssemblyTitleAttribute("org.apache.qpid.messaging")];
+[assembly:AssemblyDescriptionAttribute("")];
+[assembly:AssemblyConfigurationAttribute("")];
+[assembly:AssemblyCompanyAttribute("")];
+[assembly:AssemblyProductAttribute("org.apache.qpid.messaging")];
+[assembly:AssemblyCopyrightAttribute("Copyright (c) 2010")];
+[assembly:AssemblyTrademarkAttribute("")];
+[assembly:AssemblyCultureAttribute("")];
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the value or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("${winver_PRODUCT_VERSION_N1}.${winver_PRODUCT_VERSION_N2}.${winver_PRODUCT_VERSION_N3}.${winver_PRODUCT_VERSION_N4}")]
+[assembly: AssemblyFileVersion("${winver_FILE_VERSION_N1}.${winver_FILE_VERSION_N2}.${winver_FILE_VERSION_N3}.${winver_FILE_VERSION_N4}")]
+
+[assembly:ComVisible(false)];
+
+[assembly:CLSCompliantAttribute(true)];
+
+[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp new file mode 100644 index 0000000000..d4d5d2fd4f --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Connection.cpp @@ -0,0 +1,465 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Connection.h"
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/exceptions.h"
+
+#include "QpidMarshal.h"
+#include "Connection.h"
+#include "Session.h"
+#include "QpidException.h"
+#include "TypeTranslator.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Connection is a managed wrapper for a qpid::messaging::Connection
+ /// </summary>
+
+ // Disallow access if object has been destroyed.
+ void Connection::ThrowIfDisposed()
+ {
+ if (IsDisposed)
+ throw gcnew ObjectDisposedException (GetType()->FullName);
+ }
+
+
+ // constructors
+ Connection::Connection(System::String ^ url)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Connection(QpidMarshal::ToNative(url));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ Connection::Connection(System::String ^ url,
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ options)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Connection(QpidMarshal::ToNative(url));
+
+ for each (System::Collections::Generic::KeyValuePair<System::String^, System::Object^> kvp in options)
+ {
+ SetOption(kvp.Key, kvp.Value);
+ }
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ Connection::Connection(System::String ^ url, System::String ^ options)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Connection(QpidMarshal::ToNative(url),
+ QpidMarshal::ToNative(options));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // Copy constructor look-alike (C#)
+ Connection::Connection(const Connection ^ connection)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Connection(
+ *(const_cast<Connection ^>(connection)->NativeConnection));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Copy constructor implicitly dereferenced (C++)
+ Connection::Connection(const Connection % connection)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Connection(
+ *(const_cast<Connection %>(connection).NativeConnection));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // Destructor
+ Connection::~Connection()
+ {
+ this->!Connection();
+ }
+
+
+ // Finalizer
+ Connection::!Connection()
+ {
+ if (NULL != nativeObjPtr)
+ {
+ msclr::lock lk(privateLock);
+
+ if (NULL != nativeObjPtr)
+ {
+ delete nativeObjPtr;
+ nativeObjPtr = NULL;
+ }
+ }
+ }
+
+
+ void Connection::SetOption(System::String ^ name, System::Object ^ value)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ ::qpid::types::Variant entryValue;
+ TypeTranslator::ManagedToNativeObject(value, entryValue);
+ std::string entryName = QpidMarshal::ToNative(name);
+ nativeObjPtr->::qpid::messaging::Connection::setOption(entryName, entryValue);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Connection::Open()
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->open();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Connection::Close()
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->close();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Connection::Reconnect(System::String ^ url)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ std::string nativeUrl = QpidMarshal::ToNative(url);
+ nativeObjPtr->reconnect(nativeUrl);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Connection::Reconnect()
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->reconnect();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ //
+ // CreateTransactionalSession()
+ //
+ Session ^ Connection::CreateTransactionalSession()
+ {
+ return CreateTransactionalSession("");
+ }
+
+
+ Session ^ Connection::CreateTransactionalSession(System::String ^ name)
+ {
+ System::Exception ^ newException = nullptr;
+ Session ^ newSession = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ // create native session
+ ::qpid::messaging::Session sessionp =
+ nativeObjPtr->createTransactionalSession(QpidMarshal::ToNative(name));
+
+ // create managed session
+ newSession = gcnew Session(sessionp, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ // Clean up and throw on caught exceptions
+ if (newException != nullptr)
+ {
+ if (newSession != nullptr)
+ {
+ delete newSession;
+ }
+ }
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newSession;
+ }
+
+
+ //
+ // CreateSession()
+ //
+ Session ^ Connection::CreateSession()
+ {
+ return CreateSession("");
+ }
+
+
+ Session ^ Connection::CreateSession(System::String ^ name)
+ {
+ System::Exception ^ newException = nullptr;
+ Session ^ newSession = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ // create native session
+ ::qpid::messaging::Session sessionp =
+ nativeObjPtr->createSession(QpidMarshal::ToNative(name));
+
+ // create managed session
+ newSession = gcnew Session(sessionp, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ // Clean up and throw on caught exceptions
+ if (newException != nullptr)
+ {
+ if (newSession != nullptr)
+ {
+ delete newSession;
+ }
+ }
+ }
+
+ if (nullptr != newException)
+ {
+ throw newException;
+ }
+
+ return newSession;
+ }
+
+
+ Session ^ Connection::GetSession(System::String ^ name)
+ {
+ System::Exception ^ newException = nullptr;
+ Session ^ newSession = nullptr;
+
+ try
+ {
+ const std::string n = QpidMarshal::ToNative(name);
+
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ ::qpid::messaging::Session sess =
+ nativeObjPtr->::qpid::messaging::Connection::getSession(n);
+
+ newSession = gcnew Session(sess, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ // Clean up and throw on caught exceptions
+ if (newException != nullptr)
+ {
+ if (newSession != nullptr)
+ {
+ delete newSession;
+ }
+ }
+ }
+
+ if (nullptr != newException)
+ {
+ throw newException;
+ }
+
+ return newSession;
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Connection.h b/qpid/cpp/bindings/qpid/dotnet/src/Connection.h new file mode 100644 index 0000000000..82b5262084 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Connection.h @@ -0,0 +1,167 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Connection.h"
+#include "qpid/messaging/Session.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Connection is a managed wrapper for a qpid::messaging::Connection
+ /// </summary>
+
+ ref class Session;
+
+ public ref class Connection
+ {
+ private:
+ // The kept object in the Messaging C++ DLL
+ ::qpid::messaging::Connection * nativeObjPtr;
+
+ // per-instance lock object
+ System::Object ^ privateLock;
+
+ // Disallow use after object is destroyed
+ void ThrowIfDisposed();
+
+ public:
+ Connection(System::String ^ url);
+
+ Connection(System::String ^ url,
+ System::Collections::Generic::Dictionary<
+ System::String ^, System::Object ^> ^ options);
+
+ Connection(System::String ^ url, System::String ^ options);
+
+ // copy constructor
+ Connection(const Connection ^ connection);
+ Connection(const Connection % connection);
+
+ // unmanaged clone
+ // not defined
+
+ ~Connection();
+ !Connection();
+
+ // assignment operator
+ Connection % operator=(const Connection % rhs)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ if (NULL != nativeObjPtr)
+ delete nativeObjPtr;
+ nativeObjPtr = new ::qpid::messaging::Connection(
+ *(const_cast<Connection %>(rhs).NativeConnection) );
+ }
+ return *this;
+ }
+
+ //
+ // IsDisposed
+ //
+ property bool IsDisposed
+ {
+ bool get()
+ {
+ return NULL == nativeObjPtr;
+ }
+ }
+
+
+ //
+ // NativeConnection
+ //
+ property ::qpid::messaging::Connection * NativeConnection
+ {
+ ::qpid::messaging::Connection * get ()
+ {
+ return nativeObjPtr;
+ }
+ }
+
+ void SetOption(System::String ^ name, System::Object ^ value);
+
+ void Open();
+ void Close();
+
+ property System::Boolean IsOpen
+ {
+ System::Boolean get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->isOpen();
+ }
+ }
+
+ void Reconnect(System::String ^ url);
+ void Reconnect();
+
+ property System::String ^ Url
+ {
+ System::String ^ get()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew System::String(nativeObjPtr->getUrl().c_str());
+ }
+ }
+
+ // CreateTransactionalSession()
+ Session ^ CreateTransactionalSession();
+ Session ^ CreateTransactionalSession(System::String ^ name);
+
+ // CreateSession()
+ Session ^ CreateSession();
+ Session ^ CreateSession(System::String ^ name);
+
+ Session ^ GetSession(System::String ^ name);
+
+ property System::String ^ AuthenticatedUsername
+ {
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew System::String(nativeObjPtr->getAuthenticatedUsername().c_str());
+ }
+ }
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Duration.h b/qpid/cpp/bindings/qpid/dotnet/src/Duration.h new file mode 100644 index 0000000000..d449992cdc --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Duration.h @@ -0,0 +1,113 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Duration is a time interval in milliseconds.
+ /// It is a managed equivalent of ::qpid::messaging::Duration
+ /// </summary>
+
+ public ref class Duration sealed
+ {
+ private:
+ System::UInt64 milliseconds;
+
+ public:
+
+ Duration(const Duration % rhs)
+ : milliseconds(rhs.milliseconds) {}
+
+ explicit Duration(System::UInt64 mS)
+ : milliseconds(mS) {}
+
+ Duration()
+ : milliseconds(System::UInt64::MaxValue) {}
+
+ property System::UInt64 Milliseconds
+ {
+ System::UInt64 get () { return milliseconds; }
+ }
+
+ static Duration ^ operator * (Duration ^ dur, const System::UInt64 multiplier)
+ {
+ Duration ^ result = gcnew Duration(dur->Milliseconds * multiplier);
+ return result;
+ }
+
+ static Duration ^ operator * (const System::UInt64 multiplier, Duration ^ dur)
+ {
+ Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds);
+ return result;
+ }
+
+ static Duration ^ Multiply (Duration ^ dur, const System::UInt64 multiplier)
+ {
+ Duration ^ result = gcnew Duration(dur->Milliseconds * multiplier);
+ return result;
+ }
+
+ static Duration ^ Multiply (const System::UInt64 multiplier, Duration ^ dur)
+ {
+ Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds);
+ return result;
+ }
+
+ static bool operator == (Duration ^ a, Duration ^ b)
+ {
+ return a->Milliseconds == b->Milliseconds;
+ }
+
+ static bool operator != (Duration ^ a, Duration ^ b)
+ {
+ return a->Milliseconds != b->Milliseconds;
+ }
+ };
+
+ public ref class DurationConstants sealed
+ {
+ private:
+ DurationConstants::DurationConstants() {}
+
+ public:
+ static Duration ^ FORVER;
+ static Duration ^ IMMEDIATE;
+ static Duration ^ SECOND;
+ static Duration ^ MINUTE;
+
+ static DurationConstants()
+ {
+ FORVER = gcnew Duration();
+ IMMEDIATE = gcnew Duration(0);
+ SECOND = gcnew Duration(1000);
+ MINUTE = gcnew Duration(60000);
+ }
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp b/qpid/cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp new file mode 100644 index 0000000000..4397789f42 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/FailoverUpdates.cpp @@ -0,0 +1,93 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/FailoverUpdates.h"
+
+#include "Connection.h"
+#include "FailoverUpdates.h"
+#include "QpidException.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// FailoverUpdates is a managed wrapper for a qpid::messaging::FailoverUpdates
+ /// </summary>
+
+ // Disallow access if object has been destroyed.
+ void FailoverUpdates::ThrowIfDisposed()
+ {
+ if (IsDisposed)
+ throw gcnew ObjectDisposedException (GetType()->FullName);
+ }
+
+ // constructors
+
+ FailoverUpdates::FailoverUpdates(Connection ^ connection)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::FailoverUpdates(*(connection->NativeConnection));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // Destructor
+ FailoverUpdates::~FailoverUpdates()
+ {
+ this->!FailoverUpdates();
+ }
+
+
+ // Finalizer
+ FailoverUpdates::!FailoverUpdates()
+ {
+ if (NULL != nativeObjPtr)
+ {
+ msclr::lock lk(privateLock);
+
+ if (NULL != nativeObjPtr)
+ {
+ delete nativeObjPtr;
+ nativeObjPtr = NULL;
+ }
+ }
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/FailoverUpdates.h b/qpid/cpp/bindings/qpid/dotnet/src/FailoverUpdates.h new file mode 100644 index 0000000000..1ad5c4b42b --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/FailoverUpdates.h @@ -0,0 +1,82 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// FailoverUpdates is a managed wrapper for a qpid::messaging::FailoverUpdates
+ /// </summary>
+
+ ref class Connection;
+
+ public ref class FailoverUpdates
+ {
+ private:
+ // The kept object in the Messaging C++ DLL
+ ::qpid::messaging::FailoverUpdates * nativeObjPtr;
+
+ // per-instance lock object
+ System::Object ^ privateLock;
+
+ // Disallow use after object is destroyed
+ void ThrowIfDisposed();
+
+ public:
+ FailoverUpdates(Connection ^ connection);
+
+ ~FailoverUpdates();
+ !FailoverUpdates();
+
+ //
+ // IsDisposed
+ //
+ property bool IsDisposed
+ {
+ bool get()
+ {
+ return NULL == nativeObjPtr;
+ }
+ }
+
+ private:
+ // unmanaged clone
+ // not defined
+
+ // copy constructor
+ FailoverUpdates(const FailoverUpdates ^ failoverUpdates) {}
+ FailoverUpdates(const FailoverUpdates % failoverUpdates) {}
+
+ // assignment operator
+ FailoverUpdates % operator=(const FailoverUpdates % rhs)
+ {
+ return *this;
+ }
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Logger.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Logger.cpp new file mode 100644 index 0000000000..b084db5a6c --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Logger.cpp @@ -0,0 +1,224 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <string>
+#include <limits>
+#include <vector>
+#include <iostream>
+#include <assert.h>
+
+#include "qpid/messaging/Logger.h"
+#include "qpid/messaging/exceptions.h"
+#include "qpid/types/Variant.h"
+
+#include "Logger.h"
+#include "QpidException.h"
+#include "QpidMarshal.h"
+
+/// <summary>
+/// outputCallbackHost
+/// Native class that holds reference to managed class
+/// and for hosting the native callback procedure.
+/// </summary>
+namespace qpid {
+namespace messaging {
+
+ class outputCallbackHost : public qpid::messaging::LoggerOutput {
+ private:
+ // Reference to managed class
+ gcroot<Org::Apache::Qpid::Messaging::LoggerOutput^> m_loggerOutput;
+
+ public:
+ outputCallbackHost(Org::Apache::Qpid::Messaging::LoggerOutput ^ _m_loggerOutput)
+ : m_loggerOutput(_m_loggerOutput)
+ {
+ }
+ ~outputCallbackHost()
+ {
+ }
+
+ // Native callback entry point called by qpid Logger
+ void log(qpid::messaging::Level level, bool user, const char* file, int line,
+ const char* function, const std::string& message)
+ {
+ m_loggerOutput->Log(level, user, file, line, function, message);
+ }
+ };
+}}
+
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+///
+/// Managed class with desired delegate
+///
+LoggerOutput::LoggerOutput( LoggerOutputCallback^ callback)
+ : loggerDelegate(callback),
+ interceptor(new qpid::messaging::outputCallbackHost(this))
+{
+ ::qpid::messaging::Logger::setOutput(*interceptor);
+}
+
+LoggerOutput::~LoggerOutput()
+{
+}
+
+// Relay log message to managed code
+void LoggerOutput::Log(
+ qpid::messaging::Level level,
+ bool user,
+ const char* file,
+ int line,
+ const char* function,
+ const std::string& message)
+{
+ // create managed log args
+ Messaging::Level mLevel = (Messaging::Level)level;
+ System::Boolean mUser = user;
+ System::String^ mFile = gcnew String( file );
+ System::Int32 mLine = line;
+ System::String^ mFunction = gcnew String( function );
+ System::String^ mMessage = gcnew String( message.c_str() );
+
+ // pass to delegate
+ loggerDelegate( mLevel, mUser, mFile, mLine, mFunction, mMessage );
+}
+
+
+/// <summary>
+/// Logger a managed wrapper for a ::qpid::messaging::Logger
+/// </summary>
+
+// Constructor
+Logger::Logger()
+{
+ // Sanity check that managed == native enum values
+ assert((int)Messaging::Level::trace == (int)::qpid::messaging::trace);
+ assert((int)Messaging::Level::debug == (int)::qpid::messaging::debug);
+ assert((int)Messaging::Level::info == (int)::qpid::messaging::info);
+ assert((int)Messaging::Level::notice == (int)::qpid::messaging::notice);
+ assert((int)Messaging::Level::warning == (int)::qpid::messaging::warning);
+ assert((int)Messaging::Level::error == (int)::qpid::messaging::error);
+ assert((int)Messaging::Level::critical == (int)::qpid::messaging::critical);
+}
+
+
+// Destructor
+Logger::~Logger()
+{
+ this->!Logger();
+}
+
+
+// Finalizer
+Logger::!Logger()
+{
+}
+
+void Logger::Configure(array<System::String ^> ^ args)
+{
+ Configure(args, "");
+}
+
+void Logger::Configure(array<System::String ^> ^ theArgs, System::String ^ thePrefix)
+{
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ // Marshal the calling args
+ int argc = theArgs->Length;
+
+ std::vector<std::string> cppStrings;
+ for (int i=0; i<argc; i++)
+ {
+ cppStrings.push_back ( QpidMarshal::ToNative( theArgs[i] ) );
+ }
+
+ std::vector<const char *> cStrings;
+ for (int i=0; i<argc; i++)
+ {
+ cStrings.push_back ( cppStrings[i].c_str() );
+ }
+
+ const char** argv = &cStrings[0];
+
+ std::string prefix = QpidMarshal::ToNative(thePrefix);
+
+ // configure
+ ::qpid::messaging::Logger::configure(argc, argv, prefix);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+}
+
+
+System::String ^ Logger::Usage()
+{
+ return gcnew String(::qpid::messaging::Logger::usage().c_str());
+}
+
+
+// Inject a log message from managed user space into unmanaged
+// Qpid Messaging log stream.
+void Logger::Log(
+ Messaging::Level level,
+ System::String^ file,
+ System::Int32 line,
+ System::String^ function,
+ System::String^ message)
+{
+ // create unmanaged log args
+ qpid::messaging::Level nLevel = (qpid::messaging::Level)level;
+ std::string nFile = QpidMarshal::ToNative(file);
+ int nLine = line;
+ std::string nFunction = QpidMarshal::ToNative(function);
+ const std::string nMessage = QpidMarshal::ToNative(message);
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ // pass to native log engine
+ ::qpid::messaging::Logger::log(
+ nLevel, nFile.c_str(), line, nFunction.c_str(), nMessage);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+}
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Logger.h b/qpid/cpp/bindings/qpid/dotnet/src/Logger.h new file mode 100644 index 0000000000..1628fb19ff --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Logger.h @@ -0,0 +1,134 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Logger.h"
+
+//
+// Logger is implemented in two classes that roughly correspond
+// to the Logger and LoggerOutput classes defined by the native
+// C++ classes in qpid/messaging/Logger.h. Please refer to the
+// native Logger.h file for more detailed usage information.
+//
+// Logger is a control and status interface to configure logging
+// and to inject log messages.
+//
+// LoggerOutput defines a delegate to accept the Qpid Messaging
+// log message stream. LoggerOutput uses native class
+// outputCallbackHost to receive the native callbacks and forward
+// the log on to the delegate.
+//
+
+/// <summary>
+/// outputCallbackHost
+/// Native class that holds reference to managed class
+/// and for hosting the native callback procedure.
+/// </summary>
+namespace qpid {
+namespace messaging {
+ class outputCallbackHost;
+}}
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Level constants
+ /// These correspond exactly to qpid::messaging::Level
+ /// </summary>
+ public enum class Level { trace, debug, info, notice, warning, error, critical }; +
+ /// <summary>
+ /// LoggerOutput relays messages to the managed delegate
+ /// </summary>
+
+ // The managed delegate signature
+ public delegate void LoggerOutputCallback(
+ Messaging::Level level,
+ System::Boolean user,
+ System::String^ file,
+ System::Int32 line,
+ System::String^ function,
+ System::String^ message);
+
+ // Managed class with desired delegate
+ public ref class LoggerOutput
+ {
+ private:
+ // private destructor
+ ~LoggerOutput();
+
+ // delegate
+ LoggerOutputCallback^ loggerDelegate;
+
+ // native class to host native callback
+ qpid::messaging::outputCallbackHost * interceptor;
+
+ public:
+ // function to receive unmanaged log and relay it
+ // to managed delegate
+ void Log(
+ qpid::messaging::Level level,
+ bool user,
+ const char* file,
+ int line,
+ const char* function,
+ const std::string& message);
+
+ // constructor - create with reference to log message delegate
+ LoggerOutput( LoggerOutputCallback^ callback);
+ };
+
+ /// <summary>
+ /// Logger is a managed wrapper for native ::qpid::messaging::Logger
+ /// </summary>
+
+ public ref class Logger
+ {
+ private:
+
+ public:
+ Logger();
+ ~Logger();
+ !Logger();
+
+ // Set logging in qpid messaging
+ void Configure(array<System::String ^> ^ args);
+ void Configure(array<System::String ^> ^ args, System::String ^ prefix);
+
+ // Help string available after calling Configue
+ System::String ^ Usage();
+
+ // Inject a 'user' log message into qpid messaging log stream
+ void Log(
+ Messaging::Level level,
+ System::String^ file,
+ System::Int32 line,
+ System::String^ function,
+ System::String^ message);
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp new file mode 100644 index 0000000000..cbf477bcaa --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Message.cpp @@ -0,0 +1,716 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <typeinfo.h>
+#include <string>
+#include <limits>
+#include <iostream>
+#include <stdlib.h>
+
+#include "qpid/messaging/Message.h"
+#include "qpid/types/Variant.h"
+
+#include "QpidMarshal.h"
+#include "Address.h"
+#include "Duration.h"
+#include "Message.h"
+#include "QpidTypeCheck.h"
+#include "QpidException.h"
+#include "TypeTranslator.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Message is a managed wrapper for a ::qpid::messaging::Message
+ /// </summary>
+
+ // Disallow access if object has been destroyed.
+ void Message::ThrowIfDisposed()
+ {
+ if (IsDisposed)
+ throw gcnew ObjectDisposedException (GetType()->FullName);
+ }
+
+
+ // Create empty message
+ Message::Message()
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Message(QpidMarshal::ToNative(""));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Create from string
+ Message::Message(System::String ^ theStr)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Message(QpidMarshal::ToNative(theStr));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Create from object
+ Message::Message(System::Object ^ theValue)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Message(QpidMarshal::ToNative(""));
+
+ if (QpidTypeCheck::ObjectIsMap(theValue))
+ {
+ // Create a mapped message using given dictionary
+
+ // Allocate a map
+ ::qpid::types::Variant::Map newMap;
+
+ // Add the map variables to the map
+ TypeTranslator::ManagedToNative((QpidMap ^)theValue, newMap);
+
+ // Set message content type
+ nativeObjPtr->setContentType("ampq/map");
+
+ // Insert the map into the message
+ ::qpid::messaging::encode(newMap, *nativeObjPtr, QpidMarshal::ToNative("amqp/map"));
+ }
+ else if (QpidTypeCheck::ObjectIsList(theValue))
+ {
+ // Create a list message using given list
+
+ // Allocate a list
+ ::qpid::types::Variant::List newList;
+
+ // Add the list variables to the list
+ TypeTranslator::ManagedToNative((QpidList ^)theValue, newList);
+
+ // Set message content type
+ nativeObjPtr->setContentType("ampq/list");
+
+ // Insert the list into the message
+ ::qpid::messaging::encode(newList, *nativeObjPtr, QpidMarshal::ToNative("amqp/list"));
+ }
+ else
+ {
+ // Create a binary string message
+ nativeObjPtr->setContent(QpidMarshal::ToNative(theValue->ToString()));
+ }
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // Create from bytes
+ Message::Message(array<System::Byte> ^ bytes)
+ {
+ System::Exception ^ newException = nullptr;
+ try
+ {
+ privateLock = gcnew System::Object();
+ pin_ptr<unsigned char> pBytes = &bytes[0];
+ nativeObjPtr = new ::qpid::messaging::Message((char *)pBytes, bytes->Length);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Create from byte array slice
+ Message::Message(array<System::Byte> ^ bytes, int offset, int size)
+ {
+ if ((offset + size) > bytes->Length)
+ throw gcnew QpidException("Message::Message Create from byte array slice: buffer length exceeded");
+
+ System::Exception ^ newException = nullptr;
+ try
+ {
+ privateLock = gcnew System::Object();
+ pin_ptr<unsigned char> pBytes = &bytes[offset];
+ nativeObjPtr = new ::qpid::messaging::Message((char *)pBytes, size);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // unmanaged clone
+ Message::Message(const ::qpid::messaging::Message & msgp)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Message(msgp);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // Destructor
+ // Called by .NET Dispose() or C++ delete.
+ Message::~Message()
+ {
+ this->!Message();
+ }
+
+
+ // Finalizer
+ // Called by Destructor or by System::GC
+ Message::!Message()
+ {
+ if (NULL != nativeObjPtr)
+ {
+ msclr::lock lk(privateLock);
+
+ if (NULL != nativeObjPtr)
+ {
+ delete nativeObjPtr;
+ nativeObjPtr = NULL;
+ }
+ }
+ }
+
+ // Copy constructor look-alike (C#)
+ Message::Message(const Message ^ message)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Message(
+ *(const_cast<Message ^>(message)->NativeMessage));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Copy constructor implicitly dereferenced (C++)
+ Message::Message(const Message % message)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Message(
+ *(const_cast<Message %>(message).NativeMessage));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Property
+ void Message::SetProperty(System::String ^ name, System::Object ^ value)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ ::qpid::types::Variant entryValue;
+ TypeTranslator::ManagedToNativeObject(value, entryValue);
+
+ nativeObjPtr->getProperties()[QpidMarshal::ToNative(name)] = entryValue;
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Content
+ void Message::SetContent(System::String ^ content)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->setContent(QpidMarshal::ToNative(content));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Message::SetContent(cli::array<System::Byte> ^ bytes)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ pin_ptr<unsigned char> pBytes = &bytes[0];
+ nativeObjPtr->setContent((char *)pBytes, bytes->Length);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Message::SetContent(cli::array<System::Byte> ^ bytes, int offset, int size)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ if ((offset + size) > bytes->Length)
+ throw gcnew QpidException("Message::SetContent from byte array slice: buffer length exceeded");
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ pin_ptr<unsigned char> pBytes = &bytes[offset];
+ nativeObjPtr->setContent((char *)pBytes, size);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Message::SetContentObject(System::Object ^ managedObject)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ ::qpid::types::Variant nativeObjValue;
+ TypeTranslator::ManagedToNativeObject(managedObject, nativeObjValue);
+ nativeObjPtr->setContentObject(nativeObjValue);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ System::String ^ Message::GetContent()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::String ^ result = nullptr;
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ result = gcnew String(nativeObjPtr->getContent().c_str());
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return result;
+ }
+
+
+ //
+ // User wants to extract a Dictionary from the message
+ //
+ void Message::GetContent(System::Collections::Generic::Dictionary<
+ System::String^,
+ System::Object^> ^ dict)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ // Extract the message map from the message
+ ::qpid::types::Variant::Map map;
+
+ ::qpid::messaging::decode(*nativeObjPtr, map, QpidMarshal::ToNative("amqp/map"));
+
+ TypeTranslator::NativeToManaged(map, dict);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ //
+ // User wants to extract a list from the message
+ //
+ void Message::GetContent(System::Collections::ObjectModel::Collection<
+ System::Object^> ^ list)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ // allocate a native messaging::List
+ ::qpid::types::Variant::List nativeList;
+
+ // Extract the list from the message in native format
+ ::qpid::messaging::decode(*nativeObjPtr, nativeList, QpidMarshal::ToNative("amqp/list"));
+
+ // translate native list into user's managed list
+ TypeTranslator::NativeToManaged(nativeList, list);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ //
+ // Return message content to raw byte array.
+ // On entry, message size must not be zero and
+ // caller's byte array size must be equal to message size.
+ //
+ void Message::GetContent(array<System::Byte> ^ arr)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ System::UInt32 size = (System::UInt32) nativeObjPtr->getContentSize();
+
+ if (0 == size)
+ throw gcnew QpidException("Message::GetRaw - message size is zero");
+
+ if (arr->Length != size)
+ throw gcnew QpidException("Message::GetRaw - receive buffer is wrong size");
+
+ const char * pMsgSrc = nativeObjPtr->getContentPtr();
+ pin_ptr<unsigned char> pArr = &arr[0];
+ memcpy(pArr, pMsgSrc, size);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ System::Object ^ Message::GetContentObject()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ System::Object ^ result = nullptr;
+
+ try
+ {
+ ::qpid::types::Variant nativeObject = nativeObjPtr->getContentObject();
+
+ result = TypeTranslator::NativeToManagedObject(nativeObject);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return result;
+ }
+
+ System::String ^ Message::MapAsString(System::Collections::Generic::Dictionary<
+ System::String^, System::Object^> ^ dict)
+ {
+ System::Text::StringBuilder ^ sb = gcnew System::Text::StringBuilder("{");
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ System::String ^ leading = "";
+
+ for each (System::Collections::Generic::KeyValuePair
+ <System::String^, System::Object^> kvp in dict)
+ {
+ sb->Append(leading);
+ leading = ", ";
+
+ if (QpidTypeCheck::ObjectIsMap(kvp.Value))
+ {
+ sb->AppendFormat(
+ "{0}={1}",
+ kvp.Key,
+ MapAsString((System::Collections::Generic::Dictionary<System::String^, System::Object^> ^)kvp.Value));
+ }
+ else if (QpidTypeCheck::ObjectIsList(kvp.Value))
+ {
+ sb->AppendFormat(
+ "{0}={1}",
+ kvp.Key,
+ ListAsString((System::Collections::ObjectModel::Collection<
+ System::Object^> ^)kvp.Value));
+ }
+ else if (nullptr == kvp.Value)
+ {
+ sb->AppendFormat(
+ "{0}=",
+ kvp.Key);
+ }
+ else
+ sb->AppendFormat("{0}={1}", kvp.Key, kvp.Value);
+ }
+ sb->Append("}");
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ System::String ^ result = gcnew System::String(sb->ToString());
+ return result;
+ }
+
+ /// <summary>
+ /// A function to display a ampq/list message packaged as a List.
+ /// </summary>
+ /// <param name="list">The AMQP list</param>
+ System::String ^ Message::ListAsString(System::Collections::ObjectModel::Collection<System::Object^> ^ list)
+ {
+ System::Text::StringBuilder ^ sb = gcnew System::Text::StringBuilder("[");
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ System::String ^ leading = "";
+
+ for each (System::Object ^ obj in list)
+ {
+ sb->Append(leading);
+ leading = ", ";
+
+ if (QpidTypeCheck::ObjectIsMap(obj))
+ {
+ sb->Append(MapAsString((System::Collections::Generic::Dictionary<
+ System::String^, System::Object^> ^)obj));
+ }
+ else if (QpidTypeCheck::ObjectIsList(obj))
+ {
+ sb->Append(ListAsString((System::Collections::ObjectModel::Collection<
+ System::Object^> ^)obj));
+ }
+ else if (nullptr == obj)
+ {
+ // no display for null objects
+ }
+ else
+ sb->Append(obj->ToString());
+ }
+ sb->Append("]");
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ System::String ^ result = gcnew System::String(sb->ToString());
+ return result;
+ }
+
+ System::String ^ Message::AsString(System::Object ^ obj)
+ {
+ if (QpidTypeCheck::ObjectIsMap(obj))
+ return MapAsString((System::Collections::Generic::Dictionary<
+ System::String^, System::Object^> ^)obj);
+ else if (QpidTypeCheck::ObjectIsList(obj))
+ return ListAsString((System::Collections::ObjectModel::Collection<
+ System::Object^> ^)obj);
+ else
+ return obj->ToString();
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Message.h b/qpid/cpp/bindings/qpid/dotnet/src/Message.h new file mode 100644 index 0000000000..c706d11ce5 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Message.h @@ -0,0 +1,489 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Message.h"
+
+#include "QpidMarshal.h"
+#include "Address.h"
+#include "Duration.h"
+#include "QpidException.h"
+#include "TypeTranslator.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ ref class Address;
+ ref class Duration;
+
+ /// <summary>
+ /// Message is a managed wrapper for a ::qpid::messaging::Message
+ /// </summary>
+
+ public ref class Message
+ {
+
+ private:
+ // The kept object in the Messaging C++ DLL
+ ::qpid::messaging::Message * nativeObjPtr;
+
+ // per-instance lock object
+ System::Object ^ privateLock;
+
+ // Disallow use after object is destroyed
+ void ThrowIfDisposed();
+
+ public:
+ // Create empty message
+ Message();
+
+ // Create from String
+ Message(System::String ^ theStr);
+
+ // Create from object
+ Message(System::Object ^ theValue);
+
+ // Create from byte array
+ Message(array<System::Byte> ^ bytes);
+
+ // Create from byte array slice
+ Message(array<System::Byte> ^ bytes, int offset, int size);
+
+ // System destructor/finalizer entry points
+ ~Message();
+ !Message();
+
+ // Copy constructor
+ Message(const Message ^ message);
+ Message(const Message % message);
+
+ // unmanaged clone
+ Message(const ::qpid::messaging::Message & msgp);
+
+ // assignment operator
+ Message % operator=(const Message % rhs)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ if (NULL != nativeObjPtr)
+ delete nativeObjPtr;
+ nativeObjPtr = new ::qpid::messaging::Message(
+ *(const_cast<Message %>(rhs).NativeMessage) );
+ }
+ return *this;
+ }
+
+ //
+ // IsDisposed
+ //
+ property bool IsDisposed
+ {
+ bool get()
+ {
+ return NULL == nativeObjPtr;
+ }
+ }
+
+
+ //
+ // NativeMessage
+ //
+ property ::qpid::messaging::Message * NativeMessage
+ {
+ ::qpid::messaging::Message * get ()
+ {
+ return nativeObjPtr;
+ }
+ }
+
+ //
+ // ReplyTo
+ //
+ property Address ^ ReplyTo
+ {
+ void set (Address ^ address)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setReplyTo(*(address->NativeAddress));
+ }
+
+ Address ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ const ::qpid::messaging::Address & addrp =
+ nativeObjPtr->::qpid::messaging::Message::getReplyTo();
+
+ return gcnew Address(addrp);
+ }
+ }
+
+ //
+ // Subject
+ //
+ property System::String ^ Subject
+ {
+ void set (System::String ^ subject)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setSubject(QpidMarshal::ToNative(subject));
+ }
+
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew String(nativeObjPtr->getSubject().c_str());
+ }
+ }
+
+
+ //
+ // ContentType
+ //
+ property System::String ^ ContentType
+ {
+ void set (System::String ^ ct)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setContentType(QpidMarshal::ToNative(ct));
+ }
+
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew String(nativeObjPtr->::qpid::messaging::Message::getContentType().c_str());
+ }
+ }
+
+
+ //
+ // MessageId
+ //
+ property System::String ^ MessageId
+ {
+ void set (System::String ^ messageId)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setMessageId(QpidMarshal::ToNative(messageId));
+ }
+
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew String(nativeObjPtr->getMessageId().c_str());
+ }
+ }
+
+
+ //
+ // UserId
+ //
+ property System::String ^ UserId
+ {
+ void set (System::String ^ uId)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setUserId(QpidMarshal::ToNative(uId));
+ }
+
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew String(nativeObjPtr->getUserId().c_str());
+ }
+ }
+
+
+ //
+ // CorrelationId
+ //
+ property System::String ^ CorrelationId
+ {
+ void set (System::String ^ correlationId)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setCorrelationId(QpidMarshal::ToNative(correlationId));
+ }
+
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew String(nativeObjPtr->getCorrelationId().c_str());
+ }
+ }
+
+
+ //
+ // Priority
+ //
+ property unsigned char Priority
+ {
+ void set (unsigned char priority)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setPriority(priority);
+ }
+
+ unsigned char get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getPriority();
+ }
+ }
+
+
+ //
+ // Ttl
+ //
+ property Duration ^ Ttl
+ {
+ void set (Duration ^ ttl)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ ::qpid::messaging::Duration dur(ttl->Milliseconds);
+
+ nativeObjPtr->setTtl(dur);
+ }
+
+ Duration ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ Duration ^ dur = gcnew Duration(nativeObjPtr->getTtl().getMilliseconds());
+
+ return dur;
+ }
+ }
+
+ //
+ // Durable
+ //
+ property bool Durable
+ {
+ void set (bool durable)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setDurable(durable);
+ }
+
+ bool get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getDurable();
+ }
+ }
+
+ //
+ // Redelivered
+ //
+ property bool Redelivered
+ {
+ bool get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getRedelivered();
+ }
+
+ void set (bool redelivered)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setRedelivered(redelivered);
+ }
+ }
+
+ //
+ // Property
+ //
+ void Message::SetProperty(System::String ^ name, System::Object ^ value);
+
+ //
+ // Properties
+ //
+ property System::Collections::Generic::Dictionary<
+ System::String^, System::Object^> ^ Properties
+ {
+ System::Collections::Generic::Dictionary<
+ System::String^, System::Object^> ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ System::Collections::Generic::Dictionary<System::String^, System::Object^> ^ dict =
+ gcnew System::Collections::Generic::Dictionary<System::String^, System::Object^> ;
+
+ try
+ {
+ ::qpid::types::Variant::Map map;
+ map = nativeObjPtr->getProperties();
+ TypeTranslator::NativeToManaged(map, dict);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return dict;
+ }
+
+
+ void set (System::Collections::Generic::Dictionary<
+ System::String^, System::Object^> ^ properties)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ ::qpid::types::Variant::Map variantMap;
+ TypeTranslator::ManagedToNative(properties, variantMap);
+ nativeObjPtr->setProperties(variantMap);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+ }
+
+
+ void SetContent(System::String ^ content);
+
+ void SetContent(cli::array<System::Byte> ^ bytes);
+
+ void SetContent(cli::array<System::Byte> ^ bytes, int offset, int size);
+
+ void SetContentObject(System::Object ^ managedObject);
+
+ // get content as string
+ System::String ^ GetContent();
+
+ // get content as dictionary
+ void GetContent(System::Collections::Generic::Dictionary<
+ System::String^,
+ System::Object^> ^ dict);
+
+ // get content as map
+ void GetContent(System::Collections::ObjectModel::Collection<
+ System::Object^> ^);
+
+ // get content as bytes
+ void GetContent(cli::array<System::Byte> ^ arr);
+
+ // get content as object
+ System::Object ^ GetContentObject();
+
+ //
+ // ContentSize
+ //
+ property System::UInt64 ContentSize
+ {
+ System::UInt64 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getContentSize();
+ }
+ }
+
+
+ // A message has been returned to managed code through GetContent().
+ // Display the content of that System::Object as a string.
+ System::String ^ AsString(System::Object ^ obj);
+
+ System::String ^ MapAsString(System::Collections::Generic::Dictionary<
+ System::String^, System::Object^> ^ dict);
+
+ System::String ^ ListAsString(System::Collections::ObjectModel::Collection<
+ System::Object^> ^ list);
+
+ //TODO: EncodingException
+
+ // Note: encode/decode functions are in TypeTranslator
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h b/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h new file mode 100644 index 0000000000..bf02134203 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/QpidException.h @@ -0,0 +1,42 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#pragma once
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+using namespace System;
+
+[Serializable]
+public ref class QpidException : System::Exception
+{
+public:
+
+ QpidException()
+ : System::Exception() {}
+
+ QpidException(String^ estring)
+ : System::Exception(estring) {}
+
+};
+
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h b/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h new file mode 100644 index 0000000000..60f40afe04 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/QpidMarshal.h @@ -0,0 +1,65 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#pragma once
+
+using namespace System;
+using namespace System::Text;
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+
+
+// Helper functions for marshaling.
+
+private ref class QpidMarshal
+{
+private:
+ QpidMarshal::QpidMarshal() {}
+
+public:
+
+ /// <summary>
+ /// Convert managed String into native UTF8-encoded string
+ /// TODO: figure out some encoding other than UTF-8
+ /// </summary>
+
+ static std::string ToNative (System::String^ managed)
+ {
+ if (managed->Length == 0)
+ {
+ return std::string();
+ }
+
+ array<unsigned char>^ mbytes = Encoding::UTF8->GetBytes(managed);
+ if (mbytes->Length == 0)
+ {
+ return std::string();
+ }
+
+ pin_ptr<unsigned char> pinnedBuf = &mbytes[0];
+ std::string native((char *) pinnedBuf, mbytes->Length);
+ return native;
+ }
+};
+
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h b/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h new file mode 100644 index 0000000000..a3fdaf99c2 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/QpidTypeCheck.h @@ -0,0 +1,86 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// QpidTypeCheck determines if a given managed object represents
+ /// a qpid type per the scheme presented by the messaging DLL.
+ ///
+ // The supported mapping is:
+ /// * a managed Dictionary and a Qpid Messaging Map
+ /// * a managed Collection and a Qpid Messaging List
+ /// </summary>
+
+ typedef System::Collections::Generic::Dictionary<
+ System::String^,
+ System::Object^>
+ QpidMap;
+
+ typedef System::Collections::ObjectModel::Collection<
+ System::Object^>
+ QpidList;
+
+ private ref class QpidTypeCheckConstants sealed
+ {
+ private:
+ QpidTypeCheckConstants::QpidTypeCheckConstants() {}
+
+ public:
+ static System::Type const ^ const mapTypeP = System::Type::GetType(
+ "System.Collections.Generic.Dictionary`2[System.String,System.Object]");
+ static System::Type const ^ const listTypeP = System::Type::GetType(
+ "System.Collections.ObjectModel.Collection`1[System.Object]");
+ };
+
+
+ public ref class QpidTypeCheck sealed
+ {
+ private:
+ QpidTypeCheck::QpidTypeCheck() {}
+
+ public:
+
+ static bool ObjectIsMap (System::Object ^ theValue)
+ {
+ if (nullptr == theValue)
+ return false;
+ else
+ return (*theValue).GetType() == QpidTypeCheckConstants::mapTypeP;
+ }
+
+ static bool ObjectIsList(System::Object ^ theValue)
+ {
+ if (nullptr == theValue)
+ return false;
+ else
+ return (*theValue).GetType() == QpidTypeCheckConstants::listTypeP;
+ }
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt b/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt new file mode 100644 index 0000000000..f7287af573 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/ReadMe.txt @@ -0,0 +1,40 @@ +========================================================================
+ DYNAMIC LINK LIBRARY : Org.Apache.Qpid.Messaging Project Overview
+========================================================================
+
+AppWizard has created this Org.Apache.Qpid.Messaging DLL for you.
+
+This file contains a summary of what you will find in each of the files that
+make up your Org.Apache.Qpid.Messaging application.
+
+Org.Apache.Qpid.Messaging.vcproj
+ This is the main project file for VC++ projects generated using an Application Wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ Application Wizard.
+
+Connection.[cpp h]
+Duration.[cpp h]
+Message.[cpp h]
+Receiver.[cpp h]
+Sender.[cpp h]
+Session.[cpp h]
+ Managed code Interop layer modules to provide access to functions exported by
+ qpidcommon.dll.
+
+AssemblyInfo.cpp
+ Contains custom attributes for modifying assembly metadata.
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+AppWizard uses "TODO:" to indicate parts of the source code you
+should add to or customize.
+
+Current TODOs include:
+
+ * Add locking as needed
+ * Add remaining modules and methods
+ * Capture and repackage exceptions emitted from messaging DLLs
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp new file mode 100644 index 0000000000..2d6b2f56c3 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Receiver.cpp @@ -0,0 +1,418 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Receiver.h"
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/Message.h"
+#include "qpid/messaging/exceptions.h"
+
+#include "Receiver.h"
+#include "Address.h"
+#include "Session.h"
+#include "Message.h"
+#include "Duration.h"
+#include "QpidException.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Receiver is a managed wrapper for a ::qpid::messaging::Receiver
+ /// </summary>
+
+ // Disallow access if object has been destroyed.
+ void Receiver::ThrowIfDisposed()
+ {
+ if (IsDisposed)
+ throw gcnew ObjectDisposedException (GetType()->FullName);
+ }
+
+
+ // unmanaged clone
+ Receiver::Receiver(const ::qpid::messaging::Receiver & r,
+ Org::Apache::Qpid::Messaging::Session ^ sessRef)
+ : parentSession(sessRef)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Receiver (r);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // unmanaged clone
+ // undefined
+
+ // Destructor
+ Receiver::~Receiver()
+ {
+ this->!Receiver();
+ }
+
+
+ // Finalizer
+ Receiver::!Receiver()
+ {
+ if (NULL != nativeObjPtr)
+ {
+ msclr::lock lk(privateLock);
+
+ if (NULL != nativeObjPtr)
+ {
+ delete nativeObjPtr;
+ nativeObjPtr = NULL;
+ }
+ }
+ }
+
+
+ // Copy constructor look-alike (C#)
+ Receiver::Receiver(const Receiver ^ receiver)
+ : parentSession(receiver->parentSession)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Receiver(
+ *(const_cast<Receiver ^>(receiver)->NativeReceiver));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Copy constructor implicitly dereferenced (C++)
+ Receiver::Receiver(const Receiver % receiver)
+ : parentSession(receiver.parentSession)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Receiver(
+ *(const_cast<Receiver %>(receiver).NativeReceiver));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ //
+ // Get(message)
+ //
+ bool Receiver::Get(Message ^% mmsgp)
+ {
+ return Get(mmsgp, DurationConstants::FORVER);
+ }
+
+ bool Receiver::Get(Message ^% mmsgp, Duration ^ durationp)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ ::qpid::messaging::Duration dur((*durationp).Milliseconds);
+
+ ::qpid::messaging::Message tmpMsg;
+
+ bool result = nativeObjPtr->Receiver::get(tmpMsg, dur);
+
+ if (result)
+ {
+ mmsgp = gcnew Message(tmpMsg);
+ }
+
+ return result;
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return false;
+ }
+
+ //
+ // message = Get()
+ //
+ Message ^ Receiver::Get()
+ {
+ return Get(DurationConstants::FORVER);
+ }
+
+
+ Message ^ Receiver::Get(Duration ^ durationp)
+ {
+ System::Exception ^ newException = nullptr;
+ Message ^ newMessage = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ // translate the duration
+ ::qpid::messaging::Duration dur((*durationp).Milliseconds);
+
+ // get the message
+ ::qpid::messaging::Message msg =
+ nativeObjPtr->::qpid::messaging::Receiver::get(dur);
+
+ // create new managed message with received message embedded in it
+ newMessage = gcnew Message(msg);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newMessage != nullptr)
+ {
+ delete newMessage;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newMessage;
+ }
+
+ //
+ // Fetch(message)
+ //
+ bool Receiver::Fetch(Message ^% mmsgp)
+ {
+ return Fetch(mmsgp, DurationConstants::FORVER);
+ }
+
+ bool Receiver::Fetch(Message ^% mmsgp, Duration ^ durationp)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ ::qpid::messaging::Duration dur((*durationp).Milliseconds);
+
+ ::qpid::messaging::Message tmpMsg;
+
+ bool result = nativeObjPtr->Receiver::fetch(tmpMsg, dur);
+
+ if (result)
+ {
+ mmsgp = gcnew Message(tmpMsg);
+ }
+
+ return result;
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return false;
+ }
+
+
+ //
+ // message = Fetch()
+ //
+
+ Message ^ Receiver::Fetch()
+ {
+ return Fetch(DurationConstants::FORVER);
+ }
+
+ Message ^ Receiver::Fetch(Duration ^ durationp)
+ {
+ System::Exception ^ newException = nullptr;
+ Message ^ newMessage = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ // translate the duration
+ ::qpid::messaging::Duration dur((*durationp).Milliseconds);
+
+ // get the message
+ ::qpid::messaging::Message msg =
+ nativeObjPtr->::qpid::messaging::Receiver::fetch(dur);
+
+ // create new managed message with received message embedded in it
+ newMessage = gcnew Message(msg);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newMessage != nullptr)
+ {
+ delete newMessage;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newMessage;
+ }
+
+ void Receiver::Close()
+ {
+ System::Exception ^ newException = nullptr;
+ Message ^ newMessage = nullptr;
+
+ try
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->close();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newMessage != nullptr)
+ {
+ delete newMessage;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ Org::Apache::Qpid::Messaging::Address ^ Receiver::GetAddress()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Messaging::Address ^ newAddress = nullptr;
+
+ try
+ {
+ // fetch unmanaged Address
+ ::qpid::messaging::Address addr =
+ nativeObjPtr->getAddress();
+
+ // create a managed Address
+ newAddress = gcnew Address(addr);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newAddress != nullptr)
+ {
+ delete newAddress;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newAddress;
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h b/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h new file mode 100644 index 0000000000..c38590c1b0 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Receiver.h @@ -0,0 +1,243 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Receiver.h"
+#include "qpid/messaging/Address.h"
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/Message.h"
+#include "qpid/messaging/Duration.h"
+
+namespace qpid {
+namespace messaging {
+ // Dummy class to satisfy linker
+ class ReceiverImpl {};
+}}
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Receiver is a managed wrapper for a ::qpid::messaging::Receiver
+ /// </summary>
+
+ ref class Address;
+ ref class Session;
+ ref class Message;
+ ref class Duration;
+
+ public ref class Receiver
+ {
+ private:
+ // The session that created this Receiver
+ Session ^ parentSession;
+
+ // The kept object in the Messaging C++ DLL
+ ::qpid::messaging::Receiver * nativeObjPtr;
+
+ // per-instance lock object
+ System::Object ^ privateLock;
+
+ // Disallow use after object is destroyed
+ void ThrowIfDisposed();
+
+ public:
+
+ // unmanaged clone
+ Receiver(const ::qpid::messaging::Receiver & r,
+ Session ^ sessRef);
+
+ // copy constructor
+ Receiver(const Receiver ^ receiver);
+ Receiver(const Receiver % receiver);
+
+ // unmanaged clone
+ // undefined
+
+ ~Receiver();
+ !Receiver();
+
+ // assignment operator
+ Receiver % operator=(const Receiver % rhs)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ if (NULL != nativeObjPtr)
+ delete nativeObjPtr;
+ nativeObjPtr = new ::qpid::messaging::Receiver(
+ *(const_cast<Receiver %>(rhs).NativeReceiver));
+ parentSession = rhs.parentSession;
+ }
+ return *this;
+ }
+
+ //
+ // IsDisposed
+ //
+ property bool IsDisposed
+ {
+ bool get()
+ {
+ return NULL == nativeObjPtr;
+ }
+ }
+
+
+ //
+ // NativeReceiver
+ //
+ property ::qpid::messaging::Receiver * NativeReceiver
+ {
+ ::qpid::messaging::Receiver * get ()
+ {
+ return nativeObjPtr;
+ }
+ }
+
+ // Get(message)
+ bool Get(Message ^% mmsgp);
+ bool Get(Message ^% mmsgp, Duration ^ durationp);
+
+ // message = Get()
+ Message ^ Get();
+ Message ^ Get(Duration ^ durationp);
+
+ // Fetch(message)
+ bool Fetch(Message ^% mmsgp);
+ bool Fetch(Message ^% mmsgp, Duration ^ duration);
+
+ // message = Fetch()
+ Message ^ Fetch();
+ Message ^ Fetch(Duration ^ durationp);
+
+ //
+ // Capacity
+ //
+ property System::UInt32 Capacity
+ {
+ void set (System::UInt32 capacity)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setCapacity(capacity);
+ }
+
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getCapacity();
+ }
+ }
+
+ //
+ // Available
+ //
+ property System::UInt32 Available
+ {
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getAvailable();
+ }
+ }
+
+ //
+ // Unsettled
+ //
+ property System::UInt32 Unsettled
+ {
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getUnsettled();
+ }
+ }
+
+ void Close();
+
+ //
+ // IsClosed
+ //
+ property System::Boolean IsClosed
+ {
+ System::Boolean get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->isClosed();
+ }
+ }
+
+ //
+ // Name
+ //
+ property System::String ^ Name
+ {
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew System::String(nativeObjPtr->getName().c_str());
+ }
+ }
+
+ //
+ // Session
+ //
+ property Org::Apache::Qpid::Messaging::Session ^ Session
+ {
+ Org::Apache::Qpid::Messaging::Session ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return parentSession;
+ }
+ }
+
+ //
+ // Address
+ //
+ Org::Apache::Qpid::Messaging::Address ^ GetAddress();
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp new file mode 100644 index 0000000000..3d863eb7c7 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Sender.cpp @@ -0,0 +1,244 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Address.h"
+#include "qpid/messaging/Sender.h"
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/Message.h"
+
+#include "Sender.h"
+#include "Address.h"
+#include "Message.h"
+#include "QpidException.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Sender a managed wrapper for a ::qpid::messaging::Sender
+ /// </summary>
+
+ // Disallow access if object has been destroyed.
+ void Sender::ThrowIfDisposed()
+ {
+ if (IsDisposed)
+ throw gcnew ObjectDisposedException (GetType()->FullName);
+ }
+
+
+ // unmanaged clone
+ Sender::Sender(const ::qpid::messaging::Sender & s,
+ Org::Apache::Qpid::Messaging::Session ^ sessRef)
+ : parentSession(sessRef)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Sender (s);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // Destructor
+ Sender::~Sender()
+ {
+ this->!Sender();
+ }
+
+
+ // Finalizer
+ Sender::!Sender()
+ {
+ if (NULL != nativeObjPtr)
+ {
+ msclr::lock lk(privateLock);
+
+ if (NULL != nativeObjPtr)
+ {
+ delete nativeObjPtr;
+ nativeObjPtr = NULL;
+ }
+ }
+ }
+
+
+ // Copy constructor look-alike (C#)
+ Sender::Sender(const Sender ^ sender)
+ : parentSession(sender->parentSession)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Sender(
+ *(const_cast<Sender ^>(sender)->NativeSender));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Copy constructor implicitly dereferenced (C++)
+ Sender::Sender(const Sender % sender)
+ : parentSession(sender.parentSession)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Sender(
+ *(const_cast<Sender %>(sender).NativeSender));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ //
+ // Send(msg)
+ //
+ void Sender::Send(Message ^ mmsgp)
+ {
+ Send(mmsgp, false);
+ }
+
+ void Sender::Send(Message ^ mmsgp, bool sync)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->::qpid::messaging::Sender::send(*((*mmsgp).NativeMessage), sync);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Sender::Close()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->close();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ Org::Apache::Qpid::Messaging::Address ^ Sender::GetAddress()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Messaging::Address ^ newAddress = nullptr;
+
+ try
+ {
+ // fetch unmanaged Address
+ ::qpid::messaging::Address addr =
+ nativeObjPtr->getAddress();
+
+ // create a managed Address
+ newAddress = gcnew Address(addr);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newAddress != nullptr)
+ {
+ delete newAddress;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newAddress;
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Sender.h b/qpid/cpp/bindings/qpid/dotnet/src/Sender.h new file mode 100644 index 0000000000..3ecc615608 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Sender.h @@ -0,0 +1,199 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Sender.h"
+#include "qpid/messaging/Address.h"
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/Message.h"
+
+namespace qpid {
+namespace messaging {
+ // Dummy class to satisfy linker
+ class SenderImpl {};
+}}
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Sender is a managed wrapper for a ::qpid::messaging::Sender
+ /// </summary>
+
+ ref class Address;
+ ref class Session;
+ ref class Message;
+
+ public ref class Sender
+ {
+ private:
+ // The kept object in the Messaging C++ DLL
+ ::qpid::messaging::Sender * nativeObjPtr;
+
+ // The session that created this Sender
+ Session ^ parentSession;
+
+ // per-instance lock object
+ System::Object ^ privateLock;
+
+ // Disallow use after object is destroyed
+ void ThrowIfDisposed();
+
+ public:
+ // unmanaged clone
+ Sender(const ::qpid::messaging::Sender & s,
+ Session ^ sessRef);
+
+ // copy constructor
+ Sender(const Sender ^ sender);
+ Sender(const Sender % sender);
+
+ ~Sender();
+ !Sender();
+
+ // assignment operator
+ Sender % operator=(const Sender % rhs)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ if (NULL != nativeObjPtr)
+ delete nativeObjPtr;
+ nativeObjPtr = new ::qpid::messaging::Sender(
+ *(const_cast<Sender %>(rhs).NativeSender));
+ parentSession = rhs.parentSession;
+ }
+ return *this;
+ }
+
+ //
+ // IsDisposed
+ //
+ property bool IsDisposed
+ {
+ bool get()
+ {
+ return NULL == nativeObjPtr;
+ }
+ }
+
+
+ //
+ // NativeSender
+ //
+ property ::qpid::messaging::Sender * NativeSender
+ {
+ ::qpid::messaging::Sender * get ()
+ {
+ return nativeObjPtr;
+ }
+ }
+
+
+ // Send(message)
+ void Send(Message ^ mmsgp);
+ void Send(Message ^ mmsgp, bool sync);
+
+ void Close();
+
+ property System::UInt32 Capacity
+ {
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getCapacity();
+ }
+ void set (System::UInt32 capacity)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ nativeObjPtr->setCapacity(capacity);
+ }
+ }
+
+ property System::UInt32 Unsettled
+ {
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getUnsettled();
+ }
+ }
+
+ property System::UInt32 Available
+ {
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getAvailable();
+ }
+ }
+
+ property System::String ^ Name
+ {
+ System::String ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return gcnew System::String(nativeObjPtr->getName().c_str());
+ }
+ }
+
+ //
+ // Session
+ //
+ property Org::Apache::Qpid::Messaging::Session ^ Session
+ {
+ Org::Apache::Qpid::Messaging::Session ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return parentSession;
+ }
+ }
+
+ //
+ // Address
+ //
+ Org::Apache::Qpid::Messaging::Address ^ GetAddress();
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp b/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp new file mode 100644 index 0000000000..c5f00e86ab --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Session.cpp @@ -0,0 +1,728 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/exceptions.h"
+
+#include "QpidMarshal.h"
+#include "Address.h"
+#include "Session.h"
+#include "Connection.h"
+#include "Duration.h"
+#include "Receiver.h"
+#include "Sender.h"
+#include "Message.h"
+#include "QpidException.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Session is a managed wrapper for a ::qpid::messaging::Session
+ /// </summary>
+
+ // Disallow access if object has been destroyed.
+ void Session::ThrowIfDisposed()
+ {
+ if (IsDisposed)
+ throw gcnew ObjectDisposedException (GetType()->FullName);
+ }
+
+
+ // unmanaged clone
+ Session::Session(const ::qpid::messaging::Session & session,
+ Org::Apache::Qpid::Messaging::Connection ^ connRef)
+ : parentConnectionp(connRef)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Session (session);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ // Destructor
+ Session::~Session()
+ {
+ this->!Session();
+ }
+
+
+ // Finalizer
+ Session::!Session()
+ {
+ if (NULL != nativeObjPtr)
+ {
+ msclr::lock lk(privateLock);
+
+ if (NULL != nativeObjPtr)
+ {
+ delete nativeObjPtr;
+ nativeObjPtr = NULL;
+ }
+ }
+ }
+
+
+ // Copy constructor look-alike (C#)
+ Session::Session(const Session ^ session)
+ : parentConnectionp(session->parentConnectionp)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Session(
+ *(const_cast<Session ^>(session)->NativeSession));
+
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // Copy constructor implicitly dereferenced (C++)
+ Session::Session(const Session % session)
+ : parentConnectionp(session.parentConnectionp)
+ {
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ privateLock = gcnew System::Object();
+ nativeObjPtr = new ::qpid::messaging::Session(
+ *(const_cast<Session %>(session).NativeSession));
+
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+
+ void Session::Close()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->close();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::Commit()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->commit();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::Rollback()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->rollback();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::Acknowledge()
+ {
+ Acknowledge(false);
+ }
+
+ void Session::Acknowledge(bool sync)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->acknowledge(sync);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::Acknowledge(Message ^ message)
+ {
+ Acknowledge(message, false);
+ }
+
+ void Session::Acknowledge(Message ^ message, bool sync)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->acknowledge(*(message->NativeMessage), sync);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::AcknowledgeUpTo(Message ^ message)
+ {
+ AcknowledgeUpTo(message, false);
+ }
+
+ void Session::AcknowledgeUpTo(Message ^ message, bool sync)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->acknowledgeUpTo(*(message->NativeMessage), sync);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::Reject(Message ^ message)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->::qpid::messaging::Session::reject(*(message->NativeMessage));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::Release(Message ^ message)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->::qpid::messaging::Session::release(*(message->NativeMessage));
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ void Session::Sync()
+ {
+ Sync(true);
+ }
+
+ void Session::Sync(bool block)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->sync(block);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+
+ // next(receiver)
+ bool Session::NextReceiver(Receiver ^ rcvr)
+ {
+ return NextReceiver(rcvr, DurationConstants::FORVER);
+ }
+
+ bool Session::NextReceiver(Receiver ^ rcvr, Duration ^ timeout)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ // create a duration object
+ ::qpid::messaging::Duration dur(timeout->Milliseconds);
+
+ // wait for the next received message
+ return nativeObjPtr->nextReceiver(*(rcvr->NativeReceiver), dur);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ if ("No message to fetch" == errmsg){
+ return false;
+ }
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return true;
+ }
+
+ // receiver = next()
+ Receiver ^ Session::NextReceiver()
+ {
+ return NextReceiver(DurationConstants::FORVER);
+ }
+
+ Receiver ^ Session::NextReceiver(Duration ^ timeout)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ ::qpid::messaging::Duration dur(timeout->Milliseconds);
+
+ ::qpid::messaging::Receiver receiver = nativeObjPtr->::qpid::messaging::Session::nextReceiver(dur);
+
+ Receiver ^ newRcvr = gcnew Receiver(receiver, this);
+
+ return newRcvr;
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ if ("No message to fetch" == errmsg)
+ {
+ return nullptr;
+ }
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return nullptr;
+ }
+
+
+ Sender ^ Session::CreateSender (System::String ^ address)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Sender ^ newSender = nullptr;
+
+ try
+ {
+ // create the sender
+ ::qpid::messaging::Sender sender =
+ nativeObjPtr->::qpid::messaging::Session::createSender(QpidMarshal::ToNative(address));
+
+ // create a managed sender
+ newSender = gcnew Sender(sender, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newSender != nullptr)
+ {
+ delete newSender;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newSender;
+ }
+
+
+ Sender ^ Session::CreateSender (Address ^ address)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Sender ^ newSender = nullptr;
+
+ try
+ {
+ // allocate a native sender
+ ::qpid::messaging::Sender sender =
+ nativeObjPtr->::qpid::messaging::Session::createSender(*(address->NativeAddress));
+
+ // create a managed sender
+ newSender = gcnew Sender(sender, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newSender != nullptr)
+ {
+ delete newSender;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newSender;
+ }
+
+
+ Receiver ^ Session::CreateReceiver(System::String ^ address)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Receiver ^ newReceiver = nullptr;
+
+ try
+ {
+ // create the receiver
+ ::qpid::messaging::Receiver receiver =
+ nativeObjPtr->createReceiver(QpidMarshal::ToNative(address));
+
+ // create a managed receiver
+ newReceiver = gcnew Receiver(receiver, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newReceiver != nullptr)
+ {
+ delete newReceiver;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newReceiver;
+ }
+
+
+ Receiver ^ Session::CreateReceiver(Address ^ address)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Receiver ^ newReceiver = nullptr;
+
+ try
+ {
+ // create the receiver
+ ::qpid::messaging::Receiver receiver =
+ nativeObjPtr->createReceiver(*(address->NativeAddress));
+
+ // create a managed receiver
+ newReceiver = gcnew Receiver(receiver, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newReceiver != nullptr)
+ {
+ delete newReceiver;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newReceiver;
+ }
+
+
+ Sender ^ Session::GetSender(System::String ^ name)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Sender ^ newSender = nullptr;
+
+ try
+ {
+ ::qpid::messaging::Sender senderp =
+ nativeObjPtr->::qpid::messaging::Session::getSender(QpidMarshal::ToNative(name));
+
+ newSender = gcnew Sender(senderp, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newSender != nullptr)
+ {
+ delete newSender;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newSender;
+ }
+
+
+
+ Receiver ^ Session::GetReceiver(System::String ^ name)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+ Receiver ^ newReceiver = nullptr;
+
+ try
+ {
+ ::qpid::messaging::Receiver receiver =
+ nativeObjPtr->::qpid::messaging::Session::getReceiver(QpidMarshal::ToNative(name));
+
+ newReceiver = gcnew Receiver(receiver, this);
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+ finally
+ {
+ if (newException != nullptr)
+ {
+ if (newReceiver != nullptr)
+ {
+ delete newReceiver;
+ }
+ }
+ }
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+
+ return newReceiver;
+ }
+
+
+
+ void Session::CheckError()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ System::Exception ^ newException = nullptr;
+
+ try
+ {
+ nativeObjPtr->checkError();
+ }
+ catch (const ::qpid::types::Exception & error)
+ {
+ String ^ errmsg = gcnew String(error.what());
+ newException = gcnew QpidException(errmsg);
+ }
+
+ if (newException != nullptr)
+ {
+ throw newException;
+ }
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/Session.h b/qpid/cpp/bindings/qpid/dotnet/src/Session.h new file mode 100644 index 0000000000..42e9475c6c --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/Session.h @@ -0,0 +1,206 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/Connection.h"
+#include "qpid/messaging/Duration.h"
+#include "qpid/messaging/Receiver.h"
+#include "qpid/messaging/Sender.h"
+
+namespace qpid {
+namespace messaging {
+ // Dummy class to satisfy linker
+ class SessionImpl {};
+}}
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Session is a managed wrapper for a ::qpid::messaging::Session
+ /// </summary>
+
+ ref class Address;
+ ref class Connection;
+ ref class Duration;
+ ref class Receiver;
+ ref class Sender;
+ ref class Message;
+
+ public ref class Session
+ {
+ private:
+ // The kept object in the Messaging C++ DLL
+ ::qpid::messaging::Session * nativeObjPtr;
+
+ // The connection that created this session
+ Connection ^ parentConnectionp;
+
+ // per-instance lock object
+ System::Object ^ privateLock;
+
+ // Disallow use after object is destroyed
+ void ThrowIfDisposed();
+
+ public:
+
+ // unmanaged clone
+ Session(const ::qpid::messaging::Session & nativeObjPtr,
+ Connection ^ connRef);
+
+ // copy constructor
+ Session(const Session ^ session);
+ Session(const Session % session);
+
+ ~Session();
+ !Session();
+
+ // assignment operator
+ Session % operator=(const Session % rhs)
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ if (this == %rhs)
+ {
+ // Self assignment, do nothing
+ }
+ else
+ {
+ if (NULL != nativeObjPtr)
+ delete nativeObjPtr;
+ nativeObjPtr = new ::qpid::messaging::Session(
+ *(const_cast<Session %>(rhs).NativeSession) );
+ parentConnectionp = rhs.parentConnectionp;
+ }
+ return *this;
+ }
+
+ //
+ // IsDisposed
+ //
+ property bool IsDisposed
+ {
+ bool get()
+ {
+ return NULL == nativeObjPtr;
+ }
+ }
+
+
+ //
+ // NativeSession
+ //
+ property ::qpid::messaging::Session * NativeSession
+ {
+ ::qpid::messaging::Session * get ()
+ {
+ return nativeObjPtr;
+ }
+ }
+
+ void Close();
+ void Commit();
+ void Rollback();
+ void Acknowledge();
+ void Acknowledge(bool sync);
+ void Acknowledge(Message ^ message);
+ void Acknowledge(Message ^ message, bool sync);
+ void AcknowledgeUpTo(Message ^ message);
+ void AcknowledgeUpTo(Message ^ message, bool sync);
+ void Reject(Message ^);
+ void Release(Message ^);
+ void Sync();
+ void Sync(bool block);
+
+ property System::UInt32 Receivable
+ {
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getReceivable();
+ }
+ }
+
+ property System::UInt32 UnsettledAcks
+ {
+ System::UInt32 get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->getUnsettledAcks();
+ }
+ }
+
+ // next(receiver)
+ bool NextReceiver(Receiver ^ rcvr);
+ bool NextReceiver(Receiver ^ rcvr, Duration ^ timeout);
+
+ // receiver = next()
+ Receiver ^ NextReceiver();
+ Receiver ^ NextReceiver(Duration ^ timeout);
+
+
+ Sender ^ CreateSender(System::String ^ address);
+ Sender ^ CreateSender(Address ^ address);
+
+ Receiver ^ CreateReceiver(System::String ^ address);
+ Receiver ^ CreateReceiver(Address ^ address);
+
+ Sender ^ GetSender(System::String ^ name);
+ Receiver ^ GetReceiver(System::String ^ name);
+
+ property Org::Apache::Qpid::Messaging::Connection ^ Connection
+ {
+ Org::Apache::Qpid::Messaging::Connection ^ get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return parentConnectionp;
+ }
+ }
+
+
+ property System::Boolean HasError
+ {
+ System::Boolean get ()
+ {
+ msclr::lock lk(privateLock);
+ ThrowIfDisposed();
+
+ return nativeObjPtr->hasError();
+ }
+ }
+
+ void CheckError();
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp b/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp new file mode 100644 index 0000000000..01ec8056c6 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.cpp @@ -0,0 +1,432 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <typeinfo.h>
+#include <string>
+#include <limits>
+#include <iostream>
+
+#include "TypeTranslator.h"
+#include "QpidTypeCheck.h"
+#include "QpidMarshal.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// Translate between managed and native types.
+ /// </summary>
+
+ //
+ // The given object is a Dictionary.
+ // Add its elements to the qpid map.
+ //
+ void TypeTranslator::ManagedToNative(
+ QpidMap ^ theDictionary,
+ ::qpid::types::Variant::Map & qpidMap)
+ {
+ // iterate the items, converting each to a variant and adding to the map
+ for each (System::Collections::Generic::KeyValuePair
+ <System::String^, System::Object^> kvp in theDictionary)
+ {
+ if (QpidTypeCheck::ObjectIsMap(kvp.Value))
+ {
+ // Recurse on inner map
+ // Allocate a map
+ ::qpid::types::Variant::Map newMap;
+
+ // Add the map variables to the map
+ ManagedToNative((QpidMap ^)kvp.Value, newMap);
+
+ // Create a variant entry for the inner map
+ std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap));
+
+ // Get map's name
+ std::string entryName = QpidMarshal::ToNative(kvp.Key);
+
+ // Add inner map to outer map
+ qpidMap.insert(std::make_pair(entryName, *newVariantp));
+ }
+ else if (QpidTypeCheck::ObjectIsList(kvp.Value))
+ {
+ // Recurse on inner list
+ // Allocate a list
+ ::qpid::types::Variant::List newList;
+
+ // Add the List variables to the list
+ ManagedToNative((QpidList ^)kvp.Value, newList);
+
+ // Create a variant entry for the inner map
+ ::qpid::types::Variant::List newVariant(newList);
+
+ //std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList));
+
+ // Get list's name
+ std::string entryName = QpidMarshal::ToNative(kvp.Key);
+
+ // Add inner list to outer map
+ qpidMap.insert(std::make_pair(entryName, newVariant));
+ }
+ else
+ {
+ // Add a simple native type to map
+ ::qpid::types::Variant entryValue;
+ if (nullptr != kvp.Value)
+ {
+ ManagedToNativeObject(kvp.Value, entryValue);
+ }
+ std::string entryName = QpidMarshal::ToNative(kvp.Key);
+ qpidMap.insert(std::make_pair(entryName, entryValue));
+ }
+ }
+ }
+
+
+
+ //
+ // The given object is a List.
+ // Add its elements to the qpid list.
+ //
+ void TypeTranslator::ManagedToNative(
+ QpidList ^ theList,
+ ::qpid::types::Variant::List & qpidList)
+ {
+ // iterate the items, converting each to a variant and adding to the map
+ for each (System::Object ^ listObj in theList)
+ {
+ if (QpidTypeCheck::ObjectIsMap(listObj))
+ {
+ // Recurse on inner map
+ // Allocate a map
+ ::qpid::types::Variant::Map newMap;
+
+ // Add the map variables to the map
+ ManagedToNative((QpidMap ^)listObj, newMap);
+
+ // Create a variant entry for the inner map
+ std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap));
+
+ // Add inner map to outer list
+ qpidList.push_back(*newVariantp);
+ }
+ else if (QpidTypeCheck::ObjectIsList(listObj))
+ {
+ // Recurse on inner list
+ // Allocate a list
+ ::qpid::types::Variant::List newList;
+
+ // Add the List variables to the list
+ ManagedToNative((QpidList ^)listObj, newList);
+
+ // Create a variant entry for the inner list
+ std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList));
+
+ // Add inner list to outer list
+ qpidList.push_back(*newVariantp);
+ }
+ else
+ {
+ // Add a simple native type to list
+ ::qpid::types::Variant entryValue;
+ if (nullptr != listObj)
+ {
+ ManagedToNativeObject(listObj, entryValue);
+ }
+ qpidList.push_back(entryValue);
+ }
+ }
+ }
+
+
+
+ //
+ // Returns a variant representing simple native type object.
+ // Not to be called for Map/List objects.
+ //
+ void TypeTranslator::ManagedToNativeObject(
+ System::Object ^ managedValue,
+ ::qpid::types::Variant & qpidVariant)
+ {
+ System::Type ^ typeP = (*managedValue).GetType();
+ System::TypeCode typeCode = System::Type::GetTypeCode( typeP );
+
+ switch (typeCode)
+ {
+ case System::TypeCode::Boolean :
+ qpidVariant = System::Convert::ToBoolean(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::Byte :
+ qpidVariant = System::Convert::ToByte(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::UInt16 :
+ qpidVariant = System::Convert::ToUInt16(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::UInt32 :
+ qpidVariant = System::Convert::ToUInt32(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::UInt64 :
+ qpidVariant = System::Convert::ToUInt64(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::Char :
+ case System::TypeCode::SByte :
+ qpidVariant = System::Convert::ToSByte(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::Int16 :
+ qpidVariant = System::Convert::ToInt16(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::Int32 :
+ qpidVariant = System::Convert::ToInt32(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::Int64 :
+ qpidVariant = System::Convert::ToInt64(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::Single :
+ qpidVariant = System::Convert::ToSingle(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::Double :
+ qpidVariant = System::Convert::ToDouble(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ break;
+
+ case System::TypeCode::String :
+ {
+ std::string rString;
+ System::String ^ rpString;
+
+ rpString = System::Convert::ToString(managedValue, System::Globalization::CultureInfo::InvariantCulture);
+ rString = QpidMarshal::ToNative(rpString);
+ qpidVariant = rString;
+ qpidVariant.setEncoding(QpidMarshal::ToNative("utf8"));
+ }
+ break;
+
+ case System::TypeCode::Object :
+ {
+ //
+ // Derived classes
+ //
+ if ("System.Guid" == typeP->ToString())
+ {
+ cli::array<System::Byte> ^ guidBytes = ((System::Guid)managedValue).ToByteArray();
+ pin_ptr<unsigned char> pinnedBuf = &guidBytes[0];
+ ::qpid::types::Uuid newUuid = ::qpid::types::Uuid(pinnedBuf);
+ qpidVariant = newUuid;
+ }
+ else if (QpidTypeCheck::ObjectIsMap(managedValue))
+ {
+ ::qpid::types::Variant::Map newMap;
+ ManagedToNative((QpidMap ^)managedValue, newMap);
+ qpidVariant = newMap;
+ }
+ else if (QpidTypeCheck::ObjectIsList(managedValue))
+ {
+ ::qpid::types::Variant::List newList;
+ ManagedToNative((QpidList ^)managedValue, newList);
+ qpidVariant = newList;
+ }
+ else
+ {
+ throw gcnew System::NotImplementedException();
+ }
+ }
+ break;
+
+ default:
+
+ throw gcnew System::NotImplementedException();
+
+ }
+ }
+
+
+ // Given a user Dictionary and a qpid map,
+ // extract the qpid elements and put them into the dictionary.
+ //
+ void TypeTranslator::NativeToManaged(
+ ::qpid::types::Variant::Map & qpidMap,
+ QpidMap ^ dict)
+ {
+ // For each object in the message map,
+ // create a .NET object and add it to the dictionary.
+ for (::qpid::types::Variant::Map::const_iterator i = qpidMap.begin(); i != qpidMap.end(); ++i)
+ {
+ System::String ^ elementName = gcnew String(i->first.c_str());
+ ::qpid::types::Variant variant = i->second;
+ dict[elementName] = NativeToManagedObject(variant);
+ }
+ }
+
+
+ void TypeTranslator::NativeToManaged(
+ ::qpid::types::Variant::List & qpidList,
+ QpidList ^ managedList)
+ {
+ // For each object in the qpidList
+ // create a .NET object and add it to the managed List.
+ for (::qpid::types::Variant::List::const_iterator i = qpidList.begin(); i != qpidList.end(); ++i)
+ {
+ ::qpid::types::Variant variant = *i;
+ (*managedList).Add( NativeToManagedObject(variant) );
+ }
+ }
+
+
+ System::Object ^ TypeTranslator::NativeToManagedObject(
+ ::qpid::types::Variant & nativeObject)
+ {
+ // create a .NET object and return it
+ ::qpid::types::VariantType vType = nativeObject.getType();
+ System::Object ^ managedObject = nullptr;
+
+ switch (vType)
+ {
+ case ::qpid::types::VAR_VOID:
+ {
+ break;
+ }
+
+ case ::qpid::types::VAR_BOOL:
+ {
+ bool result = nativeObject.asBool();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_UINT8:
+ {
+ byte result = nativeObject.asUint8();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_UINT16:
+ {
+ unsigned short result = nativeObject.asUint16();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_UINT32:
+ {
+ unsigned long result = nativeObject.asUint32();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_UINT64:
+ {
+ unsigned __int64 result = nativeObject.asUint64();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_INT8:
+ {
+ System::SByte result = nativeObject.asInt8();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_INT16:
+ {
+ short result = nativeObject.asInt16();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_INT32:
+ {
+ long result = nativeObject.asInt32();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_INT64:
+ {
+ __int64 result = nativeObject.asInt64();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_FLOAT:
+ {
+ float result = nativeObject.asFloat();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_DOUBLE:
+ {
+ double result = nativeObject.asDouble();
+ managedObject = result;
+ break;
+ }
+
+ case ::qpid::types::VAR_STRING:
+ {
+ System::String ^ elementValue = gcnew System::String(nativeObject.asString().c_str());
+ managedObject = elementValue;
+ break;
+ }
+ case ::qpid::types::VAR_MAP:
+ {
+ QpidMap ^ newDict = gcnew QpidMap();
+
+ NativeToManaged(nativeObject.asMap(), newDict);
+
+ managedObject = newDict;
+ break;
+ }
+
+ case ::qpid::types::VAR_LIST:
+ {
+ QpidList ^ newList = gcnew QpidList();
+
+ NativeToManaged(nativeObject.asList(), newList);
+
+ managedObject = newList;
+ break;
+ }
+
+ case ::qpid::types::VAR_UUID:
+ {
+ System::String ^ elementValue = gcnew System::String(nativeObject.asUuid().str().c_str());
+ System::Guid ^ newGuid = System::Guid(elementValue);
+ managedObject = newGuid;
+ }
+ break;
+ }
+
+ return managedObject;
+ }
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h b/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h new file mode 100644 index 0000000000..67af712c84 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/TypeTranslator.h @@ -0,0 +1,81 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+#pragma once
+
+#include <windows.h>
+#include <msclr\lock.h>
+#include <oletx2xa.h>
+#include <string>
+#include <limits>
+
+#include "qpid/types/Variant.h"
+
+#include "QpidTypeCheck.h"
+
+namespace Org {
+namespace Apache {
+namespace Qpid {
+namespace Messaging {
+
+ /// <summary>
+ /// TypeTranslator provides codec between .NET Dictionary/List and
+ /// qpid messaging Map/List.
+ /// </summary>
+ public ref class TypeTranslator sealed
+ {
+ private:
+ TypeTranslator::TypeTranslator() {}
+
+ public:
+ // The given object is a managed Dictionary.
+ // Add its elements to the qpid map.
+ static void ManagedToNative(
+ QpidMap ^ theDictionary,
+ ::qpid::types::Variant::Map & qpidMap);
+
+ // The given object is a managed List.
+ // Add its elements to the qpid list.
+ static void ManagedToNative(
+ QpidList ^ theList,
+ ::qpid::types::Variant::List & qpidList);
+
+ // The given object is a simple managed type (not a Dictionary or List)
+ // Returns a variant representing simple native type object.
+ static void ManagedToNativeObject(
+ System::Object ^ managedValue,
+ ::qpid::types::Variant & qpidVariant);
+
+ // The given object is a qpid map.
+ // Add its elements to the managed Dictionary.
+ static void NativeToManaged(
+ ::qpid::types::Variant::Map & qpidMap,
+ QpidMap ^ dict);
+
+ // The given object is a qpid list.
+ // Add its elements to the managed List.
+ static void NativeToManaged(
+ ::qpid::types::Variant::List & qpidList,
+ QpidList ^ managedList);
+
+ // The given object is a qpid Variant
+ // Return it as a managed System::Object
+ static System::Object ^ NativeToManagedObject(
+ ::qpid::types::Variant & nativeObject);
+ };
+}}}}
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/app.rc b/qpid/cpp/bindings/qpid/dotnet/src/app.rc new file mode 100644 index 0000000000..35b3d8df68 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/app.rc @@ -0,0 +1,82 @@ +//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon placed first or with lowest ID value becomes application icon
+
+LANGUAGE 9, 1
+#pragma code_page(1252)
+1 ICON "app.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+ "\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj.in b/qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj.in new file mode 100644 index 0000000000..c98252a539 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj.in @@ -0,0 +1,652 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="Org.Apache.Qpid.Messaging"
+ ProjectGUID="{AA5A3B83-5F98-406D-A01C-5A921467A57D}"
+ RootNamespace="org.apache.qpid.messaging"
+ Keyword="ManagedCProj"
+ TargetFrameworkVersion="196613"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)"
+ IntermediateDirectory="${PROJECT_BINARY_DIR}\obj\$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ ManagedExtensions="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Zm1000 /wd4244 /wd4800 /wd4355"
+ Optimization="0"
+ AdditionalIncludeDirectories=""${PROJECT_SOURCE_DIR}\include";"${PROJECT_SOURCE_DIR}\src""
+ PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;WIN32_LEAN_AND_MEAN"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /STACK:10000000 /machine:I386"
+ AdditionalDependencies="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidclientd.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidcommond.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidmessagingd.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidtypesd.lib"
+ OutputFile="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\org.apache.qpid.messaging.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ TargetMachine="1"
+ KeyFile="${CMAKE_CURRENT_SOURCE_DIR}\src\qpid.snk"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)"
+ IntermediateDirectory="${PROJECT_BINARY_DIR}\obj\$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ ManagedExtensions="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Zm1000 /wd4244 /wd4800 /wd4355"
+ Optimization="0"
+ AdditionalIncludeDirectories=""${PROJECT_SOURCE_DIR}\include";"${PROJECT_SOURCE_DIR}\src""
+ PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;WIN32_LEAN_AND_MEAN"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /STACK:10000000"
+ AdditionalDependencies="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidclientd.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidcommond.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidmessagingd.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidtypesd.lib"
+ OutputFile="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\org.apache.qpid.messaging.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ TargetMachine="17"
+ KeyFile="${CMAKE_CURRENT_SOURCE_DIR}\src\qpid.snk"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)"
+ IntermediateDirectory="${PROJECT_BINARY_DIR}\obj\$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ ManagedExtensions="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Zm1000 /wd4244 /wd4800 /wd4355"
+ Optimization="0"
+ AdditionalIncludeDirectories=""${PROJECT_SOURCE_DIR}\include";"${PROJECT_SOURCE_DIR}\src""
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /STACK:10000000 /machine:I386"
+ AdditionalDependencies="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidclient.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidcommon.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidmessaging.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidtypes.lib"
+ OutputFile="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\org.apache.qpid.messaging.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ TargetMachine="1"
+ KeyFile="${CMAKE_CURRENT_SOURCE_DIR}\src\qpid.snk"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)"
+ IntermediateDirectory="${PROJECT_BINARY_DIR}\obj\$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ ManagedExtensions="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Zm1000 /wd4244 /wd4800 /wd4355"
+ Optimization="0"
+ AdditionalIncludeDirectories=""${PROJECT_SOURCE_DIR}\include";"${PROJECT_SOURCE_DIR}\src""
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /STACK:10000000"
+ AdditionalDependencies="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidclient.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidcommon.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidmessaging.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidtypes.lib"
+ OutputFile="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\org.apache.qpid.messaging.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ TargetMachine="17"
+ KeyFile="${CMAKE_CURRENT_SOURCE_DIR}\src\qpid.snk"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="RelWithDebInfo|Win32"
+ OutputDirectory="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)"
+ IntermediateDirectory="${PROJECT_BINARY_DIR}\obj\$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ ManagedExtensions="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Zm1000 /wd4244 /wd4800 /wd4355"
+ Optimization="0"
+ AdditionalIncludeDirectories=""${PROJECT_SOURCE_DIR}\include";"${PROJECT_SOURCE_DIR}\src""
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /STACK:10000000 /machine:I386"
+ AdditionalDependencies="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidclient.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidcommon.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidmessaging.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidtypes.lib"
+ OutputFile="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\org.apache.qpid.messaging.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ TargetMachine="1"
+ KeyFile="${CMAKE_CURRENT_SOURCE_DIR}\src\qpid.snk"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="RelWithDebInfo|x64"
+ OutputDirectory="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)"
+ IntermediateDirectory="${PROJECT_BINARY_DIR}\obj\$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ ManagedExtensions="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions=" /Zm1000 /wd4244 /wd4800 /wd4355"
+ Optimization="0"
+ AdditionalIncludeDirectories=""${PROJECT_SOURCE_DIR}\include";"${PROJECT_SOURCE_DIR}\src""
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions=" /STACK:10000000"
+ AdditionalDependencies="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidclient.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidcommon.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidmessaging.lib ${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\qpidtypes.lib"
+ OutputFile="${PROJECT_BINARY_DIR}\src\$(ConfigurationName)\org.apache.qpid.messaging.dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ AssemblyDebug="1"
+ TargetMachine="17"
+ KeyFile="${CMAKE_CURRENT_SOURCE_DIR}\src\qpid.snk"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ <AssemblyReference
+ RelativePath="System.dll"
+ AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.Data.dll"
+ AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
+ MinFrameworkVersion="131072"
+ />
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Address.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${PROJECT_BINARY_DIR}\src\windows\generated_src\AssemblyInfo.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Connection.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\FailoverUpdates.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Logger.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Message.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Receiver.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Sender.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Session.cpp"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\TypeTranslator.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Address.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Connection.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Duration.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\FailoverUpdates.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Logger.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Message.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\QpidException.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\QpidMarshal.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\QpidTypeCheck.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Receiver.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Sender.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\Session.h"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\TypeTranslator.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\app.ico"
+ >
+ </File>
+ <File
+ RelativePath="${PROJECT_BINARY_DIR}\src\windows\resources\org.apache.qpid.messaging.rc"
+ >
+ </File>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\resource1.h"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="${CMAKE_CURRENT_SOURCE_DIR}\src\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/msvcx/org.apache.qpid.messaging.vcxproj.filters.in b/qpid/cpp/bindings/qpid/dotnet/src/msvcx/org.apache.qpid.messaging.vcxproj.filters.in new file mode 100644 index 0000000000..5d176e7586 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/msvcx/org.apache.qpid.messaging.vcxproj.filters.in @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Address.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\AssemblyInfo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Connection.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\FailoverUpdates.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Message.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Receiver.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Sender.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Session.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\TypeTranslator.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Address.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Connection.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Duration.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\FailoverUpdates.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Message.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\QpidException.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\QpidMarshal.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\QpidTypeCheck.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Receiver.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Sender.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Session.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\TypeTranslator.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\resource1.h">
+ <Filter>Resource Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="${DOTNET_currentSourceDir}\src\app.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="${DOTNET_currentSourceDir}\src\ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="${DOTNET_projectBinaryDir}\src\windows\resources\org.apache.qpid.messaging.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/src/msvcx/org.apache.qpid.messaging.vcxproj.in b/qpid/cpp/bindings/qpid/dotnet/src/msvcx/org.apache.qpid.messaging.vcxproj.in new file mode 100644 index 0000000000..db95fa6927 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/msvcx/org.apache.qpid.messaging.vcxproj.in @@ -0,0 +1,342 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="RelWithDebInfo|Win32">
+ <Configuration>RelWithDebInfo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="RelWithDebInfo|x64">
+ <Configuration>RelWithDebInfo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</ProjectGuid>
+ <RootNamespace>org.apache.qpid.messaging</RootNamespace>
+ <Keyword>ManagedCProj</Keyword>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ ${DOTNET_PLATFORM_TOOLSET}
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ ${DOTNET_PLATFORM_TOOLSET}
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ ${DOTNET_PLATFORM_TOOLSET}
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ ${DOTNET_PLATFORM_TOOLSET}
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ ${DOTNET_PLATFORM_TOOLSET}
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <CLRSupport>true</CLRSupport>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ ${DOTNET_PLATFORM_TOOLSET}
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">${DOTNET_projectBinaryDir}\src\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">${DOTNET_projectBinaryDir}\obj\$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">${DOTNET_projectBinaryDir}\src\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">${DOTNET_projectBinaryDir}\obj\$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">${DOTNET_projectBinaryDir}\src\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">${DOTNET_projectBinaryDir}\obj\$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">${DOTNET_projectBinaryDir}\src\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">${DOTNET_projectBinaryDir}\obj\$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">${DOTNET_projectBinaryDir}\src\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">${DOTNET_projectBinaryDir}\obj\$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">${DOTNET_projectBinaryDir}\src\$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">${DOTNET_projectBinaryDir}\obj\$(Platform)\$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">false</LinkIncremental>
+ <LinkKeyFile>${DOTNET_currentSourceDir}\src\qpid.snk</LinkKeyFile>
+ <LinkDelaySign>true</LinkDelaySign>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <AdditionalOptions> /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>${PROJECT_SOURCE_DIR}\include;${PROJECT_SOURCE_DIR}\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions> /STACK:10000000 /machine:I386 /KEYFILE:${DOTNET_currentSourceDir}\src\qpid.snk %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidclientd.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidcommond.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidmessagingd.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidtypesd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>${DOTNET_projectBinaryDir}\src\$(Configuration)\org.apache.qpid.messaging.dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AssemblyDebug>true</AssemblyDebug>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>sn.exe -Ra "$(TargetPath)" "${DOTNET_currentSourceDir}\src\qpid.snk"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions> /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>${PROJECT_SOURCE_DIR}\include;${PROJECT_SOURCE_DIR}\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions> /STACK:10000000 /KEYFILE:${DOTNET_currentSourceDir}\src\qpid.snk %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidclientd.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidcommond.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidmessagingd.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidtypesd.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>${DOTNET_projectBinaryDir}\src\$(Configuration)\org.apache.qpid.messaging.dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AssemblyDebug>true</AssemblyDebug>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>sn.exe -Ra "$(TargetPath)" "${DOTNET_currentSourceDir}\src\qpid.snk"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalOptions> /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>${PROJECT_SOURCE_DIR}\include;${PROJECT_SOURCE_DIR}\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions> /STACK:10000000 /machine:I386 /KEYFILE:${DOTNET_currentSourceDir}\src\qpid.snk %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidclient.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidcommon.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidmessaging.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>${DOTNET_projectBinaryDir}\src\$(Configuration)\org.apache.qpid.messaging.dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AssemblyDebug>true</AssemblyDebug>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>sn.exe -Ra "$(TargetPath)" "${DOTNET_currentSourceDir}\src\qpid.snk"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions> /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>${PROJECT_SOURCE_DIR}\include;${PROJECT_SOURCE_DIR}\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions> /STACK:10000000 /KEYFILE:${DOTNET_currentSourceDir}\src\qpid.snk %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidclient.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidcommon.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidmessaging.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>${DOTNET_projectBinaryDir}\src\$(Configuration)\org.apache.qpid.messaging.dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AssemblyDebug>true</AssemblyDebug>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>sn.exe -Ra "$(TargetPath)" "${DOTNET_currentSourceDir}\src\qpid.snk"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|Win32'">
+ <ClCompile>
+ <AdditionalOptions> /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>${PROJECT_SOURCE_DIR}\include;${PROJECT_SOURCE_DIR}\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions> /STACK:10000000 /machine:I386 /KEYFILE:${DOTNET_currentSourceDir}\src\qpid.snk %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidclient.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidcommon.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidmessaging.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>${DOTNET_projectBinaryDir}\src\$(Configuration)\org.apache.qpid.messaging.dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AssemblyDebug>true</AssemblyDebug>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>sn.exe -Ra "$(TargetPath)" "${DOTNET_currentSourceDir}\src\qpid.snk"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RelWithDebInfo|x64'">
+ <Midl>
+ <TargetEnvironment>X64</TargetEnvironment>
+ </Midl>
+ <ClCompile>
+ <AdditionalOptions> /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions)</AdditionalOptions>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>${PROJECT_SOURCE_DIR}\include;${PROJECT_SOURCE_DIR}\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions> /STACK:10000000 /KEYFILE:${DOTNET_currentSourceDir}\src\qpid.snk %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidclient.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidcommon.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidmessaging.lib;${DOTNET_projectBinaryDir}\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>${DOTNET_projectBinaryDir}\src\$(Configuration)\org.apache.qpid.messaging.dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AssemblyDebug>true</AssemblyDebug>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <PostBuildEvent>
+ <Command>sn.exe -Ra "$(TargetPath)" "${DOTNET_currentSourceDir}\src\qpid.snk"</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Reference Include="System">
+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </Reference>
+ <Reference Include="System.Data">
+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Address.cpp" />
+ <ClCompile Include="${DOTNET_projectBinaryDir}\src\windows\generated_src\AssemblyInfo.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Connection.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\FailoverUpdates.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Logger.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Message.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Receiver.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Sender.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\Session.cpp" />
+ <ClCompile Include="${DOTNET_currentSourceDir}\src\TypeTranslator.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Address.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Connection.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Duration.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\FailoverUpdates.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Logger.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Message.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\QpidException.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\QpidMarshal.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\QpidTypeCheck.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Receiver.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Sender.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\Session.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\TypeTranslator.h" />
+ <ClInclude Include="${DOTNET_currentSourceDir}\src\resource1.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="${DOTNET_currentSourceDir}\src\app.ico" />
+ <None Include="${DOTNET_currentSourceDir}\src\ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="${DOTNET_projectBinaryDir}\src\windows\resources\org.apache.qpid.messaging.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc b/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc new file mode 100644 index 0000000000..8ce231912d --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc @@ -0,0 +1,120 @@ +//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// Microsoft Visual C++ generated resource script.
+//
+#include "${DOTNET_relPathToResource}"
+
+#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
+ "${DOTNET_relPathToResource}\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION ${winver_FILE_VERSION_N1},${winver_FILE_VERSION_N2},${winver_FILE_VERSION_N3},${winver_FILE_VERSION_N4}
+ PRODUCTVERSION ${winver_PRODUCT_VERSION_N1},${winver_PRODUCT_VERSION_N2},${winver_PRODUCT_VERSION_N3},${winver_PRODUCT_VERSION_N4}
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "FileDescription", "org.apache.qpid.messaging"
+ VALUE "FileVersion", "${winver_FILE_VERSION_N1}, ${winver_FILE_VERSION_N2}, ${winver_FILE_VERSION_N3}, ${winver_FILE_VERSION_N4}"
+ VALUE "InternalName", "org.apache.qpid.messaging"
+ VALUE "LegalCopyright", ""
+ VALUE "OriginalFilename", "org.apache.qpid.messaging"
+ VALUE "ProductName", "org.apache.qpid.messaging"
+ VALUE "ProductVersion", "${winver_PRODUCT_VERSION_N1}, ${winver_PRODUCT_VERSION_N2}, ${winver_PRODUCT_VERSION_N3}, ${winver_PRODUCT_VERSION_N4}"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/qpid.snk b/qpid/cpp/bindings/qpid/dotnet/src/qpid.snk Binary files differnew file mode 100644 index 0000000000..9faafd8f8b --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/qpid.snk diff --git a/qpid/cpp/bindings/qpid/dotnet/src/resource1.h b/qpid/cpp/bindings/qpid/dotnet/src/resource1.h new file mode 100644 index 0000000000..12cc93450b --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/resource1.h @@ -0,0 +1,34 @@ +//{{NO_DEPENDENCIES}}
+
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// Microsoft Visual C++ generated include file.
+// Used by org.apache.qpid.messaging.rc
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 101
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/sessionreceiver-AssemblyInfo-template.cs b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/sessionreceiver-AssemblyInfo-template.cs new file mode 100644 index 0000000000..de057ce9be --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/Properties/sessionreceiver-AssemblyInfo-template.cs @@ -0,0 +1,55 @@ +/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Org.Apache.Qpid.Messaging.SessionReceiver")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Org.Apache.Qpid.Messaging.SessionReceiver")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e18f363a-a9b0-4251-8f3c-de0e9d9d6827")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("${winver_PRODUCT_VERSION_N1}.${winver_PRODUCT_VERSION_N2}.${winver_PRODUCT_VERSION_N3}.${winver_PRODUCT_VERSION_N4}")]
+[assembly: AssemblyFileVersion("${winver_FILE_VERSION_N1}.${winver_FILE_VERSION_N2}.${winver_FILE_VERSION_N3}.${winver_FILE_VERSION_N4}")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/msvc9/org.apache.qpid.messaging.sessionreceiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/msvc9/org.apache.qpid.messaging.sessionreceiver.csproj.in new file mode 100644 index 0000000000..1c54517823 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/msvc9/org.apache.qpid.messaging.sessionreceiver.csproj.in @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>org.apache.qpid.messaging.sessionreceiver</RootNamespace>
+ <AssemblyName>org.apache.qpid.messaging.sessionreceiver</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>${CMAKE_CURRENT_SOURCE_DIR}/src/qpid.snk</AssemblyOriginatorKeyFile>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|AnyCPU' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${CMAKE_CURRENT_SOURCE_DIR}/src/sessionreceiver/sessionreceiver.cs" />
+ <Compile Include="${PROJECT_BINARY_DIR}/src/windows/generated_src/sessionreceiver-AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="../${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="${CMAKE_CURRENT_SOURCE_DIR}/src/qpid.snk" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/msvcx/org.apache.qpid.messaging.sessionreceiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/msvcx/org.apache.qpid.messaging.sessionreceiver.csproj.in new file mode 100644 index 0000000000..33d1f562e3 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/msvcx/org.apache.qpid.messaging.sessionreceiver.csproj.in @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>org.apache.qpid.messaging.sessionreceiver</RootNamespace>
+ <AssemblyName>org.apache.qpid.messaging.sessionreceiver</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <SignAssembly>true</SignAssembly>
+ <AssemblyOriginatorKeyFile>${DOTNET_currentSourceDir}\src\qpid.snk</AssemblyOriginatorKeyFile>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|AnyCPU' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\${DOTNET_relPathToSrc}\src\sessionreceiver\sessionreceiver.cs">
+ <Link>sessionreceiver.cs</Link>
+ </Compile>
+ <Compile Include="${DOTNET_projectBinaryDir}\src\windows\generated_src\sessionreceiver-AssemblyInfo.cs">
+ <Link>sessionreceiver-AssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\..\..\${DOTNET_relPathToSrc}\src\qpid.snk">
+ <Link>qpid.snk</Link>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/qpid.snk b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/qpid.snk Binary files differnew file mode 100644 index 0000000000..9faafd8f8b --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/qpid.snk diff --git a/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs new file mode 100644 index 0000000000..a15a8d60fe --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs @@ -0,0 +1,141 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using Org.Apache.Qpid.Messaging;
+
+namespace Org.Apache.Qpid.Messaging.SessionReceiver
+{
+ /// <summary>
+ /// ISessionReceiver interface defines the callback for users to supply.
+ /// Once established this callback will receive all messages for all
+ /// receivers defined by the current session.
+ /// Users are expected not to 'fetch' or 'get' messages by any other means.
+ /// Users must acknowledge() the Session's messages either in the callback
+ /// function or by some other scheme.
+ /// </summary>
+
+ public interface ISessionReceiver
+ {
+ void SessionReceiver(Receiver receiver, Message message);
+ void SessionException(Exception exception);
+ }
+
+
+ /// <summary>
+ /// EventEngine - wait for messages from the underlying C++ code.
+ /// When available get them and deliver them via callback to our
+ /// client through the ISessionReceiver interface.
+ /// This class consumes the thread that calls the Run() function.
+ /// </summary>
+
+ internal class EventEngine
+ {
+ private Session session;
+ private ISessionReceiver callback;
+ private bool keepRunning;
+
+ public EventEngine(Session theSession, ISessionReceiver thecallback)
+ {
+ this.session = theSession;
+ this.callback = thecallback;
+ }
+
+ /// <summary>
+ /// Function to call Session's nextReceiver, discover messages,
+ /// and to deliver messages through the callback.
+ /// </summary>
+ public void Open()
+ {
+ Receiver rcvr;
+ Message msg;
+ try
+ {
+ keepRunning = true;
+ while (keepRunning)
+ {
+ rcvr = session.NextReceiver(DurationConstants.SECOND);
+
+ if (null != rcvr)
+ {
+ if (keepRunning)
+ {
+ msg = rcvr.Fetch(DurationConstants.SECOND);
+ this.callback.SessionReceiver(rcvr, msg);
+ }
+ }
+ //else
+ // receive timed out
+ // EventEngine exits the nextReceiver() function periodically
+ // in order to test the keepRunning flag
+ }
+ }
+ catch (Exception e)
+ {
+ this.callback.SessionException(e);
+ }
+
+ // Private thread is now exiting.
+ }
+
+ /// <summary>
+ /// Function to stop the EventEngine. Private thread will exit within
+ /// one second.
+ /// </summary>
+ public void Close()
+ {
+ keepRunning = false;
+ }
+ }
+
+
+ /// <summary>
+ /// server is the class that users instantiate to connect a SessionReceiver
+ /// callback to the stream of received messages received on a Session.
+ /// </summary>
+ public class CallbackServer
+ {
+ private EventEngine ee;
+
+ /// <summary>
+ /// Constructor for the server.
+ /// </summary>
+ /// <param name="session">The Session whose messages are collected.</param>
+ /// <param name="callback">The user function call with each message.</param>
+ ///
+ public CallbackServer(Session session, ISessionReceiver callback)
+ {
+ ee = new EventEngine(session, callback);
+
+ new System.Threading.Thread(
+ new System.Threading.ThreadStart(ee.Open)).Start();
+ }
+
+ /// <summary>
+ /// Function to stop the server.
+ /// </summary>
+ public void Close()
+ {
+ ee.Close();
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..81a89ce393 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs @@ -0,0 +1,57 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("messaging.test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("messaging.test")]
+[assembly: AssemblyCopyright("Copyright 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("fdf30e75-69ba-45c2-a196-df09085dd56a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.address.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.address.cs new file mode 100644 index 0000000000..22ad186c9a --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.address.cs @@ -0,0 +1,157 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace Org.Apache.Qpid.Messaging.UnitTest
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using Org.Apache.Qpid.Messaging;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class AddressTests
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ }
+
+ //
+ // Address test
+ //
+ [Test]
+ public void AddressConstructor_Empty()
+ {
+ Address addr = new Address();
+
+ StringAssert.IsMatch("", addr.ToStr());
+
+ StringAssert.IsMatch("", addr.Name);
+ StringAssert.IsMatch("", addr.Subject);
+ Dictionary<string, object> opts = addr.Options;
+ Assert.AreEqual(0, opts.Count);
+ StringAssert.IsMatch("", addr.Type);
+ }
+
+
+ [Test]
+ public void AddressConstructor_Name()
+ {
+ Address addr = new Address("name1");
+
+ StringAssert.IsMatch("", addr.ToStr());
+
+ StringAssert.IsMatch("name1", addr.Name);
+ StringAssert.IsMatch("", addr.Subject);
+ Dictionary<string, object> opts = addr.Options;
+ Assert.AreEqual(0, opts.Count);
+ StringAssert.IsMatch("", addr.Type);
+ }
+
+
+ [Test]
+ public void AddressConstructor_NameSubjOpts()
+ {
+ Dictionary<string, object> options = new Dictionary<string, object>();
+ options["one"] = 1;
+ options["two"] = "two";
+
+ Address addr = new Address("name2", "subj2", options);
+
+ StringAssert.IsMatch("name2/subj2;{node:{type:}, one:1, two:two}", addr.ToStr());
+
+ StringAssert.IsMatch("name2", addr.Name);
+ StringAssert.IsMatch("subj2", addr.Subject);
+ Dictionary<string, object> opts = addr.Options;
+ Assert.AreEqual(3, opts.Count);
+ StringAssert.IsMatch("", addr.Type);
+ }
+
+ [Test]
+ public void AddressConstructor_NameSubjOptsType()
+ {
+ Dictionary<string, object> options = new Dictionary<string, object>();
+ options["one"] = 1;
+ options["two"] = "two";
+
+ Address addr = new Address("name3", "subj3", options, "type3");
+
+ StringAssert.IsMatch("name3/subj3;{node:{type:type3}, one:1, two:two}", addr.ToStr());
+
+ StringAssert.IsMatch("name3", addr.Name);
+ StringAssert.IsMatch("subj3", addr.Subject);
+ Dictionary<string, object> opts = addr.Options;
+ Assert.AreEqual(3, opts.Count);
+ StringAssert.IsMatch("type3", addr.Type);
+ }
+
+ [Test]
+ public void AddressProperty()
+ {
+ Dictionary<string, object> options = new Dictionary<string, object>();
+ options["one"] = 1;
+ options["two"] = "two";
+ options["pi"] = 3.14159;
+ Dictionary<string, object> opts;
+
+ Address addr = new Address();
+
+ addr.Name = "name4";
+
+ StringAssert.IsMatch("name4", addr.Name);
+ StringAssert.IsMatch("", addr.Subject);
+ opts = addr.Options;
+ Assert.AreEqual(0, opts.Count);
+ StringAssert.IsMatch("", addr.Type);
+
+ addr.Subject = "subject4";
+
+ StringAssert.IsMatch("name4", addr.Name);
+ StringAssert.IsMatch("subject4", addr.Subject);
+ opts = addr.Options;
+ Assert.AreEqual(0, opts.Count);
+ StringAssert.IsMatch("", addr.Type);
+
+ addr.Type = "type4";
+
+ StringAssert.IsMatch("name4", addr.Name);
+ StringAssert.IsMatch("subject4", addr.Subject);
+ opts = addr.Options;
+ Assert.AreEqual(1, opts.Count);
+ StringAssert.IsMatch("type4", addr.Type);
+
+ addr.Options = options;
+
+ StringAssert.IsMatch("name4", addr.Name);
+ StringAssert.IsMatch("subject4", addr.Subject);
+ opts = addr.Options;
+ Assert.AreEqual(3, opts.Count);
+ StringAssert.IsMatch("", addr.Type);
+ }
+
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.connection.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.connection.cs new file mode 100644 index 0000000000..c93f1d63f7 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.connection.cs @@ -0,0 +1,93 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace Org.Apache.Qpid.Messaging.UnitTest
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using Org.Apache.Qpid.Messaging;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class ConnectionTests
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ }
+
+ //
+ // Doing without a real connection
+ //
+ [Test]
+ public void ConnectionCreate_1()
+ {
+ Connection myConn = new Connection("url");
+ Assert.IsFalse(myConn.IsOpen);
+ }
+
+ [Test]
+ public void ConnectionCreate_2()
+ {
+ Dictionary<string, object> options = new Dictionary<string, object>();
+ options["reconnect"] = true;
+
+ Connection myConn = new Connection("url", options);
+ Assert.IsFalse(myConn.IsOpen);
+ }
+
+ [Test]
+ public void ConnectionCreate_3()
+ {
+ Connection myConn = new Connection("url", "{reconnect:True}");
+ Assert.IsFalse(myConn.IsOpen);
+ }
+
+ [Test]
+ public void ConnectionSetOption()
+ {
+ Dictionary<string, object> options = new Dictionary<string, object>();
+ options["reconnect"] = true;
+
+ Connection myConn = new Connection("url", options);
+ myConn.SetOption("reconnect", false);
+
+ Assert.IsFalse(myConn.IsOpen);
+ }
+
+ [Test]
+ public void ConnectionClose()
+ {
+ Dictionary<string, object> options = new Dictionary<string, object>();
+
+ Connection myConn = new Connection("url", options);
+ myConn.Close();
+
+ Assert.IsFalse(myConn.IsOpen);
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs new file mode 100644 index 0000000000..dc7af0a7c8 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs @@ -0,0 +1,76 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+//
+// Note:
+// NUnit tests require all libraries to be on the project path
+// or in the project working directory. If an unmanaged DLL
+// (boost_xxx, for instance) is missing then NUnit will give
+// the error message:
+// System.IO.FileNotFoundException :
+// The specified module could not be found.
+// (Exception from HRESULT: 0x8007007E)
+//
+// Users may need to adjust this project's reference to the
+// NUnit assembly.
+//
+
+namespace Org.Apache.Qpid.Messaging.UnitTest
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using Org.Apache.Qpid.Messaging;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class BasicTests
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ }
+
+ //
+ // Types representing amqp.map and amqp.list
+ //
+ [Test]
+ public void TypeTestForDictionary()
+ {
+ Dictionary<string, object> dx = new Dictionary<string, object>();
+
+ StringAssert.Contains("System.Collections.Generic.Dictionary`2[System.String,System.Object]", dx.GetType().ToString());
+ }
+
+ [Test]
+ public void TypeTestForCollection()
+ {
+ Collection<object> cx = new Collection<object>();
+
+ StringAssert.Contains("System.Collections.ObjectModel.Collection`1[System.Object]", cx.GetType().ToString());
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.duration.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.duration.cs new file mode 100644 index 0000000000..2512d7936c --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.duration.cs @@ -0,0 +1,99 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace Org.Apache.Qpid.Messaging.UnitTest
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using Org.Apache.Qpid.Messaging;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class DurationTests
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ }
+
+ [Test]
+ public void ValueOfUSERVALUE()
+ {
+ Duration myDuration = new Duration(1234);
+ Assert.AreEqual(1234, myDuration.Milliseconds);
+ }
+
+ [Test]
+ public void ValueOfFOREVER()
+ {
+ bool result = DurationConstants.FORVER.Milliseconds > 1.0E18;
+ Assert.True(result);
+ }
+
+ [Test]
+ public void ValueOfIMMEDIATE()
+ {
+ Assert.AreEqual(0, DurationConstants.IMMEDIATE.Milliseconds);
+ }
+
+ [Test]
+ public void ValueOfSECOND()
+ {
+ Assert.AreEqual(1000, DurationConstants.SECOND.Milliseconds);
+ }
+
+
+ [Test]
+ public void ValueOfMINUTE()
+ {
+ Assert.AreEqual(60000, DurationConstants.MINUTE.Milliseconds);
+ }
+
+ [Test]
+ public void ValueOfDefaultIsFOREVER()
+ {
+ Duration isInfinite = new Duration();
+
+ bool result = isInfinite.Milliseconds > 1.0E18;
+ Assert.True(result);
+ }
+
+ [Test]
+ public void ComputedValueFiveMinutes_1()
+ {
+ Duration fiveMinutes = new Duration(DurationConstants.MINUTE.Milliseconds * 5);
+ Assert.AreEqual(5 * 60000, fiveMinutes.Milliseconds);
+ }
+
+ [Test]
+ public void ComputedValueFiveMinutes_2()
+ {
+ Duration fiveMinutes = new Duration(5 * DurationConstants.MINUTE.Milliseconds);
+ Assert.AreEqual(5 * 60000, fiveMinutes.Milliseconds);
+ }
+ }
+}
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.message.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.message.cs new file mode 100644 index 0000000000..bf9620d785 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/messaging.test.message.cs @@ -0,0 +1,424 @@ +/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+namespace Org.Apache.Qpid.Messaging.UnitTest
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using Org.Apache.Qpid.Messaging;
+ using NUnit.Framework;
+
+ [TestFixture]
+ public class MessageTests
+ {
+ [SetUp]
+ public void SetUp()
+ {
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ }
+
+ [Test]
+ public void SimpleMessageSize()
+ {
+ Message m2 = new Message("rarey");
+ UInt64 m2Size = m2.ContentSize;
+ Assert.AreEqual(5, m2Size);
+ }
+
+ [Test]
+ public void SimpleMessageStringContent()
+ {
+ Message m2 = new Message("rarely");
+ string mString = m2.GetContent();
+
+ StringAssert.IsMatch("rarely", mString);
+ }
+
+ [Test]
+ public void MessageReceiveContentAsByteArray()
+ {
+ Message m2 = new Message("while");
+ UInt64 m2Size = m2.ContentSize;
+
+ byte[] myRaw = new byte [m2Size];
+
+ m2.GetContent(myRaw);
+
+ Assert.IsTrue(true);
+ }
+
+ [Test]
+ public void MessageAsByteArray()
+ {
+ byte[] rawData = new byte[10];
+ for (byte i = 0; i < 10; i++)
+ rawData[i] = i;
+ Message m3 = new Message(rawData);
+
+ byte[] readback = new byte[m3.ContentSize];
+ m3.GetContent(readback);
+
+ for (byte i = 0; i < 10; i++)
+ Assert.AreEqual(i, readback[i]);
+ }
+
+ [Test]
+ public void MessageAsByteArraySlice()
+ {
+ byte[] rawData = new byte[10];
+ for (byte i = 0; i < 10; i++)
+ rawData[i] = i;
+ Message m3 = new Message(rawData, 1, 8);
+
+ Assert.AreEqual(8, m3.ContentSize);
+
+ byte[] readback = new byte[m3.ContentSize];
+ m3.GetContent(readback);
+
+ for (byte i = 0; i < 8; i++)
+ Assert.AreEqual(i + 1, readback[i]);
+ }
+
+
+ [Test]
+ public void MessageProperties()
+ {
+ Message msgGetSet = new Message("12345");
+
+ msgGetSet.Subject = "Subject";
+ msgGetSet.MessageId = "MessageId";
+ msgGetSet.UserId = "UserId";
+ msgGetSet.CorrelationId = "CorrelationId";
+ msgGetSet.Ttl = DurationConstants.SECOND;
+ msgGetSet.Priority = (byte)'z';
+ msgGetSet.Durable = false;
+ msgGetSet.Redelivered = true;
+
+ Dictionary<string, object> props = new Dictionary<string,object>();
+ props.Add("firstProperty", 1);
+ props.Add("secondProperty", 2);
+ msgGetSet.Properties = props;
+
+ Address replyToAddr = new Address("replyTo");
+ replyToAddr.Subject = "topsecret";
+ msgGetSet.ReplyTo = replyToAddr;
+
+ StringAssert.IsMatch("Subject", msgGetSet.Subject);
+ StringAssert.IsMatch("", msgGetSet.ContentType);
+ StringAssert.IsMatch("MessageId", msgGetSet.MessageId);
+ StringAssert.IsMatch("UserId", msgGetSet.UserId);
+ StringAssert.IsMatch("CorrelationId", msgGetSet.CorrelationId);
+ Assert.AreEqual(1000, msgGetSet.Ttl.Milliseconds);
+ Assert.AreEqual((byte)'z', msgGetSet.Priority);
+ Assert.IsFalse( msgGetSet.Durable);
+ Assert.IsTrue( msgGetSet.Redelivered);
+
+ Dictionary<string, object> gotProps = msgGetSet.Properties;
+ StringAssert.IsMatch("1", gotProps["firstProperty"].ToString());
+ StringAssert.IsMatch("2", gotProps["secondProperty"].ToString());
+
+ Address gotReply = msgGetSet.ReplyTo;
+ StringAssert.IsMatch("replyTo", gotReply.Name);
+ StringAssert.IsMatch("topsecret", msgGetSet.ReplyTo.Subject);
+ }
+
+ [Test]
+ public void SimpleMessageCopy()
+ {
+ Message m2 = new Message("rarely");
+ Message m3 = m2;
+
+ StringAssert.IsMatch("rarely", m3.GetContent());
+ }
+
+ [Test]
+ public void MessageAsMap_AllVariableTypes()
+ {
+ //
+ // Create structured content for the message. This example builds a
+ // map of items including a nested map and a list of values.
+ //
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ Dictionary<string, object> subMap = new Dictionary<string, object>();
+ Collection<object> colors = new Collection<object>();
+
+ // add simple types
+ content["id"] = 987654321;
+ content["name"] = "Widget";
+ content["percent"] = 0.99;
+
+ // add nested amqp/map
+ subMap["name"] = "Smith";
+ subMap["number"] = 354;
+ content["nestedMap"] = subMap;
+
+ // add an amqp/list
+ colors.Add("red");
+ colors.Add("green");
+ colors.Add("white");
+ // list contains null value
+ colors.Add(null);
+ content["colorsList"] = colors;
+
+ // add one of each supported amqp data type
+ bool mybool = true;
+ content["mybool"] = mybool;
+
+ byte mybyte = 4;
+ content["mybyte"] = mybyte;
+
+ UInt16 myUInt16 = 5;
+ content["myUInt16"] = myUInt16;
+
+ UInt32 myUInt32 = 6;
+ content["myUInt32"] = myUInt32;
+
+ UInt64 myUInt64 = 7;
+ content["myUInt64"] = myUInt64;
+
+ char mychar = 'h';
+ content["mychar"] = mychar;
+
+ Int16 myInt16 = 9;
+ content["myInt16"] = myInt16;
+
+ Int32 myInt32 = 10;
+ content["myInt32"] = myInt32;
+
+ Int64 myInt64 = 11;
+ content["myInt64"] = myInt64;
+
+ Single mySingle = (Single)12.12;
+ content["mySingle"] = mySingle;
+
+ Double myDouble = 13.13;
+ content["myDouble"] = myDouble;
+
+ Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f");
+ content["myGuid"] = myGuid;
+
+ content["myNull"] = null;
+
+ // Create the message
+ Message message = new Message(content);
+
+ // Copy the message
+ Message rxMsg = message;
+
+ // Extract the content
+ Dictionary<string, object> rxContent = new Dictionary<string, object>();
+
+ rxMsg.GetContent(rxContent);
+
+ Dictionary<string, object> rxSubMap = (Dictionary<string, object>)rxContent["nestedMap"];
+
+ Collection<object> rxColors = (Collection<object>)rxContent["colorsList"];
+
+ StringAssert.IsMatch("System.Boolean", rxContent["mybool"].GetType().ToString());
+ bool rxbool = (bool)rxContent["mybool"];
+
+ StringAssert.IsMatch("System.Byte", rxContent["mybyte"].GetType().ToString());
+ byte rxbyte = (byte)rxContent["mybyte"];
+
+ StringAssert.IsMatch("System.UInt16", rxContent["myUInt16"].GetType().ToString());
+ UInt16 rxUInt16 = (UInt16)rxContent["myUInt16"];
+
+ StringAssert.IsMatch("System.UInt32", rxContent["myUInt32"].GetType().ToString());
+ UInt32 rxUInt32 = (UInt32)rxContent["myUInt32"];
+
+ StringAssert.IsMatch("System.UInt64", rxContent["myUInt64"].GetType().ToString());
+ UInt64 rxUInt64 = (UInt64)rxContent["myUInt64"];
+
+ StringAssert.IsMatch("System.SByte", rxContent["mychar"].GetType().ToString());
+ char rxchar = System.Convert.ToChar(rxContent["mychar"]);
+
+ StringAssert.IsMatch("System.Int16", rxContent["myInt16"].GetType().ToString());
+ Int16 rxInt16 = (Int16)rxContent["myInt16"];
+
+ StringAssert.IsMatch("System.Int32", rxContent["myInt32"].GetType().ToString());
+ Int32 rxInt32 = (Int32)rxContent["myInt32"];
+
+ StringAssert.IsMatch("System.Int64", rxContent["myInt64"].GetType().ToString());
+ Int64 rxInt64 = (Int64)rxContent["myInt64"];
+
+ StringAssert.IsMatch("System.Single", rxContent["mySingle"].GetType().ToString());
+ Single rxSingle = (Single)rxContent["mySingle"];
+
+ StringAssert.IsMatch("System.Double", rxContent["myDouble"].GetType().ToString());
+ Double rxDouble = (Double)rxContent["myDouble"];
+
+ StringAssert.IsMatch("System.Guid", rxContent["myGuid"].GetType().ToString());
+ Guid rxGuid = (Guid)rxContent["myGuid"];
+
+ // Verify the values
+
+ StringAssert.IsMatch("Smith", rxSubMap["name"].ToString());
+ Assert.AreEqual(4, rxColors.Count);
+ Assert.IsTrue(rxbool);
+ Assert.AreEqual(4, rxbyte);
+ Assert.AreEqual(5, rxUInt16);
+ Assert.AreEqual(6, rxUInt32);
+ Assert.AreEqual(7, rxUInt64);
+ Assert.AreEqual((char)'h', rxchar);
+ Assert.AreEqual(9, rxInt16);
+ Assert.AreEqual(10, rxInt32);
+ Assert.AreEqual(11, rxInt64);
+ Assert.AreEqual((Single)12.12, rxSingle);
+ Assert.AreEqual((Double)13.13, rxDouble);
+ StringAssert.IsMatch("03020100-0504-0706-0809-0a0b0c0d0e0f", rxGuid.ToString());
+ }
+
+ [Test]
+ public void MessageContentAsObject()
+ {
+ // Only processes primitive data types
+
+ // Create the message
+ Message message = new Message();
+ Object gotThis = new Object();
+
+
+ // add one of each supported amqp data type
+ bool mybool = true;
+ message.SetContentObject(mybool);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Boolean", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(mybool));
+
+ byte mybyte = 4;
+ message.SetContentObject(mybyte);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Byte", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(mybyte));
+
+ UInt16 myUInt16 = 5;
+ message.SetContentObject(myUInt16);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.UInt16", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(myUInt16));
+
+ UInt32 myUInt32 = 6;
+ message.SetContentObject(myUInt32);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.UInt32", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(myUInt32));
+
+ UInt64 myUInt64 = 7;
+ message.SetContentObject(myUInt64);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.UInt64", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(myUInt64));
+
+ char mychar = 'h';
+ message.SetContentObject(mychar);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.SByte", gotThis.GetType().ToString());
+ char result;
+ result = Convert.ToChar(gotThis);
+ Assert.IsTrue(result.Equals(mychar));
+
+ Int16 myInt16 = 9;
+ message.SetContentObject(myInt16);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Int16", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(myInt16));
+
+ Int32 myInt32 = 10;
+ message.SetContentObject(myInt32);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Int32", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(myInt32));
+
+ Int64 myInt64 = 11;
+ message.SetContentObject(myInt64);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Int64", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(myInt64));
+
+ Single mySingle = (Single)12.12;
+ message.SetContentObject(mySingle);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Single", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(mySingle));
+
+ Double myDouble = 13.13;
+ message.SetContentObject(myDouble);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Double", gotThis.GetType().ToString());
+ Assert.IsTrue(gotThis.Equals(myDouble));
+
+ Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f");
+ message.SetContentObject(myGuid);
+ gotThis = message.GetContentObject();
+ StringAssert.IsMatch("System.Guid", gotThis.GetType().ToString());
+ StringAssert.IsMatch("03020100-0504-0706-0809-0a0b0c0d0e0f", gotThis.ToString());
+
+ Dictionary<string, object> content = new Dictionary<string, object>();
+ Dictionary<string, object> subMap = new Dictionary<string, object>();
+ Collection<object> colors = new Collection<object>();
+
+ // Test object map
+ // add simple types
+ content["id"] = 987654321;
+ content["name"] = "Widget";
+ content["percent"] = 0.99;
+
+ // add nested amqp/map
+ subMap["name"] = "Smith";
+ subMap["number"] = 354;
+ content["nestedMap"] = subMap;
+
+ // add an amqp/list
+ colors.Add("red");
+ colors.Add("green");
+ colors.Add("white");
+ // list contains null value
+ colors.Add(null);
+ content["colorsList"] = colors;
+
+ // add one of each supported amqp data type
+ bool mybool2 = true;
+ content["mybool"] = mybool2;
+
+ message.SetContentObject(content);
+ gotThis = message.GetContentObject();
+ StringAssert.Contains("System.Collections.Generic.Dictionary`2[System.String,System.Object]", gotThis.GetType().ToString());
+ // Can't compare objects as strings since the maps get reordered
+ // so compare each item
+ foreach (KeyValuePair<string, object> kvp in content)
+ {
+ object gotObj = ((Dictionary<string, object>)(gotThis))[kvp.Key];
+ StringAssert.Contains(kvp.Value.ToString(), gotObj.ToString());
+ }
+
+ // test object list
+ message.SetContentObject(colors);
+ gotThis = message.GetContentObject();
+ StringAssert.Contains("System.Collections.ObjectModel.Collection`1[System.Object]", gotThis.GetType().ToString());
+ StringAssert.Contains(message.ListAsString(colors), message.ListAsString((Collection<object>)gotThis));
+ }
+ }
+}
diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/msvc9/messaging.test.csproj.in b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/msvc9/messaging.test.csproj.in new file mode 100644 index 0000000000..13874d35b1 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/msvc9/messaging.test.csproj.in @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{AF2FBC78-266C-430C-BC29-9477AB596A36}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>messaging.test</RootNamespace>
+ <AssemblyName>messaging.test</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <StartupObject>
+ </StartupObject>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}\src\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|AnyCPU' ">
+ <OutputPath>bin\RelWithDebInfo\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>bin\x86\RelWithDebInfo\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>bin\x64\RelWithDebInfo\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="nunit.framework, Version=2.5.3.9345, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Program Files (x86)\NUnit 2.5.3\bin\net-1.1\framework\nunit.framework.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="${CMAKE_CURRENT_SOURCE_DIR}/test/messaging.test/messaging.test.address.cs" />
+ <Compile Include="${CMAKE_CURRENT_SOURCE_DIR}/test/messaging.test/messaging.test.connection.cs" />
+ <Compile Include="${CMAKE_CURRENT_SOURCE_DIR}/test/messaging.test/messaging.test.cs" />
+ <Compile Include="${CMAKE_CURRENT_SOURCE_DIR}/test/messaging.test/messaging.test.duration.cs" />
+ <Compile Include="${CMAKE_CURRENT_SOURCE_DIR}/test/messaging.test/messaging.test.message.cs" />
+ <Compile Include="${CMAKE_CURRENT_SOURCE_DIR}/test/messaging.test/Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/msvcx/messaging.test.csproj.in b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/msvcx/messaging.test.csproj.in new file mode 100644 index 0000000000..c77315f0be --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/msvcx/messaging.test.csproj.in @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{AF2FBC78-266C-430C-BC29-9477AB596A36}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>messaging.test</RootNamespace>
+ <AssemblyName>messaging.test</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <StartupObject>
+ </StartupObject>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation />
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|AnyCPU' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x86' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'RelWithDebInfo|x64' ">
+ <OutputPath>${PROJECT_BINARY_DIR}/src/$(Configuration)/</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="nunit.framework, Version=2.5.3.9345, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Program Files (x86)\NUnit 2.5.3\bin\net-1.1\framework\nunit.framework.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\${DOTNET_relPathToSrc}\test\messaging.test\messaging.test.address.cs">
+ <Link>messaging.test.address.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\${DOTNET_relPathToSrc}\test\messaging.test\messaging.test.connection.cs">
+ <Link>messaging.test.connection.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\${DOTNET_relPathToSrc}\test\messaging.test\messaging.test.cs">
+ <Link>messaging.test.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\${DOTNET_relPathToSrc}\test\messaging.test\messaging.test.duration.cs">
+ <Link>messaging.test.duration.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\${DOTNET_relPathToSrc}\test\messaging.test\messaging.test.message.cs">
+ <Link>messaging.test.message.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\${DOTNET_relPathToSrc}\test\messaging.test\Properties\AssemblyInfo.cs">
+ <Link>AssemblyInfo.cs</Link>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="${DOTNET_exampleRelPathToBindingProj}">
+ <Project>{AA5A3B83-5F98-406D-A01C-5A921467A57D}</Project>
+ <Name>Org.Apache.Qpid.Messaging</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <PropertyGroup>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ </PropertyGroup>
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.receiver/csharp.direct.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.receiver/csharp.direct.receiver.csproj.in new file mode 100644 index 0000000000..45258fa843 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.receiver/csharp.direct.receiver.csproj.in @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{52F880E7-D677-4C91-8516-D679CE0F46A8}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.direct.receiver</RootNamespace>
+ <AssemblyName>csharp.direct.receiver</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.direct.receiver.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.sender/csharp.direct.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.sender/csharp.direct.sender.csproj.in new file mode 100644 index 0000000000..f11603ac69 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.sender/csharp.direct.sender.csproj.in @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.direct.sender</RootNamespace>
+ <AssemblyName>csharp.direct.sender</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.direct.sender.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.client/csharp.example.client.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.client/csharp.example.client.csproj.in new file mode 100644 index 0000000000..1d78ff1a66 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.client/csharp.example.client.csproj.in @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0DE01712-C2D1-4CA4-B42C-5856456A8696}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.client</RootNamespace>
+ <AssemblyName>csharp.example.client</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.client.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj.in new file mode 100644 index 0000000000..d3082838ef --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj.in @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E31B349C-830C-4583-8BD9-30DA4398349F}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.declare_queues</RootNamespace>
+ <AssemblyName>csharp.example.declare_queues</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.declare_queues.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.drain/csharp.example.drain.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.drain/csharp.example.drain.csproj.in new file mode 100644 index 0000000000..0f6832b069 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.drain/csharp.example.drain.csproj.in @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C43DEB69-8088-420B-B0CA-C699535E6D08}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.drain</RootNamespace>
+ <AssemblyName>csharp.example.drain</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.drain.cs" />
+ <Compile Include="Options.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.helloworld/csharp.example.helloworld.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.helloworld/csharp.example.helloworld.csproj.in new file mode 100644 index 0000000000..a8b1b1465e --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.helloworld/csharp.example.helloworld.csproj.in @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{8CC1C265-0507-44A3-9483-8FAF48513F4D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.helloworld</RootNamespace>
+ <AssemblyName>csharp.example.helloworld</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.helloworld.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.server/csharp.example.server.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.server/csharp.example.server.csproj.in new file mode 100644 index 0000000000..d3958ef68f --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.server/csharp.example.server.csproj.in @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{090A081D-E8B5-4949-AA43-EE182B7101E3}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.server</RootNamespace>
+ <AssemblyName>csharp.example.server</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.server.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.spout/csharp.example.spout.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.spout/csharp.example.spout.csproj.in new file mode 100644 index 0000000000..b009ddbf1d --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.spout/csharp.example.spout.csproj.in @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{EB36626D-36C2-41B3-B65E-762BAF27F137}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.spout</RootNamespace>
+ <AssemblyName>csharp.example.spout</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.spout.cs" />
+ <Compile Include="Options.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in new file mode 100644 index 0000000000..ddd5523ba6 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{68A43817-2358-4A31-8FDF-FE21722BFBCF}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.receiver</RootNamespace>
+ <AssemblyName>csharp.map.callback.receiver</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="org.apache.qpid.messaging.sessionreceiver, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.sessionreceiver.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="org.apache.qpid.messaging.sessionreceiver, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.sessionreceiver.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.callback.receiver.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in new file mode 100644 index 0000000000..747ca6fb3f --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{12F1C14F-5C7D-4075-9BAE-C091394FF99A}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.sender</RootNamespace>
+ <AssemblyName>csharp.map.callback.sender</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.callback.sender.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.receiver/csharp.map.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.receiver/csharp.map.receiver.csproj.in new file mode 100644 index 0000000000..b71e1667b9 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.receiver/csharp.map.receiver.csproj.in @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.receiver</RootNamespace>
+ <AssemblyName>csharp.map.receiver</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.receiver.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.sender/csharp.map.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.sender/csharp.map.sender.csproj.in new file mode 100644 index 0000000000..6775913ede --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.sender/csharp.map.sender.csproj.in @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.sender</RootNamespace>
+ <AssemblyName>csharp.map.sender</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x86' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup Condition=" '$(Platform)' == 'x64' ">
+ <Reference Include="org.apache.qpid.messaging, Version=1.0.4358.13700, Culture=neutral, PublicKeyToken=7e57166074abee8c, processorArchitecture=AMD64">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.sender.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/winsdk_dotnet_examples.sln.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/winsdk_dotnet_examples.sln.in new file mode 100644 index 0000000000..6db55b5590 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvc9/winsdk_dotnet_examples.sln.in @@ -0,0 +1,178 @@ +Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "examples\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "examples\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "examples\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "examples\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "examples\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "examples\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "examples\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "examples\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "examples\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "examples\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "examples\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "examples\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|Win32.Build.0 = Debug|Win32
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|x64.ActiveCfg = Debug|Win32
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|x86.ActiveCfg = Debug|Win32
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|Win32.ActiveCfg = Release|Win32
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|Win32.Build.0 = Release|Win32
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|x64.ActiveCfg = Release|Win32
+ {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|x86.ActiveCfg = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.direct.receiver/csharp.direct.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.direct.receiver/csharp.direct.receiver.csproj.in new file mode 100644 index 0000000000..82f4e384ef --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.direct.receiver/csharp.direct.receiver.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{52F880E7-D677-4C91-8516-D679CE0F46A8}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.direct.receiver</RootNamespace>
+ <AssemblyName>csharp.direct.receiver</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.direct.receiver.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.direct.sender/csharp.direct.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.direct.sender/csharp.direct.sender.csproj.in new file mode 100644 index 0000000000..e7e07064bb --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.direct.sender/csharp.direct.sender.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.direct.sender</RootNamespace>
+ <AssemblyName>csharp.direct.sender</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.direct.sender.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.client/csharp.example.client.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.client/csharp.example.client.csproj.in new file mode 100644 index 0000000000..3baddb12b9 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.client/csharp.example.client.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0DE01712-C2D1-4CA4-B42C-5856456A8696}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.client</RootNamespace>
+ <AssemblyName>csharp.example.client</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.client.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj.in new file mode 100644 index 0000000000..99d5a598b0 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E31B349C-830C-4583-8BD9-30DA4398349F}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.declare_queues</RootNamespace>
+ <AssemblyName>csharp.example.declare_queues</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.declare_queues.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.drain/csharp.example.drain.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.drain/csharp.example.drain.csproj.in new file mode 100644 index 0000000000..5b3eab16ce --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.drain/csharp.example.drain.csproj.in @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C43DEB69-8088-420B-B0CA-C699535E6D08}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.drain</RootNamespace>
+ <AssemblyName>csharp.example.drain</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.drain.cs" />
+ <Compile Include="Options.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.helloworld/csharp.example.helloworld.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.helloworld/csharp.example.helloworld.csproj.in new file mode 100644 index 0000000000..1ef196cdce --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.helloworld/csharp.example.helloworld.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{8CC1C265-0507-44A3-9483-8FAF48513F4D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.helloworld</RootNamespace>
+ <AssemblyName>csharp.example.helloworld</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.helloworld.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.server/csharp.example.server.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.server/csharp.example.server.csproj.in new file mode 100644 index 0000000000..26f68c8007 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.server/csharp.example.server.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{090A081D-E8B5-4949-AA43-EE182B7101E3}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.server</RootNamespace>
+ <AssemblyName>csharp.example.server</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.server.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.spout/csharp.example.spout.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.spout/csharp.example.spout.csproj.in new file mode 100644 index 0000000000..55a41c8de5 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.example.spout/csharp.example.spout.csproj.in @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{EB36626D-36C2-41B3-B65E-762BAF27F137}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.example.spout</RootNamespace>
+ <AssemblyName>csharp.example.spout</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.example.spout.cs" />
+ <Compile Include="Options.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in new file mode 100644 index 0000000000..dc6f6f0db3 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj.in @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{68A43817-2358-4A31-8FDF-FE21722BFBCF}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.receiver</RootNamespace>
+ <AssemblyName>csharp.map.callback.receiver</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="org.apache.qpid.messaging.sessionreceiver">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.sessionreceiver.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.callback.receiver.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in new file mode 100644 index 0000000000..dbc06ae49f --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj.in @@ -0,0 +1,92 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{12F1C14F-5C7D-4075-9BAE-C091394FF99A}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.callback.sender</RootNamespace>
+ <AssemblyName>csharp.map.callback.sender</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.callback.sender.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.receiver/csharp.map.receiver.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.receiver/csharp.map.receiver.csproj.in new file mode 100644 index 0000000000..8ae1bdec87 --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.receiver/csharp.map.receiver.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.receiver</RootNamespace>
+ <AssemblyName>csharp.map.receiver</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.receiver.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.sender/csharp.map.sender.csproj.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.sender/csharp.map.sender.csproj.in new file mode 100644 index 0000000000..ed79f871bd --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/examples/csharp.map.sender/csharp.map.sender.csproj.in @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>csharp.map.sender</RootNamespace>
+ <AssemblyName>csharp.map.sender</AssemblyName>
+ <TargetFrameworkVersion>${DOTNET_TARGET_FRAMEWORK_VERSION}</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x86</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+ <DebugSymbols>true</DebugSymbols>
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DebugType>full</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+ <OutputPath>$(ProjectDir)..\..\..\bin\$(Configuration)\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <Optimize>true</Optimize>
+ <DebugType>pdbonly</DebugType>
+ <PlatformTarget>x64</PlatformTarget>
+ <ErrorReport>prompt</ErrorReport>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="org.apache.qpid.messaging">
+ <HintPath>$(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll</HintPath>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="csharp.map.sender.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/winsdk_dotnet_examples.sln.in b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/winsdk_dotnet_examples.sln.in new file mode 100644 index 0000000000..1e82f6833b --- /dev/null +++ b/qpid/cpp/bindings/qpid/dotnet/winsdk_sources/msvcx/winsdk_dotnet_examples.sln.in @@ -0,0 +1,181 @@ +Microsoft Visual Studio Solution File, Format Version ${DOTNET_SLN_FILE_FORMAT}
+# ${DOTNET_SLN_VISUAL_STUDIO}
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "examples\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "examples\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "examples\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "examples\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "examples\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "examples\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "examples\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "examples\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "examples\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "examples\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "examples\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "examples\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86
+ {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|Win32.ActiveCfg = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|Win32.ActiveCfg = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86
+ {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|Win32.ActiveCfg = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|Win32.ActiveCfg = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86
+ {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|Win32.ActiveCfg = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|Win32.ActiveCfg = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86
+ {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|Win32.ActiveCfg = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|Win32.ActiveCfg = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86
+ {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|Win32.ActiveCfg = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|Win32.ActiveCfg = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86
+ {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86
+ {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86
+ {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86
+ {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86
+ {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86
+ {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86
+ {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/qpid/cpp/bindings/qpid/examples/perl/client.pl b/qpid/cpp/bindings/qpid/examples/perl/client.pl new file mode 100755 index 0000000000..ee7bc6cd53 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/client.pl @@ -0,0 +1,76 @@ +#!/usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; + +use qpid; + +my $url = ( @ARGV == 1 ) ? $ARGV[0] : "amqp:tcp:127.0.0.1:5672"; +my $connectionOptions = ( @ARGV > 1 ) ? $ARGV[1] : ""; + +# creates a new connection instance +my $connection = new qpid::messaging::Connection( $url, $connectionOptions ); + +eval { + # open the connection and create a session for interacting with it + $connection->open(); + + my $session = $connection->create_session(); + my $sender = $session->create_sender("service_queue"); + + # create an address and receiver for incoming messages + # the queue will be created always, and will be deleted + # when the receive disconnects + my $receiver = $session->create_receiver("#"); + my $responseQueue = $receiver->get_address(); + # Now send some messages... + + my @s = ( + "Twas brillig, and the slithy toves", + "Did gire and gymble in the wabe.", + "All mimsy were the borogroves,", + "And the mome raths outgrabe." + ); + + # create the message object, and set a reply-to address + # so that the server knows where to send responses + # the message object will be reused to send each line + my $request = new qpid::messaging::Message(); + $request->set_reply_to($responseQueue); + for ( my $i = 0 ; $i < 4 ; $i++ ) { + $request->set_content( $s[$i] ); + $sender->send($request); + + # wait for the response to the last line sent + # the message will be taken directly from the + # broker's queue rather than waiting for it + # to be queued locally + my $response = $receiver->fetch(); + print $request->get_content() . " -> " + . $response->get_content() . "\n"; + } + + # close the connection + $connection->close(); +}; + +if ($@) { + die $@; +} diff --git a/qpid/cpp/bindings/qpid/examples/perl/drain.pl b/qpid/cpp/bindings/qpid/examples/perl/drain.pl new file mode 100755 index 0000000000..d0150854b2 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/drain.pl @@ -0,0 +1,154 @@ +#!/usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; + +use qpid; +use Getopt::Long; +use Pod::Usage; + +my $url = "127.0.0.1"; +my $timeout = 0; +my $forever = 0; +my $count = 0; +my $connectionOptions = ""; +my $address = "amq.direct"; +my $help; + +my $result = GetOptions( + "broker|b=s" => \$url, + "timeout|t=i" => \$timeout, + "forever|f" => \$forever, + "connection-options=s" => \$connectionOptions, + "count|c=i" => \$count, + "help|h" => \$help +) || pod2usage( -verbose => 0 ); + +pod2usage( -verbose => 1 ) if $help; + +if ( $#ARGV ge 0 ) { + $address = $ARGV[0]; +} + +sub getTimeout { + + # returns either the named duration FOREVER if the + # forever cmdline argument was used, otherwise creates + # a new Duration of the specified length + return ($forever) + ? qpid::messaging::Duration::FOREVER + : new qpid::messaging::Duration( $timeout * 1000 ); +} + +sub printProperties { + my $h = shift(); + return qq[{${\(join', ',map"'$_': '$h->{$_}'",keys%$h)}}]; +} + +# create a connection object +my $connection = new qpid::messaging::Connection( $url, $connectionOptions ); + +eval { + # open the connection, then create a session and receiver + $connection->open(); + my $session = $connection->create_session(); + my $receiver = $session->create_receiver($address); + my $timeout = getTimeout(); + my $message = new qpid::messaging::Message(); + my $i = 0; + + for ( ; ; ) { + eval { $message = $receiver->fetch($timeout); }; + + if ($@) { + last; + } + + # check if the message was on that was redelivered + my $redelivered = + ( $message->get_redelivered ) ? "redelivered=True, " : ""; + print "Message(" + . $redelivered + . "properties=" + . printProperties( $message->get_properties() ) + . ", content='"; + + # if the message content was a map, then we will print + # it out as a series of name => value pairs + my $content = $message->get_content_object; + if ( $message->get_content_type() eq "amqp/map" ) { + map { print "\n$_ => $content->{$_}"; } keys %{$content}; + } + else { + # it's not a map, so just print the content as a string + print $content; + } + print "')\n"; + + # if the message had a reply-to address, then we'll send a + # response back letting the send know the message was processed + my $replyto = $message->get_reply_to(); + if ( $replyto->get_name() ) { + print "Replying to " . $message->get_reply_to()->str() . "...\n"; + + # create a temporary sender for the specified queue + my $sender = $session->create_sender($replyto); + my $response = + new qpid::messaging::Message("received by the server."); + $sender->send($response); + } + + # acknowledge all messages received on this queue so far + $session->acknowledge(); + + if ( $count and ( ++$i == $count ) ) { + last; + } + } + + # close everything to clean up + $receiver->close(); + $session->close(); + $connection->close(); +}; + +if ($@) { + $connection->close(); + die $@; +} + +__END__ + +=head1 NAME + +drain - Drains messages from the specified address + +=head1 SYNOPSIS + + Options: + -h, --help show this message + -b VALUE, --broker VALUE url of broker to connect to + -t VALUE, --timeout VALUE timeout in seconds to wait before exiting + -f, --forever ignore timeout and wait forever + --connection-options VALUE connection options string in the form {name1:value1, name2:value2} + -c VALUE, --count VALUE number of messages to read before exiting + +=cut + diff --git a/qpid/cpp/bindings/qpid/examples/perl/hello_world.pl b/qpid/cpp/bindings/qpid/examples/perl/hello_world.pl new file mode 100755 index 0000000000..917038f0ef --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/hello_world.pl @@ -0,0 +1,56 @@ +#!/usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; +use Data::Dumper; + +use qpid; + +my $broker = ( @ARGV > 0 ) ? $ARGV[0] : "localhost:5672"; +my $address = ( @ARGV > 1 ) ? $ARGV[1] : "amq.topic"; +my $connectionOptions = ( @ARGV > 2 ) ? $ARGV[2] : ""; + +# create a connection +my $connection = new qpid::messaging::Connection( $broker, $connectionOptions ); + +eval { + # open the connection and create a session, and both a sender a receive + $connection->open(); + + my $session = $connection->create_session(); + + my $receiver = $session->create_receiver($address); + my $sender = $session->create_sender($address); + + # send a simple message + $sender->send( new qpid::messaging::Message("Hello world!") ); + + # receive the message, fetching it directly from the broker + my $message = $receiver->fetch(qpid::messaging::Duration::SECOND, 1); + + # output the message content, then acknowledge it + print $message->get_content() . "\n"; + $session->acknowledge(); + + # close the connection + $connection->close(); +}; + +die $@ if ($@); diff --git a/qpid/cpp/bindings/qpid/examples/perl/hello_xml.pl b/qpid/cpp/bindings/qpid/examples/perl/hello_xml.pl new file mode 100755 index 0000000000..8d77c4b2b8 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/hello_xml.pl @@ -0,0 +1,83 @@ +#!/usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; + +use qpid; + +my $broker = ( @ARGV > 0 ) ? $ARGV[0] : "localhost:5672"; +my $connectionOptions = ( @ARGV > 1 ) ? $ARGV[1] : ""; + +my $query = <<END; + let \$w := ./weather + return \$w/station = 'Raleigh-Durham International Airport (KRDU)' + and \$w/temperature_f > 50 + and \$w/temperature_f - \$w/dewpoint > 5 + and \$w/wind_speed_mph > 7 + and \$w/wind_speed_mph < 20 +END + +my $address = <<END; +xml-exchange; { +create: always, +node: { type: topic, x-declare: { type: xml } }, +link: { +x-bindings: [{ exchange: xml-exchange, key: weather, arguments: { xquery:" $query" } }] +}} +END + +# create a connection object +my $connection = new qpid::messaging::Connection( $broker, $connectionOptions ); + +eval { + # open the connection, then create from it a session + # from the session, create a receiver to handle incoming messages + $connection->open(); + my $session = $connection->create_session(); + my $receiver = $session->create_receiver($address); + + # create a message and set its contentn + my $message = new qpid::messaging::Message(); + + my $content = <<END; + <weather> + <station>Raleigh-Durham International Airport (KRDU)</station> + <wind_speed_mph>16</wind_speed_mph> + <temperature_f>70</temperature_f> + <dewpoint>35</dewpoint> + </weather> +END + + $message->set_content($content); + + # create a sender for the xml-exchange/weater topic + # then send the message + my $sender = $session->create_sender('xml-exchange/weather'); + $sender->send($message); + + # wait for the response and then output it to the screen + my $response = $receiver->fetch(); + print $response->get_content() . "\n"; + + # close the connection + $connection->close(); +}; + +die $@ if ($@); diff --git a/qpid/cpp/bindings/qpid/examples/perl/map_receiver.pl b/qpid/cpp/bindings/qpid/examples/perl/map_receiver.pl new file mode 100755 index 0000000000..21b1cb09f2 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/map_receiver.pl @@ -0,0 +1,55 @@ +#! /usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; +use Data::Dumper; + +use qpid; + +my $url = ( @ARGV > 0 ) ? $ARGV[0] : "amqp:tcp:127.0.0.1:5672"; +my $address = ( @ARGV > 1 ) ? $ARGV[1] : "message_queue; {create: always}"; +my $connectionOptions = ( @ARGV > 2 ) ? $ARGV[2] : ""; + +# create a connection object +my $connection = new qpid::messaging::Connection( $url, $connectionOptions ); + +eval { + # open the connection, then create a session from it + $connection->open(); + my $session = $connection->create_session(); + + # create a receiver for the session, subscribed the the specified queue + my $receiver = $session->create_receiver($address); + # wait for a message to appear in the queue + my $message = $receiver->fetch(); + + # display the content of the message + my $content = $message->get_content(); + print Dumper($content); + + # acknowledge the message, removing it from the queue + $session->acknowledge(); + + # close everything, cleaning up + $receiver->close(); + $connection->close(); +}; + +die $@ if ($@); diff --git a/qpid/cpp/bindings/qpid/examples/perl/map_sender.pl b/qpid/cpp/bindings/qpid/examples/perl/map_sender.pl new file mode 100755 index 0000000000..27063ef780 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/map_sender.pl @@ -0,0 +1,60 @@ +#! /usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; +use Data::Dumper; + +use qpid; + +my $url = ( @ARGV > 0 ) ? $ARGV[0] : "amqp:tcp:127.0.0.1:5672"; +my $address = ( @ARGV > 1 ) ? $ARGV[1] : "message_queue; {create: always}"; +my $connectionOptions = ( @ARGV > 2 ) ? $ARGV[2] : ""; + +# create a new connection object +my $connection = new qpid::messaging::Connection( $url, $connectionOptions ); + +eval { + + # open the connection and create a session + $connection->open(); + my $session = $connection->create_session(); + + # create a sender and connect it to the supplied address string + my $sender = $session->create_sender($address); + + # create a message and set the content to be a map of values + my $message = new qpid::messaging::Message(); + my $content = { + id => 987654321, + name => "Widget", + percent => sprintf( "%.2f", 0.99 ), + colours => [qw (red green white)], + }; + $message->set_content($content); + + # send the message + $sender->send( $message, 1 ); + + # close the connection and session + $session->close(); + $connection->close(); +}; + +die $@ if ($@); diff --git a/qpid/cpp/bindings/qpid/examples/perl/server.pl b/qpid/cpp/bindings/qpid/examples/perl/server.pl new file mode 100755 index 0000000000..be43655aeb --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/server.pl @@ -0,0 +1,83 @@ +#!/usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; + +use qpid; + +my $url = ( @ARGV == 1 ) ? $ARGV[0] : "amqp:tcp:127.0.0.1:5672"; +my $connectionOptions = ( @ARGV > 1 ) ? $ARGV[1] : ""; + +# create a connection object +my $connection = new qpid::messaging::Connection( $url, $connectionOptions ); + +eval { + + # connect to the broker and create a session + $connection->open(); + my $session = $connection->create_session(); + + # create a receiver for accepting incoming messages + my $receiver = $session->create_receiver("service_queue; {create: always}"); + + # go into an infinite loop to receive messages and process them + while (1) { + + # wait for the next message to be processed + my $request = $receiver->fetch(); + + + # get the address for sending replies + # if no address was supplised then we can't really respond, so + # only process when one is present + my $address = $request->get_reply_to(); + if ($address) { + + # a temporary sender for sending to the response queue + my $sender = $session->create_sender($address); + my $s = $request->get_content(); + $s = uc($s); + + # create the response message and send it + my $response = new qpid::messaging::Message($s); + $sender->send($response); + print "Processed request: " + . $request->get_content() . " -> " + . $response->get_content() . "\n"; + + # acknowledge the message since it was processed + $session->acknowledge(); + } + else { + print "Error: no reply address specified for request: " + . $request->get_content() . "\n"; + $session->reject($request); + } + } + + # close connections to clean up + $session->close(); + $connection->close(); +}; + +if ($@) { + die $@; +} + diff --git a/qpid/cpp/bindings/qpid/examples/perl/spout.pl b/qpid/cpp/bindings/qpid/examples/perl/spout.pl new file mode 100755 index 0000000000..c97c2a58af --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/perl/spout.pl @@ -0,0 +1,169 @@ +#!/usr/bin/env perl +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +use strict; +use warnings; + +use qpid; +use Getopt::Long; +use Pod::Usage; +use Time::Local; + +my $url = "127.0.0.1"; +my $timeout = 0; +my $count = 1; +my $durable = 0; +my $id = ""; +my $replyto = ""; +my @properties; +my @entries; +my $content = ""; +my $connectionOptions = ""; +my $address = "amq.direct"; +my $help; + +my $result = GetOptions( + "broker|b=s" => \$url, + "timeout|t=i" => \$timeout, + "count|c=i" => \$count, + "durable|d" => \$durable, + "id|i=s" => \$id, + "replyto=s" => \$replyto, + "property|p=s@" => \@properties, + "map|m=s@" => \@entries, + "content=s" => \$content, + "connection-options=s" => \$connectionOptions, + "help|h" => \$help +) || pod2usage( -verbose => 0 ); + +pod2usage( -verbose => 1 ) if $help; + +if ( $#ARGV ge 0 ) { + $address = $ARGV[0]; +} + +sub setEntries { + my ($content) = @_; + + foreach (@entries) { + my ( $name, $value ) = split( "=", $_ ); + $content->{$name} = $value; + } +} + +sub setProperties { + my ($message) = @_; + + foreach (@properties) { + my ( $name, $value ) = split( "=", $_ ); + $message->set_property( $name, $value ); + } +} + +# create a connection object +my $connection = new qpid::messaging::Connection( $url, $connectionOptions ); + +eval { + # open the connection, create a session and then a sender + $connection->open(); + my $session = $connection->create_session(); + my $sender = $session->create_sender($address); + + # create a message to be sent + my $message = new qpid::messaging::Message(); + setProperties($message) if (@properties); + if (@entries) { + my $content = {}; + setEntries($content); + $message->set_content_object($content); + } + elsif ($content) { + $message->set_content($content); + $message->set_content_type("text/plain"); + } + + # set durable flag + $message->set_durable($durable); + + # if a reply-to address was supplied, then create a receiver from the + # session and wait for a response to be sent + my $receiver; + if ($replyto) { + my $responseQueue = new qpid::messaging::Address($replyto); + $receiver = $session->create_receiver($responseQueue); + $message->set_reply_to($responseQueue); + } + + my $start = localtime; + my @s = split( /[:\s]/, $start ); + my $s = "$s[3]$s[4]$s[5]"; + my $n = $s; + + for ( + my $i = 0 ; + ( $i < $count || $count == 0 ) + and ( $timeout == 0 || abs( $n - $s ) < $timeout ) ; + $i++ + ) + { + + $sender->send($message); + + if ($receiver) { + print "Waiting for a response.\n"; + my $response = $receiver->fetch(); + print "$i -> " . $response->get_content() . "\n"; + } + + my $now = localtime; + my @n = split( /[:\s]/, $now ); + my $n = "$n[3]$n[4]$n[5]"; + } + $session->sync(); + $connection->close(); +}; + +if ($@) { + $connection->close(); + die $@; +} + +__END__ + +=head1 NAME + +spout - Send messages to the specified address + +=head1 SYNOPSIS + + Usage: spout [OPTIONS] ADDRESS + + Options: + -h, --help show this message + -b VALUE, --broker VALUE url of broker to connect to + -t VALUE, --timeout VALUE exit after the specified time + -c VALUE, --count VALUE stop after count messageshave been sent, zero disables + -i VALUE, --id VALUE use the supplied id instead of generating one + --replyto VALUE specify reply-to value + -P VALUE, --property VALUE specify message property + -M VALUE, --map VALUE specify entry for map content + --content VALUE specify textual content + --connection-options VALUE connection options string in the form {name1:value1, name2:value2} + +=cut diff --git a/qpid/cpp/bindings/qpid/examples/python/console b/qpid/cpp/bindings/qpid/examples/python/console new file mode 100755 index 0000000000..2facc368c3 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/python/console @@ -0,0 +1,99 @@ +#!/usr/bin/env python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import optparse, sys, traceback + +try: + from qpid_messaging import * +except: + from qpid.messaging import * + +parser = optparse.OptionParser(usage="usage: %prog [options] ADDRESS ...", + description="handle requests from the supplied address.") +parser.add_option("-b", "--broker", default="localhost", + help="connect to specified BROKER (default %default)") +parser.add_option("-r", "--reconnect", action="store_true", + help="enable auto reconnect") +parser.add_option("-i", "--reconnect-interval", type="float", default=3, + help="interval between reconnect attempts") +parser.add_option("-l", "--reconnect-limit", type="int", default=10, + help="maximum number of reconnect attempts") +parser.add_option("-v", dest="verbose", action="store_true", + help="enable logging") + +opts, args = parser.parse_args() + +if args: + addr = args.pop(0) +else: + parser.error("address is required") + +conn = Connection(opts.broker, + reconnect=opts.reconnect, + reconnect_interval=opts.reconnect_interval, + reconnect_limit=opts.reconnect_limit) + +try: + conn.open() + session = conn.session() + sender = session.sender(addr) + response_queue = "response-queue;{create:always}" + receiver = session.receiver(response_queue) + receiver.capacity = 10 + + while True: + cmdtype = None + data = None + input = raw_input("Type (eval/shell/exit, ENTER=shell):") + if input != "exit": + if input == "eval": + cmdtype = input + data = raw_input("Text to evaluate: ") + elif input == "shell" or input == "": + cmdtype = "shell" + data = raw_input("Shell cmd: ") + + if cmdtype != None and data != "": + msg = Message() + msg.properties["type"] = cmdtype + # TODO: fix this + # msg.setProperty("type", cmdtype) + msg.content = data + msg.reply_to = response_queue + try: + sender.send(msg) + response = receiver.fetch() + print "Response:" + print "%s" % response.content + session.acknowledge(response) + except SendError, e: + print e + else: + break + if sender is not None: + sender.close() + if receiver is not None: + receiver.close() +except ReceiverError, e: + print e +except KeyboardInterrupt: + pass + +conn.close() diff --git a/qpid/cpp/bindings/qpid/examples/python/drain b/qpid/cpp/bindings/qpid/examples/python/drain new file mode 100755 index 0000000000..2b15a50500 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/python/drain @@ -0,0 +1,102 @@ +#!/usr/bin/env python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import optparse + +try: + from qpid_messaging import * +except: + from qpid.messaging import * + +from qpid.util import URL +from qpid.log import enable, DEBUG, WARN + +parser = optparse.OptionParser(usage="usage: %prog [options] ADDRESS ...", + description="Drain messages from the supplied address.") +parser.add_option("-b", "--broker", default="localhost", + help="connect to specified BROKER (default %default)") +parser.add_option("-c", "--count", type="int", + help="number of messages to drain") +parser.add_option("-f", "--forever", action="store_true", + help="ignore timeout and wait forever") +parser.add_option("-r", "--reconnect", action="store_true", + help="enable auto reconnect") +parser.add_option("-i", "--reconnect-interval", type="float", default=3, + help="interval between reconnect attempts") +parser.add_option("-l", "--reconnect-limit", type="int", + help="maximum number of reconnect attempts") +parser.add_option("-t", "--timeout", type="float", default=0, + help="timeout in seconds to wait before exiting (default %default)") +parser.add_option("-p", "--print", dest="format", default="%(M)s", + help="format string for printing messages (default %default)") +parser.add_option("-v", dest="verbose", action="store_true", + help="enable logging") + +opts, args = parser.parse_args() + +if opts.verbose: + enable("qpid", DEBUG) +else: + enable("qpid", WARN) + +if args: + addr = args.pop(0) +else: + parser.error("address is required") +if opts.forever: + timeout = None +else: + timeout = opts.timeout + +class Formatter: + + def __init__(self, message): + self.message = message + self.environ = {"M": self.message, + "P": self.message.properties, + "C": self.message.content} + + def __getitem__(self, st): + return eval(st, self.environ) + +conn = Connection(opts.broker, + reconnect=opts.reconnect, + reconnect_interval=opts.reconnect_interval, + reconnect_limit=opts.reconnect_limit) +try: + conn.open() + ssn = conn.session() + rcv = ssn.receiver(addr) + + count = 0 + while not opts.count or count < opts.count: + try: + msg = rcv.fetch(timeout=timeout) + print opts.format % Formatter(msg) + count += 1 + ssn.acknowledge() + except Empty: + break +except ReceiverError, e: + print e +except KeyboardInterrupt: + pass + +conn.close() diff --git a/qpid/cpp/bindings/qpid/examples/python/hello b/qpid/cpp/bindings/qpid/examples/python/hello new file mode 100755 index 0000000000..52ea955093 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/python/hello @@ -0,0 +1,56 @@ +#!/usr/bin/env python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import sys + +try: + from qpid_messaging import * +except: + from qpid.messaging import * + +if len(sys.argv)<2: + broker = "localhost:5672" +else: + broker = sys.argv[1] + +if len(sys.argv)<3: + address = "amq.topic" +else: + address = sys.argv[2] + +connection = Connection(broker) + +try: + connection.open() + session = connection.session() + + sender = session.sender(address) + receiver = session.receiver(address) + + sender.send(Message("Hello world!")); + + message = receiver.fetch() + print message.content + session.acknowledge() + +except MessagingError,m: + print m + +connection.close() diff --git a/qpid/cpp/bindings/qpid/examples/python/hello_xml b/qpid/cpp/bindings/qpid/examples/python/hello_xml new file mode 100755 index 0000000000..05fa5cc7ba --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/python/hello_xml @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import sys + +try: + from qpid_messaging import * +except: + from qpid.messaging import * + +broker = "localhost:5672" +connection = Connection(broker) + +try: + connection.open() + session = connection.session() + +# Set up the receiver + query = """ + let $w := ./weather + return $w/station = 'Raleigh-Durham International Airport (KRDU)' + and $w/temperature_f > 50 + and $w/temperature_f - $w/dewpoint > 5 + and $w/wind_speed_mph > 7 + and $w/wind_speed_mph < 20 """ + +# query="./weather" + + address = """ + xml; { + create: always, + node:{ type: queue }, + link: { + x-bindings: [{ exchange: xml, key: weather, arguments: { xquery: %r} }] + } + } + """ % query + + receiver = session.receiver(address) + +# Send an observation + + observations = """ + <weather> + <station>Raleigh-Durham International Airport (KRDU)</station> + <wind_speed_mph>16</wind_speed_mph> + <temperature_f>70</temperature_f> + <dewpoint>35</dewpoint> + </weather> """ + + message = Message(subject="weather", content=observations) + sender = session.sender("xml") + sender.send(message) + +# Retrieve matching message from the receiver and print it + + message = receiver.fetch(timeout=1) + print message.content + session.acknowledge() + +except MessagingError,m: + print m + +connection.close() diff --git a/qpid/cpp/bindings/qpid/examples/python/server b/qpid/cpp/bindings/qpid/examples/python/server new file mode 100755 index 0000000000..fb87951bad --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/python/server @@ -0,0 +1,100 @@ +#!/usr/bin/env python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import optparse, sys, traceback + +try: + from qpid_messaging import * +except: + from qpid.messaging import * + +from qpid.util import URL +from subprocess import Popen, STDOUT, PIPE +from qpid.log import enable, DEBUG, WARN + +parser = optparse.OptionParser(usage="usage: %prog [options] ADDRESS ...", + description="handle requests from the supplied address.") +parser.add_option("-b", "--broker", default="localhost", + help="connect to specified BROKER (default %default)") +parser.add_option("-r", "--reconnect", action="store_true", + help="enable auto reconnect") +parser.add_option("-i", "--reconnect-interval", type="float", default=3, + help="interval between reconnect attempts") +parser.add_option("-l", "--reconnect-limit", type="int", + help="maximum number of reconnect attempts") +parser.add_option("-v", dest="verbose", action="store_true", + help="enable logging") + +opts, args = parser.parse_args() + +if opts.verbose: + enable("qpid", DEBUG) +else: + enable("qpid", WARN) + +if args: + addr = args.pop(0) +else: + parser.error("address is required") + +conn = Connection(opts.broker, + reconnect=opts.reconnect, + reconnect_interval=opts.reconnect_interval, + reconnect_limit=opts.reconnect_limit) +def dispatch(msg): + msg_type = msg.properties.get("type") + if msg_type == "shell": + proc = Popen(msg.content, shell=True, stderr=STDOUT, stdin=PIPE, stdout=PIPE) + output, _ = proc.communicate() + result = Message(output) + result.properties["exit"] = proc.returncode + elif msg_type == "eval": + try: + content = str(eval(msg.content)) + except: + content = traceback.format_exc() + result = Message(content = content) + else: + result = Message("unrecognized message type: %s" % msg_type) + return result + +try: + conn.open() + ssn = conn.session() + rcv = ssn.receiver(addr) + + while True: + msg = rcv.fetch() + response = dispatch(msg) + snd = None + try: + snd = ssn.sender(msg.reply_to) + snd.send(response) + except SendError, e: + print e + if snd is not None: + snd.close() + ssn.acknowledge() +except ReceiverError, e: + print e +except KeyboardInterrupt: + pass + +conn.close() diff --git a/qpid/cpp/bindings/qpid/examples/python/spout b/qpid/cpp/bindings/qpid/examples/python/spout new file mode 100755 index 0000000000..48921d4387 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/python/spout @@ -0,0 +1,139 @@ +#!/usr/bin/env python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import optparse, time + +try: + from qpid_messaging import * + from uuid import uuid4 +except: + from qpid.messaging import * + +from qpid.util import URL +from qpid.log import enable, DEBUG, WARN + +def nameval(st): + idx = st.find("=") + if idx >= 0: + name = st[0:idx] + value = st[idx+1:] + else: + name = st + value = None + return name, value + +parser = optparse.OptionParser(usage="usage: %prog [options] ADDRESS [ CONTENT ... ]", + description="Send messages to the supplied address.") +parser.add_option("-b", "--broker", default="localhost", + help="connect to specified BROKER (default %default)") +parser.add_option("-r", "--reconnect", action="store_true", + help="enable auto reconnect") +parser.add_option("-i", "--reconnect-interval", type="float", default=3, + help="interval between reconnect attempts") +parser.add_option("-l", "--reconnect-limit", type="int", + help="maximum number of reconnect attempts") +parser.add_option("-c", "--count", type="int", default=1, + help="stop after count messages have been sent, zero disables (default %default)") +parser.add_option("-d", "--durable", action="store_true", + help="make the message persistent") +parser.add_option("-t", "--timeout", type="float", default=None, + help="exit after the specified time") +parser.add_option("-I", "--id", help="use the supplied id instead of generating one") +parser.add_option("-S", "--subject", help="specify a subject") +parser.add_option("-R", "--reply-to", help="specify reply-to address") +parser.add_option("-P", "--property", dest="properties", action="append", default=[], + metavar="NAME=VALUE", help="specify message property") +parser.add_option("-M", "--map", dest="entries", action="append", default=[], + metavar="KEY=VALUE", + help="specify map entry for message body") +parser.add_option("-v", dest="verbose", action="store_true", + help="enable logging") + +opts, args = parser.parse_args() + +if opts.verbose: + enable("qpid", DEBUG) +else: + enable("qpid", WARN) + +if opts.id is None: + spout_id = str(uuid4()) +else: + spout_id = opts.id +if args: + addr = args.pop(0) +else: + parser.error("address is required") + +content = None +content_type = None + +if args: + text = " ".join(args) +else: + text = None + +if opts.entries: + content = {} + if text: + content["text"] = text + for e in opts.entries: + name, val = nameval(e) + content[name] = val +else: + content = text + # no entries were supplied, so assume text/plain for + # compatibility with java (and other) clients + content_type = "text/plain" + +conn = Connection(opts.broker, + reconnect=opts.reconnect, + reconnect_interval=opts.reconnect_interval, + reconnect_limit=opts.reconnect_limit) +try: + conn.open() + ssn = conn.session() + snd = ssn.sender(addr) + + count = 0 + start = time.time() + while (opts.count == 0 or count < opts.count) and \ + (opts.timeout is None or time.time() - start < opts.timeout): + msg = Message(subject=opts.subject, + reply_to=opts.reply_to, + content=content) + if opts.durable: + msg.durable = True + if content_type is not None: + msg.content_type = content_type + msg.properties["spout-id"] = "%s:%s" % (spout_id, count) + for p in opts.properties: + name, val = nameval(p) + msg.properties[name] = val + + snd.send(msg) + count += 1 + print msg +except SendError, e: + print e +except KeyboardInterrupt: + pass + +conn.close() diff --git a/qpid/cpp/bindings/qpid/examples/python/statistics.py b/qpid/cpp/bindings/qpid/examples/python/statistics.py new file mode 100644 index 0000000000..089b81b740 --- /dev/null +++ b/qpid/cpp/bindings/qpid/examples/python/statistics.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +import time + +TS = "ts" +TIME_SEC = 1000000000 +MILLISECOND = 1000 + +class Statistic: + def message(self, msg): + return + def report(self): + return "" + def header(self): + return "" + + +class Throughput(Statistic): + def __init__(self): + self.messages = 0 + self.started = False + + def message(self, m): + self.messages += 1 + if not self.started: + self.start = time.time() + self.started = True + + def header(self): + return "tp(m/s)" + + def report(self): + if self.started: + elapsed = time.time() - self.start + return str(int(self.messages/elapsed)) + else: + return "0" + + +class ThroughputAndLatency(Throughput): + def __init__(self): + Throughput.__init__(self) + self.total = 0.0 + self.min = float('inf') + self.max = -float('inf') + self.samples = 0 + + def message(self, m): + Throughput.message(self, m) + if TS in m.properties: + self.samples+=1 + latency = MILLISECOND * (time.time() - float(m.properties[TS])/TIME_SEC) + if latency > 0: + self.total += latency + if latency < self.min: + self.min = latency + if latency > self.max: + self.max = latency + + def header(self): +# Throughput.header(self) + return "%s\tl-min\tl-max\tl-avg" % Throughput.header(self) + + def report(self): + output = Throughput.report(self) + if (self.samples > 0): + output += "\t%.2f\t%.2f\t%.2f" %(self.min, self.max, self.total/self.samples) + return output + + +# Report batch and overall statistics +class ReporterBase: + def __init__(self, batch, wantHeader): + self.batchSize = batch + self.batchCount = 0 + self.headerPrinted = not wantHeader + self.overall = None + self.batch = None + + def create(self): + return + + # Count message in the statistics + def message(self, m): + if self.overall == None: + self.overall = self.create() + self.overall.message(m) + if self.batchSize: + if self.batch == None: + self.batch = self.create() + self.batch.message(m) + self.batchCount+=1 + if self.batchCount == self.batchSize: + self.header() + print self.batch.report() + self.create() + self.batchCount = 0 + + # Print overall report. + def report(self): + if self.overall == None: + self.overall = self.create() + self.header() + print self.overall.report() + + def header(self): + if not self.headerPrinted: + if self.overall == None: + self.overall = self.create() + print self.overall.header() + self.headerPrinted = True + + +class Reporter(ReporterBase): + def __init__(self, batchSize, wantHeader, Stats): + ReporterBase.__init__(self, batchSize, wantHeader) + self.__stats = Stats + + def create(self): + ClassName = self.__stats.__class__ + return ClassName() diff --git a/qpid/cpp/bindings/qpid/perl/CMakeLists.txt b/qpid/cpp/bindings/qpid/perl/CMakeLists.txt new file mode 100644 index 0000000000..3c859d689f --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/CMakeLists.txt @@ -0,0 +1,55 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +##------------------------------------------------------ +## Use Swig to generate a literal binding to the C++ API +##------------------------------------------------------ +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/perl.i PROPERTIES CPLUSPLUS ON) +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/perl.i + PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/bindings") + +list(APPEND SWIG_MODULE_cqpid_perl_EXTRA_DEPS + ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/qpid/qpid.i + ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/qpid/swig_perl_typemaps.i +) +swig_add_module(cqpid_perl perl ${CMAKE_CURRENT_SOURCE_DIR}/perl.i) +swig_link_libraries(cqpid_perl qpidmessaging qpidtypes ${PERL_LIBRARY}) +set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${NOSTRICT_ALIASING}") + +include_directories(${PERL_INCLUDE_PATH} + ${qpid-cpp_SOURCE_DIR}/include + ${qpid-cpp_SOURCE_DIR}/bindings) + +##---------------------------------- +## Install the complete Perl binding +##---------------------------------- +## install the Perl library separate, since we need to rename the film if +# it's coming from a version of Cmake < 2.8 +install(TARGETS ${SWIG_MODULE_cqpid_perl_REAL_NAME} + RENAME cqpid_perl.so + DESTINATION ${PERL_PFX_ARCHLIB} + COMPONENT ${QPID_COMPONENT_CLIENT} +) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cqpid_perl.pm + ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE + ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.PL + DESTINATION ${PERL_PFX_ARCHLIB} + COMPONENT ${QPID_COMPONENT_CLIENT} + ) diff --git a/qpid/cpp/bindings/qpid/perl/ChangeLog b/qpid/cpp/bindings/qpid/perl/ChangeLog new file mode 100644 index 0000000000..d55d76ae27 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/ChangeLog @@ -0,0 +1,6 @@ +Version 0.22: + * QPID-4466: qpid::messaging::Duration now supports multiplication + * QPID-4416: Messages with embedded nulls won't break on getContentPtr + * QPID-4505: Provides unit tests for Address, Duration and Message + * QPID-4504: Broke up the Per classes into separate source modules + * QPID-4580: Added perldoc markup to each source module diff --git a/qpid/cpp/bindings/qpid/perl/LICENSE b/qpid/cpp/bindings/qpid/perl/LICENSE new file mode 100644 index 0000000000..bc46b77047 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/LICENSE @@ -0,0 +1,206 @@ +========================================================================= +== Apache License == +========================================================================= + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/qpid/cpp/bindings/qpid/perl/Makefile.PL b/qpid/cpp/bindings/qpid/perl/Makefile.PL new file mode 100644 index 0000000000..91686a89e5 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/Makefile.PL @@ -0,0 +1,32 @@ +#!/usr/bin/env perl -w +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License + +use strict; + +use ExtUtils::MakeMaker; +use Config; + +# generate the Swig wrappers for the Qpid libraries +system('swig -perl -c++ -I/usr/include -o cqpid_perl.cpp perl.i'); + +WriteMakefile( + NAME => 'cqpid_perl', + PREREQ_PM => {}, + LIBS => ["-lqpidmessaging -lqpidtypes"], + C => ['cqpid_perl.cpp'], +); diff --git a/qpid/cpp/bindings/qpid/perl/Makefile.PL.in b/qpid/cpp/bindings/qpid/perl/Makefile.PL.in new file mode 100644 index 0000000000..75586cfe74 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/Makefile.PL.in @@ -0,0 +1,18 @@ +#!/usr/bin/env perl -w + +use strict; + +use ExtUtils::MakeMaker; +use Config; + +WriteMakefile( + NAME => 'cqpid_perl', + PREREQ_PM => {}, + AUTHOR => 'Jan-Marek Glogowski <glogow@fbihome.de>', + LIBS => ["-L@top_builddir@/src/.libs -lqpidmessaging -lqpidtypes"], + DEFINE => '', + INC => '-I@top_srcdir@/include -I@top_builddir@/include -I@top_srcdir@/src -I@top_builddir@/src -I@PERL_INC@', + C => ['cqpid_perl.cpp'], + # Un-comment this if you add C files to link with later: + OBJECT => 'cqpid_perl.o', +); diff --git a/qpid/cpp/bindings/qpid/perl/README b/qpid/cpp/bindings/qpid/perl/README new file mode 100644 index 0000000000..ca5a96e539 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/README @@ -0,0 +1,15 @@ +Qpid Perl Language Bindings +=========================== + +How to get help +=============== + +You can use the perldoc command to display API help for working with Qpid. + + perldoc qpid_messaging.pm + +will show a simple example application written in Perl that uses the APIs. +From there you can display the individual module documentation by typing: + + perldoc [module] + diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid.pm new file mode 100644 index 0000000000..1f8d967a65 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid.pm @@ -0,0 +1,24 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +use qpid_messaging; + +package qpid; + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging.pm new file mode 100644 index 0000000000..c9d6845eb9 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging.pm @@ -0,0 +1,53 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +package qpid::messaging; + +sub encode { + my $content = $_[0]; + my $message = $_[1]; + my $impl = $message->get_implementation(); + + if(UNIVERSAL::isa($content, "HASH")) { + cqpid_perl::encode($content, $impl, "amqp/map"); + } elsif(UNIVERSAL::isa($content, "ARRAY")) { + cqpid_perl::encode($content, $impl, "amqp/list"); + } else { + $message->get_implementation()->setContent($content); + } +} + +sub decode { + my $message = $_[0]; + my $impl = $message->get_implementation(); + my $content_type = $impl->getContentType(); + + if($content_type eq "amqp/map") { + $result = cqpid_perl::decodeMap($impl); + } elsif($content_type eq "amqp/list") { + $result = cqpid_perl::decodeList($impl); + } else { + $result = $impl->getContent(); + } + + return $result; +} + +1; + diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Address.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Address.pm new file mode 100644 index 0000000000..d417770b1c --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Address.pm @@ -0,0 +1,338 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +=pod + +=head1 NAME + +qpid::messaging::Address + +=head1 DESCRIPTION + +An B<Address> represents an address to which messages can be sent or +from which they can be received. + +=head2 THE ADDRESS STRING + +An address can be described suing the following pattern: + +E<lt>addressE<gt> [ / E<lt>subjectE<gt> ]= ; [ { E<lt>keyE<gt> : E<lt>valueE<gt> , ... } ] + +where B<address> is a simple name and B<subject> is a subject or subject +pattern. + +=head3 ADDRESS OPTIONS + +The options, encluded in curly braces, are key:value pairs delimited by a comma. +The values can be nested maps also enclosed in curly braces. Or they can be +lists of values, where they are contained within square brackets but still comma +delimited, such as: + + [value1,value2,value3] + +The following are the list of supported options: + +=over + +=item B<create> + +Indicates if the address should be created; values are B<always>, B<never>, +B<sender> or B<receiver> + +=item B<assert> + +Indicates whether or not to assert any specified node properties; values are +B<always>, B<never>, B<sender> or B<receiver> + +=item B<delete> + +Indicates whether or not to delete the addressed node when a sender or receiver +is cancelled; values are B<always>, B<never>, B<sender> or B<receiver> + +=item B<node> + +A nested map describing properties for the addressed node. Properties are +B<type> (B<topic> or B<queue>), B<durable> (a boolean), B<x-declare> (a nested +map of AMQP 0.10-specific options) and B<x-bindings> (a nested list which +specifies a queue, exchange or a binding key and arguments). + +=item B<link> + +=item B<mode> + +=back + +=cut + +package qpid::messaging::Address; + +use overload ( + 'bool' => \& boolify, + '""' => \& stringify, + ); + +sub boolify { + my ($self) = @_; + my $impl = $self->{_impl}; + + return length($impl->getName()); +} + +sub stringify { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $self->str(); +} + +sub str { + my ($self) = @_; + + return $self->get_implementation()->str(); +} + +=pod + +=head1 CONSTRUCTOR + +Creates an B<Address> + +=over + +=item $address = new qpid::messaging::Address( addr ) + +=back + +=head3 ARGUMENTS + +=over + +=item * addr + +The address string. + +=back + +=cut +sub new { + my ($class) = @_; + my ($self) = {}; + + # 2 args: either a string address or a cqpid_perl::Address + # 3+ args: name + subject + options + type + if (@_ eq 2) { + my $address = $_[1]; + + if (ref($address) eq 'cqpid_perl::Address') { + $self->{_impl} = $address; + } else { + $self->{_impl} = new cqpid_perl::Address($_[1]); + } + } elsif (@_ >= 4) { + my $impl = new cqpid_perl::Address($_[1], $_[2], $_[3]); + + $impl->setType($_[4]) if @_ >= 5; + + $self->{_impl} = $impl; + } else { + die "You must specify an address." + } + + bless $self, $class; + return $self; +} + +sub get_implementation { + my ($self) = @_; + return $self->{_impl}; +} + +=pod + +=head1 ATTRIBUTES + +=cut + +=pod + +=head2 NAME + +The name portion of the address. + +=over + +=item $address->set_name( name ) + +=item $name = $address->get_name + +=back + +=head3 ARGUMENTS + +=over + +=item * name + +See the address string explanation. + +=back + +=cut +sub set_name { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->setName($_[1]); +} + +sub get_name { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getName(); +} + +=pod + +=head2 SUBJECT + +The subject portion of the address. + +=over + +=item $address->set_subject( subject ) + +=item $subject = $address->get_subject + +=back + +=head3 ARGUMENTS + +=over + +=item * subject + +See the address string explanation. + +=back + +=cut +sub set_subject { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->setSubject($_[1]); +} + +sub get_subject { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getSubject; +} + +=pod + +=head2 OPTIONS + +The address options. + +=over + +=item $address->set_options( options ) + +=item @opts = $address->get_options + +=back + +=head3 ARGUMENTS + +=over + +=item * options + +The set of name:value pairs for the address. See the address string explanation. + +=back + +=cut +sub set_options { + my ($self) = @_; + my $impl = $self->{_impl}; + my $options = $_[1]; + + die "Options cannot be null" if !defined($options); + + $impl->setOptions($_[1]); +} + +sub get_options { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getOptions; +} + +=pod + +=head2 TYPE + +The type of the address determines how B<Sender> and B<Receiver> objects are +constructed for it. It also affects how a b<reply-to> address is encoded. + +If no type is specified then it willb e determined by querying the broker. +Explicitly setting the type prevents this. + +=over + +=item $address->set_type( type ) + +=item $type = $address->get_type + +=back + +=head3 ARGUMENTS + +=over + +=item * type + +Values can be either B<queue> or B<type>. + +=back + +=cut +sub set_type { + my ($self) = @_; + my $impl = $self->{_impl}; + my $type = $_[1]; + + die "Type must be defined" if !defined($type); + + $impl->setType($type); +} + +sub get_type { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getType; +} + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Connection.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Connection.pm new file mode 100644 index 0000000000..6d478cdf0c --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Connection.pm @@ -0,0 +1,291 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +=pod + +=head1 NAME + +qpid::messaging::Connection + +=head1 DESCRIPTION + +A B<qpid::messaging::Connection> represents a network connection to a remote +endpoint. + +=cut + +package qpid::messaging::Connection; + +=pod + +=head1 CONSTRUCTOR + +=over + +=item $conn = new qpid::messaging::Connection + +=item $conn = new qpid::messaging::Connection( url ) + +=item $conn = new qpid::messaging::Connection( url, options ) + +Creates a connection object. Raises a C<MessagingError> if an invalid +connection option is used. + +=back + +=head3 ARGUMENTS + +=over + +=item * url + +The URL for the broker. See B<qpid::messaging::Address> for more on + address strings + +=item * options + +The connection options. + +=back + +=cut + +sub new { + my ($class) = @_; + my $self = { + _url => $_[1] || "localhost:5672", + _options => $_[2] || {}, + _impl => $_[3], + }; + + bless $self, $class; + return $self; +} + +=pod + +=head1 ACTIONS + +=cut + + +=pod + +=head2 OPENING AND CLOSING CONNECTIONS + +=cut + + +=pod + +=over + +=item $conn->open + +Establishes the connection to the broker. + +=back + +=cut +sub open { + my ($self) = @_; + my $impl = $self->{_impl}; + + # if we have an implementation instance then use it, otherwise + # create a new implementation instance + unless (defined($impl)) { + my $url = $self->{_url}; + my ($options) = $self->{_options}; + + $impl = new cqpid_perl::Connection($url, $options); + $self->{_impl} = $impl + } + + $impl->open() unless $impl->isOpen() +} + +=pod + +=over + +=item $conn->is_open + +Reports whether the connection is open. + +=back + +=cut +sub is_open { + my ($self) = @_; + my $impl = $self->{_impl}; + + if (defined($impl) && $impl->isOpen()) { + 1; + } else { + 0; + } +} + +=pod + +=over + +=item $conn->close + +Closes the connection. + +=back + +=cut +sub close { + my ($self) = @_; + + if ($self->is_open) { + my $impl = $self->{_impl}; + + $impl->close; + $self->{_impl} = undef; + } +} + +=pod + +=head2 SESSIONS + +=cut + + +=pod + +=over + +=item $session = $conn->create_session + +=item $conn->create_session( name ) + +Creates a new session. + +=back + +=head3 ARGUMENTS + +=over + +=item * name + +Specifies a name for the session. + +=back + +=cut +sub create_session { + my ($self) = @_; + + die "No connection available." unless ($self->open); + + my $impl = $self->{_impl}; + my $name = $_[1] || ""; + my $session = $impl->createSession($name); + + return new qpid::messaging::Session($session, $self); +} + +=pod + +=over + +=item $session = $conn->create_transactional_session + +=item $session = $conn->create_transaction_session( name ) + +Creates a transactional session. + +=back + +=head3 ARGUMENTS + +=over + +=item * name + +Specifies a name for the session. + +=back + +=cut +sub create_transactional_session { + my ($self) = @_; + + die "No connection available." unless ($self->open); + + my $impl = $self->{_impl}; + my $name = $_[1] || ""; + my $session = $impl->createTransactionalSession($name); + + return new qpid::messaging::Session($session, $self); +} + +=pod + +=over + +=item $session = $conn->get_session( name ) + +Returns the session with the specified name. + +=over + +=item $name + +The name given to the session when it was created. + +=back + +=back + +=cut +sub get_session { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getSession($_[1]); +} + +=pod + +=over + +=item $uname = $conn->get_authenticated_username + +Returns the username user to authenticate with the broker. + +If the conneciton did not use authentication credentials, then the +username returned is "anonymous". + +=back + +=cut +sub get_authenticated_username { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getAuthenticatedUsername; +} + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Duration.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Duration.pm new file mode 100644 index 0000000000..7d05daeeab --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Duration.pm @@ -0,0 +1,204 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +=pod + +=head1 NAME + +qpid::messaging::Duration + +=head1 DESCRIPTION + +A B<qpid::messaging::Duration> represents a period of time in milliseconds. + +=head1 NAMED DURATIONS + +The following named durations are available as constants + +=over + +=item B<FOREVER> + +The maximum wait time, equal to the maximum integer value for the platform. +Effective this will wait forever. + +=item B<IMMEDIATE> + +An alias for 0 milliseconds. + +=item B<SECOND> + +An alias for 1,000 milliseconds. + +=item B<MINUTE> + +An alias for 60,000 milliseconds. + +=back + +=cut + +package qpid::messaging::Duration; + +=pod + +=head1 OPERATORS + +=cut + +use overload ( + "*" => \&multiply, + "==" => \&equalify, + "!=" => \&unequalify, + ); + +=pod + +=over + +=item $doubled = $duration * $factor + +=item $doubled = $duration * 2 + +Multiplies the duration and returns a new instance. + +=over + +=item $factor + +A factor for multiplying the duration. + +=back + +=back + +=cut +sub multiply { + my ($self) = @_; + my $factor = $_[1]; + + die "Factor must be non-negative values" if !defined($factor) || ($factor < 0); + + my $duration = $self->{_impl} * $factor; + + return new qpid::messaging::Duration($duration); +} + +sub equalify { + my ($self) = @_; + my $that = $_[1]; + + return 0 if !defined($that) || !UNIVERSAL::isa($that, 'qpid::messaging::Duration');; + + return ($self->get_milliseconds() == $that->get_milliseconds()) ? 1 : 0; +} + +sub unequalify { + my ($self) = @_; + my $that = $_[1]; + + return 1 if !defined($that) || !UNIVERSAL::isa($that, 'qpid::messaging::Duration');; + + return ($self->get_milliseconds() != $that->get_milliseconds()) ? 1 : 0; +} + +=pod + +=head1 CONSTRUCTOR + +Creates a new instance. + +=over + +=item duration = new qpid::messaging::Duration( time ) + +=back + +=head3 ARGUMENTS + +=over + +=item * time + +The duration in B<milliseconds>. + +=back + +=cut +sub new { + my ($class) = @_; + my $duration = $_[1]; + + die "Duration time period must be defined" if !defined($duration); + + if (!UNIVERSAL::isa($duration, 'cqpid_perl::Duration')) { + die "Duration must be non-negative" if $duration < 0; + $duration = new cqpid_perl::Duration($duration); + } + + my ($self) = { + _impl => $duration, + }; + + bless $self, $class; + return $self; +} + +=pod + +=head1 ATTRIBUTES + +=cut + + +=pod + +=head2 MILLISECONDS + +The length of time is measured in milliseconds. + +=over + +=item time = $duration->get_milliseconds + +=back + +=cut +sub get_milliseconds { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getMilliseconds(); +} + +sub get_implementation { + my ($self) = @_; + + return $self->{_impl}; +} + +# TODO: Need a better way to define FOREVER +use constant { + FOREVER => new qpid::messaging::Duration(1000000), + IMMEDIATE => new qpid::messaging::Duration(0), + SECOND => new qpid::messaging::Duration(1000), + MINUTE => new qpid::messaging::Duration(60000), +}; + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Message.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Message.pm new file mode 100644 index 0000000000..6926eb221f --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Message.pm @@ -0,0 +1,617 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +=pod + +=head1 NAME + +qpid::messaging::Message + +=head1 DESCRIPTION + +A B<qpid::messaging::Message> a routable piece of information. + +=cut + +package qpid::messaging::Message; + + +=pod + +=head1 CONSTRUCTOR + +Creates a B<Message>. + +=over + +=item $msg = new qpid::messaging::Message + +=item $msg = new qpid::messaging::Message( $content ) + +=back + +=head3 ARGUMENTS + +=over + +=item * $content + +The message's content. + +=back + +=cut +sub new { + my ($class) = @_; + my $content = $_[1] if (@_ > 1); + my $impl = $_[2] if (@_ > 2); + my ($self) = { + _content => $content || "", + _impl => $impl || undef, + }; + + unless (defined($self->{_impl})) { + my $impl = new cqpid_perl::Message($self->{_content}); + + $self->{_impl} = $impl; + } + + bless $self, $class; + return $self; +} + +sub get_implementation { + my ($self) = @_; + + return $self->{_impl}; +} + + +=pod + +=head1 ATTRIBUTES + +=cut + +=pod + +=head2 REPLY TO ADDRESS + +The reply-to address tells a receiver where to send any responses. + +=over + +=item $msg->set_reply_to( "#reqly-queue;{create:always}" ) + +=item $msg->set_reply_to( address ) + +=item $address = $msg->get_reply_to + +=back + +=head3 ARGUMENTS + +=over + +=item * address + +The address. Can be either an instance of B<qpid::messaging::Address> or else an +address string. + +=back + +=cut +sub set_reply_to { + my ($self) = @_; + my $impl = $self->{_impl}; + my $address = $_[1]; + + # if the address was a string, then wrap it + # in a qpid::messaging::Address instance + if (!UNIVERSAL::isa($address, 'qpid::messaging::Address')) { + $address = new qpid::messaging::Address($_[1]); + } + + $impl->setReplyTo($address->get_implementation()); +} + +sub get_reply_to { + my ($self) = @_; + my $impl = $self->{_impl}; + + return new qpid::messaging::Address($impl->getReplyTo()); +} + +=pod + +=head2 SUBJECT + +=over + +=item $msg->set_subject( "responses" ) + +=item $msg->set_subject( subject ) + +=item $subject = $msg->get_subject + +=back + +=cut +sub set_subject { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->setSubject($_[1]); +} + +sub get_subject { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getSubject; +} + +=pod + +=head2 CONTENT TYPE + +This should be set by the sending application and indicates to the +recipients of the message how to interpret or decide the content. + +By default, only dictionaries and maps are automatically given a content +type. If this content type is replaced then retrieving the content will +not behave correctly. + +=over + +=item $msg->set_content_type( content_type ) + +=back + +=head3 ARGUMENTS + +=over + +=item * content_type + +The content type. For a list this would be C<amqp/list> and for a hash it is +C<amqp/map>. + +=back + +=cut +sub set_content_type { + my ($self) = @_; + my $type = $_[1]; + + my $impl = $self->{_impl}; + $impl->setContentType($type); +} + +sub get_content_type { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getContentType; +} + +=pod + +=head2 MESSAGE ID + +A message id must be a UUID type. A non-UUID value will be converted +to a zero UUID, thouygh a blank ID will be left untouched. + +=over + +=item $msg->set_message_id( id ) + +=item $id = $msg->get_message_id + +=back + +=cut +sub set_message_id { + my ($self) = @_; + my $impl = $self->{_impl}; + my $id = $_[1]; + + die "message id must be defined" if !defined($id); + + $impl->setMessageId($id); +} + +sub get_message_id { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getMessageId; +} + +=pod + +=head2 USER ID + +The user id should, in general, be the user-id which was used when +authenticating the connection itself, as the messaging infrastructure +will verify this. + +See B<qpid::messaging::Address#authenticated_username>. + +=over + +=item $msg->set_user_id( id ) + +=item $id = $msg->get_user_id + +=back + +=cut +sub set_user_id { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->setUserId($_[1]); +} + +sub get_user_id { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getUserId; +} + +=pod + +=head2 CORRELATION ID + +The correlation id can be used as part of a protocol for message exchange +patterns; e.g., a request-response pattern might require the correlation id +of the request and hte response to match, or it might use the message id of +the request as the correlation id on the response. + +B<NOTE:> If the id is not a string then the id is setup using the object's +string representation. + +=over + +=item $msg->set_correlation_id( id ) + +=item $id = $msg->get_correlation_id + +=back + +=cut +sub set_correlation_id { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->setCorrelationId($_[1]); +} + +sub get_correlation_id { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getCorrelationId; +} + +=pod + +=head2 PRIORITY + +The priority may be used by the messaging infrastructure to prioritize +delivery of messages with higher priority. + +B<NOTE:> If the priority is not an integer type then it is set using the +object's integer represtation. If the integer value is greater than an +8-bit value then only 8-bits are used. + +=over + +=item $msg->set_priority( priority ) + +=item $priority = $msg->get_priority + +=back + +=cut +sub set_priority { + my ($self) = @_; + my $impl = $self->{_impl}; + my $priority = $_[1]; + + die "Priority must be provided" if !defined($priority); + + $priority = int($priority); + die "Priority must be non-negative" if $priority < 0; + + $impl->setPriority($priority); +} + +sub get_priority { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getPriority; +} + +=pod + +=head2 TIME TO LIVE + +This can be used by the messaging infrastructure to discard messages +that are no longer of relevance. + +=over + +=item $msg->set_ttl( ttl ) + +=item $ttl = $msg->get_ttl + +=back + +=head3 ARGUMENTS + +=over + +=item * ttl + +A B<qpid::messaging::Duration> instance. If it is not, then a new instance +is created using the integer value for the argument. + +A B<negative> value is treated as the equipment of +B<qpid::messaging::Duration::FOREVER>. + +=back + +=cut +sub set_ttl { + my ($self) = @_; + my $impl = $self->{_impl}; + my $duration = $_[1]; + + die "Duration must be provided" if !defined($duration); + if (!UNIVERSAL::isa($duration, 'qpid::messaging::Duration')) { + $duration = int($duration); + + if ($duration < 0) { + $duration = qpid::messaging::Duration::FOREVER; + } elsif ($duration == 0) { + $duration = qpid::messaging::Duration::IMMEDIATE; + } else { + $duration = new qpid::messaging::Duration(int($duration)); + } + } + + $impl->setTtl($duration->get_implementation()); +} + +sub get_ttl { + my ($self) = @_; + my $impl = $self->{_impl}; + + return new qpid::messaging::Duration($impl->getTtl); +} + +=pod + +=head2 DURABILITY + +The durability of a B<Message> is a hint to the messaging infrastructure that +the message should be persisted or otherwise stored. This helps to ensure that +the message is not lost due to failures or a shutdown. + +=over + +=item $msg->set_durable( 1 ) + +=item $durable = $msg->get_durable + +=back + +=cut +sub set_durable { + my ($self) = @_; + my $impl = $self->{_impl}; + my $durable = $_[1]; + + die "Durable must be specified" if !defined($durable); + + $impl->setDurable($durable); +} + +sub get_durable { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getDurable; +} + +=pod + +=head2 REDELIVERED + +This is a hint to the messaging infrastructure that if de-duplication is +required, that this message should be examined to determine if it is a +duplicate. + +=over + +=item $msg->set_redelivered( 1 ) + +=item $redelivered = $msg->get_redelivered + +=back + +=cut +sub set_redelivered { + my ($self) = @_; + my $impl = $self->{_impl}; + my $redelivered = $_[1]; + + die "Redelivered must be specified" if !defined($redelivered); + + $impl->setRedelivered($redelivered); +} + +sub get_redelivered { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getRedelivered; +} + +=pod + +=head2 PROPERTIES + +Named properties for the message are name/value pairs. + +=over + +=item $msg->set_property( name, value ) + +=item $value = $msg->get_property( name ) + +=item @props = $msg->get_properties + +=back + +=head3 ARGUMENTS + +=over + +=item * name + +The property name. + +=item * value + +The property value. + +=back + +=cut +sub set_property { + my ($self) = @_; + my $impl = $self->{_impl}; + my $key = $_[1]; + my $value = $_[2]; + + $impl->setProperty($key, $value); +} + +sub get_properties { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getProperties; +} + +=pod + +=head2 CONTENT OBJECT + +The message content, represented as anh object. + +=over + +=item $msg->set_content_object( \%content ) + +=item $content = $msg->get_Content_object + +=back + +=cut + +sub set_content_object { + my ($self) = @_; + my $impl = $self->{_impl}; + + my $content = $_[1]; + + $impl->setContentObject($content); +} + +sub get_content_object { + my ($self) = @_; + my $impl = $self->{_impl}; + my $content = $impl->getContentObject; + + return $content; +} + +=pod + +=head2 CONTENT + +The message content. + +=begin _private + +TODO: Need to make the content automatically encode and decode for +hashes and lists. + +=end _private + +=over + +=item $msg->set_content( content ) + +=item $content = $msg->get_content + +=item $length = $msg->get_content_size + +=back + +=cut +sub set_content { + my ($self) = @_; + my $content = $_[1]; + my $impl = $self->{_impl}; + + die "Content must be provided" if !defined($content); + + $self->{_content} = $content; + + qpid::messaging::encode($content, $self); +} + +sub get_content { + my ($self) = @_; + my $impl = $self->{_impl}; + $content = $self->{_content} || undef; + + if(!defined($content)) { + $content = qpid::messaging::decode($self); + $self->{_content} = $content; + } + + return $content; +} + +sub get_content_size { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getContentSize; +} + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Receiver.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Receiver.pm new file mode 100644 index 0000000000..811a8660db --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Receiver.pm @@ -0,0 +1,339 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +=pod + +=head1 NAME + +qpid::messaging::Receiver + +=head1 DESCRIPTION + +A B<qpid::messaging::Receiver> is the entity though which messages are received. + +An instance can only be created using an active (i.e., not previously closed) +B<qpid::messaging::Session>. + +=head1 EXAMPLE + + # create a connection and a session + my $conn = new qpid::messaging::Connection("mybroker:5672"); + conn->open; + my $session = $conn->create_session; + + # create a receiver that listens on the "updates" topic of "alerts" + my $recv = $session->create_receiver("alerts/updates"); + + # set the local queue size to hold a maximum of 100 messages + $recv->set_capacity(100); + + # wait for an incoming message and process it + my $incoming = $recv->get; + process($incoming) + +=cut + +package qpid::messaging::Receiver; + +sub new { + my ($class) = @_; + my ($self) = { + _impl => $_[1], + _session => $_[2], + }; + + die "Must provide an implementation." unless defined($self->{_impl}); + die "Must provide a Session." unless defined($self->{_session}); + + bless $self, $class; + return $self; +} + +=pod + +=head1 ACTIONS + +=cut + + +=pod + +There are two ways to retrieve messages: from the local queue or from the +remote queue. + +=head2 GETTING FROM THE LOCAL QUEUE + +Messages can be held locally in message queues. + +=over + +=item $incoming = $receiver->get + +=item $incoming = $receiver->get( timeout) + +=back + +=head3 ARGUMENTS + +=over + +=item * timeout + +The period of time to wait for a message before raising an exception. If no +period of time is specified then the default is to wait B<forever>. + +=back + +=cut +sub get { + my ($self) = @_; + my $duration = $_[1]; + my $impl = $self->{_impl}; + + $duration = $duration->get_implementation() if defined($duration); + + my $message = undef; + + if (defined($duration)) { + $message = $impl->get($duration); + } else { + $message = $impl->get; + } + + return new qpid::messaging::Message(undef, $message); +} + +=pod + +=head2 FETCHING FROM THE REMOTE QUEUE + +Messages held in the remote queue must be fetched from the broker in order +to be processed. + +=over + +=item $incoming = $receiver->fetch + +=item $incoming = $receiver->fetch( time ) + +=back + +=head3 ARGUMENTS + +=over + +=item * timeout + +The period of time to wait for a message before raising an exception. If no +period of time is specified then the default is to wait B<forever>. + +=back + +=cut +sub fetch { + my ($self) = @_; + my $duration = $_[1]; + my $impl = $self->{_impl}; + my $message = undef; + + if (defined($duration)) { + $message = $impl->fetch($duration->get_implementation()); + } else { + $message = $impl->fetch; + } + + return new qpid::messaging::Message("", $message); +} + +=pod + +=head2 CLOSING THE RECEIVER + +=over + +=item receiver->close + +Closes the receiver. + +=back + +=cut +sub close { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->close; +} + +=pod + +=head1 ATTRIBUTES + +=cut + + +=pod + +=head2 CAPACITY + +The maximum number of messages that are prefected and held locally is +determined by the capacity of the receiver. + +=over + +=item $receiver->set_capacity( size ) + +=item $size = $receiver->get_capacity + +=back + +=cut +sub set_capacity { + my ($self) = @_; + my $capacity = $_[1]; + my $impl = $self->{_impl}; + + $impl->setCapacity($capacity); +} + +sub get_capacity { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getCapacity; +} + +=pod + +=head2 AVAILABLE + +The number of messages waiting in the local queue. + +The value is always in the range 0 <= B<available> <= B<capacity>. + +=over + +=item $count = $receiver->get_available + +=back + +=cut + +sub get_available { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getAvailable; +} + +=pod + +=over + +=item $count = $receiver->get_unsettled + +Returns the number of messages that have been received and acknowledged but +whose acknowledgements have not been confirmed by the sender. + +=back + +=cut +sub get_unsettled { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getUnsettled; +} + +=pod + +=over + +=item $name = $receiver->get_name + +Returns the name of the receiver. + +=back + +=cut +sub get_name { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getName; +} + +=pod + +=over + +=item $session = $receiver->get_session + +Returns the B<qpid::messaging::Session> instance from which this +receiver was created. + +=back + +=cut +sub get_session { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->{_session}; +} + +=pod + +Returns the address for this receiver. + +=over + +=item $address = $receiver->get_address + +=back + +=cut + +sub get_address { + my ($self) = @_; + my $impl = $self->{_impl}; + my $address = $impl->getAddress; + + return new qpid::messaging::Address($address); +} + +=pod + +=over + +=item $receiver->is_closed + +Returns whether the receiver is closed. + +=back + +=cut +sub is_closed { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->isClosed; +} + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Sender.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Sender.pm new file mode 100644 index 0000000000..bb67826a5e --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Sender.pm @@ -0,0 +1,280 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +=pod + +=head1 NAME + +qpid::messaging::Sender + +=head1 DESCRIPTION + +A B<qpid::messaging::Sender> is the entity through which messages are sent. + +An instance can only be created using an active (i.e., not previously closed) +B<qpid::messaging::Session>. + +=head1 EXAMPLE + + # create a connection and a session + my $conn = new qpid::messaging::Connection("mybroker:5672"); + conn->open; + my $session = $conn->create_session; + + # create a sender that posts messages to the "updates" queue + my $sender = $session->create_sender "updates;{create:always}" + + # begin sending updates + while( 1 ) { + my $content = wait_for_event; + $sender->send(new qpid::messaging::Message($content)); + } + +=cut + +package qpid::messaging::Sender; + +sub new { + my ($class) = @_; + my ($self) = { + _impl => $_[1], + _session => $_[2], + }; + + die "Must provide an implementation." unless defined($self->{_impl}); + die "Must provide a Session." unless defined($self->{_session}); + + bless $self, $class; + return $self; +} + +=pod + +=head1 ACTIONS + +=cut + + +=pod + +=head2 SENDING MESSAGES + +=over + +=item $sender->send( message ) + +=item $sender->send( message, block) + +Sends a message, optionally blocking until the message is received by +the broker. + +=back + +=head3 ARGUMENTS + +=over + +=item * message + +The message to be sent. + +=item * block + +If true then blocks until the message is received. + +=back + +=cut +sub send { + my ($self) = @_; + my $message = $_[1]; + my $sync = $_[2] || 0; + + die "No message to send." unless defined($message); + + my $impl = $self->{_impl}; + + $impl->send($message->get_implementation, $sync); +} + +=pod + +=head2 CLOSING THE SENDER + +=item sender->close + +Closes the sender. + +This does not affect the ownering B<Session> or B<Connection> + +=back + +=cut +sub close { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->close; +} + +=pod + +=head1 ATTRIBUTES + +=cut + +=pod + +=head2 CAPACITY + +The capacity is the number of outoing messages that can be held pending +confirmation of receipt by the broker. + +=over + +=item sender->set_capacity( size ) + +=item $size = sender->get_capacity + +=back + +=back + +=cut +sub set_capacity { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->setCapacity($_[1]); +} + +sub get_capacity { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getCapacity; +} + +=pod + +=head2 UNSETTLED + +The number of messages sent that are pending receipt confirmation by the broker. + +=over + +=item $count = sender->get_unsettled + +=back + +=cut +sub get_unsettled { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getUnsettled; +} + +=pod + +=head2 AVAILABLE + +The available slots for sending messages. + +This differences form B<capacity> in that it is the available slots in the +senders capacity for holding outgoing messages. The difference between +capacity and available is the number of messages that have no been delivered +yet. + +=over + +=item $slots = sender->get_available + +=back + +=cut +sub get_available { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getAvailable(); +} + +=pod + +=head2 NAME + +The human-readable name for this sender. + +=over + +=item $name = sender-get_name + +=back + +=cut +sub get_name { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getName; +} + +=pod + +=head2 SESSION + +The owning session from which the sender was created. + +=over + +=item $session = $sender->get_session + +=back + +=cut +sub get_session { + my ($self) = @_; + + return $self->{_session}; +} + +=pod + +=head2 ADDRESS + +Returns the address for this sender. + +=over + +=item $address = $sender->get_address + +=back + +=cut + +sub get_address { + my ($self) = @_; + my $impl = $self->{_impl}; + my $address = $impl->getAddress; + + return new qpid::messaging::Address($address); +} + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Session.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Session.pm new file mode 100644 index 0000000000..316f1fa817 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid/messaging/Session.pm @@ -0,0 +1,473 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +=pod + +=head1 NAME + +qpid::messaging::Session + +=head1 DESCRIPTION + +A B<qpid::messaging::Session> represents a distinct conversation between end +points. They are created from an active (i.e, not closed) B<Connection>. + +A session is used to acknowledge individual or all messages that have +passed through it, as well as for creating senders and receivers for conversing. +=cut +package qpid::messaging::Session; + +sub new { + my ($class) = @_; + my ($self) = { + _impl => $_[1], + _conn => $_[2], + }; + + die "Must provide an implementation." unless defined($self->{_impl}); + die "Must provide a Connection." unless defined($self->{_conn}); + + bless $self, $class; + return $self; +} + +=pod + +=head1 ACTIONS + +=cut + + +=pod + +=head2 CLOSING THE SESSION + +=over + +=item $session->close + +=back + +=cut +sub close { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->close; +} + +=pod + +=head2 TRANSACTIONS + +Transactions can be rolled back or committed. + +=over + +=item $session->commit + +=item $session->rollback + +=back + +=cut +sub commit { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->commit; +} + +sub rollback { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->rollback; +} + +=pod + +=head2 MESSAGE DISPOSITIONS + +=cut + + +=pod + +=over + +=item $session->acknowledge + +Acknowledges that a specific message that has been received. + +=back + +=begin _private + +TODO: How to handle acknowledging a specific message? + +=end _private + +=cut +sub acknowledge { + my ($self) = @_; + my $sync = $_[1] || 0; + + my $impl = $self->{_impl}; + + $impl->acknowledge($sync); +} + +=pod + +=over + +=item $session->reject( msg ) + +Rejects the specified message. A reject message will not be redelivered. + +=back + +=cut +sub reject { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->reject($_[1]->get_implementation); +} + +=pod + +=over + +=item $session->release( msg ) + +Releases the specified message, which allows the broker to attempt to +redeliver it. + +=back + +=cut +sub release { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->release($_[1]->get_implementation); +} + +=pod + +=over + +=item $session->sync + +=item $session->sync( block ) + +Requests synchronization with the broker. + +=back + +=head3 ARGUMENTS + +=over + +=item * block + +If true, then the call blocks until the process completes. + +=back + +=cut +sub sync { + my ($self) = @_; + my $impl = $self->{_impl}; + + if(defined($_[1])) { + $impl->sync($_[1]); + } else { + $impl->sync; + } +} + +=pod + +=head2 SENDERS AND RECEIVERS + +=cut + + +=pod + +=over + +=item $sender = $session->create_sender( address ) + +Creates a new sender. + +=back + +=head3 ARGUMENTS + +=over + +=item * address + +The sender address. See B<qpid::messaging::Address> for more details + +=back + +=cut +sub create_sender { + my ($self) = @_; + my $impl = $self->{_impl}; + + my $address = $_[1]; + + if (ref($address) eq "qpid::messaging::Address") { + my $temp = $address->get_implementation(); + $address = $temp; + } + my $send_impl = $impl->createSender($address); + + return new qpid::messaging::Sender($send_impl, $self); +} + +=pod + +=over + +=item $sender = $session->get_session( name ) + +=back + +=head3 ARGUMENTS + +=over + +=item * name + +The name of the sender. + +Raises an exception when no sender with that name exists. + +=back + +=cut +sub get_sender { + my ($self) = @_; + my $impl = $self->{_impl}; + + my $send_impl = $impl->getSender($_[1]); + my $sender = undef; + + if (defined($send_impl)) { + $sender = new qpid::messaging::Sender($send_impl, $self); + } + + return $sender; +} + +=pod + +=over + +=item $receiver = $session->create_receiver( address ) + +=back + +=head3 ARGUMENTS + +=over + +=item * address + +The receiver address. see B<qpid::messaging::Address> for more details. + +=back + +=cut +sub create_receiver { + my ($self) = @_; + my $impl = $self->{_impl}; + + my $address = $_[1]; + + if (ref($address) eq "qpid::messaging::Address") { + $address = $address->get_implementation(); + } + my $recv_impl = $impl->createReceiver($address); + + return new qpid::messaging::Receiver($recv_impl, $self); +} + +=pod + +=over + +=item $receiver = $session->get_receiver( name ) + +=back + +=head3 ARGUMENTS + +=over + +=item * name + +The name of the receiver. + +=back + +=cut +sub get_receiver { + my ($self) = @_; + my $impl = $self->{_impl}; + + my $recv_impl = $impl->getReceiver($_[1]); + my $receiver = undef; + + if (defined($recv_impl)) { + $receiver = new qpid::messaging::Receiver($recv_impl, $self); + } + + return $receiver; +} + +=pod + +=head1 ATTRIBUTES + +=cut + + +=pod + +=head2 RECEIVABLE + +The total number of receivable messages, and messages already received, +by receivers associated with this session. + +=over + +=item $session->get_receivable + +=back + +=cut +sub get_receivable { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getReceivable; +} + +=pod + +=head2 UNSETTLED ACKNOWLEDGEMENTS + +The number of messages that have been acknowledged by this session whose +acknowledgements have not been confirmed as processed by the broker. + +=over + +=item $session->get_unsettled_acks + +=back + +=cut +sub get_unsettled_acks { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->getUnsettledAcks; +} + +=pod + +=head2 NEXT RECEIVER + +The next receiver is the one, created by this session, that has any pending +local messages. + +If no receivers are found within the timeout then a B<MessagingException> is +raised. + +=over + +=item $session->get_next_receiver + +=item $session->get_next_receiver( timeout ) + +=back + +=head3 ARGUMENTS + +=over + +=item * timeout + +The period of time to wait for a receiver to be found. If no period of time is +specified then the default is to wait B<forever>. + +=back + +=cut +sub get_next_receiver { + my ($self) = @_; + my $impl = $self->{_impl}; + + my $timeout = $_[1] || qpid::messaging::Duration::FOREVER; + + return $impl->getNextReceiver($timeout); +} + +=pod + +=head2 CONNECTION + +=over + +=item $conn = $session->get_connection + +Returns the owning connection for the session. + +=back + +=cut +sub get_connection { + my ($self) = @_; + + return $self->{_conn}; +} + +sub has_error { + my ($self) = @_; + my $impl = $self->{_impl}; + + return $impl->hasError; +} + +sub check_for_error { + my ($self) = @_; + my $impl = $self->{_impl}; + + $impl->checkForError; +} + +1; diff --git a/qpid/cpp/bindings/qpid/perl/lib/qpid_messaging.pm b/qpid/cpp/bindings/qpid/perl/lib/qpid_messaging.pm new file mode 100644 index 0000000000..2948748422 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/lib/qpid_messaging.pm @@ -0,0 +1,97 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +use strict; +use warnings; +use cqpid_perl; + +package qpid::messaging; + +use qpid::messaging; +use qpid::messaging::Address; +use qpid::messaging::Duration; +use qpid::messaging::Message; +use qpid::messaging::Receiver; +use qpid::messaging::Sender; +use qpid::messaging::Session; +use qpid::messaging::Connection; + +package qpid_messaging; + +1; + +__END__ + +=pod + +=head1 NAME + +qpid::messaging + +=head1 DESCRIPTION + +The Qpid Messaging framework is an enterprise messaging framework +based on the open-source AMQP protocol. + +=head1 EXAMPLE + +Here is a simple example application. It creates a link to a broker located +on a system named C<broker.myqpiddomain.com>. It then creates a new messaging +queue named C<qpid-examples> and publishes a message to it. It then consumes +that same message and closes the connection. + + use strict; + use warnings; + + use qpid; + + # create a connection, open it and then create a session named "session1" + my $conn = new qpid::messaging::Connection("broker.myqpiddomain.com"); + $conn->open(); + my $session = $conn->create_session("session1"); + + # create a sender and a receiver + # the sender marks the queue as one that is deleted when the sender disconnects + my $send = $session->create_sender("qpid-examples;{create:always}"); + my $recv = $session->create_receiver("qpid-examples"); + + # create an outgoing message and send it + my $outgoing = new qpid::messaging::Message(); + $outgoing->set_content("The time is " . localtime(time)"); + $send->send($outgoing); + + # set the receiver's capacity to 10 and then check out many messages are pending + $recv->set_capacity(10); + print "There are " . $recv->get_available . " messages waiting.\n"; + + # get the nextwaitingmessage, which should be in the local queue now, + # and output the contents + my $incoming = $recv->fetch(); + print "Received the following message: " . $incoming->get_content() . "\n"; + # the output should be the text that was sent earlier + + # acknowledge the message, letting the sender know the message was received + printf "The sender currently has " . $send->get_unsettled . " message(s) pending.\n"; + # should report 1 unsettled message + $session->acknowledge(); # acknowledges all pending messages + print "Now sender currently has " . $send->get_unsettled . " message(s) pending.\n"; + # should report 0 unsettled messages + + # close the connection + $conn->close diff --git a/qpid/cpp/bindings/qpid/perl/perl.i b/qpid/cpp/bindings/qpid/perl/perl.i new file mode 100644 index 0000000000..4dc2665c2b --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/perl.i @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +%module cqpid_perl +%include "std_string.i" +%include "qpid/swig_perl_typemaps.i" + +/* Define the general-purpose exception handling */ +%exception { + try { + $action + } + catch (qpid::messaging::MessagingException& mex) { + Perl_croak(aTHX_ "%s", mex.what()); + } +} + +%include "qpid/qpid.i" + diff --git a/qpid/cpp/bindings/qpid/perl/t/Address.t b/qpid/cpp/bindings/qpid/perl/t/Address.t new file mode 100644 index 0000000000..409a63d4fe --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/t/Address.t @@ -0,0 +1,105 @@ +#!/usr/bin/env perl -w +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +use Test::More qw(no_plan); +use Test::Exception; + +# append the location of the test to the PERL5LIB path +use File::Basename; +BEGIN {push @INC, dirname (__FILE__)}; +use utils; + +# verify that qpid is available +BEGIN { use_ok( 'qpid' ); } +require_ok ('qpid' ); + +# construction +# address cannot be null +dies_ok (sub {new qpid::messaging::Address(undef);}, + "Address cannot be null"); + +# can use an address +my $address = new qpid::messaging::Address("0.0.0.0"); +ok ($address, "Can be created with an arbitrary address"); + +# name +# name cannot be null +dies_ok (sub {$address->set_name(undef);}, + "Name cannot be null"); + +# name can be an empty string +$address->set_name(""); +ok ($address->get_name() eq "", + "Name can be empty"); + +# name can be an arbitrary string +my $name = random_string(25); +$address->set_name($name); +ok ($address->get_name() eq $name, + "Name can be an arbitrary string"); + +# subject +# cannot be null +dies_ok (sub {$address->set_subject(undef);}, + "Subject cannot be null"); + +# can be an empty string +$address->set_subject(""); +ok ($address->get_subject() eq "", + "Subject can be empty"); + +# can be an arbitrary string +my $subject = random_string(64); +$address->set_subject($subject); +ok ($address->get_subject() eq $subject, + "Subject can be an arbitrary string"); + +# options +# options cannot be null +dies_ok (sub {$address->set_options(undef);}, + "Options cannot be null"); + +# options can be an empty hash +$address->set_options({}); +ok (eq_hash($address->get_options(), {}), + "Options can be an empty hash"); + +# options cannot be arbitrary values +my %options = ("create", "always", "delete", "always"); +$address->set_options(\%options); +ok (eq_hash($address->get_options(), \%options), + "Options can be arbitrary keys"); + +# type +# cannot be null +dies_ok (sub {$address->set_type(undef);}, + "Type cannot be null"); + +# can be an empty string +$address->set_type(""); +ok ($address->get_type() eq "", + "Type can be an empty string"); + +# can be an arbitrary string +my $type = random_string(16); +$address->set_type($type); +ok ($address->get_type() eq $type, + "Type can be an arbitrary type"); + diff --git a/qpid/cpp/bindings/qpid/perl/t/Duration.t b/qpid/cpp/bindings/qpid/perl/t/Duration.t new file mode 100644 index 0000000000..4f2ae1c606 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/t/Duration.t @@ -0,0 +1,127 @@ +#!/usr/bin/env perl -w +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +use Test::More qw(no_plan); +use Test::Exception; + +# append the location of the test to the PERL5LIB path +use File::Basename; +BEGIN {push @INC, dirname (__FILE__)}; +use utils; + +# verify that qpid is available +BEGIN { use_ok( 'qpid' ); } +require_ok ('qpid' ); + +# milliseconds +# duration cannot be null +{ + dies_ok (sub {new qpid::messaging::Duration(undef);}, + "Durations cannot have null time periods"); +} + +# duration cannot be negative +{ + my $period = 0 - (int(rand(65535)) + 1); + dies_ok(sub {new qpid::messaging::Duration($period);}, + "Duration times cannot be negative"); +} + +# duration can be an arbitrary value +{ + my $period = int(rand(65535)); + my $duration = new qpid::messaging::Duration($period); + ok ($duration->get_milliseconds() == $period, + "Milliseconds are properly stored and fetched"); +} + +# multiplier +# cannot multiply by null +dies_ok(sub {qpid::messaging::Duration::FOREVER * undef;}, + "Cannot multiply a duration times a null"); + +# cannot multiply by a negative +dies_ok (sub {qpid::messaging::Duration::MINUTE * -2;}, + "Duration cannot be multiplied by a negative"); + +# multiply by zero returns a zero time period +{ + my $result = qpid::messaging::Duration::MINUTE * 0; + + ok ($result->get_milliseconds() == 0, + "Multiplying duration by 0 returns a 0 duration"); +} + +# multiply by arbitrary values works +{ + my $factor = int(1 + rand(100)); + my $result = qpid::messaging::Duration::MINUTE * $factor; + ok ($result->get_milliseconds() == 60000 * $factor, + "Multiplying by a factor returns a new Duration with that period"); +} + +# equality +# always fails with null +ok (!(qpid::messaging::Duration::MINUTE == undef), + "Duration is never equal to null"); + +# never equal to a non-duration class +ok (!(qpid::messaging::Duration::MINUTE == random_string(12)), + "Duration is never equal to a non-Duration"); + +# works with self +ok (qpid::messaging::Duration::MINUTE == qpid::messaging::Duration::MINUTE, + "Duration is always equal to itself"); + +# fails with non-equal instance +ok (!(qpid::messaging::Duration::MINUTE == qpid::messaging::Duration::SECOND), + "Duration non-equality works"); + +# works with equal instance +{ + my $result = qpid::messaging::Duration::MINUTE * 0; + ok ($result == qpid::messaging::Duration::IMMEDIATE, + "Equality comparison works correctly"); +} + +# non-equality +# always not equal to null +ok (qpid::messaging::Duration::MINUTE != undef, + "Always unequal to null"); + +# always not equal to a non-duration class +ok (qpid::messaging::Duration::MINUTE != random_string(64), + "Always unequal to a non-duration class"); + +# not unequal to itself +ok (!(qpid::messaging::Duration::MINUTE != qpid::messaging::Duration::MINUTE), + "Never unequal to itself"); + +# not unequal to an equal instance +{ + my $duration = qpid::messaging::Duration::MINUTE * 1; + ok (!(qpid::messaging::Duration::MINUTE != $duration), + "Never unequal to an equal instance"); +} + +# works with unequal instances +ok (qpid::messaging::Duration::MINUTE != qpid::messaging::Duration::FOREVER, + "Always unequal to a non-equal instance"); + diff --git a/qpid/cpp/bindings/qpid/perl/t/Message.t b/qpid/cpp/bindings/qpid/perl/t/Message.t new file mode 100644 index 0000000000..a17c1121c8 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/t/Message.t @@ -0,0 +1,276 @@ +#!/usr/bin/env perl -w +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +use Test::More qw(no_plan); +use Test::Exception; + +# append the location of the test to the PERL5LIB path +use File::Basename; +BEGIN {push @INC, dirname (__FILE__)}; +use utils; + +# verify that qpid is available +BEGIN { use_ok( 'qpid' ); } +require_ok ('qpid' ); + +# Create a new message +my $message = new qpid::messaging::Message(); +isa_ok($message, 'qpid::messaging::Message'); + +# reply to +# rejects an null address +dies_ok (sub {$message->set_reply_to(undef);}, + "Reply to cannot be null."); + +# can handle a string address +$message->set_reply_to("test"); +ok ($message->get_reply_to()->str() eq "test", + "Reply to can be set"); + +# subject +# cannot have an null subject +dies_ok (sub {$message->set_subject(undef);}, + "Subject cannot be null"); + +# can have an empty subject +$message->set_subject(""); +ok ($message->get_subject() eq "", + "Subject can be empty"); + +# can have a subject +my $subject = random_string(16); +$message->set_subject($subject); +ok ($message->get_subject() eq $subject, + "Subject can be set."); + +# content type +# cannot have an null content type +dies_ok (sub {$message->set_content_type(undef);}, + "Content type must be defined."); + +# can an empty content type +$message->set_content_type(""); +ok ($message->get_content_type() eq "", + "Content type can be empty"); + +# can have an arbitrary content type +my $content_type = random_string(10); +$message->set_content_type($content_type); +ok ($message->get_content_type() eq $content_type, + "Content type can be arbitrary"); + +# can be for a map +$content_type = "amqp/map"; +$message->set_content_type($content_type); +ok ($message->get_content_type() eq $content_type, + "Content type can be for a map"); + +# message id +# cannot be null +dies_ok (sub {$message->set_message_id(undef);}, + "Message id cannot be null"); + +# can be an empty string +$message->set_message_id(""); +ok ($message->get_message_id() eq "", + "Message id can be empty"); + +# can be an arbitrary string +my $id = random_string(32); +$message->set_message_id($id); +ok ($message->get_message_id() eq $id, + "Message id can be an arbitrary string"); + +# can be a UUID +$id = generate_uuid(); +$message->set_message_id($id); +ok ($message->get_message_id() eq $id, + "Message id can be a valid UUID"); + +# user id +# cannot be null +dies_ok (sub {$message->set_user_id(undef);}, + "User id cannot be null"); + +# can be an empty string +my $user_id = ""; +$message->set_user_id($user_id); +ok ($message->get_user_id() eq $user_id, + "User id can be empty"); + +# can be an arbitrary string +$id = random_string(65); +$message->set_user_id($user_id); +ok ($message->get_user_id() eq $user_id, + "User id can be an arbitrary string"); + +# correlation id +# cannot be null +dies_ok (sub {$message->set_correlation_id(undef);}, + "Correlation id cannot be null"); + +# can be empty +my $correlation_id = ""; +$message->set_correlation_id($correlation_id); +ok ($message->get_correlation_id() eq $correlation_id, + "Correlation id can be an empty string"); + +# can be an arbitrary string +$correlation_id = random_string(32); +$message->set_correlation_id($correlation_id); +ok ($message->get_correlation_id() eq $correlation_id, + "Correlation id can be an arbitrary string"); + +# priority +# cannot be nul +dies_ok (sub {$message->set_priority(undef);}, + "Priority cannot be null"); + +# cannot be negative +my $priority = 0 - (rand(2**8) + 1); +dies_ok (sub {$message->set_priority($priority);}, + "Priority cannot be negative"); + +# can be 0 +$message->set_priority(0); +ok ($message->get_priority() == 0, + "Priority can be zero"); + +# can be an arbitrary value +$priority = int(rand(2**8) + 1); +$message->set_priority($priority); +ok ($message->get_priority() == $priority, + "Priority can be any positive value"); + +# ttl +# cannot be null +dies_ok (sub {$message->set_ttl(undef);}, + "TTL cannot be null"); + +# can be a duration +$message->set_ttl(qpid::messaging::Duration::FOREVER); +ok ($message->get_ttl()->get_milliseconds() == qpid::messaging::Duration::FOREVER->get_milliseconds(), + "TTL can be a Duration"); + +# if numeric, is converted to a duration +my $duration = rand(65535); +$message->set_ttl($duration); +ok ($message->get_ttl()->get_milliseconds() == int($duration), + "TTL can be any arbitrary duration"); + +# if 0 it's converted to IMMEDIATE +$message->set_ttl(0); +ok ($message->get_ttl()->get_milliseconds() == qpid::messaging::Duration::IMMEDIATE->get_milliseconds(), + "TTL of 0 is converted to IMMEDIATE"); + +# if negative it's converted to FOREVER +$message->set_ttl(0 - (rand(65535) + 1)); +ok ($message->get_ttl()->get_milliseconds() == qpid::messaging::Duration::FOREVER->get_milliseconds(), + "TTL of <0 is converted to FOREVER"); + +# durable +# cannot be null +dies_ok (sub {$message->set_durable(undef);}, + "Durable cannot be null"); + +# can be set to true +$message->set_durable(1); +ok ($message->get_durable(), + "Durable can be true"); + +# can be set to false +$message->set_durable(0); +ok (!$message->get_durable(), + "Durable can be false"); + +# redelivered +# redelivered cannot be null +dies_ok (sub {$message->set_redelivered(undef);}, + "Redelivered cannot be null"); + +# can be set to true +$message->set_redelivered(1); +ok ($message->get_redelivered(), + "Redelivered can be true"); + +# can be set to false +$message->set_redelivered(0); +ok (!$message->get_redelivered(), + "Redelivered can be false"); + +# properties +# can retrieve all properties +my $properties = $message->get_properties(); +ok (UNIVERSAL::isa($properties, 'HASH'), + "Returns the properties as a hash map"); + +# property +# setting a property using a null key fails +dies_ok (sub {$message->set_property(undef, "bar");}, + "Property cannot have a null key"); + +# setting a property with a null value succeeds +my $key = random_string(16); +$message->set_property($key, undef); +ok (!$message->get_properties()->{$key}, + "Properties can have null values"); + +# setting a property succeeds +my $value = random_string(255); +$message->set_property($key, $value); +ok ($message->get_properties()->{$key} eq $value, + "Messages can have arbitrary property values"); + +# content +# cannot be null +dies_ok (sub {$message->set_content(undef);}, + "Content cannot be null"); + +# can be an empty string +$message->set_content_object(""); +ok ($message->get_content_object() eq "", + "Content can be an empty string"); + +# can be an arbitrary string +my $content = random_string(255); +$message->set_content_object($content); +ok ($message->get_content_object() eq $content, + "Content can be an arbitrary string"); + +# Embedded nulls should be handled properly +$content = { id => 1234, name => "With\x00null" }; +qpid::messaging::encode($content, $message); +my $map = qpid::messaging::decode($message); +ok ($map->{name} eq "With\x00null", + "Nulls embedded in map values work."); + +# Unicode strings shouldn't be broken +$content = { id => 1234, name => "Euro=\x{20AC}" }; +qpid::messaging::encode($content, $message); +$map = qpid::messaging::decode($message); +ok ($map->{name} eq "Euro=\x{20AC}", + "Unicode strings encoded correctly."); + +# Maps inside maps should work +$content = { id => 1234, name => { first => "tom" } }; +qpid::messaging::encode($content, $message); +$map = qpid::messaging::decode($message); +ok ($map->{name}{first} eq "tom", + "Map inside map encoded correctly."); diff --git a/qpid/cpp/bindings/qpid/perl/t/utils.pm b/qpid/cpp/bindings/qpid/perl/t/utils.pm new file mode 100644 index 0000000000..db8093d324 --- /dev/null +++ b/qpid/cpp/bindings/qpid/perl/t/utils.pm @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +use Digest::MD5; + +sub random_string +{ + my $len=$_[0]; + my @chars=('a'..'z','A'..'Z','0'..'9','_'); + my $result; + + foreach (1..$len) { + $result .= $chars[rand @chars]; + } + return $result; +} + +sub generate_uuid +{ + return Digest::MD5::md5_base64( rand ); +} + +1; diff --git a/qpid/cpp/bindings/qpid/python/CMakeLists.txt b/qpid/cpp/bindings/qpid/python/CMakeLists.txt new file mode 100644 index 0000000000..ac1998b18f --- /dev/null +++ b/qpid/cpp/bindings/qpid/python/CMakeLists.txt @@ -0,0 +1,60 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +##------------------------------------------------------ +## Use Swig to generate a literal binding to the C++ API +##------------------------------------------------------ + +# NB For python the SWIG module name must have the same name as the input .i file for CMake to generate the +# correct dependencies + +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/qpid_messaging.i PROPERTIES + CPLUSPLUS ON + SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/bindings") + +list(APPEND SWIG_MODULE_qpid_messaging_EXTRA_DEPS + ${CMAKE_SOURCE_DIR}/include/qpid/qpid.i + ${CMAKE_SOURCE_DIR}/include/qpid/swig_python_typemaps.i +) +swig_add_module(qpid_messaging python ${CMAKE_CURRENT_SOURCE_DIR}/qpid_messaging.i) +swig_link_libraries(qpid_messaging qpidmessaging qpidtypes ${PYTHON_LIBRARIES}) +set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${NOSTRICT_ALIASING}") + +include_directories(${PYTHON_INCLUDE_PATH} + ${qpid-cpp_SOURCE_DIR}/include + ${qpid-cpp_SOURCE_DIR}/bindings) + +##------------------------------------ +## Install the complete Python binding +##------------------------------------ +install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qpid_messaging.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") +install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qpid_messaging.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.py + ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyc + ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyo + DESTINATION ${PYTHON_SITEARCH_PACKAGES} + COMPONENT ${QPID_COMPONENT_CLIENT} + ) +install(TARGETS ${SWIG_MODULE_qpid_messaging_REAL_NAME} + DESTINATION ${PYTHON_SITEARCH_PACKAGES} + COMPONENT ${QPID_COMPONENT_CLIENT} + ) + diff --git a/qpid/cpp/bindings/qpid/python/ChangeLog b/qpid/cpp/bindings/qpid/python/ChangeLog new file mode 100644 index 0000000000..ff6704cdd6 --- /dev/null +++ b/qpid/cpp/bindings/qpid/python/ChangeLog @@ -0,0 +1,5 @@ +Version 0.26: + * QPID-4952: Changed the module name to qpid_messaging. + * QPID-5140: Added get/set method to MessageProperties. + * QPID-4924: Added examples from pure Python libraries. + * QPID-4924: Added the console example to interact with server. diff --git a/qpid/cpp/bindings/qpid/python/LICENSE b/qpid/cpp/bindings/qpid/python/LICENSE new file mode 100644 index 0000000000..bc46b77047 --- /dev/null +++ b/qpid/cpp/bindings/qpid/python/LICENSE @@ -0,0 +1,206 @@ +========================================================================= +== Apache License == +========================================================================= + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/qpid/cpp/bindings/qpid/python/README b/qpid/cpp/bindings/qpid/python/README new file mode 100644 index 0000000000..eae32cd8ab --- /dev/null +++ b/qpid/cpp/bindings/qpid/python/README @@ -0,0 +1,28 @@ += Qpid Python Language Bindings + +Qpid is a cross-platform enterprise messaging system based on the open-source +AMQP protocol. + + +== Building The Bindings +To build the Python bindings, you need to have installed: + + * Qpid development libraries - http://qpid.apache.org + * Swig - http://www.swig.org/ + * CMake - http://www.cmake.org/ + +After extracting the files: + + $ cmake . + $ make + $ make install + + +== License + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor licensing agreements. + +Author:: Apache Qpid Project +Homepage:: http://qpid.apache.org +License:: Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html diff --git a/qpid/cpp/bindings/qpid/python/extra_dist/CMakeLists.txt b/qpid/cpp/bindings/qpid/python/extra_dist/CMakeLists.txt new file mode 100644 index 0000000000..8ddd7869ae --- /dev/null +++ b/qpid/cpp/bindings/qpid/python/extra_dist/CMakeLists.txt @@ -0,0 +1,86 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +PROJECT (python-qpid_message) + +CMAKE_MINIMUM_REQUIRED (VERSION 2.4.0 FATAL_ERROR) + +INCLUDE (FindSWIG REQUIRED) +INCLUDE (UseSWIG) +INCLUDE (FindPythonInterp REQUIRED) +INCLUDE (FindPythonLibs REQUIRED) + +## ------------- +## Set variables +## ------------- + +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} + -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')" + OUTPUT_VARIABLE PYTHON_SITEARCH_PACKAGES + OUTPUT_STRIP_TRAILING_WHITESPACE) + +FIND_PATH (QPID_INCLUDE_DIR qpid/qpid.i) +FIND_LIBRARY (QPID_LIBRARY_DIR + qpidmessaging + qpidtypes) + +## -------------------------- +## Generate the Swig bindings +## -------------------------- + +SET_SOURCE_FILES_PROPERTIES (${CMAKE_CURRENT_SOURCE_DIR}/python.i + PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES (${CMAKE_CURRENT_SOURCE_DIR}/python.i + PROPERTIES SWIG_FLAGS "-I${QPID_INCLUDE_DIR}") + +SWIG_ADD_MODULE (qpid_messaging_python python + ${CMAKE_CURRENT_SOURCE_DIR}/python.i) + +SWIG_LINK_LIBRARIES (qpid_messaging_python + qpidmessaging + qpidtypes + ${PYTHON_LIBRARIES}) + +## -------------------- +## Install the bindings +## -------------------- + +INSTALL (CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qpid_messaging.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") +INSTALL (CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qpid_messaging.py + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") + +SET_SOURCE_FILES_PROPERTIES (${swig_generated_file_fullname} + PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing") + +INCLUDE_DIRECTORIES ( + ${PYTHON_INCLUDE_PATH} + $QPID_INCLUDE_PATH} + ${CMAKE_CURRENT_SOURCE_DIR} +) + +INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.py + ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyc + ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyo + DESTINATION ${PYTHON_SITEARCH_PACKAGES}) + +INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/_qpid_messaging_python.so + RENAME _qpid_messaging.so + DESTINATION ${PYTHON_SITEARCH_PACKAGES}) + diff --git a/qpid/cpp/bindings/qpid/python/qpid_messaging.i b/qpid/cpp/bindings/qpid/python/qpid_messaging.i new file mode 100644 index 0000000000..513cc531ae --- /dev/null +++ b/qpid/cpp/bindings/qpid/python/qpid_messaging.i @@ -0,0 +1,568 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +%module qpid_messaging + +%include "std_string.i" +%include "qpid/swig_python_typemaps.i" + +/* Needed for get/setPriority methods. Surprising SWIG 1.3.40 doesn't + * convert uint8_t by default. */ +%apply unsigned char { uint8_t }; + + +/* + * Exceptions + * + * The convention below is that exceptions in _qpid_messaging.so have the same + * names as in the C++ library. They get renamed to their Python + * equivalents when brought into the Python wrapping + */ +%define QPID_EXCEPTION(exception, parent) +%{ +static PyObject* exception; +%} +%init %{ + exception = PyErr_NewException( + (char *) ("_qpid_messaging." #exception), parent, NULL); + Py_INCREF(exception); + PyModule_AddObject(m, #exception, exception); +%} +%pythoncode %{ + exception = _qpid_messaging. ## exception +%} +%enddef + + /* Python equivalents of C++ exceptions. */ + /* */ + /* Commented out lines are exceptions in the Python library, but not */ + /* in the C++ library. */ + +QPID_EXCEPTION(MessagingError, NULL) + +QPID_EXCEPTION(LinkError, MessagingError) +QPID_EXCEPTION(AddressError, LinkError) +QPID_EXCEPTION(ResolutionError, AddressError) +QPID_EXCEPTION(AssertionFailed, ResolutionError) +QPID_EXCEPTION(NotFound, ResolutionError) +QPID_EXCEPTION(InvalidOption, LinkError) +QPID_EXCEPTION(MalformedAddress, LinkError) +QPID_EXCEPTION(ReceiverError, LinkError) +QPID_EXCEPTION(FetchError, ReceiverError) +QPID_EXCEPTION(Empty, FetchError) +/* QPID_EXCEPTION(InsufficientCapacity, LinkError) */ +/* QPID_EXCEPTION(LinkClosed, LinkError) */ +QPID_EXCEPTION(SenderError, LinkError) +QPID_EXCEPTION(SendError, SenderError) +QPID_EXCEPTION(TargetCapacityExceeded, SendError) + +QPID_EXCEPTION(ConnectionError, MessagingError) +QPID_EXCEPTION(ConnectError, ConnectionError) +/* QPID_EXCEPTION(AuthenticationFailure, ConnectError) */ +/* QPID_EXCEPTION(VersionError, ConnectError) */ +/* QPID_EXCEPTION(ConnectionClosed, ConnectionError) */ +/* QPID_EXCEPTION(HeartbeartTimeout, ConnectionError) */ + +QPID_EXCEPTION(SessionError, MessagingError) +/* QPID_EXCEPTION(Detached, SessionError) */ +/* QPID_EXCEPTION(NontransactionalSession, SessionError) */ +/* QPID_EXCEPTION(ServerError, SessionError) */ +/* QPID_EXCEPTION(SessionClosed, SessionError) */ +QPID_EXCEPTION(TransactionError, SessionError) +QPID_EXCEPTION(TransactionAborted, TransactionError) +QPID_EXCEPTION(TransactionUnknown, TransactionError) +QPID_EXCEPTION(UnauthorizedAccess, SessionError) + +/* QPID_EXCEPTION(InternalError, MessagingError) */ + +%define TRANSLATE_EXCEPTION(cpp_exception, py_exception) + catch ( cpp_exception & ex) { + pExceptionType = py_exception; + error = ex.what(); + } +%enddef + +/* Define the general-purpose exception handling */ +%exception { + PyObject * pExceptionType = NULL; + std::string error; + Py_BEGIN_ALLOW_THREADS; + try { + $action + } + /* Catch and translate exceptions. */ + TRANSLATE_EXCEPTION(qpid::messaging::NoMessageAvailable, Empty) + TRANSLATE_EXCEPTION(qpid::messaging::NotFound, NotFound) + TRANSLATE_EXCEPTION(qpid::messaging::AssertionFailed, AssertionFailed) + TRANSLATE_EXCEPTION(qpid::messaging::ResolutionError, ResolutionError) + TRANSLATE_EXCEPTION(qpid::messaging::TargetCapacityExceeded, + TargetCapacityExceeded) + TRANSLATE_EXCEPTION(qpid::messaging::TransportFailure, ConnectError) + TRANSLATE_EXCEPTION(qpid::messaging::MalformedAddress, MalformedAddress) + TRANSLATE_EXCEPTION(qpid::messaging::AddressError, AddressError) + TRANSLATE_EXCEPTION(qpid::messaging::FetchError, FetchError) + TRANSLATE_EXCEPTION(qpid::messaging::ReceiverError, ReceiverError) + TRANSLATE_EXCEPTION(qpid::messaging::SendError, SendError) + TRANSLATE_EXCEPTION(qpid::messaging::SenderError, SenderError) + TRANSLATE_EXCEPTION(qpid::messaging::InvalidOptionString, InvalidOption) + TRANSLATE_EXCEPTION(qpid::messaging::LinkError, LinkError) + TRANSLATE_EXCEPTION(qpid::messaging::TransactionAborted, TransactionAborted) + TRANSLATE_EXCEPTION(qpid::messaging::TransactionUnknown, TransactionUnknown) + TRANSLATE_EXCEPTION(qpid::messaging::TransactionError, TransactionError) + TRANSLATE_EXCEPTION(qpid::messaging::UnauthorizedAccess, UnauthorizedAccess) + TRANSLATE_EXCEPTION(qpid::messaging::SessionError, SessionError) + TRANSLATE_EXCEPTION(qpid::messaging::ConnectionError, ConnectionError) + TRANSLATE_EXCEPTION(qpid::messaging::KeyError, PyExc_KeyError) + TRANSLATE_EXCEPTION(qpid::messaging::MessagingException, MessagingError) + TRANSLATE_EXCEPTION(qpid::types::Exception, PyExc_RuntimeError) + Py_END_ALLOW_THREADS; + if (!error.empty()) { + PyErr_SetString(pExceptionType, error.c_str()); + return NULL; + } +} + + +/* This only renames the non-const version (I believe). Then again, I + * don't even know why there is a non-const version of the method. */ +%rename(opened) qpid::messaging::Connection::isOpen(); +%rename(_close) qpid::messaging::Connection::close(); +%rename(_receiver) qpid::messaging::Session::createReceiver; +%rename(_sender) qpid::messaging::Session::createSender; +%rename(_acknowledge_all) qpid::messaging::Session::acknowledge(bool); +%rename(_acknowledge_msg) qpid::messaging::Session::acknowledge( + Message &, bool); +%rename(_next_receiver) qpid::messaging::Session::nextReceiver; + +%rename(_fetch) qpid::messaging::Receiver::fetch; +%rename(_get) qpid::messaging::Receiver::get; +%rename(unsettled) qpid::messaging::Receiver::getUnsettled; +%rename(available) qpid::messaging::Receiver::getAvailable; + +%rename(unsettled) qpid::messaging::Sender::getUnsettled; +%rename(available) qpid::messaging::Sender::getAvailable; +%rename(_send) qpid::messaging::Sender::send; + +%rename(_getReplyTo) qpid::messaging::Message::getReplyTo; +%rename(_setReplyTo) qpid::messaging::Message::setReplyTo; +%rename(_getTtl) qpid::messaging::Message::getTtl; +%rename(_setTtl) qpid::messaging::Message::setTtl; + +%rename(_sync) qpid::messaging::Session::sync; + +// Capitalize constant names correctly for python +%rename(TRACE) qpid::messaging::trace; +%rename(DEBUG) qpid::messaging::debug; +%rename(INFO) qpid::messaging::info; +%rename(NOTICE) qpid::messaging::notice; +%rename(WARNING) qpid::messaging::warning; +%rename(ERROR) qpid::messaging::error; +%rename(CRITICAL) qpid::messaging::critical; + +%include "qpid/qpid.i" + +%extend qpid::messaging::Connection { + %pythoncode %{ + def __init__(self, url=None, **options): + if url: + args = [str(url)] + else: + args = [] + if options: + # remove null valued options + clean_opts = {} + for k, v in options.iteritems(): + if v: + clean_opts[k] = v + args.append(clean_opts) + this = _qpid_messaging.new_Connection(*args) + try: self.this.append(this) + except: self.this = this + + def attached(self): + return self.opened() + + def close(self, timeout=None): + #timeout not supported in c++ + self._close() + %} + + /* Return a pre-existing session with the given name, if one + * exists, otherwise return a new one. (Note that if a + * pre-existing session exists, the transactional argument is + * ignored, and the returned session might not satisfy the desired + * setting. */ + qpid::messaging::Session _session(const std::string & name, + bool transactional) { + if (!name.empty()) { + try { + return self->getSession(name); + } + catch (const qpid::messaging::KeyError &) { + } + } + if (transactional) { + return self->createTransactionalSession(name); + } + else { + return self->createSession(name); + } + } + + %pythoncode %{ + def session(self, name=None, transactional=False) : + if name is None : + name = '' + return self._session(name, transactional) + %} + + %pythoncode %{ + @staticmethod + def establish(url=None, timeout=None, **options) : + if timeout and "reconnect-timeout" not in options: + options["reconnect-timeout"] = timeout + conn = Connection(url, **options) + conn.open() + return conn + %} +} + +%pythoncode %{ + # Disposition class from messaging/message.py + class Disposition: + def __init__(self, type, **options): + self.type = type + self.options = options + + def __repr__(self): + args = [str(self.type)] + ["%s=%r" % (k, v) for k, v in self.options.items()] + return "Disposition(%s)" % ", ".join(args) + + # Consntants from messaging/constants.py + __SELF__ = object() + + class Constant: + + def __init__(self, name, value=__SELF__): + self.name = name + if value is __SELF__: + self.value = self + else: + self.value = value + + def __repr__(self): + return self.name + + AMQP_PORT = 5672 + AMQPS_PORT = 5671 + + UNLIMITED = Constant("UNLIMITED", 0xFFFFFFFFL) + + REJECTED = Constant("REJECTED") + RELEASED = Constant("RELEASED") +%} + +%extend qpid::messaging::Session { + %pythoncode %{ + def acknowledge(self, message=None, disposition=None, sync=True) : + if message : + if disposition is None: self._acknowledge_msg(message, sync) + # FIXME aconway 2014-02-11: the following does not repsect the sync flag. + elif disposition.type == REJECTED: self.reject(message) + elif disposition.type == RELEASED: self.release(message) + else : + if disposition : # FIXME aconway 2014-02-11: support this + raise Exception("SWIG does not support dispositions yet. Use " + "Session.reject and Session.release instead") + self._acknowledge_all(sync) + + __swig_getmethods__["connection"] = getConnection + if _newclass: connection = property(getConnection) + + def receiver(self, source, capacity=None): + r = self._receiver(source) + if capacity is not None: r.capacity = capacity + return r + + def sender(self, target, durable=None, capacity=None) : + s = self._sender(target) + if capacity is not None: s.capacity = capacity + s._setDurable(durable) + return s + + def next_receiver(self, timeout=None) : + if timeout is None : + return self._next_receiver() + else : + # Python API uses timeouts in seconds, + # but C++ API uses milliseconds + return self._next_receiver(Duration(int(1000*timeout))) + + def sync(self, timeout=None): + if timeout == 0: self._sync(False) # Non-blocking sync + else: self._sync(True) # Blocking sync, C++ has not timeout. + + %} +} + + +%extend qpid::messaging::Receiver { + %pythoncode %{ + def _get_source(self): + return self.getAddress().str() + + __swig_getmethods__["capacity"] = getCapacity + __swig_setmethods__["capacity"] = setCapacity + if _newclass: capacity = property(getCapacity, setCapacity) + + __swig_getmethods__["session"] = getSession + if _newclass: session = property(getSession) + + __swig_getmethods__["source"] = _get_source + if _newclass: source = property(_get_source) + %} + + %pythoncode %{ + def fetch(self, timeout=None) : + if timeout is None : + return self._fetch() + else : + # Python API uses timeouts in seconds, + # but C++ API uses milliseconds + return self._fetch(Duration(int(1000*timeout))) + %} + + %pythoncode %{ + def get(self, timeout=None) : + if timeout is None : + return self._get() + else : + # Python API uses timeouts in seconds, + # but C++ API uses milliseconds + return self._get(Duration(int(1000*timeout))) + %} +} + +%extend qpid::messaging::Sender { + %pythoncode %{ + def _get_target(self): + return self.getAddress().str() + + def _setDurable(self, d): + self.durable = d + + def send(self, object, sync=True) : + if isinstance(object, Message): + message = object + else: + message = Message(object) + if self.durable and message.durable is None: + message.durable = self.durable + return self._send(message, sync) + + def sync(self, timeout=None): self.session.sync(timeout) + + __swig_getmethods__["capacity"] = getCapacity + __swig_setmethods__["capacity"] = setCapacity + if _newclass: capacity = property(getCapacity, setCapacity) + + __swig_getmethods__["session"] = getSession + if _newclass: session = property(getSession) + + __swig_getmethods__["target"] = _get_target + if _newclass: source = property(_get_target) + + %} +} + + +%extend qpid::messaging::Message { + %pythoncode %{ + class MessageProperties: + def __init__(self, msg): + self.msg = msg + self.properties = self.msg.getProperties() + + def __len__(self): + return self.properties.__len__() + + def __getitem__(self, key): + return self.properties[key]; + + def get(self, key): + return self.__getitem__(key) + + def __setitem__(self, key, value): + self.properties[key] = value + self.msg.setProperty(key, value) + + def set(self, key, value): + self.__setitem__(key, value) + + def __delitem__(self, key): + del self.properties[key] + self.msg.setProperties(self.properties) + + def __iter__(self): + return self.properties.iteritems() + + def __repr__(self): + return str(self.properties) + + # UNSPECIFIED was module level before, but I do not + # know how to insert python code at the top of the module. + # (A bare "%pythoncode" inserts at the end. + UNSPECIFIED=object() + def __init__(self, content=None, content_type=UNSPECIFIED, id=None, + subject=None, user_id=None, reply_to=None, + correlation_id=None, durable=None, priority=None, + ttl=None, properties=None): + this = _qpid_messaging.new_Message('') + try: self.this.append(this) + except: self.this = this + if not content is None: + self.content = content + if content_type != UNSPECIFIED : + self.content_type = content_type + if id is not None : + self.id = id + if subject is not None : + self.subject = subject + if user_id is not None : + self.user_id = user_id + if reply_to is not None : + self.reply_to = reply_to + if correlation_id is not None : + self.correlation_id = correlation_id + if durable is not None : + self.durable = durable + if priority is not None : + self.priority = priority + if ttl is not None : + self.ttl = ttl + if properties is not None : + self.setProperties(properties) + + def _get_msg_props(self): + try: + return self._msg_props + except AttributeError: + self._msg_props = Message.MessageProperties(self) + return self._msg_props + + def _get_content(self) : + obj = self.getContentObject() + if obj: + return obj + if self.content_type == "amqp/list" : + return decodeList(self) + if self.content_type == "amqp/map" : + return decodeMap(self) + return self.getContent() + def _set_content(self, content) : + if isinstance(content, str) : + self.setContent(content) + elif isinstance(content, unicode) : + if not self.content_type: self.content_type = "text/plain" + self.setContent(str(content)) + elif isinstance(content, list) or isinstance(content, dict) : + encode(content, self) + else : + self.setContentObject(content) + __swig_getmethods__["content"] = _get_content + __swig_setmethods__["content"] = _set_content + if _newclass: content = property(_get_content, _set_content) + + def _get_content_type(self) : + ct = self.getContentType() + if ct == "": return None + else: return ct + + __swig_getmethods__["content_type"] = _get_content_type + __swig_setmethods__["content_type"] = setContentType + if _newclass: content_type = property(_get_content_type, setContentType) + + __swig_getmethods__["id"] = getMessageId + __swig_setmethods__["id"] = setMessageId + if _newclass: id = property(getMessageId, setMessageId) + + __swig_getmethods__["subject"] = getSubject + __swig_setmethods__["subject"] = setSubject + if _newclass: subject = property(getSubject, setSubject) + + __swig_getmethods__["priority"] = getPriority + __swig_setmethods__["priority"] = setPriority + if _newclass: priority = property(getPriority, setPriority) + + def getTtl(self) : + return self._getTtl().getMilliseconds()/1000.0 + def setTtl(self, duration) : + self._setTtl(Duration(int(1000*duration))) + __swig_getmethods__["ttl"] = getTtl + __swig_setmethods__["ttl"] = setTtl + if _newclass: ttl = property(getTtl, setTtl) + + __swig_getmethods__["user_id"] = getUserId + __swig_setmethods__["user_id"] = setUserId + if _newclass: user_id = property(getUserId, setUserId) + + __swig_getmethods__["correlation_id"] = getCorrelationId + __swig_setmethods__["correlation_id"] = setCorrelationId + if _newclass: correlation_id = property(getCorrelationId, setCorrelationId) + + __swig_getmethods__["redelivered"] = getRedelivered + __swig_setmethods__["redelivered"] = setRedelivered + if _newclass: redelivered = property(getRedelivered, setRedelivered) + + __swig_getmethods__["durable"] = getDurable + __swig_setmethods__["durable"] = setDurable + if _newclass: durable = property(getDurable, setDurable) + + __swig_getmethods__["properties"] = _get_msg_props + if _newclass: properties = property(_get_msg_props) + + def getReplyTo(self) : + return self._getReplyTo().str() + def setReplyTo(self, address_str) : + self._setReplyTo(Address(address_str)) + __swig_getmethods__["reply_to"] = getReplyTo + __swig_setmethods__["reply_to"] = setReplyTo + if _newclass: reply_to = property(getReplyTo, setReplyTo) + + def __repr__(self): + args = [] + for name in ["id", "subject", "user_id", "reply_to", + "correlation_id", "priority", "ttl", + "durable", "redelivered", "properties", + "content_type"] : + value = getattr(self, name) + if value : args.append("%s=%r" % (name, value)) + if self.content is not None: + if args: + args.append("content=%r" % self.content) + else: + args.append(repr(self.content)) + return "Message(%s)" % ", ".join(args) + %} +} + +%pythoncode %{ +# Bring into module scope +UNSPECIFIED = Message.UNSPECIFIED +%} diff --git a/qpid/cpp/bindings/qpid/ruby/.gitignore b/qpid/cpp/bindings/qpid/ruby/.gitignore new file mode 100644 index 0000000000..769576fafd --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/.gitignore @@ -0,0 +1,21 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +pkg +html diff --git a/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt new file mode 100644 index 0000000000..c31b4d4cde --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/CMakeLists.txt @@ -0,0 +1,76 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +##-------------------------------------------------- +## Properties used for generating the Ruby bindings. +##-------------------------------------------------- +set(GEM_BINDINGS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext/cqpid) +set(GEM_BINDINGS_SOURCE_FILE ${GEM_BINDINGS_SOURCE_DIR}/cqpid.cpp) +set(GEM_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) +set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/pkg/qpid-${qpidc_version}.0.gem) + + +##------------------------------------------------------ +## Use Swig to generate a literal binding to the C++ API +##------------------------------------------------------ +set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES + CPLUSPLUS ON + SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include;-I${qpid-cpp_SOURCE_DIR}/bindings") + +if ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8)) + set (RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_PATH}) +endif ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8)) + +include_directories(${RUBY_INCLUDE_DIRS} + ${qpid-cpp_SOURCE_DIR}/include + ${qpid-cpp_SOURCE_DIR}/bindings) + +list(APPEND SWIG_MODULE_cqpid_ruby_EXTRA_DEPS + ${CMAKE_SOURCE_DIR}/include/qpid/qpid.i + ${CMAKE_SOURCE_DIR}/include/qpid/swig_ruby_typemaps.i +) +swig_add_module(cqpid_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i) +swig_link_libraries(cqpid_ruby qpidmessaging qpidtypes ${RUBY_LIBRARY}) + +set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${NOSTRICT_ALIASING}") + +##---------------------------------- +## Install the complete Ruby binding +##---------------------------------- +install(TARGETS ${SWIG_MODULE_cqpid_ruby_REAL_NAME} + RENAME cqpid.so + DESTINATION ${RUBY_PFX_ARCH_DIR} + COMPONENT ${QPID_COMPONENT_CLIENT} +) + +add_custom_command(OUTPUT ${GEM_BINDINGS_SOURCE_FILE} + COMMAND cp ${swig_generated_file_fullname} ${GEM_BINDINGS_SOURCE_FILE} + DEPENDS ${swig_generated_file_fullname} + ) + +add_custom_command(OUTPUT ${GEM_OUTPUT_FILE} + COMMAND OUTPUT_DIR=${GEM_OUTPUT_PATH} rake clean clobber package + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DEPENDS ${swig_generated_file_fullname} ${GEM_BINDINGS_SOURCE_FILE} + ) + +add_custom_target(gemfile + DEPENDS ${GEM_OUTPUT_FILE} + ) + diff --git a/qpid/cpp/bindings/qpid/ruby/ChangeLog b/qpid/cpp/bindings/qpid/ruby/ChangeLog new file mode 100644 index 0000000000..5eca9644d3 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/ChangeLog @@ -0,0 +1,11 @@ +Version 0.26: + * QPID-4834: Ruby client examples incorrectly handles '--connection-options' option + * QPID-5250: Wrapped all C++ exceptions as Ruby exceptions. + +Version 0.24: + * No language-specific changes. + +Version 0.22: + * Qpid::Messaging::Address can use an address string on creation. + * Qpid::Messaging::Message can use an address string for reply_to. + * Removed errors.rb and the KeyError and SessionNameException errors. diff --git a/qpid/cpp/bindings/qpid/ruby/LICENSE b/qpid/cpp/bindings/qpid/ruby/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/qpid/cpp/bindings/qpid/ruby/README.rdoc b/qpid/cpp/bindings/qpid/ruby/README.rdoc new file mode 100644 index 0000000000..fce87ac3e1 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/README.rdoc @@ -0,0 +1,41 @@ += Qpid - Ruby language bindings for the Qpid messaging framework. + +Qpid is a cross-platform enterprise messaging system based on the open-source +AMQP protocol. + += Links + +Documents :: http://qpid.apache.org/ + += Building The Gemfile + +== Prerequisites + +You need to have the Qpid client libraries installed along with the related +development files (headers, etc). To install them, please see: + +http://cwiki.apache.org/qpid/developer-pages.html + +== Gemfile Creation + +Simply type: + + $ gem build qpid_messaging.gemspec + +This will produce a gemfile name qpid_messaging-${VERSION}.gem. + +== Installation + +You can install Qpid with the following command: + + $ gem install qpid_messaging-${VERSION}.gem + +== License + +Licensed to the Apache Software Foundation (ASF) under one or more +contributor licensing agreements. + +Author:: Apache Qpid Project +Homepage:: http://qpid.apache.org +License:: Apache License 2.0 - http://www.apache.org/licenses/LICENSE-2.0.html + diff --git a/qpid/cpp/bindings/qpid/ruby/TODO b/qpid/cpp/bindings/qpid/ruby/TODO new file mode 100644 index 0000000000..db2aca0195 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/TODO @@ -0,0 +1,12 @@ +Qpid Ruby bindigns TODO List +============================================================================== + +Beyond this simple laundry list, you can find the list of bugs and +enhancements to be fixed by going to the Apache Qpid JIRA instance: + + http://issues.apache.org/jira/browse/QPID + + +Fixes & Improvements +============================================================================== +* Fix the threading issues with blocking I/O calls (Receiver get/fetch). diff --git a/qpid/cpp/bindings/qpid/ruby/examples/client.rb b/qpid/cpp/bindings/qpid/ruby/examples/client.rb new file mode 100644 index 0000000000..9e22bade0d --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/examples/client.rb @@ -0,0 +1,48 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'qpid_messaging' + +if __FILE__ == $0 + broker = ARGV[1] || "amqp:tcp:localhost:5672" + options = ARGV[2] || "" + + connection = Qpid::Messaging::Connection.new :url => broker, :options => options + connection.open + session = connection.create_session + sender = session.create_sender "service_queue" + response_queue = Qpid::Messaging::Address.new("#response-queue;{create:always}") + receiver = session.create_receiver response_queue + + ["Twas brillig, and the slithy toves", + "Did gire and gymble in the wabe.", + "All mimsy were the borogroves,", + "And the mome raths outgrabe."].each do |line| + request = Qpid::Messaging::Message.new :content => line + request.reply_to = response_queue + sender.send request + response = receiver.fetch + puts "#{request.content_object} -> #{response.content_object}" + end + + connection.close +end + diff --git a/qpid/cpp/bindings/qpid/ruby/examples/drain.rb b/qpid/cpp/bindings/qpid/ruby/examples/drain.rb new file mode 100644 index 0000000000..6bf3d93c36 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/examples/drain.rb @@ -0,0 +1,111 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'qpid_messaging' +require 'optparse' + +options = { + :broker => "localhost", + :timeout => Qpid::Messaging::Duration::IMMEDIATE, + :count => 1, + :forever => false, + :connection_options => "" +} + +opts = OptionParser.new do |opts| + opts.banner = "Usage: drain.rb [OPTIONS] ADDRESS" + + opts.separator "" + opts.separator "Drains messages from the specified address" + opts.separator "" + + opts.on("-h", "--help", + "show this message") do + puts opts + exit + end + + opts.on("-b", "--broker VALUE", + "url of broker to connect to") do |broker| + options[:broker] = broker + end + + opts.on("-t", "--timeout VALUE", Integer, + "timeout in seconds to wait before exiting") do |timeout| + options[:timeout] = Qpid::Messaging::Duration.new timeout * 1000 + end + + opts.on("-f", "--forever", + "ignore timeout and wait forever") do + options[:forever] = true + end + + opts.on("--connection-options VALUE", + "connection options string in the form {name1:value,name2:value2}") do |conopts| + options[:connection_options] = conopts + end + + opts.on("-c", "--count VALUE", Integer, + "number of messages to read before exiting") do |count| + options[:count] = count + end +end + +opts.parse!(ARGV) + +options[:address] = ARGV[0] || "" + +connection = Qpid::Messaging::Connection.new :url => options[:broker], :options => options[:connection_options] +connection.open + +def render_map map + print "{" + map.keys.sort.each_with_index {|key,index| print "#{index > 0 ? ', ' : ''}#{key}:#{map[key]}"} + print "}" +end + +begin + session = connection.create_session + receiver = session.create_receiver options[:address] + done = false + count = 0 + options[:timeout] = Qpid::Messaging::Duration::FOREVER if options[:forever] + + while !done && (count < options[:count]) + message = receiver.fetch(options[:timeout]) + print "Message(properties=" + render_map message.properties + print ", content_object=" + if message.content_object == "amqp/map" + print "'#{render_map message.content_object}')" + else + print "'#{message.content_object}'" + end + print ")\n" + session.acknowledge message + count += 1 + end +rescue Exception => error + puts "Exception: #{error.to_s}" +end + +connection.close + diff --git a/qpid/cpp/bindings/qpid/ruby/examples/hello_world.rb b/qpid/cpp/bindings/qpid/ruby/examples/hello_world.rb new file mode 100644 index 0000000000..1928d55408 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/examples/hello_world.rb @@ -0,0 +1,49 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'qpid_messaging' + +# This is your classic Hello World application, written in +# Ruby, that uses Qpid. It demonstrates how to send and +# also receive messages. +# +if __FILE__ == $0 + broker = ARGV[0] || "localhost:5672" + address = ARGV[1] || "amq.topic" + options = ARGV[2] || "" + + connection = Qpid::Messaging::Connection.new :url => broker, :options => options + connection.open + session = connection.create_session + receiver = session.create_receiver address + sender = session.create_sender address + + # Send a simple message + sender.send Qpid::Messaging::Message.new :content => "Hello world!" + + # Now receive the message + message = receiver.fetch Qpid::Messaging::Duration::SECOND + puts "#{message.content_object}" + session.acknowledge + + connection.close +end + diff --git a/qpid/cpp/bindings/qpid/ruby/examples/map_receiver.rb b/qpid/cpp/bindings/qpid/ruby/examples/map_receiver.rb new file mode 100644 index 0000000000..9ff5f7eea0 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/examples/map_receiver.rb @@ -0,0 +1,63 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'qpid_messaging' + +broker = ARGV[0] || "amqp:tcp:127.0.0.1:5672" +address = ARGV[1] || "message_queue; {create: always}" +options = ARGV[2] || "" + +connection = Qpid::Messaging::Connection.new :url => broker, :options => options +connection.open + +def display_value value + case value + when Array + result = "" + value.each_with_index {|element, index| result += "#{', ' if index > 0}#{element}"} + return "[#{result}]" + end + + value.to_s +end + +begin + session = connection.create_session + receiver = session.create_receiver address + + message = receiver.fetch + content = message.content_object + + print "content-type:#{message.content_type}" + print "{" + content.keys.sort.each_with_index do |key, index| + print "#{', ' if index > 0}#{key}:#{display_value content[key]}" + end + print "}\n" + + session.acknowledge + +rescue Exception => error + puts "Exception: #{error.message}" +end + +connection.close + diff --git a/qpid/cpp/bindings/qpid/ruby/examples/map_sender.rb b/qpid/cpp/bindings/qpid/ruby/examples/map_sender.rb new file mode 100644 index 0000000000..f876bc5560 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/examples/map_sender.rb @@ -0,0 +1,53 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'qpid_messaging' + +broker = ARGV[0] || "amqp:tcp:127.0.0.1:5672" +address = ARGV[1] || "message_queue; {create: always}" +options = ARGV[2] || {} + +connection = Qpid::Messaging::Connection.new :url => broker, :options => options +connection.open + +begin + session = connection.create_session + sender = session.create_sender address + message = Qpid::Messaging::Message.new + + content = { + "id" => 987654321, + :name => "Widget", + :percent => 0.99, + :colors => ["red", "green", "blue"] + } + + message.content_object = content + + sender.send message + +rescue Exception => error + puts "Exception: #{error.message}" + puts error.backtrace +end + +connection.close + diff --git a/qpid/cpp/bindings/qpid/ruby/examples/server.rb b/qpid/cpp/bindings/qpid/ruby/examples/server.rb new file mode 100644 index 0000000000..8b21cb033b --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/examples/server.rb @@ -0,0 +1,51 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'qpid_messaging' + +if __FILE__ == $0 + broker = ARGV[0] || "amqp:tcp:localhost:5672" + options = ARGV[1] || "" + + connection = Qpid::Messaging::Connection.new :url => broker, :options =>options + connection.open + session = connection.create_session + receiver = session.create_receiver "service_queue; {create:always}" + + loop do + request = receiver.fetch + address = request.reply_to + + if !address.nil? + sender = session.create_sender address + response = Qpid::Messaging::Message.new :content => request.content_object.upcase + sender.send response + puts "Processed request: #{request.content_object} -> #{response.content_object}" + session.acknowledge + else + puts "Error: no reply address specified for request: #{request.content_object}" + session.reject request + end + end + + connection.close +end + diff --git a/qpid/cpp/bindings/qpid/ruby/examples/spout.rb b/qpid/cpp/bindings/qpid/ruby/examples/spout.rb new file mode 100644 index 0000000000..fbab69f6a8 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/examples/spout.rb @@ -0,0 +1,154 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$:.unshift File.join(File.dirname(__FILE__), "..", "lib") + +require 'qpid_messaging' +require 'optparse' + +options = { + :broker => "127.0.0.1", + :address => "", + :timeout => 0, + :durable => false, + :count => 1, + :properties => {}, + :content => nil, + :mapped => {} +} + +opts = OptionParser.new do |opts| + opts.banner = "Usage: spout.rb [OPTIONS] ADDRESS" + + opts.on("-h", "--help", + "show this message") do |help| + puts opts + exit + end + + opts.on("-b","--broker VALUE", + "url of broker to connect to ") do |broker| + options[:broker] = broker + end + + opts.on("-t", "--timeout VALUE", Integer, + "exit after the specified time") do |timeout| + options[:timeout] = Qpid::Messaging::Duration.new timeout * 1000 + end + + opts.on("-d", "--durable", + "make the message durable (def. #{options[:durable]})") do + options[:durable] = true + end + + opts.on("-c", "--count VALUE", Integer, + "stop after count messages have been sent, zero disables") do |count| + options[:count] = count + end + + opts.on("-i", "--id VALUE", + "use the supplied id instead of generating one") do |id| + options[:id] = id + end + + opts.on("--reply-to VALUE", + "specify reply-to address") do |replyto| + options[:replyto] = replyto + end + + opts.on("-P", "--property VALUE", + "specify message property") do |property| + name = property.split(/=/)[0] + value = property.split(/=/)[1] + options[:properties][name] = value + end + + opts.on("-M", "--map VALUE", + "specify entry for map content") do |mapped| + name = mapped.split(/=/)[0] + value = mapped.split(/=/)[1] + options[:mapped][name] = value + end + + opts.on("--content VALUE", + "specify textual content") do |content| + options[:content] = content + end + + opts.on("--connection-options VALUE", + "connection options string in the form {name1:value1, name2:value2}") do |conopts| + + options[:connection_options] = conopts + end +end + +begin + opts.parse!(ARGV) +rescue => error + opts.parse(["-h"]) +end + +# now get the non-arg options +options[:address] = ARGV[0] unless ARGV[0].nil? + +# process the connection options +unless options[:connection_options].nil? + fields = options[:connection_options].gsub(/^\{(.*)\}$/, '\1') + # remove any surrounding braces + if /\{.*\}/ =~ fields + fields = fields[1..-2] + end + # break up the options separated by commas + keysvalues = {} + fields.split(",").each do |field| + if /.+:.+/ =~ field + (key, value) = field.split(":") + keysvalues[key] = value + end + end + # now store the options + options[:connection_options] = keysvalues +end + +connection = Qpid::Messaging::Connection.new(:url => options[:broker], + :options => options[:connection_options]) +connection.open +session = connection.create_session +sender = session.create_sender options[:address] +message = Qpid::Messaging::Message.new + +options[:properties].each_key {|key| message[key] = options[:properties][key]} + +(1..options[:count]).each do |count| + if !options[:mapped].keys.empty? + message.content_object = options[:mapped] + elsif options[:content] + message.content_object = options[:content] + end + message.durable = options[:durable] + message.content_object = options[:content] unless options[:content].nil? + message.properties["spout-id"] = "#{count}" + message.reply_to = options[:replyto] unless options[:replyto].nil? || options[:replyto].empty? + sender.send message +end + +# session.sync + +connection.close + diff --git a/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb b/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb new file mode 100644 index 0000000000..27cb41af3c --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb @@ -0,0 +1,82 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# To create the Makefile then you need to specify the location +# of the Qpid shared libraries using the commandline: +# +# $ ruby extconf.rb --with-qpid-lib=[path to libraries] +# + +require 'mkmf' + +(rver, rrev, rmin) = RUBY_VERSION.split('.') + +old_ruby = (rver == "1" && rrev < "9") # pre-1.9 + +# Setup the build environment. +if old_ruby + $CFLAGS = "-fPIC -fno-inline -x c++ -lstdc++" +else + $CFLAGS = "-fPIC -fno-inline" +end + +REQUIRED_LIBRARIES = [ + 'stdc++', + 'qpidclient', + 'qpidcommon', + 'qpidmessaging', + 'qpidtypes' + ] + +REQUIRED_HEADERS = [ + 'qpid/messaging/Address.h', + 'qpid/messaging/Connection.h', + 'qpid/messaging/Duration.h', + 'qpid/messaging/exceptions.h', + 'qpid/messaging/FailoverUpdates.h', + 'qpid/messaging/Handle.h', + 'qpid/messaging/ImportExport.h', + 'qpid/messaging/Message.h', + 'qpid/messaging/Receiver.h', + 'qpid/messaging/Sender.h', + 'qpid/messaging/Session.h' + ] + +dir_config('qpid') + +def abort_build filetype, filename + abort "Missing required #{filetype}: #{filename}" +end + +def require_library lib + abort_build "library", lib unless have_library lib +end + +def require_header header + abort_build "header", header unless have_header header +end + +have_library('stdc++') + +REQUIRED_LIBRARIES.each {|library| require_library library} + +REQUIRED_HEADERS.each {|header| require_header header} if old_ruby + +create_makefile('cqpid') + diff --git a/qpid/cpp/bindings/qpid/ruby/features/closing_a_connection.feature b/qpid/cpp/bindings/qpid/ruby/features/closing_a_connection.feature new file mode 100644 index 0000000000..b5cb92b5ea --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/closing_a_connection.feature @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +Feature: Closing an open connection + When working with a broker + As a producer or consumer + I want to close a connection + + Scenario: The connection is already closed + Given a closed connection + Then calling close does not raise an exception + + Scenario: The connection is open + Given an open connection + And the connection is closed + Then the connection is in the closed state diff --git a/qpid/cpp/bindings/qpid/ruby/features/closing_a_session.feature b/qpid/cpp/bindings/qpid/ruby/features/closing_a_session.feature new file mode 100644 index 0000000000..37b3f51df1 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/closing_a_session.feature @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Closing an open session + While working with a session + As a producer or consumer + I want to close the session + + Scenario: The connection has already been closed + Given an open session with a closed connection + Then closing the session does not raise an error + + Scenario: Closing an active session + Given an open session + Then closing the session does not raise an error + And the connection is in the open state diff --git a/qpid/cpp/bindings/qpid/ruby/features/connecting_to_a_broker.feature b/qpid/cpp/bindings/qpid/ruby/features/connecting_to_a_broker.feature new file mode 100644 index 0000000000..3c7917b8b5 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/connecting_to_a_broker.feature @@ -0,0 +1,30 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Connecting to a broker + In order to interaction on an AMQP network + As a producer or consumer + I want to connect to a broker + + Scenario: Connections are closed by default + Given a new connection + Then the connection is in the closed state + + Scenario: Opening a connection + Given a new connection + And the connection is opened + Then the connection is in the open state diff --git a/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature b/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature new file mode 100644 index 0000000000..2dd5fe33f2 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + + +Feature: Creating a receiver + When working with a messaging environment + As a consumer + I want to create a Receiver for consuming messages + + Scenario: The session is closed + Given a closed session + Then creating a receiver with "my-queue" raises an exception + + Scenario: The connection is closed + Given an open session with a closed connection + Then creating a receiver with "my-queue" raises an exception + + Scenario: The address is malformed + Given an open session + Then creating a receiver with "my-queue;{foo:bar}" raises an exception + + Scenario: The address string is valid but the queue does not exist + Given an open session + Then creating a receiver for a nonexistent queue raises an exception + + Scenario: The address string is fine + Given an open session + Then creating a receiver with "my-queue;{create:always,delete:always}" succeeds + + Scenario: Using an Address object + Given an open session + And an Address with the string "create-receiver-test;{create:always}" + Then creating a receiver with an Address succeeds diff --git a/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature b/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature new file mode 100644 index 0000000000..d603f1749a --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/creating_a_sender.feature @@ -0,0 +1,42 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Creating a sender + When working with a session + As a producer + I want to create a Sender for sending messages + + Scenario: The session is closed + Given a closed session + Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception + + Scenario: The connection is closed + Given an open session with a closed connection + Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception + + Scenario: The address is malformed + Given an open session + Then creating a sender with "my-queue;{foo:bar}" raises an exception + + Scenario: The address string is valid + Given an open session + Then creating a sender with "my-queue;{create:always,delete:always}" succeeds + + Scenario: Using an Address object + Given an open session + And an Address with the string "my-queue/my-subject;{create:always}" + Then creating a sender with an Address succeeds diff --git a/qpid/cpp/bindings/qpid/ruby/features/creating_a_session.feature b/qpid/cpp/bindings/qpid/ruby/features/creating_a_session.feature new file mode 100644 index 0000000000..257d85ee7a --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/creating_a_session.feature @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Creating a session + When working with a broker + As a producer or consumer + I want to create a session + + Scenario: The connection is closed + Given a closed connection + Then creating a session raises an exception + + Scenario: The connection is open + Given an open connection + Then creating a session works diff --git a/qpid/cpp/bindings/qpid/ruby/features/getting_the_connections_authenticated_username.feature b/qpid/cpp/bindings/qpid/ruby/features/getting_the_connections_authenticated_username.feature new file mode 100644 index 0000000000..783faafa67 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/getting_the_connections_authenticated_username.feature @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Getting the authenticated username from an open connection. + When connected to a broker + As a producer or consumer + I can retrieve the username used to authenticate + + Scenario: When connected anonymously + Given an open connection + Then the authenticated username should be "anonymous" diff --git a/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature b/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature new file mode 100644 index 0000000000..6386afb79d --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/receiving_a_message.feature @@ -0,0 +1,47 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Receving a message + When working with a broker + As a message consumer + I need to be able to receive messages + + Scenario: Receiving after the session is closed + Given a sender and receiver for "my-queue;{create:always,delete:always}" + And the message "this is a test" is sent + And the session is closed + Then getting the next message raises an error + + Scenario: Receiving after the connection is closed + Given a sender and receiver for "my-queue;{create:always,delete:always}" + And the message "this is a test" is sent + And the connection is closed + Then getting the next message raises an error + + Scenario: No message is received on an empty queue + Given an existing receiver for "my-queue;{create:always,delete:always}" + And the receiver has no pending messages + Then getting the next message raises an error + + Scenario: A message is pending + Given an open session + And given a sender for "my-queue;{create:always}" + And given a receiver for "my-queue;{create:always,delete:always}" + And the receiver has a capacity of 1 + And the message "this is a test" is sent + Then the receiver should have 1 message available + And the receiver should receive a message with "this is a test" diff --git a/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature b/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature new file mode 100644 index 0000000000..d6e6a9464e --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/sending_a_message.feature @@ -0,0 +1,38 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Sending a message + When working with a broker + As a producer + I want to send messages using an existing Sender + + Scenario: The session is closed + Given an open session + And creating a sender with "my-queue;{create:always,delete:always}" succeeds + And the session is closed + Then sending the message "This is a test" should raise an error + + Scenario: The connection is closed + Given an open session + And creating a sender with "my-queue;{create:always,delete:always}" succeeds + And the connection is closed + Then sending the message "This is a test" should raise an error + + Scenario: The message sends successfully + Given an open session + And creating a sender with "my-queue;{create:always,delete:always}" succeeds + Then sending the message "This is a test" succeeds diff --git a/qpid/cpp/bindings/qpid/ruby/features/session_returns_its_connection.feature b/qpid/cpp/bindings/qpid/ruby/features/session_returns_its_connection.feature new file mode 100644 index 0000000000..58cb0aa0b9 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/session_returns_its_connection.feature @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: A session returns its connection + With an action session + As a producer or consumer + I can retrieve the underlying connection for the session + + Scenario: The connection is closed + Given an open session with a closed connection + Then the connection for the session is in the closed state + + Scenario: The connection is open + Given an open session + Then the connection for the session is in the open state diff --git a/qpid/cpp/bindings/qpid/ruby/features/sessions_have_names.feature b/qpid/cpp/bindings/qpid/ruby/features/sessions_have_names.feature new file mode 100644 index 0000000000..58a5771c9f --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/sessions_have_names.feature @@ -0,0 +1,25 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Feature: Session have a name + When using a session + As a producer or consumer + I can name a session and then later retrieve it by name + + Scenario: Naming a session + Given an existing session named "test-session" + Then the session can be retrieved by the name "test-session" diff --git a/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb new file mode 100644 index 0000000000..a7eca6f9ce --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb @@ -0,0 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +Given /^an Address with the string "(.*?)"$/ do |address| + @address = Qpid::Messaging::Address.new "#{address}" +end diff --git a/qpid/cpp/bindings/qpid/ruby/features/step_definitions/connection_steps.rb b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/connection_steps.rb new file mode 100644 index 0000000000..3fe3e6941f --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/connection_steps.rb @@ -0,0 +1,93 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +# close all connections +After do + @connection.close if @connection +end + +Given /^a new connection$/ do + @connection = Qpid::Messaging::Connection.new unless @connection +end + +Given /^an open connection$/ do + steps %Q{ + Given a new connection + } + @connection.open +end + +Given /^a closed connection$/ do + steps %Q{ + Given a new connection + } + @connection.close if @connection.open? +end + +Then /^the connection is in the (open|closed) state$/ do |state| + @connection.open?.should == false if state == "closed" + @connection.open?.should == true if state == "open" +end + +Given /^the connection is opened$/ do + @connection.open +end + +Given /^the connection is closed$/ do + @connection.close +end + +Then /^creating a session raises an exception$/ do + lambda { + @session = @connection.create_session + }.should raise_error +end + +Then /^creating a session works$/ do + steps %Q{ + Given a session exists with the name "nameless" + } + @session.should_not be_nil +end + +Given /^an existing session named "([^"]*)"$/ do |name| + steps %Q{ + Given an open connection + And a session exists with the name "#{name}" + } +end + +Given /^a session exists with the name "([^"]*)"$/ do |name| + @session = @connection.create_session :name => "#{name}" +end + +Then /^the session can be retrieved by the name "([^"]*)"$/ do |name| + session = @connection.session "#{name}" + session.should_not be_nil +end + +Then /^calling close does not raise an exception$/ do + lambda { + @connection.close + }.should_not raise_error +end + +Then /^the authenticated username should be "([^"]*)"$/ do |username| + @connection.authenticated_username.should == "#{username}" +end diff --git a/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb new file mode 100644 index 0000000000..e454dac345 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb @@ -0,0 +1,69 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +Given /^an existing receiver for "([^"]*)"$/ do |address| + steps %Q{ + Given an open session + Then creating a receiver with "#{address}" succeeds + } +end + +Given /^the receiver has no pending messages$/ do + available = @receiver.available + available.should == 0 +end + +Then /^getting the next message raises an error$/ do + lambda { + @message = @receiver.get Qpid::Messaging::Duration::IMMEDIATE + }.should raise_error +end + +Given /^a sender and receiver for "([^"]*)"$/ do |address| + steps %Q{ + Given an open session + Then creating a sender with "#{address}" succeeds + Then creating a receiver with "#{address}" succeeds + } +end + +Then /^the receiver should receive a message with "([^"]*)"$/ do |content| + @message = @receiver.fetch Qpid::Messaging::Duration::IMMEDIATE + + @message.should_not be_nil + @message.content.should == "#{content}" +end + +Given /^the receiver has a capacity of (\d+)$/ do |capacity| + @receiver.capacity = capacity.to_i +end + +Then /^the receiver should have (\d+) message available$/ do |available| + # TODO we shouldn't need to sleep a second in order to have this update + sleep 1 + @receiver.available.should == available.to_i +end + +Given /^given a sender for "([^"]*)"$/ do |address| + @sender = @session.create_sender "#{address}" +end + +Given /^given a receiver for "([^"]*)"$/ do |address| + @receiver = @session.create_receiver "#{address}" +end diff --git a/qpid/cpp/bindings/qpid/ruby/features/step_definitions/sender_steps.rb b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/sender_steps.rb new file mode 100644 index 0000000000..93dbd2d5c0 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/sender_steps.rb @@ -0,0 +1,34 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +Given /^the message "([^"]*)" is sent$/ do |content| + @sender.send Qpid::Messaging::Message.new :content => "#{content}" +end + +Then /^sending the message "([^"]*)" should raise an error$/ do |content| + lambda { + steps %Q{ + Then sending the message "#{content}" succeeds + } + }.should raise_error +end + +Then /^sending the message "([^"]*)" succeeds$/ do |content| + @sender.send Qpid::Messaging::Message.new :content => "#{content}" +end diff --git a/qpid/cpp/bindings/qpid/ruby/features/step_definitions/session_steps.rb b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/session_steps.rb new file mode 100644 index 0000000000..cf775d917d --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/step_definitions/session_steps.rb @@ -0,0 +1,99 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +Given /^a closed session/ do + steps %Q{ + Given an open connection + Then creating a session works + } + @connection.close +end + +Then /^creating a sender with "([^"]*)" raises an exception$/ do |address| + lambda { + steps %Q{ + @sender = @session.create_sender "#{address}" + } + }.should raise_error +end + +Then /^creating a receiver with "([^"]*)" raises an exception$/ do |address| + lambda { + steps %Q{ + @sender = @session.create_sender "#{address}" + } + }.should raise_error +end + +Given /^an open session with a closed connection$/ do + steps %Q{ + Given an open connection + Then creating a session works + } + @session.connection.close +end + +Given /^an open session$/ do + steps %Q{ + Given an open connection + Then creating a session works + } +end + +Given /^the session is closed$/ do + @session.close +end + +Then /^creating a sender with "([^"]*)" succeeds$/ do |address| + @sender = @session.create_sender "#{address}" + @sender.should_not be_nil +end + +Then /^creating a sender with an Address succeeds$/ do + @sender = @session.create_receiver @address + @sender.should_not be_nil +end + +Then /^creating a receiver for a nonexistent queue raises an exception$/ do + lambda { + steps %Q{ + Then creating a receiver with "queue-#{Time.new.to_i}" succeeds + } + }.should raise_error +end + +Then /^creating a receiver with "([^"]*)" succeeds$/ do |address| + @receiver = @session.create_receiver "#{address}" + @receiver.should_not be_nil +end + +Then /^creating a receiver with an Address succeeds$/ do + @receiver = @session.create_receiver @address + @receiver.should_not be_nil +end + +Then /^closing the session does not raise an error$/ do + lambda { + @session.close + }.should_not raise_error +end + +Then /^the connection for the session is in the (open|closed) state$/ do |state| + @session.connection.open?.should == false if state == "closed" +end diff --git a/qpid/cpp/bindings/qpid/ruby/features/support/env.rb b/qpid/cpp/bindings/qpid/ruby/features/support/env.rb new file mode 100644 index 0000000000..cc0097ca8b --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/features/support/env.rb @@ -0,0 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +$LOAD_PATH.unshift(File.dirname(__FILE__) + "/../../lib") + +require 'qpid_messaging' diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging.rb new file mode 100644 index 0000000000..2b5348f298 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging.rb @@ -0,0 +1,82 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +require 'cqpid' +require 'qpid_messaging/duration' +require 'qpid_messaging/address' +require 'qpid_messaging/encoding' +require 'qpid_messaging/message' +require 'qpid_messaging/sender' +require 'qpid_messaging/receiver' +require 'qpid_messaging/session' +require 'qpid_messaging/connection' + +module Qpid + + # The Qpid Messaging framework is an enterprise messaging framework + # based on the open-source AMQP protocol. + # + # ==== Example Application + # + # Here is a simple example application. It creates a link to a broker located + # on a system named *broker.myqpiddomain.com*. It then creates a new messaging + # queue named "qpid-examples" and publishes a message to it. It then consumes + # that same message and closes the connection. + # + # require 'rubygems' + # gem 'qpid_messaging' + # require 'qpid_messaging' + # + # # create a connection, open it and then create a session named "session1" + # conn = Qpid::Messaging::Connection.new :name => "broker.myqpiddomain.com" + # conn.open + # session = conn.create_session "session1" + # + # # create a sender and a receiver + # # the sender marks the queue as one that is deleted when trhe sender disconnects + # send = session.create_sender "qpid-examples;{create:always,delete:always}" + # recv = session.create_receiver "qpid-examples" + # + # # create an outgoing message and send it + # outgoing = Qpid::Messaging::Message.new :content => "The time is #{Time.new}" + # sender.send outgoing + # + # # set the receiver's capacity to 10 and then check out many messages are pending + # recv.capacity = 10 + # puts "There are #{recv.available} messages waiting." # should report 1 message + # + # # get the nextwaiting message, which should be in the local queue now, + # # and output the contents + # incoming = recv.get Qpid::Messaging::Duration::IMMEDIATE + # puts "Received the following message: #{incoming.content}" + # # the output should be the text that was sent earlier + # + # # acknowledge the message, letting the sender know the message was received + # puts "The sender currently has #{send.unsettled} message(s) pending." + # # should report 1 unsettled message + # session.acknowledge incoming # acknowledge the received message + # puts "Now sender currently has #{send.unsettled} message(s) pending." + # # should report 0 unsettled messages + # + # # close the connection + # conn.close + # + module Messaging; end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/address.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/address.rb new file mode 100644 index 0000000000..0879f0fcd1 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/address.rb @@ -0,0 +1,200 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # Address represents an address to which messages can be sent or from + # which they can be received. + # + # == The +Address+ String + # + # An +Address+ can be described using the following pattern: + # + # <address> [ / <subject> ] ; [ { <key> : <value> , ... } ] + # + # where *address* is a simple name and *subject* is a subject or subject + # pattern. + # + # === Options + # + # The options, enclosed in curly braces, are key:value pairs delimited by + # a comma. The values can be nested maps also enclosed in curly braces. + # Or they can be lists of values, where they are contained within square + # brackets but still comma delimited, such as: + # + # [value1,value2,value3] + # + # The following are the list of supported options: + # + # [create] + # Indicates if the address should be created; values are *always*, + # *never*, *sender* or *reciever*. + # + # [assert] + # Indicates whether or not to assert any specified node properties; + # values are *always*, *never*, *sender* or *receiver*. + # + # [delete] + # Indicates whether or not to delete the addressed node when a sender + # or receiver is cancelled; values are *always*, *never*, *sender* or + # *receiver*. + # + # [node] + # A nested map describing properties for the addressed node. Properties + # are *type* (*topic* or *queue*), *durable* (a boolean), *x-declare* + # (a nested map of amqp 0.10-specific options) and *x-bindings* (nested + # list which specifies a queue, exchange or a binding key and arguments). + # + # [link] + # A nested map through which properties of the link can be specified; + # properties are *durable*, *reliability*, *x-declare*, *x-subscribe* + # and *x-bindings*. + # + # [mode] + # (*For receivers only*) indicates whether the receiver should consume + # or browse messages; values are *consume* (the default) and *browse*. + class Address + + # Creates a new +Address+ from an address string. + # + # ==== Attributes + # + # * +address+ - the address string + # + # ==== Examples + # + # # create a new address for a queue named "my-queue" that will + # # be created if it doesn't already exist + # addr = Qpid::Messaging::Address.new "my-queue;{create:always}" + # + def initialize(address, address_impl = nil) + @address_impl = address_impl || Cqpid::Address.new(address) + end + + def address_impl # :nodoc: + @address_impl + end + + # Returns the name for the +Address+. + # + # ==== Examples + # + # # display the name of the address + # addr = Qpid::Messaging::Address.new "foo;{create:always}" + # # outputs the word 'foo' + # puts addr.name + # + def name; @address_impl.getName; end + + # Sets the name for the +Address+. + # + # ==== Examples + # + # # create a new address with the name "my-queue" + # addr = Qpid::Messaging::Address.new "my-queue/my-subject;{create:always}" + # # changes the name to "my-new-queue" + # addr.name = "my-new-queue" + # + def name=(name); @address_impl.setName name; end + + # Returns the subject for the +Address+. + # + # ==== Examples + # + # # creates a new address with the subject "bar" + # addr = Qpid::Messaging::Address.new "my-queue/bar;{create:always}" + # + def subject; @address_impl.getSubject; end + + # Sets the subject for the +Address+. + # + # ==== Examples + # + # # creates an address with the subject "example" + # addr = Qpid::Messaging::Address.new "my-queue/example;{create:always}" + # # changes the subject to "test" + # addr.subject = "test" + # + def subject=(subject); @address_impl.setSubject(subject); end + + # Returns the type for the +Address+. + #-- + # We cannot use "type" since that clashes with the Ruby object.type + # identifier. + #++ + def address_type; @address_impl.getType; end + + # Sets the type for the +Address+. + # + # The type of the address determines how +Sender+ and +Receiver+ objects + # are constructed for it. It also affects how a reply-to address is + # encoded. + # + # If no type is specified then it will be determined by querying the + # broker. Explicitly setting the type prevents this. + # + # Values are either *queue* or *topic*. + # + # ==== Options + # + # * +type+ - the address type + # + # ==== Examples + # + # # creates an queue address + # addr = Qpid::Messaging::Address.new "my-queue;{create:always}" + # addr.address_type = "queue" + # + def address_type=(type); @address_impl.setType(type); end + + # Returns the options. + def options; @address_impl.getOptions; end + + # Sets the options for the address. + # + # *NOTE:* See the class documentation for more details on options. + # + # ==== Examples + # + # addr.options = :create => :always + # addr.options = :create => :always, :delete => :always + # + def options=(options = {}); @address_impl.setOptions(convert_options(options)); end + + def to_s # :nodoc: + @address_impl.str + end + + private + + def convert_options(options) + result = {} + options.each_pair {|key, value| result[key.to_s] = value.to_s} + + return result + end + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/connection.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/connection.rb new file mode 100644 index 0000000000..6d637a1665 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/connection.rb @@ -0,0 +1,189 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # A +Connection+ represents a network connection to a remote endpoint. + class Connection + + attr_reader :options # :nodoc: + + # Creates a connection object. Raises a MessagingError if an invalid + # connection option is used. + # + # == Options + # + # * +:url+ - the URL for the broker + # * +:options+ - connection options + # + # == Controlling Reconnect Behavior + # + # The following connection options can be used to configure + # the reconnection behavior for this connection. + # + # * +:username+ - the authentication username + # * +:password+ - the authentication password + # * +:heartbeat+ + # * +:tcp_nodelay+ + # * +:sasl_mechanism+ + # * +:sasl_service+ + # * +:sasl_min_ssf+ + # * +:sasl_max_ssf+ + # * +:transport+ + # * +:reconnect+ - indicates whether to attempt reconnections + # * +:reconnect_timeout+ - the number of seconds to attempt reconnecting + # * +:reconnect_limit+ - the number of retries before reporting failure + # * +:reconnect_interval_min+ - initial delay, in seconds, before attempting a reconnection + # * +:reconnect_interval_max+ - number of seconds to wait before additional reconnect attempts + # * +:reconnect_interval+ - shorthand for setting both min and max values + # * +:reconnect_urls+ - a list of alternate URLs to use for reconnection attempts + # + # == Examples + # + # # creates a connection to the broker running local *localhost* + # conn = Qpid::Messaging::Connnection.new + # # creates a connection to *broker1.domain.com* on port *5672* + # conn = Qpid::Messaging::Connection.new :url => "amqp:tcp:broker1.domain.com:5672" + # # creates a connection to localhost with the specified authentication credentials + # conn = Qpid::Messaging::Connection.new :options => {:username => "login", :password => "password"} + # + def initialize(opts = {}) + @url = opts[:url] || "localhost" + @options = Qpid::Messaging.stringify(opts[:options] || {}) + @connection_impl = opts[:impl] || Cqpid::Connection.new(@url, @options) + end + + def connection_impl # :nodoc: + @connection_impl + end + + # Establishes the connection. + # + # == Examples + # + # # open a connection if it's not already open + # conn.open unless conn.open? + # + def open + @connection_impl.open + end + + # Reports whether the connection is open. + # + # == Examples + # + # # close the connection if it's not already closed + # conn.close if conn.open? + # + def open?; true && !@connection_impl.nil? && @connection_impl.isOpen; end + + # Closes the connection. + # + # == Examples + # + # # close a connection + # conn.close + # + def close; @connection_impl.close; end + + # Creates a new session. + # + # == Arguments + # + # * +:name+ - specifies the name for this session + # * +:transactional+ - if +true+ then a creates a transaction session (def. +false+) + # + # == Examples + # + # # create a session named 'session1' + # session = conn.create_session :name => "session1" + # # create a transactional session + # session = conn.create_session :transaction => true + # + def create_session(args = {}) + name = args[:name] || "" + if open? + if args[:transactional] + session = @connection_impl.createTransactionalSession name + else + session = @connection_impl.createSession name + end + return Session.new(self, session) + else + raise RuntimeError.new "No connection available." + end + end + + # Returns a Session with the given name. Raises an exception if no + # session with the given name exists. + # + # == Options + # + # * +name+ - the existing session's name + # + # == Examples + # + # # retrieve a session named 'mysession' from the current connection + # name = "my-session" + # # if no such session exists then catchh the exception raised + # begin + # session = conn.session name + # rescue MessagingException => error + # puts "No such session: #{name}." + # end + # + def session name + session_impl = @connection_impl.getSession name + Qpid::Messaging::Session.new self, session_impl if session_impl + end + + # Returns the username used to authenticate with the connection. + # + # If the connection did not user authentication credentials, then the + # username returned is "anonymous". + # + # == Examples + # + # # create a new connection for user "qpiduser" + # conn = Qpid::Messaging::Connection.new :username => "qpiduser" + # conn.open + # # displays the authenticate username + # puts "Connected as #{conn.authenticated_username}" # should say 'qpiduser' + # + def authenticated_username; @connection_impl.getAuthenticatedUsername if open?; end + + private + + def convert_options(options) + result = {} + unless options.nil? || options.empty? + options.each_pair {|key, value| result[key.to_s] = value.to_s} + end + + return result + end + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/duration.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/duration.rb new file mode 100644 index 0000000000..11c903dade --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/duration.rb @@ -0,0 +1,128 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # A Duration represents a period of time in milliseconds + # + # == Named Durations + # + # The following named +Durations+ are available as symbols: + # + # [FOREVER] + # The maximum integer value for the platform. Effectively this will wait + # forever. + # + # [IMMEDIATE] + # An alias for 0 milliseconds. + # + # [SECOND] + # An alias for 1,000 milliseconds. + # + # [MINUTE] + # And alias for 60,000 millisecons. + # + class Duration + + # Creates a Duration with the specified length, in milliseconds. + # + # ==== Options + # + # * +length+ - The duration in +milliseconds+. + # + # ==== Examples + # + # # creates a duration of 15 seconds + # # REMEMBER: Duration deals in milliseconds + # delay = Qpid::Messaging::Duration.new 15000 + # + def initialize length + @duration_impl = Cqpid::Duration.new length + end + + def duration_impl # :nodoc: + @duration_impl + end + + # Returns the period of time in +milliseconds+. + # + # ==== Examples + # + # # doubling growth in waiting for messages in a loop + # do loop + # set the base duration waiting length + # timeout = Qpid::Messaging::Duration::SECOND + # msg = nil + # # loop until we receive a message + # while msg.nil? + # puts "Waiting #{timeout.milliseconds}ms" + # msg = recv.get timeout + # # if nothing was received, double the duration + # if msg.nil? + # # double out timeout + # timeout = timeout * 2 + # else + # # do something with the message + # puts "Received: #{msg.content}" + # end + # end + # end + # + def milliseconds + @duration_impl.getMilliseconds + end + + # Multiplies the duration of the +Duration+ and returns a new instance. + # + # Raises exceptions on a negative factor. Returns + # Qpid::Messaging::Duration::IMMEDIATE when the factor is 0. + # + # ==== Examples + # + # # return a duration that is 2 minutes (120,000 ms) + # twominutes = Qpid::Messaging::Duration::MINUTE * 2 + # + def *(factor) + raise TypeError.new "Factors must be non-zero positive values" if factor < 0 + return Qpid::Messaging::Duration::IMMEDIATE if factor.zero? + Qpid::Messaging::Duration.new((self.milliseconds * factor).floor) + end + + def self.add_item(key, value) # :nodoc: + @hash ||= {} + @hash[key] = Duration.new value + end + + def self.const_missing(key) # :nodoc: + @hash[key] + end + + self.add_item :FOREVER, Cqpid::Duration.FOREVER.getMilliseconds + self.add_item :IMMEDIATE, Cqpid::Duration.IMMEDIATE.getMilliseconds + self.add_item :SECOND, Cqpid::Duration.SECOND.getMilliseconds + self.add_item :MINUTE, Cqpid::Duration.MINUTE.getMilliseconds + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb new file mode 100644 index 0000000000..ac0fbc32a7 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb @@ -0,0 +1,75 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # Encodes the supplied content into the given message. + def self.encode content, message, encoding = nil # :nodoc: + Cqpid::encode content, message.message_impl, encoding + end + + # Decodes and returns the message's content. + def self.decode(message, content_type = nil) # :nodoc: + content_type = message.content_type if content_type.nil? + + case content_type + when "amqp/map" + return Cqpid.decodeMap message.message_impl + when "amqp/list" + return Cqpid.decodeList message.message_impl + end + + message.content + end + + # Takes as input any type and converts anything that's a symbol + # into a string. + def self.stringify(value) # :nodoc: + # set the default value + result = value + + case value + + when Symbol + result = value.to_s + + when Hash + result = {} + value.each_pair do |key, value| + result[stringify(key)] = stringify(value) + end + + when Array + result = [] + value.each do |element| + result << stringify(element) + end + + end + + return result + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb new file mode 100644 index 0000000000..58205bdcbc --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/message.rb @@ -0,0 +1,375 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # A +Message+ represents an routable piece of information. + class Message + + # Creates a +Message+. + # + # ==== Options + # + # * +:content+ - the content + # + # ==== Examples + # + # # create a simple message and sends it + # message = Qpid::Messaging::Message.new :content => "This is a message." + # sender.send message + # + def initialize(args = {}) + @message_impl = (args[:impl] if args[:impl]) || nil + @message_impl = Cqpid::Message.new if @message_impl.nil? + args = {} if args.nil? + self.content_object = args[:content] if args[:content] + end + + def message_impl # :nodoc: + @message_impl + end + + # Sets the reply-to address. + # + # The address can either be an instance of Address or else and + # address string. + # + # ==== Options + # + # * +address+ - the address + # + # ==== Examples + # + # # set replies using an Address + # msg.reply_to = Qpid:Messaging::Address.new "my-responses" + # # set replies using an address string + # msg.reply_to = "my-feed/responses" + # + def reply_to=(address) + address = Qpid::Messaging::Address.new "#{address}" if !address.is_a? Qpid::Messaging::Address + + @message_impl.setReplyTo address.address_impl + end + + # Returns the reply to address for the +Message+. + def reply_to + address_impl = @message_impl.getReplyTo + # only return an address if a reply to was specified + Qpid::Messaging::Address.new(nil, address_impl) if address_impl + end + + # Sets the subject for the +Message+. + # + # ==== Options + # + # * +subject+ - the subject + def subject=(subject); @message_impl.setSubject subject; end + + # Returns the subject of the +Message+. + def subject; @message_impl.getSubject; end + + # Sets the content type for the +Message+. + # + # This should be set by the sending application and indicates to the + # recipients of the message how to interpret or decode the content. + # + # By default, only dictionaries and maps are automatically given a content + # type. If this content type is replaced then retrieving the content will + # not behave correctly. + # + # ==== Options + # + # * +content_type+ - the content type + # + # ==== Examples + # + # # send base64 encoded data in a mesage + # msg = Qpid::Messaging::Message.new :content = "UXBpZCBSdWxlcyEK" + # msg.content_type = "application/base64" + # + def content_type=(content_type); @message_impl.setContentType content_type; end + + # Returns the content type for the +Message+. + def content_type; @message_impl.getContentType; end + + # Sets the message id. + # + # *NOTE:* this field must be a UUID type currently. A non-UUID value will + # be converted to a zero UUID, though a blank ID will be left untouched. + # + # ==== Options + # + # * +id+ - the id + # + # ==== Examples + # + # # this example only works in Ruby >= 1.9, for 1.8 use a UUID library + # require 'SecureRandom' + # msg.message_id = SecureRandom.uuid + # + def message_id=(message_id); @message_impl.setMessageId message_id.to_s; end + + # Returns the message id. + def message_id; @message_impl.getMessageId; end + + # Sets the user id for the +Message+. + # + # This should in general be the user-id which was used when authenticating + # the connection itself, as the messaging infrastructure will verify + # this. + # + # See Qpid::Messaging::Connection.authenticated_username + # + # *NOTE:* If the id is not a +String+ then the id is set using + # the object's string representation. + # + # ==== Options + # + # * +id+ - the id + # + def user_id=(user_id); @message_impl.setUserId user_id; end + + # Returns the user id for the +Message+. + def user_id; @message_impl.getUserId; end + + # Sets the correlation id of the +Message+. + # + # The correlation id can be used as part of a protocol for message + # exchange patterns; e.g., a request-response pattern might require + # the correlation id of the request and the response to match, or it + # might use the message id of the request as the correlation id on + # the response. + # + # *NOTE:* If the id is not a +String+ then the id is setup using + # the object's string representation. + # + # ==== Options + # + # * +id+ - the id + # + def correlation_id=(correlation_id); @message_impl.setCorrelationId correlation_id; end + + # Returns the correlation id of the +Message+. + def correlation_id; @message_impl.getCorrelationId; end + + # Sets the priority of the +Message+. + # + # This may be used by the messaging infrastructure to prioritize + # delivery of messages with higher priority. + # + # *NOTE:* If the priority is not an integer type then it is set using + # the object's integer representation. If the integer value is greater + # than 8-bits then only the first 8-bits are used. + # + # ==== Options + # + # * +priority+ - the priority + # + def priority=(priority); @message_impl.setPriority priority; end + + # Returns the priority for the +Message+. + def priority; @message_impl.getPriority; end + + # Sets the time-to-live in milliseconds. + # + # This can be used by the messaging infrastructure to discard messages + # that are no longer of relevance. + # + # ==== Options + # + # * +duration+ - the number of milliseconds + # + def ttl=(duration) + if duration.is_a? Qpid::Messaging::Duration + @message_impl.setTtl duration.duration_impl + else + @message_impl.setTtl Cqpid::Duration.new duration.to_i + end + end + + # Returns the time-to-live in milliseconds. + def ttl; Qpid::Messaging::Duration.new @message_impl.getTtl.getMilliseconds; end + + # Sets the durability of the +Message+. + # + # This is a hint to the messaging infrastructure that the message + # should be persisted or otherwise stored. This helps to ensure + # that the message is not lost due to failures or a shutdown. + # + # ==== Options + # + # * +durable+ - the durability flag (def. false) + # + def durable=(durable); @message_impl.setDurable durable; end + + # Returns the durability for the +Message+. + def durable; @message_impl.getDurable; end + + # This is a hint to the messaging infrastructure that if de-duplication + # is required, that this message should be examined to determine if it + # is a duplicate. + # + # ==== Options + # + # * +redelivered+ - sets the redelivered state (def. false) + # + # ==== Examples + # + # # processed is a collection of messages already received + # msg.redelivered = true if processed.include? msg.message_id + # + def redelivered=(redelivered); @message_impl.setRedelivered redelivered; end + + # Returns whether the +Message+ has been marked as redelivered. + def redelivered; @message_impl.getRedelivered; end + + # Returns all named properties. + # + # *NOTE:* It is recommended to use the []= method for + # retrieving and setting properties. Using this method may + # result in non-deterministic behavior. + def properties; @message_impl.getProperties; end + + # Returns the value for the named property. + # + # ==== Options + # + # * +name+ - the property name + # + # ==== Examples + # + # # use of message properties to mark a message as digitally signed + # verify(msg) if msg[:signed] + # + def [](key); self.properties[key.to_s]; end + + # Assigns a value to the named property. + # + # A property's name or value, if a symbol, will be converted to a string + # representation. However, you will still be able to access them using + # a symbol for the name. + # + # ==== Options + # + # * +name+ - the property name + # * +value+ - the property value + # + # ==== Examples + # + # # set the signed attribute on a message and then retrieve it + # msg[:signed] = true # sets "signed" => true + # puts "It's signed" if msg["signed"] # outputs "It's signed" + # + def []=(key, value) + @message_impl.setProperty(key.to_s, + Qpid::Messaging.stringify(value)) + end + + # Sets the content for the +Message+. + # + # Content is automatically encoded for Array and Hash types. Other types + # need to set their own content types (via content_type) in order to + # specify how recipients should process the content. + # + # ==== Options + # + # * +content+ - the content + # + # ==== Examples + # + # # set a simple content for a message + # msg.content = "This is a simple message." + # # sets content that is automatically encoded + # msg.content = {:foo => :bar} + # + def content=(content) + content_type = nil + @content = Qpid::Messaging.stringify(content) + case @content + when Hash + content_type = "amqp/map" + when Array + content_type = "amqp/list" + end + if content_type.nil? + @message_impl.setContent @content + else + Qpid::Messaging.encode @content, self, content_type + end + end + + # Returns the content of the +Message+. + # + # Content is automatically decoded based on the specified content type. + # If the content type is application-specific, then no decoding is + # performed and the content is returnedas a +String+ representation. + # + # For example, if an array of integers are sent, then the receiver will + # find the message content to be an array of String objects, where each + # String is a representation of the sent integer value. + # + def content + if @content.nil? + @content = @message_impl.getContent + + # decode the content is necessary if it + # has an encoded content type + if ["amqp/list", "amqp/map"].include? @message_impl.getContentType + @content = Qpid::Messaging.decode(self, + @message_impl.getContentType) + end + + end + @content + end + + # Returns the content's size in bytes. + def content_size; @message_impl.getContentSize; end + + # Sets the message content. + # + # ==== Options + # + # * +content+ - the content + # + # ==== Examples + # + # # set a simple content for a message + # msg.content_object = "This is a simple message." + # # sets content that is automatically encoded + # msg.content_object = {:foo => :bar} + # + def content_object=(content) + @message_impl.setContentObject(Qpid::Messaging.stringify(content)) + end + + # Returns the content of the +Message+. + # + def content_object + @message_impl.getContentObject() + end + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/receiver.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/receiver.rb new file mode 100644 index 0000000000..05ee925212 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/receiver.rb @@ -0,0 +1,177 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # +Receiver+ is the entity through which messages are received. + # + # An instance of +Receiver+ can only be created using an active (i.e., not + # previously closed) Session. See Qpid::Messaging::Session.create_receiver + # for more details. + # + # ==== Example + # + # # create a connection and a session + # conn = Qpid::Messaging::Connection.new :url => "mybroker:5762" + # conn.open + # session = conn.create_session + # + # # create a receiver that listens on the "updates" topic of "alerts" + # receiver = session.create_receiver "alerts/updates" + # + # # wait for an incoming message and process it + # incoming = receiver.get Qpid::Messaging::Duration::FOREVER + # process(incoming) + # + class Receiver + + def initialize(session, receiver_impl) # :nodoc: + @session = session + @receiver_impl = receiver_impl + end + + def receiver_impl # :nodoc: + @receiver_impl + end + + # Retrieves a message from the local queue, or waits for up to + # the duration specified for one to become available. + # + # If no message is received within the specified time then a + # MessagingException is raised. + # + # ==== Options + # + # * duration - the timeout to wait + # + # ==== Examples + # + # # retrieves a message, also handles exceptions raised on no messages + # begin + # # checks for a message, returning immediately + # msg = recv.get Qpid::Messaging::Duration::IMMEDIATE + # puts "Received this message: #{message.content}" + # rescue + # puts "No messages available. + # end + # + def get(duration = Qpid::Messaging::Duration::FOREVER) + message_impl = @receiver_impl.get duration.duration_impl + create_message_wrapper message_impl unless message_impl.nil? + end + + # Retrieves a message from the receiver's subscription, or waits + # for up to the duration specified for one to become available. + # + # If no message is fetched within the specified time then a + # MessagingException is raised. + # + # ==== Options + # + # * duration - the timeout to wait (def. Duration::FOREVER) + # + # ==== Examples + # + # # retrieves a message, also handles exceptions raised on no messages + # begin + # # checks for a message, times out after one second + # msg = recv.fetch Qpid::Messaging::Duration::SECOND + # puts "Fetched this message: #{message.content}" + # rescue + # puts "No messages available. + # end + # + def fetch(duration = Qpid::Messaging::Duration::FOREVER) + message_impl = @receiver_impl.fetch duration.duration_impl + create_message_wrapper message_impl unless message_impl.nil? + end + + # Sets the capacity. + # + # The capacity of a +Receiver+ is the number of Messages that can be + # pre-fetched from the broker and held locally. If capacity is 0 then + # messages will never be pre-fetched and all messages must instead be + # retrieved using #fetch. + # + # ==== Options + # + # * capacity - the capacity + # + # ==== Examples + # + # # create a receiver and give it a capacity of 50 + # recv = session.create_receiver "alerts/minor" + # recv.capacity = 50 + # + def capacity=(capacity); @receiver_impl.setCapacity capacity; end + + # Returns the capacity. + def capacity; @receiver_impl.getCapacity; end + + # Returns the number of messages locally held. + # + # The available is always 0 <= available <= capacity. + # + # If the #capacity is set to 0 then available will always be 0. + # + # ==== Examples + # + # # output the number of messages waiting while processing + # loop do + # puts "There are #{recv.available} messages pending..." + # # wait forever (the default) for the next message + # msg = recv.get + # # process the message + # dispatch_message msg + # end + # + def available; @receiver_impl.getAvailable; end + + # Returns the number of messages that have been received and acknowledged + # but whose acknowledgements have not been confirmed by the sender. + def unsettled; @receiver_impl.getUnsettled; end + + # Closes this +Receiver+. + # + # This does not affect the owning Session or Connection. + def close; @receiver_impl.close; end + + # Returns whether the +Receiver+ is closed. + def closed?; @receiver_impl.isClosed; end + + # Returns the name of this +Receiver+. + def name; @receiver_impl.getName; end + + # Returns the owning Session for this +Receiver+. + def session; @session; end + + private + + def create_message_wrapper message_impl # :nodoc: + Qpid::Messaging::Message.new(:impl => message_impl) + end + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/sender.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/sender.rb new file mode 100644 index 0000000000..4ce1393dc7 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/sender.rb @@ -0,0 +1,135 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # +Sender+ is the entity through which messages are sent. + # + # An instance of +Sender+ can only be created using an active (not previously + # closed) Session. See Qpid::Messaging::Session.create_sender for more details. + # + # ==== Examples + # + # # create a connection + # conn = Qpid::Messaging::Connection.new "mybroker:5672" + # conn.open + # + # if conn.open? + # + # # create a session + # session = conn.create_session + # + # # create a sender that posts messages to the "updates" queue + # sender = session.create_sender "updates;{create:always} + # + # # begin sending updates + # loop do + # # wait for the next event content then send it + # content = wait_for_event + # sender.send Qpid::Messaging::Message.new :content => content + # end + # end + # + class Sender + + def initialize(session, sender_impl) # :nodoc: + @session = session + @sender_impl = sender_impl + end + + def sender_impl # :nodoc: + @sender_impl + end + + # Sends a message, optionally blocking until the message is received + # by the broker. + # + # ==== Options + # + # * +message+ - The message to send. + # * +:sync+ - Block until received. See note below on synching. + # + # ==== Synching + # + # If :sync => true, then the call will block until the broker confirms + # receipt of the message. Otherwise it will only block for available + # capacity; i.e., until pending is equal to capacity. + # + # ==== Examples + # + # # send a message + # outgoing = Qpid::Messaging::Message.new :content => content + # sender.send outgoing + # + # # send a message, wait for confirmation from the broker + # outgoing = Qpid::Messaging::Message.new :content => content + # sender.send outgoing, :sync => true + # + def send(message, args = {}, &block) + sync = args[:sync] || false + @sender_impl.send message.message_impl, sync + block.call message unless block.nil? + end + + # Closes this +Sender+. + # + # This does not affect the owning Session or Connection. + def close; @sender_impl.close; end + + # Returns the human-readable name for this +Sender+. + def name; @sender_impl.getName; end + + # Sets the capacity for this +Sender+. + # + # The capacity is the number of outgoing messages that can be held + # pending confirmation of receipt by the broker. + # + # ==== Options + # + # * +capacity+ - the capacity + def capacity=(capacity); @sender_impl.setCapacity capacity; end + + # Returns the capacity. + def capacity; @sender_impl.getCapacity; end + + # Returns the number of messages sent that are pending receipt + # confirmation by the broker. + def unsettled; @sender_impl.getUnsettled; end + + # Returns the available slots for sending messages. + # + # This differs from +capacity+ in that it is the available slots in + # the senders capacity for holding outgoing messages. The difference + # between capacity and available is the number of messages that + # have not been delivered yet. + def available + @sender_impl.getAvailable + end + + # Returns the Session for this sender. + def session; @session; end + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/session.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/session.rb new file mode 100644 index 0000000000..7e6e11f654 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/session.rb @@ -0,0 +1,264 @@ +#-- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +#++ + +module Qpid + + module Messaging + + # A +Session+ represents a distinct conversation between end points. They are + # created from an active (i.e., not closed) Connection. + # + # A +Session+ is used to acknowledge individual or all messages that have + # passed through it + class Session + + def initialize(connection, session) # :nodoc: + @connection = connection + @session_impl = session + end + + def session_impl # :nodoc: + @session_impl + end + + # Returns the Connection associated with this session. + def connection + @connection + end + + # Creates a new endpoint for sending messages. + # + # The address can either be an instance Address or else an + # address string. + # + # ==== Arguments + # + # * +address+ - the end point address. + def create_sender(address) + _address = address + + if address.class == Qpid::Messaging::Address + _address = address.address_impl + end + + sender_impl = @session_impl.createSender(_address) + sender_name = sender_impl.getName + + Qpid::Messaging::Sender.new(self, sender_impl) + end + + # Retrieves the Sender with the specified name. + # + # Raises an exception if no such Sender exists. + # + # ==== Arguments + # + # * +name+ - the name of the Sender + def sender(name) + Qpid::Messaging::Sender.new self, @session_impl.getSender(name) + end + + # Creates a new endpoint for receiving messages. + # + # The +address+ can either be an instance Address or else an + # address string. + # + # ==== Arguments + # + # * +address+ - the end point address. + def create_receiver(address) + result = nil + receiver_impl = nil + + if address.class == Qpid::Messaging::Address + address_impl = address.address_impl + receiver_impl = @session_impl.createReceiver address_impl + else + receiver_impl = @session_impl.createReceiver(address) + end + + Qpid::Messaging::Receiver.new self, receiver_impl + end + + # Retrieves the +Receiver+ with the specified name, or nil if no such + # Receiver exists. + # + # ==== Arguments + # + # * +name+ - the name of the Receiver + def receiver(name) + Qpid::Messaging::Receiver.new self, @session_impl.getReceiver(name) + end + + # Closes the +Session+ and all associated +Sender+ and +Receiver+ instances. + # + # *NOTE:* All +Session+ instances for a Connection are closed when the + # Connection is closed. But closing a +Session+ does not affect the + # owning Connection. + def close; @session_impl.close; end + + # Commits any pending transactions for a transactional session. + def commit; @session_impl.commit; end + + # Rolls back any uncommitted transactions on a transactional session. + def rollback; @session_impl.rollback; end + + # Acknowledges one or more outstanding messages that have been received + # on this session. + # + # ==== Arguments + # + # * +options+ - the set of options + # + # ==== Options + # + # * :message - if specified, then only that Message is acknowledged + # * :sync - if true, the call will block until processed by the broker + # + # ==== Examples + # + # # acknowledge all received messages + # session.acknowledge + # + # # acknowledge a single message + # session.acknowledge :message => message + # + # # acknowledge all messages, wait until the call finishes + # session.acknowledge :sync => true + # + #-- + # TODO: Add an optional block to be used for blocking calls. + #++ + def acknowledge(options = {}) + sync = options[:sync] || false + message = options[:message] if options[:message] + + unless message.nil? + @session_impl.acknowledge message.message_impl, sync + else + @session_impl.acknowledge sync + end + end + + # Rejects the specified message. A rejected message will not be + # redelivered. + # + # NOTE: A message cannot be rejected once it has been acknowledged. + def reject(message); @session_impl.reject message.message_impl; end + + # Releases the message, which allows the broker to attempt to + # redeliver it. + # + # NOTE: A message connot be released once it has been acknowled. + def release(message); @session_impl.release message.message_impl; end + + # Requests synchronization with the broker. + # + # ==== Arguments + # + # * +options+ - the list of options + # + # ==== Options + # + # * +:block+ - if true, the call blocks until the broker acknowledges it + # + #-- + # TODO: Add an optional block to be used for blocking calls. + #++ + def sync(args = {}) + block = args[:block] || false + @session_impl.sync block + end + + # Returns the total number of receivable messages, and messages already + # received, by Receiver instances associated with this +Session+. + def receivable; @session_impl.getReceivable; end + + # Returns the number of messages that have been acknowledged by this + # +Session+ whose acknowledgements have not been confirmed as processed + # by the broker. + def unsettled_acks; @session_impl.getUnsettledAcks; end + + # Fetches the next Receiver with a message pending. Waits the specified + # number of milliseconds before timing out. + # + # For a Receiver to be returned, it must have a capacity > 0 and have + # Messages locally queued. + # + # If no Receiver is found within the time out period, then a MessageError + # is raised. + # + # ==== Arguments + # + # * +timeout+ - the duration + # + # ==== Examples + # + # loop do + # + # begin + # # wait a maximum of one minute for the next receiver to be ready + # recv = session.next_receiver Qpid::Messaging::Duration::MINUTE + # + # # get and dispatch the message + # msg = recv.get + # dispatch_message msg + # + # rescue + # puts "No receivers were returned" + # end + # + # end + def next_receiver(timeout = Qpid::Messaging::Duration::FOREVER, &block) + receiver_impl = @session_impl.nextReceiver(timeout.duration_impl) + + unless receiver_impl.nil? + recv = Qpid::Messaging::Receiver.new self, receiver_impl + block.call recv unless block.nil? + end + + return recv + end + + # Returns true if there were exceptions on this session. + def errors?; @session_impl.hasError; end + + # If the +Session+ has been rendered invalid due to some exception, + # this method will result in that exception being raised. + # + # If none have occurred, then no exceptions are raised. + # + # ==== Examples + # + # # show any errors that occurred during the Session + # if @session.errors? + # begin + # @session.errors + # rescue Exception => error + # puts "An error occurred: #{error}" + # end + # end + def errors; @session_impl.checkError; end + + end + + end + +end + diff --git a/qpid/cpp/bindings/qpid/ruby/qpid_messaging.gemspec b/qpid/cpp/bindings/qpid/ruby/qpid_messaging.gemspec new file mode 100644 index 0000000000..fe22f821d3 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/qpid_messaging.gemspec @@ -0,0 +1,46 @@ +# -*- encoding: utf-8 -*- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +lib = File.expand_path('lib/', __FILE__) +$:.unshift lib unless $:.include?(lib) + +# Generate the Swig wrapper +system "swig -ruby -c++ -I../../../include -I../../ -o ext/cqpid/cqpid.cpp ruby.i" + +Gem::Specification.new do |s| + s.name = "qpid_messaging" + s.version = "0.22.0" + s.platform = Gem::Platform::RUBY + s.authors = "Apache Qpid Project" + s.email = "dev@qpid.apache.org" + s.homepage = "http://qpid.apache.org" + s.summary = "Qpid is an enterprise messaging framework." + s.description = s.summary + + s.extensions = "ext/cqpid/extconf.rb" + s.files = Dir["LICENSE", + "ChangeLog", + "README.rdoc", + "TODO", + "lib/**/*.rb", + "ext/**/*", + "examples/**/*.rb" + ] + s.require_path = 'lib' +end + diff --git a/qpid/cpp/bindings/qpid/ruby/ruby.i b/qpid/cpp/bindings/qpid/ruby/ruby.i new file mode 100644 index 0000000000..30384aad9f --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/ruby.i @@ -0,0 +1,125 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +%module cqpid +/* Ruby doesn't have a != operator*/ +#pragma SWIG nowarn=378 +%include "std_string.i" +%include "qpid/swig_ruby_typemaps.i" + +/* Define the general-purpose exception handling */ +%exception { + + static VALUE eMessagingError = rb_define_class("MessagingError", + rb_eStandardError); + + try { + $action + } + catch(qpid::messaging::ConnectionError& error) { + static VALUE merror = rb_define_class("ConnectionError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::TransportFailure& error) { + static VALUE merror = rb_define_class("TransportFailure", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::TransactionAborted& error) { + static VALUE merror = rb_define_class("TransactionAborted", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::TransactionUnknown& error) { + static VALUE merror = rb_define_class("TransactionUnknown", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::TransactionError& error) { + static VALUE merror = rb_define_class("TransactionError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::UnauthorizedAccess& error) { + static VALUE merror = rb_define_class("UnauthorizedAccess", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::SessionError& error) { + static VALUE merror = rb_define_class("SessionError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::TargetCapacityExceeded& error) { + static VALUE merror = rb_define_class("TargetCapacityExceeded", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::SendError& error) { + static VALUE merror = rb_define_class("SendError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::SenderError& error) { + static VALUE merror = rb_define_class("SenderError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::NoMessageAvailable& error) { + static VALUE merror = rb_define_class("NoMessageAvailable", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::FetchError& error) { + static VALUE merror = rb_define_class("FetchError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::ReceiverError& error) { + static VALUE merror = rb_define_class("ReceiverError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::InvalidOptionString& error) { + static VALUE merror = rb_define_class("InvalidOptionString", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::KeyError& error) { + static VALUE merror = rb_define_class("KeyError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::AssertionFailed& error) { + static VALUE merror = rb_define_class("AssertionFailed", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::NotFound& error) { + static VALUE merror = rb_define_class("NotFound", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::ResolutionError& error) { + static VALUE merror = rb_define_class("ResolutionError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::MalformedAddress& error) { + static VALUE merror = rb_define_class("MalformedAddress", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::AddressError& error) { + static VALUE merror = rb_define_class("AddressError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::LinkError& error) { + static VALUE merror = rb_define_class("LinkError", eMessagingError); + rb_raise(merror, "%s", error.what()); + } + catch(qpid::messaging::MessagingException& error) { + rb_raise(eMessagingError, "%s", error.what()); + } +} + +%include "qpid/qpid.i" + diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/address_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/address_spec.rb new file mode 100644 index 0000000000..05c97ddf30 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/address_spec.rb @@ -0,0 +1,87 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe Address do + + before(:each) do + @address = Qpid::Messaging::Address.new "my-name/my-subject;{create:always}" + end + + it "stores the name, subject and options when created" do + name = @address.name + subject = @address.subject + create = @address.options["create"] + + name.should == "my-name" + subject.should == "my-subject" + create.should == "always" + end + + it "can update the name" do + @address.name = "new-name" + + name = @address.name + + name.should == "new-name" + end + + it "can update the subject" do + @address.subject = "new-subject" + + subject = @address.subject + + subject.should == "new-subject" + end + + it "can update the type" do + @address.address_type = "routed" + + type = @address.address_type + + type.should == "routed" + end + + it "can update the options" do + @address.options[:create] = :never + + create = @address.options["create"] + + create.should == "always" + end + + it "can return a string representation" do + address = Qpid::Messaging::Address.new "foo/bar:{create:always,link:durable}" + result = address.to_s + + result.should =~ /foo\/bar/ + result.should =~ /create:always/ + result.should =~ /link:durable/ + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/connection_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/connection_spec.rb new file mode 100644 index 0000000000..50038a0fc0 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/connection_spec.rb @@ -0,0 +1,191 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe Connection do + + before(:each) do + @session_impl = double('Cqpid::Session') + @connection_impl = double('Cqpid::Connection') + + @connection = Qpid::Messaging::Connection.new :impl => @connection_impl + end + + it "accepts options on construction" do + expect { + connection = Qpid::Messaging::Connection.new :options => {:username => "foo"} + + connection.options.should include("username") + }.to_not raise_error + end + + it "returns the underlying implementation" do + impl = @connection.connection_impl + + impl.should == @connection_impl + end + + it "opens the connection" do + @connection_impl.should_receive(:open) + + @connection.open + end + + it "closes the connection" do + @connection_impl.should_receive(:close) + + @connection.close + end + + it "retrieves a session by name" do + @connection_impl.should_receive(:getSession). + with("farkle"). + and_return(@session_impl) + + session = @connection.session "farkle" + + session.session_impl.should == @session_impl + end + + it "raises an error when a session name is invalid" do + @connection_impl.should_receive(:getSession). + with("farkle"). + and_raise(RuntimeError) + + expect { + @connection.session "farkle" + }.to raise_error + end + + #################################################################### + # test conditions for when a connection is not connected to a broker + #################################################################### + describe "when closed" do + + before(:each) do + @connection_impl.should_receive(:isOpen). + and_return(false) + end + + it "returns false when not connected to a broker" do + open = @connection.open? + + open.should == false + end + + it "should raise an error when creating a session on a closed connection" do + expect { + @connection.create_session + }.to raise_error(RuntimeError) + end + + it "raises an error when creating a transactional session on a closed connection" do + expect { + @connection.create_session :transactional => true + }.to raise_error(RuntimeError) + end + + it "raises an error when creating a named session on a closed connection" do + expect { + @connection.create_session :name => "test", :transactional => true + }.to raise_error(RuntimeError) + end + + it "returns a null username when not connected" do + username = @connection.authenticated_username + + username.should be_nil + end + + end + + ######################################################### + # test conditions for when a connection must be connected + ######################################################### + describe "when connected" do + + before(:each) do + @connection_impl.should_receive(:isOpen). + and_return(true) + end + + it "returns true when connected to a broker" do + open = @connection.open? + + open.should == true + end + + it "creates a session" do + @connection_impl.should_receive(:createSession). + and_return(@session_impl) + + session = @connection.create_session + + session.session_impl.should == @session_impl + end + + it "creates a named session with a name when provided" do + @connection_impl.should_receive(:createSession).with("farkle"). + and_return(@session_impl) + + session = @connection.create_session :name => "farkle" + + session.session_impl.should == @session_impl + end + + it "creates a transactional session when specified" do + @connection_impl.should_receive(:createTransactionalSession). + and_return(@session_impl) + + session = @connection.create_session :transactional => true + + session.session_impl.should == @session_impl + end + + it "creates a named transactional session when specified" do + @connection_impl.should_receive(:createTransactionalSession). + with("farkle"). + and_return(@session_impl) + + session = @connection.create_session :transactional => true, :name => "farkle" + + session.session_impl.should == @session_impl + end + + it "returns the authenticated username when connected" do + @connection_impl.should_receive(:getAuthenticatedUsername). + and_return("mcpierce") + + username = @connection.authenticated_username + + username.should == "mcpierce" + end + + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/duration_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/duration_spec.rb new file mode 100644 index 0000000000..202332d232 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/duration_spec.rb @@ -0,0 +1,83 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe Duration do + + before(:each) do + @duration = Qpid::Messaging::Duration::SECOND + end + + it "returns the underlying implementation" do + impl = @duration.duration_impl + + impl.should_not be_nil + end + + it "can create a duration with a millisecond value" do + duration = Qpid::Messaging::Duration.new 500 + + milliseconds = duration.milliseconds + + milliseconds.should == 500 + end + + it "returns the time in milliseconds" do + milliseconds = @duration.milliseconds + + milliseconds.should == 1000 + end + + it "raises an error when multiplied by a negative" do + expect { + twomin = Qpid::Messaging::Duration::MINUTE * -2 + }.to raise_error + end + + it "returns IMMEDIATE if the factor is zero" do + result = Qpid::Messaging::Duration::MINUTE * 0 + result.should be(Qpid::Messaging::Duration::IMMEDIATE) + end + + it "fractional factors return a reduced duration" do + factor = rand(1) + first = Qpid::Messaging::Duration::MINUTE + second = first * factor + + second.milliseconds.should == ((first.milliseconds * factor).floor) + end + + it "can return a multiple of its duration" do + factor = rand(10).floor + first = Qpid::Messaging::Duration.new(rand(10).floor * 10000) + second = first * factor + + second.milliseconds.should == first.milliseconds * factor + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/encoding_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/encoding_spec.rb new file mode 100644 index 0000000000..58b8447278 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/encoding_spec.rb @@ -0,0 +1,63 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe "encoding" do + end + + describe "decoding" do + + before(:each) do + @message = Qpid::Messaging::Message.new + end + + it "can decode a message's text content" do + @message.content = "This is an unencoded message." + + content = Qpid::Messaging.decode @message + + content.should == "This is an unencoded message." + end + + it "can decode a message's list content" do + @message.content = ["this", "that"] + + content = Qpid::Messaging.decode @message + + content.should == ["this", "that"] + end + + it "can decode a message's map content" do + @message.content = {"this" => "that"} + + content = Qpid::Messaging.decode @message + + content.should == {"this" => "that"} + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb new file mode 100644 index 0000000000..3581174548 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/message_spec.rb @@ -0,0 +1,335 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe Message do + + before(:each) do + @message = Qpid::Messaging::Message.new :content => "My content" + end + + it "returns its implementation" do + impl = @message.message_impl + + impl.class.should == Cqpid::Message + end + + it "can set the reply to address" do + address = Qpid::Messaging::Address.new "my-queue;{create:always}" + + @message.reply_to = address + + reply_to = @message.reply_to + + reply_to.name.should == address.name + end + + it "can set the reply to from an address string" do + name = "my-queue" + subject = "responses" + address = "#{name}/#{subject}" + + @message.reply_to = address + + reply_to = @message.reply_to + + reply_to.name.should == name + reply_to.subject.should == subject + end + + it "should store the content when created" do + content = @message.content + + content.should == "My content" + end + + it "should store and retrieve string content properly" do + content = random_string(64) + + @message.content_object = content + @message.content_object.should == content + end + + it "should store and retrieve numeric content properly" do + content = rand(65536) + + @message.content_object = content + @message.content_object.should == content + end + + it "should store and retrieve map content properly" do + content = {} + (1..rand(128)).each { content["#{random_string(64)}"] = "#{random_string(64)}" } + + @message.content = content + @message.content.should eq content + end + + it "should store and retrieve list content properly" do + content = [] + (1..rand(128)).each { content << "#{random_string(64)}" } + + @message.content = content + @message.content.should eq content + end + + it "should properly encode a map when created" do + message = Qpid::Messaging::Message.new :content => {"foo" => "bar"} + + content = message.content + content_type = message.content_type + + content_type.should == "amqp/map" + content.class == Hash + content["foo"].should == "bar" + end + + it "should properly encode a list when created" do + message = Qpid::Messaging::Message.new :content => ["foo", "bar"] + + content = message.content + content_type = message.content_type + + content_type.should == "amqp/list" + content.class == Array + content.should include("foo") + content.should include("bar") + end + + it "should store the subject" do + @message.subject = "new-subject" + + subject = @message.subject + + subject.should == "new-subject" + end + + it "should update the content type" do + @message.content_type = "amqp/audio" + + content_type = @message.content_type + + content_type.should == "amqp/audio" + end + + it "should store the message id" do + @message.message_id = "foo" + + id = @message.message_id + + id.should == "foo" + end + + it "should store the user id" do + @message.user_id = "foo" + + id = @message.user_id + + id.should == "foo" + end + + it "should store the correlation id" do + @message.correlation_id = "message1" + + id = @message.correlation_id + + id.should == "message1" + end + + it "should store the priority" do + @message.priority = 7 + + priority = @message.priority + + priority.should == 7 + end + + it "should accept a Duration as the time to live" do + @message.ttl = Qpid::Messaging::Duration::SECOND + + ttl = @message.ttl + + ttl.milliseconds.should == Qpid::Messaging::Duration::SECOND.milliseconds + end + + it "should accept an integer value as the time to live" do + @message.ttl = 15000 + + ttl = @message.ttl + + ttl.milliseconds.should == 15000 + end + + it "should update the durable flag" do + @message.durable = true + + durable = @message.durable + + durable.should == true + end + + it "should update the redelivered flag" do + @message.redelivered = true + + redelivered = @message.redelivered + + redelivered.should == true + end + + it "should store a property" do + property = @message[:test_property] + + property.should == nil + + @message[:test_property] = "test_value1" + + property = @message[:test_property] + + property.should == "test_value1" + end + + it "should convert a symbol property value to a string" do + @message[:test_property] = :test_value2 + + property = @message[:test_property] + + property.should == "test_value2" + end + + it "should convert a symbol property name to a string" do + @message[:test_property] = "test_value3" + + property = @message["test_property"] + + property.should == "test_value3" + end + + it "should store text content" do + @message.content = "This is the content." + + content = @message.content + + content.should == "This is the content." + end + + it "should store list content" do + list = ["foo", "bar"] + + @message.content = list + + content = @message.content + content_type = @message.content_type + + content.should == list + content_type.should == "amqp/list" + end + + it "should convert symbol list elements to strings" do + @message.content = [:farkle] + + content = @message.content.first + + content.should == "farkle" + end + + it "should store map content" do + map = {"foo" => "bar"} + + @message.content = map + + content = @message.content + content_type = @message.content_type + + content.should == map + content_type.should == "amqp/map" + end + + it "should convert symbol map elements to strings" do + @message.content = {:first_name => :qpid} + + content = @message.content["first_name"] + + content.should == "qpid" + end + + describe "with content from the underlying implementation" do + + before(:each) do + @message_impl = double("Cqpid::Message") + @message = Qpid::Messaging::Message.new :impl => @message_impl + end + + it "should return simple text content" do + @message_impl.should_receive(:getContent). + and_return("my content") + @message_impl.should_receive(:getContentType). + and_return("") + + content = @message.content + + content.should == "my content" + end + + it "should decode a list" do + list = ["first", "second"] + + @message_impl.should_receive(:getContent). + and_return(list) + @message_impl.should_receive(:getContentType). + twice. + and_return("amqp/list") + Qpid::Messaging.stub!(:decode). + with(@message, "amqp/list"). + and_return(list) + + content = @message.content + + content.should == list + end + + it "should decode a map" do + map = {"first" => "second"} + + @message_impl.should_receive(:getContent). + and_return(map) + @message_impl.should_receive(:getContentType). + twice. + and_return("amqp/map") + Qpid::Messaging.stub!(:decode). + with(@message, "amqp/map"). + and_return(map) + + content = @message.content + + content.should == map + end + + + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/receiver_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/receiver_spec.rb new file mode 100644 index 0000000000..81ae935dcb --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/receiver_spec.rb @@ -0,0 +1,170 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe Receiver do + + before(:each) do + @message_impl = double("Cqpid::Message") + @session = double("Qpid::Messaging::Session") + @receiver_impl = double("Cqpid::Receiver") + + @receiver = Qpid::Messaging::Receiver.new @session, @receiver_impl + end + + it "returns the underlying implementation" do + impl = @receiver.receiver_impl + + impl.should == @receiver_impl + end + + it "gets a message with the default duration" do + @receiver_impl.should_receive(:get). + with(Qpid::Messaging::Duration::FOREVER.duration_impl). + and_return(@message_impl) + + message = @receiver.get + + message.message_impl.should == @message_impl + end + + it "gets a message with a specified duration" do + @receiver_impl.should_receive(:get). + with(Qpid::Messaging::Duration::SECOND.duration_impl). + and_return(@message_impl) + + message = @receiver.get Qpid::Messaging::Duration::SECOND + + message.message_impl.should == @message_impl + end + + it "returns nil when get receives no message" do + @receiver_impl.should_receive(:get). + with(Qpid::Messaging::Duration::MINUTE.duration_impl). + and_return(nil) + + message = @receiver.get Qpid::Messaging::Duration::MINUTE + + message.should be_nil + end + + it "fetches a message with the default duration" do + @receiver_impl.should_receive(:fetch). + with(Qpid::Messaging::Duration::FOREVER.duration_impl). + and_return(@message_impl) + + message = @receiver.fetch + + message.message_impl.should == @message_impl + end + + it "fetches a message with a specified duration" do + @receiver_impl.should_receive(:fetch). + with(Qpid::Messaging::Duration::SECOND.duration_impl). + and_return(@message_impl) + + message = @receiver.fetch Qpid::Messaging::Duration::SECOND + + message.message_impl.should == @message_impl + end + + it "returns nil when fetch recieves no message" do + @receiver_impl.should_receive(:fetch). + with(Qpid::Messaging::Duration::MINUTE.duration_impl). + and_return(nil) + + message = @receiver.fetch Qpid::Messaging::Duration::MINUTE + + message.should be_nil + end + + it "assigns capacity" do + @receiver_impl.should_receive(:setCapacity). + with(10) + + @receiver.capacity = 10 + end + + it "returns the capacity" do + @receiver_impl.should_receive(:getCapacity). + and_return(10) + + capacity = @receiver.capacity + + capacity.should == 10 + end + + it "reports the number of available messages" do + @receiver_impl.should_receive(:getAvailable). + and_return(20) + + available = @receiver.available + + available.should == 20 + end + + it "reports the number of unsettled messages" do + @receiver_impl.should_receive(:getUnsettled). + and_return(25) + + unsettled = @receiver.unsettled + + unsettled.should == 25 + end + + it "closes" do + @receiver_impl.should_receive(:close) + + @receiver.close + end + + it "reports its closed status" do + @receiver_impl.should_receive(:isClosed). + and_return(true) + + closed = @receiver.closed? + + closed.should == true + end + + it "returns its name" do + @receiver_impl.should_receive(:getName). + and_return("farkle") + + name = @receiver.name + + name.should == "farkle" + end + + it "returns its related session" do + session = @receiver.session + + session.should == @session + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/sender_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/sender_spec.rb new file mode 100644 index 0000000000..fa3a2a5b1f --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/sender_spec.rb @@ -0,0 +1,135 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe Sender do + + before(:each) do + @message = double("Qpid::Messaging::Message") + @message_impl = double("Cqpid::Message") + @sender_impl = double("Cqpid::Sender") + @session = double("Qpid::Messaging::Session") + + @sender = Qpid::Messaging::Sender.new @session, @sender_impl + end + + it "returns its implementation" do + impl = @sender.sender_impl + + impl.should == @sender_impl + end + + it "sends a message" do + @message.should_receive(:message_impl). + and_return(@message_impl) + @sender_impl.should_receive(:send). + with(@message_impl, false) + + @sender.send @message + end + + it "sends a message with optional synch" do + @message.should_receive(:message_impl). + and_return(@message_impl) + @sender_impl.should_receive(:send). + with(@message_impl, true) + + @sender.send @message, :sync => true + end + + it "sends a message with an optional block" do + block_called = false + + @message.should_receive(:message_impl). + and_return(@message_impl) + @sender_impl.should_receive(:send). + with(@message_impl, false) + + @sender.send @message do |message| + block_called = true if message == @message + end + + block_called.should be_true + end + + it "closes" do + @sender_impl.should_receive(:close) + + @sender.close + end + + it "returns its name" do + @sender_impl.should_receive(:getName). + and_return("farkle") + + name = @sender.name + + name.should == "farkle" + end + + it "sets its capacity" do + @sender_impl.should_receive(:setCapacity). + with(100) + + @sender.capacity = 100 + end + + it "returns its capacity" do + @sender_impl.should_receive(:getCapacity). + and_return(25) + + capacity = @sender.capacity + + capacity.should == 25 + end + + it "returns the number of unsettled messages" do + @sender_impl.should_receive(:getUnsettled). + and_return(15) + + unsettled = @sender.unsettled + + unsettled.should == 15 + end + + it "returns the number of available message slots" do + @sender_impl.should_receive(:getAvailable). + and_return(50) + + available = @sender.available + + available.should == 50 + end + + it "returns a reference to its session" do + session = @sender.session + + session.should == @session + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/session_spec.rb b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/session_spec.rb new file mode 100644 index 0000000000..cb1e94a72f --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/qpid_messaging/session_spec.rb @@ -0,0 +1,353 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'spec_helper' + +module Qpid + + module Messaging + + describe Session do + + before(:each) do + @connection = double("Qpid::Messaging::Connection") + @session_impl = double("Cqpid::Session") + @session = Qpid::Messaging::Session.new @connection, @session_impl + @sender_impl = double("Cqpid::Sender") + @receiver_impl = double("Cqpid::Receiver") + end + + it "returns its implementation" do + impl = @session.session_impl + + impl.should == @session_impl + end + + it "returns its connection" do + connection = @session.connection + + connection.should == @connection + end + + it "creates a Sender from an Address" do + address = Qpid::Messaging::Address.new "my-queue;{create:always}" + + @session_impl.should_receive(:createSender). + with(address.address_impl). + and_return(@sender_impl) + @sender_impl.should_receive(:getName). + and_return("my-queue") + + sender = @session.create_sender address + + sender.sender_impl.should == @sender_impl + end + + it "creates a Sender from an address string" do + address = "my-queue;{create:true}" + + @session_impl.should_receive(:createSender). + with(address). + and_return(@sender_impl) + @sender_impl.should_receive(:getName). + and_return("my-queue") + + sender = @session.create_sender address + + sender.sender_impl.should == @sender_impl + end + + ####################################### + # scenarios involing an existing Sender + ####################################### + describe "when retrieving a Sender by name" do + + before(:each) do + address = "my-queue;{create:always}" + @name = "my-queue" + + @session_impl.should_receive(:createSender). + with(address). + and_return(@sender_impl) + @sender_impl.should_receive(:getName). + and_return(@name) + + @sender = @session.create_sender address + end + + it "works when the name is valid" do + sender = @session.sender @name + + sender.should == @sender + end + + it "raises an error when the name is invalid" do + expect { + @session.sender @name.reverse + }.to raise_error + end + + end + + it "creates a Receiver from an Address" do + address = Qpid::Messaging::Address.new "my-queue", "" + + @session_impl.should_receive(:createReceiver). + with(address.address_impl). + and_return(@receiver_impl) + @receiver_impl.should_receive(:getName). + and_return("my-queue") + + receiver = @session.create_receiver address + + receiver.receiver_impl.should == @receiver_impl + end + + it "creates a Receiver from an address string" do + address = "my-queue" + + @session_impl.should_receive(:createReceiver). + with(address). + and_return(@receiver_impl) + @receiver_impl.should_receive(:getName). + and_return("my-queue") + + receiver = @session.create_receiver address + + receiver.receiver_impl.should == @receiver_impl + end + + ######################################### + # scenarios involving an existing Receiver + ########################################## + describe "when retrieving a Receiver by name" do + + before(:each) do + address = "my-queue" + @name = "my-queue" + + @session_impl.should_receive(:createReceiver). + with(address). + and_return(@receiver_impl) + @receiver_impl.should_receive(:getName). + and_return(@name) + + @receiver = @session.create_receiver address + end + + it "works with a valid name" do + receiver = @session.receiver @name + + receiver.should == @receiver + end + + it "raises an error when the name is invalid" do + expect { + @session.receiver @name.reverse + }.to raise_error + end + + end + + it "closes the session" do + @session_impl.should_receive(:close) + + @session.close + end + + it "commits a pending transaction" do + @session_impl.should_receive(:commit) + + @session.commit + end + + it "rolls back an uncommitted transaction" do + @session_impl.should_receive(:rollback) + + @session.rollback + end + + it "acknowledges all received messages" do + @session_impl.should_receive(:acknowledge). + with(false) + + @session.acknowledge + end + + it "acknowledges all messages synchronously" do + @session_impl.should_receive(:acknowledge). + with(true) + + @session.acknowledge :sync => true + end + + it "acknowledges all messages asynchronously" do + @session_impl.should_receive(:acknowledge). + with(false) + + @session.acknowledge :sync => false + end + + ###################################### + # Scenarios involving a single message + ###################################### + describe "with a single message" do + + before(:each) do + @message = Qpid::Messaging::Message.new :content => "Testing" + end + + it "can acknowledge asynchronously by default" do + @session_impl.should_receive(:acknowledge). + with(@message.message_impl, false) + + @session.acknowledge :message => @message + end + + it "can acknowledge synchronously" do + @session_impl.should_receive(:acknowledge). + with(@message.message_impl, true) + + @session.acknowledge :message => @message, :sync => true + end + + it "can acknowledge asynchronously" do + @session_impl.should_receive(:acknowledge). + with(@message.message_impl, false) + + @session.acknowledge :message => @message, :sync => false + end + + it "can reject it" do + @session_impl.should_receive(:reject). + with(@message.message_impl) + + @session.reject @message + end + + it "can release it" do + @session_impl.should_receive(:release). + with(@message.message_impl) + + @session.release @message + end + + end + + it "does not block by default when synchronizating with the broker" do + @session_impl.should_receive(:sync). + with(false) + + @session.sync + end + + it "can block while synchronizing with the broker" do + @session_impl.should_receive(:sync). + with(true) + + @session.sync :block => true + end + + it "can not block while synchronizing with the broker" do + @session_impl.should_receive(:sync). + with(false) + + @session.sync :block => false + end + + it "returns the number of messages that are receivable" do + @session_impl.should_receive(:getReceivable). + and_return(15) + + receivable = @session.receivable + + receivable.should == 15 + end + + it "returns the number of unsettled messages" do + @session_impl.should_receive(:getUnsettledAcks). + and_return(25) + + unsettled = @session.unsettled_acks + + unsettled.should == 25 + end + + it "waits forever by default for the next Receiver with messages" do + @session_impl.should_receive(:nextReceiver). + with(Qpid::Messaging::Duration::FOREVER.duration_impl). + and_return(@receiver_impl) + + receiver = @session.next_receiver + + receiver.receiver_impl.should == @receiver_impl + end + + it "uses the specified time when waiting for the next Receiver with messages" do + @session_impl.should_receive(:nextReceiver). + with(Qpid::Messaging::Duration::SECOND.duration_impl). + and_return(@receiver_impl) + + receiver = @session.next_receiver Qpid::Messaging::Duration::SECOND + + receiver.receiver_impl.should == @receiver_impl + end + + it "returns nil when no Receiver has messages within the timeout period" do + @session_impl.should_receive(:nextReceiver). + with(Qpid::Messaging::Duration::MINUTE.duration_impl). + and_return(nil) + + receiver = @session.next_receiver Qpid::Messaging::Duration::MINUTE + + receiver.should be_nil + end + + it "returns true when there are errors on the session" do + @session_impl.should_receive(:hasError). + and_return(true) + + errors = @session.errors? + + errors.should be_true + end + + it "returns false when there are no errors on the session" do + @session_impl.should_receive(:hasError). + and_return(false) + + errors = @session.errors? + + errors.should be_false + end + + it "causes exceptions to be raised when there are errors" do + @session_impl.should_receive(:checkError). + and_raise(RuntimeError) + + expect { + @session.errors + }.to raise_error(RuntimeError) + end + + end + + end + +end diff --git a/qpid/cpp/bindings/qpid/ruby/spec/spec_helper.rb b/qpid/cpp/bindings/qpid/ruby/spec/spec_helper.rb new file mode 100644 index 0000000000..cf1b3b25f9 --- /dev/null +++ b/qpid/cpp/bindings/qpid/ruby/spec/spec_helper.rb @@ -0,0 +1,26 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +require 'qpid_messaging' + +# Generates a random string of the specified length +def random_string(length = 8) + (0...length).map{65.+(rand(25)).chr}.join +end + |