You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by gr...@apache.org on 2010/09/17 15:53:28 UTC
svn commit: r998135 [1/2] - in /incubator/etch/trunk: ./ examples/
examples/helloworld/ examples/helloworld/src/ examples/helloworld/src/main/
examples/helloworld/src/main/c/ examples/helloworld/src/main/csharp/
examples/helloworld/src/main/csharp/Hell...
Author: grandyho
Date: Fri Sep 17 13:53:26 2010
New Revision: 998135
URL: http://svn.apache.org/viewvc?rev=998135&view=rev
Log:
overhauled the helloworld example. current implementation works for Java and C#. C sources get generated too, but build is not yet integrated. (the latter will be done when the c binding itself will be built using cmake).
Added:
incubator/etch/trunk/examples/helloworld/README.txt
incubator/etch/trunk/examples/helloworld/build.xml
incubator/etch/trunk/examples/helloworld/dist-build.xml
incubator/etch/trunk/examples/helloworld/src/
incubator/etch/trunk/examples/helloworld/src/main/
incubator/etch/trunk/examples/helloworld/src/main/c/
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.c
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.h
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_implx.c
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.c
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.h
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.c
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.h
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.c
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.h
incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_implx.c
incubator/etch/trunk/examples/helloworld/src/main/csharp/
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/HelloWorldClientProj.csproj
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/Properties/
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/Properties/AssemblyInfo.cs
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/HelloWorldListenerProj.csproj
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/Properties/
incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/Properties/AssemblyInfo.cs
incubator/etch/trunk/examples/helloworld/src/main/csharp/org.apache.etch.examples.helloworld/
incubator/etch/trunk/examples/helloworld/src/main/csharp/org.apache.etch.examples.helloworld/ImplHelloWorldClient.cs
incubator/etch/trunk/examples/helloworld/src/main/csharp/org.apache.etch.examples.helloworld/ImplHelloWorldServer.cs
incubator/etch/trunk/examples/helloworld/src/main/csharp/org.apache.etch.examples.helloworld/MainHelloWorldClient.cs
incubator/etch/trunk/examples/helloworld/src/main/csharp/org.apache.etch.examples.helloworld/MainHelloWorldListener.cs
incubator/etch/trunk/examples/helloworld/src/main/etch/
incubator/etch/trunk/examples/helloworld/src/main/etch/HelloWorld.etch
incubator/etch/trunk/examples/helloworld/src/main/java/
incubator/etch/trunk/examples/helloworld/src/main/java/org/
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/etch/
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/etch/examples/
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/etch/examples/helloworld/
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/etch/examples/helloworld/ImplHelloWorldClient.java
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/etch/examples/helloworld/ImplHelloWorldServer.java
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/etch/examples/helloworld/MainHelloWorldClient.java
incubator/etch/trunk/examples/helloworld/src/main/java/org/apache/etch/examples/helloworld/MainHelloWorldListener.java
incubator/etch/trunk/examples/helloworld/src/test/
incubator/etch/trunk/examples/helloworld/src/test/csharp/
incubator/etch/trunk/examples/helloworld/src/test/csharp/HelloWorldTestProj/
incubator/etch/trunk/examples/helloworld/src/test/csharp/HelloWorldTestProj/HelloWorldTestProj.csproj
incubator/etch/trunk/examples/helloworld/src/test/csharp/HelloWorldTestProj/Properties/
incubator/etch/trunk/examples/helloworld/src/test/csharp/HelloWorldTestProj/Properties/AssemblyInfo.cs
incubator/etch/trunk/examples/helloworld/src/test/csharp/org.apache.etch.examples.helloworld/
incubator/etch/trunk/examples/helloworld/src/test/csharp/org.apache.etch.examples.helloworld/TestHelloWorldServer.cs
incubator/etch/trunk/examples/helloworld/src/test/java/
incubator/etch/trunk/examples/helloworld/src/test/java/org/
incubator/etch/trunk/examples/helloworld/src/test/java/org/apache/
incubator/etch/trunk/examples/helloworld/src/test/java/org/apache/etch/
incubator/etch/trunk/examples/helloworld/src/test/java/org/apache/etch/examples/
incubator/etch/trunk/examples/helloworld/src/test/java/org/apache/etch/examples/helloworld/
incubator/etch/trunk/examples/helloworld/src/test/java/org/apache/etch/examples/helloworld/TestHelloWorldServer.java
Modified:
incubator/etch/trunk/CSharp.sln
incubator/etch/trunk/examples/build.xml
Modified: incubator/etch/trunk/CSharp.sln
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/CSharp.sln?rev=998135&r1=998134&r2=998135&view=diff
==============================================================================
--- incubator/etch/trunk/CSharp.sln (original)
+++ incubator/etch/trunk/CSharp.sln Fri Sep 17 13:53:26 2010
@@ -59,6 +59,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IOTClientProj", "interoptester\example\src\main\csharp\IOTClientProj\IOTClientProj.csproj", "{14D7A923-0CB4-442A-9499-7F0C25C239EE}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorldListenerProj", "examples\helloworld\src\main\csharp\HelloWorldListenerProj\HelloWorldListenerProj.csproj", "{9FD2F8D3-12C5-4C1A-AB14-437559A7E0F8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorldClientProj", "examples\helloworld\src\main\csharp\HelloWorldClientProj\HelloWorldClientProj.csproj", "{615F95F2-A645-4BF1-8367-91756BE89514}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorldTestProj", "examples\helloworld\src\test\csharp\HelloWorldTestProj\HelloWorldTestProj.csproj", "{E3676B8F-6BBB-4A7E-A48F-74BBB694F6B2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -133,6 +139,18 @@ Global
{14D7A923-0CB4-442A-9499-7F0C25C239EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14D7A923-0CB4-442A-9499-7F0C25C239EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14D7A923-0CB4-442A-9499-7F0C25C239EE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9FD2F8D3-12C5-4C1A-AB14-437559A7E0F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9FD2F8D3-12C5-4C1A-AB14-437559A7E0F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9FD2F8D3-12C5-4C1A-AB14-437559A7E0F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9FD2F8D3-12C5-4C1A-AB14-437559A7E0F8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {615F95F2-A645-4BF1-8367-91756BE89514}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {615F95F2-A645-4BF1-8367-91756BE89514}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {615F95F2-A645-4BF1-8367-91756BE89514}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {615F95F2-A645-4BF1-8367-91756BE89514}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E3676B8F-6BBB-4A7E-A48F-74BBB694F6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E3676B8F-6BBB-4A7E-A48F-74BBB694F6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E3676B8F-6BBB-4A7E-A48F-74BBB694F6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E3676B8F-6BBB-4A7E-A48F-74BBB694F6B2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: incubator/etch/trunk/examples/build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/build.xml?rev=998135&r1=998134&r2=998135&view=diff
==============================================================================
--- incubator/etch/trunk/examples/build.xml (original)
+++ incubator/etch/trunk/examples/build.xml Fri Sep 17 13:53:26 2010
@@ -29,6 +29,7 @@
<build_example dir="distmap" logdir="${basedir}/target/logs" />
<build_example dir="example" logdir="${basedir}/target/logs" />
<build_example dir="perf" logdir="${basedir}/target/logs" />
+ <build_example dir="helloworld" logdir="${basedir}/target/logs" />
<delete dir="${target}" failonerror="false" quiet="true" />
</target>
@@ -42,6 +43,7 @@
<build_example dir="distmap" logdir="${basedir}/target/logs" />
<build_example dir="example" logdir="${basedir}/target/logs" />
<build_example dir="perf" logdir="${basedir}/target/logs" />
+ <build_example dir="helloworld" logdir="${basedir}/target/logs" />
</target>
<target name="do-postbuild">
Added: incubator/etch/trunk/examples/helloworld/README.txt
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/README.txt?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/README.txt (added)
+++ incubator/etch/trunk/examples/helloworld/README.txt Fri Sep 17 13:53:26 2010
@@ -0,0 +1,27 @@
+Helloworld is the classic example and shows basic usage of etch and the interoperability of the bindings.
+
+To generate sources, build and run tests execute:
+
+cd $ETCH_HOME
+.\scripts\antSetup.bat
+cd examples
+cd helloworld
+ant Debug
+
+This will generate sources for all csharp, java and c. It will also build the csharp and java sources.
+To build the C sources, please use the instructions and cmake files provided in the src/main/c folder.
+
+To run java HelloWorld example for java, run these commands:
+
+> cd target\bin
+> start java -cp helloworld.jar org.apache.etch.examples.helloworld.MainHelloWorldListener
+> start java -cp helloworld.jar org.apache.etch.examples.helloworld.MainHelloWorldClient
+
+To run csharp example:
+
+> cd target\bin
+> start HelloWorldListener.exe
+> start HelloWorldClient.exe
+
+You can mix and match the various clients and listeners.
+
Added: incubator/etch/trunk/examples/helloworld/build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/build.xml?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/build.xml (added)
+++ incubator/etch/trunk/examples/helloworld/build.xml Fri Sep 17 13:53:26 2010
@@ -0,0 +1,334 @@
+<?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 name="etch-HelloWorld-example" basedir="." default="help" >
+ <description>HelloWorld Example</description>
+ <property name="Etch.basedir" location="${basedir}/../.." />
+ <import file="${Etch.basedir}/build-support/etch.includes.xml" />
+
+ <!-- TODO better computation of etch.home, etch.version -->
+ <property environment="env" />
+
+ <!-- compute ETCH_HOME -->
+ <property name="build.ETCH_HOME" location="${basedir}/../../target/Installers/dist" />
+ <condition property="etch.home" value="${env.ETCH_HOME}" >
+ <isset property="${env.ETCH_HOME}" />
+ </condition>
+ <condition property="etch.home" value="${build.ETCH_HOME}" >
+ <not><isset property="etch.home" /></not>
+ </condition>
+
+ <property name="Etch.dependency.junit.jar"
+ location="${default.junit.lib}/junit-4.3.1.jar" />
+
+ <property name="Etch.buildSupportDirectory" location="../../build-support" />
+
+ <!-- compute etch.version -->
+ <condition property="etch.version" value="${Etch.version}" >
+ <not><isset property="etch.version" /></not>
+ </condition>
+
+ <condition property="etch.longversion" value="${Etch.longversion}" >
+ <not><isset property="etch.longversion" /></not>
+ </condition>
+
+ <!-- Csharp Support -->
+ <condition property="USE.dotnet" >
+ <and>
+ <os family="windows" />
+ <available file="${env.DOTNET_HOME}/msbuild.exe" />
+ <available file="${build.ant-dotnet.lib}/ant-dotnet-1.0.jar" />
+ <available file="${env.NUNIT_HOME}/bin/nunit.exe" />
+ </and>
+ </condition>
+ <condition property="USE.mono" >
+ <and>
+ <not><os family="windows" /></not>
+ <!-- TODO mono support is not fully baked, use -DUSE.mono to test -->
+ <!-- <available file="${env.MONO_HOME}/bin/mdtool" /> -->
+ <isset property="USE.mono" />
+ </and>
+ </condition>
+ <condition property="BUILD.csharp" >
+ <or>
+ <isset property="USE.dotnet" />
+ <isset property="USE.mono" />
+ </or>
+ </condition>
+
+ <!-- import etch task -->
+ <taskdef
+ onerror="report"
+ resource="org/apache/etch/tools/ant/etch.xml"
+ classpath="${etch.home}/lib/apache-etch-ant-plugin-${etch.longversion}.jar" />
+
+ <!-- import dotnet task -->
+ <condition property="ant.dotnet.jar" value="ant-dotnet-1.0.jar" >
+ <not><isset property="ant.dotnet.jar" /></not>
+ </condition>
+
+ <taskdef
+ onerror="report"
+ resource="org/apache/ant/dotnet/antlib.xml"
+ classpath="${ant.dotnet.jar}" />
+
+ <macrodef name="mdtool" >
+ <attribute name="dir" default="." />
+ <attribute name="failonerror" default="false" />
+ <attribute name="project" default="project.csproj" />
+ <attribute name="target" default="${build.target}" />
+ <sequential>
+ <exec executable="${env.MONO_HOME}/bin/mdtool" dir="@{dir}" failonerror="@{failonerror}" >
+ <arg value="build" />
+ <arg value="--buildfile:@{project}" />
+ </exec>
+ </sequential>
+ </macrodef>
+
+ <!-- set properties -->
+ <property name="src" location="${basedir}/src" />
+ <property name="main-src-java" location="${src}/main/java" />
+ <property name="test-src-java" location="${src}/test/java" />
+ <property name="target" location="${basedir}/target" />
+ <property name="dist-src" location="${target}/dist-src" />
+ <property name="generated-sources" location="${target}/generated-sources" />
+ <property name="gen-src-java" location="${generated-sources}/main/etch/java" />
+ <property name="gen-src-csharp" location="${generated-sources}/main/etch/csharp" />
+ <property name="gen-src-c" location="${generated-sources}/main/etch/c" />
+ <property name="bin" location="${target}/bin" />
+ <property name="classes" location="${target}/classes" />
+ <property name="classes-test" location="${target}/classes-test" />
+ <property name="test-results" location="${target}/test-results" />
+ <property name="nunit-results" location="${target}/nunit-results" />
+ <property name="dist" location="${basedir}/../../target/Installers/dist" />
+
+ <!-- initialize -->
+ <target name="init" >
+ <mkdir dir="${target}" />
+ <mkdir dir="${dist-src}" />
+ <mkdir dir="${generated-sources}" />
+ <mkdir dir="${gen-src-java}" />
+ <mkdir dir="${gen-src-csharp}" />
+ <mkdir dir="${bin}" />
+ <mkdir dir="${classes}" />
+ <mkdir dir="${classes-test}" />
+ <mkdir dir="${test-results}" />
+ <mkdir dir="${nunit-results}" />
+ </target>
+
+ <!-- build the server -->
+ <target name="generate-sources" depends="init" >
+ <!-- generate sources -->
+
+ <etch home="${etch.home}"
+ file="${src}/main/etch/HelloWorld.etch"
+ binding="java"
+ outputDir="${gen-src-java}" />
+
+ <etch home="${etch.home}"
+ file="${src}/main/etch/HelloWorld.etch"
+ binding="csharp"
+ outputDir="${gen-src-csharp}" />
+
+ <etch home="${etch.home}"
+ file="${src}/main/etch/HelloWorld.etch"
+ binding="c"
+ outputDir="${gen-src-c}" />
+ </target>
+
+ <property name="etch-java-runtime-name"
+ value="apache-etch-java-runtime-${etch.longversion}.jar" />
+
+ <property name="Etch.dependency.java.runtime"
+ location="${etch.home}/lib/${etch-java-runtime-name}" />
+
+ <target name="build-java" depends="generate-sources" >
+ <!-- compile sources -->
+
+ <javac target="1.5" destdir="${classes}" >
+ <src path="${gen-src-java}" />
+ <src path="${main-src-java}" />
+ <classpath>
+ <pathelement location="${Etch.dependency.java.runtime}" />
+ </classpath>
+ </javac>
+
+ <javac target="1.5" destdir="${classes-test}" >
+ <src path="${gen-src-java}" />
+ <src path="${main-src-java}" />
+ <src path="${test-src-java}" />
+ <classpath>
+ <pathelement location="${Etch.dependency.java.runtime}" />
+ <pathelement location="${Etch.dependency.junit.jar}" />
+ </classpath>
+ </javac>
+
+ <!-- Create Jar -->
+ <jar jarfile="${bin}/helloworld.jar" >
+ <manifest>
+ <attribute name="Class-Path" value="${etch-java-runtime-name}" />
+ </manifest>
+ <fileset dir="${classes}" >
+ <include name="**/*" />
+ </fileset>
+ </jar>
+
+ <!-- copy in dependencies -->
+ <copy todir="${bin}" file="${Etch.dependency.java.runtime}" />
+ </target>
+
+ <target name="build-csharp-with-mono" depends="generate-sources" if="USE.mono" >
+ <mdtool dir="${src}/main/csharp/HelloWorldClientProj" project="HelloWorldClientProj.csproj" />
+ <mdtool dir="${src}/main/csharp/HelloWorldListenerProj" project="HelloWorldListenerProj.csproj" />
+ </target>
+
+ <target name="build-csharp-with-dotnet" depends="generate-sources" if="USE.dotnet" >
+ <msbuild buildfile="${src}/main/csharp/HelloWorldListenerProj/HelloWorldListenerProj.csproj" >
+ <property name="Configuration" value="${build.target}" />
+ </msbuild>
+ <msbuild buildfile="${src}/main/csharp/HelloWorldClientProj/HelloWorldClientProj.csproj" >
+ <property name="Configuration" value="${build.target}" />
+ </msbuild>
+ <msbuild buildfile="${src}/test/csharp/HelloWorldTestProj/HelloWorldTestProj.csproj" >
+ <property name="Configuration" value="${build.target}" />
+ </msbuild>
+ <copy todir="${bin}" >
+ <fileset dir="${src}/main/csharp/HelloWorldListenerProj/bin/${build.target}" >
+ <include name="*" />
+ </fileset>
+ <fileset dir="${src}/main/csharp/HelloWorldClientProj/bin/${build.target}" >
+ <include name="*" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="build-csharp" depends="build-csharp-with-mono,build-csharp-with-dotnet" />
+
+ <target name="build" depends="build-java,build-csharp" />
+
+ <!-- run unit tests -->
+
+ <target name="test-java" depends="build-java" unless="build.skip.tests">
+ <!-- Run Unit Tests -->
+ <junit printsummary="yes" haltonfailure="no" dir="${classes-test}"
+ errorProperty="build.tests.fail" failureProperty="build.tests.fail" >
+ <classpath>
+ <pathelement location="${classes-test}" />
+ <pathelement location="${Etch.dependency.java.runtime}" />
+ <pathelement location="${Etch.dependency.junit.jar}" />
+ </classpath>
+ <formatter type="xml" />
+ <batchtest fork="true" todir="${test-results}" >
+ <fileset dir="${test-src-java}" >
+ <include name="**/Test*.java" />
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="test-csharp" depends="build-csharp" if="BUILD.csharp" unless="build.skip.tests">
+ <nunit xmlout="${nunit-results}/NUnitResults.xml">
+ <testassembly name="${src}/test/csharp/HelloWorldTestProj/bin/${build.target}/HelloWorldTestProj.dll" />
+ </nunit>
+
+ <xslt style="${Etch.buildSupportDirectory}/NUnitToJUnit.xsl"
+ in="${nunit-results}/NUnitResults.xml" out="${test-results}/TEST-NUnitResults.xml" />
+ </target>
+
+ <target name="test" depends="build,test-java,test-csharp,done" >
+ </target>
+
+ <target name="done" depends="build" >
+ <echo>
+
+Build Complete!
+
+To run java HelloWorld example, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp helloworld.jar org.apache.etch.examples.helloworld.MainHelloWorldListener
+> start java -cp helloworld.jar org.apache.etch.examples.helloworld.MainHelloWorldClient
+
+To run csharp example:
+
+> cd target\bin
+> start HelloWorldListener.exe
+> start HelloWorldClient.exe
+
+You can mix and match the various clients and listeners.
+
+ </echo>
+ </target>
+
+ <!-- build everything -->
+ <target name="init-debug" >
+ <property name="build.target" value="Debug" />
+ </target>
+
+ <target name="init-release" >
+ <property name="build.target" value="Release" />
+ </target>
+
+ <target name="dist-src" >
+ <copy file="dist-build.xml" tofile="${dist-src}/build.xml" overwrite="true" >
+ <filterset refid="Etch.buildTokens" />
+ </copy>
+ <copy file="README.txt" tofile="${dist-src}/README.txt" overwrite="true" />
+
+ <copy todir="${dist-src}/src/main/etch" overwrite="true" >
+ <fileset dir="${src}/main/etch" >
+ <exclude name="**/.svn/**" />
+ <include name="**/*.etch" />
+ </fileset>
+ </copy>
+
+ <copy todir="${dist-src}/src/main/java" overwrite="true" >
+ <fileset dir="${src}/main/java" >
+ <exclude name="**/.svn/**" />
+ <include name="**/*.java" />
+ </fileset>
+ </copy>
+
+ <copy todir="${dist-src}/src/main/csharp" overwrite="true" >
+ <fileset dir="${src}/main/csharp" >
+ <exclude name="**/.svn/**" />
+ <include name="**/*.cs" />
+ </fileset>
+ </copy>
+
+ <copy todir="${dist}/examples/helloworld" overwrite="true" >
+ <fileset dir="${dist-src}" />
+ </copy>
+ </target>
+
+ <target name="debug" depends="dist-src,init-debug,test" />
+ <target name="release" depends="dist-src,init-release,test" />
+
+ <!-- clean -->
+ <target name="clean" >
+ <delete dir="${target}" quiet="true" />
+ <delete dir="${src}/main/csharp/HelloWorldClientProj/bin" quiet="true" />
+ <delete dir="${src}/main/csharp/HelloWorldClientProj/obj" quiet="true" />
+ <delete dir="${src}/main/csharp/HelloWorldListenerProj/bin" quiet="true" />
+ <delete dir="${src}/main/csharp/HelloWorldListenerProj/obj" quiet="true" />
+ <delete dir="${src}/test/csharp/HelloWorldTestProj/bin" quiet="true" />
+ <delete dir="${src}/test/csharp/HelloWorldTestProj/obj" quiet="true" />
+ </target>
+</project>
Added: incubator/etch/trunk/examples/helloworld/dist-build.xml
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/dist-build.xml?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/dist-build.xml (added)
+++ incubator/etch/trunk/examples/helloworld/dist-build.xml Fri Sep 17 13:53:26 2010
@@ -0,0 +1,158 @@
+<?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 name="etch-HelloWorld-example" basedir="." default="build">
+ <description>HelloWorld Example</description>
+
+ <property name="etch.home" location="${basedir}/../.."/>
+ <property name="etch.version" value="@EtchVersion@"/>
+ <property name="etch.longversion" value="@EtchLongVersion@"/>
+ <property name="etch-java-runtime-name" value="apache-etch-java-runtime-${etch.longversion}.jar"/>
+ <property name="etch-csharp-runtime.dll" value="ApacheEtchCsharpIncubating.dll"/>
+
+ <property name="etch-ant-plugin.jar" location="${etch.home}/lib/apache-etch-ant-plugin-${etch.longversion}.jar"/>
+ <property name="etch-java-runtime.jar" location="${etch.home}/lib/${etch-java-runtime-name}"/>
+ <property name="etch.dll" location="${etch.home}/lib/${etch-csharp-runtime.dll}"/>
+
+ <property name="src" location="${basedir}/src"/>
+ <property name="src-main-etch" location="${src}/main/etch"/>
+ <property name="src-main-java" location="${src}/main/java"/>
+ <property name="src-main-csharp" location="${src}/main/csharp"/>
+ <property name="target" location="${basedir}/target"/>
+ <property name="generated-sources" location="${target}/generated-sources"/>
+ <property name="gensrc-main-etch-java" location="${generated-sources}/main/etch/java"/>
+ <property name="gensrc-main-etch-csharp" location="${generated-sources}/main/etch/csharp"/>
+ <property name="classes" location="${target}/classes"/>
+ <property name="bin" location="${target}/bin"/>
+
+ <condition property="BUILD.csharp" >
+ <os family="windows" />
+ </condition>
+
+ <taskdef
+ resource="org/apache/etch/tools/ant/etch.xml"
+ classpath="${etch-ant-plugin.jar}"/>
+
+ <target name="build" depends="build-java, build-csharp, done"/>
+
+ <target name="build-java" depends="gensrc-java">
+ <javac destdir="${classes}" source="1.5" debug="true">
+ <classpath>
+ <pathelement location="${etch-java-runtime.jar}"/>
+ </classpath>
+ <src path="${src-main-java}"/>
+ <src path="${gensrc-main-etch-java}"/>
+ </javac>
+
+ <jar jarfile="${bin}/helloworld.jar">
+ <manifest>
+ <attribute name="Class-Path" value="${etch-java-runtime-name}"/>
+ </manifest>
+ <fileset dir="${classes}"/>
+ </jar>
+
+ <copy todir="${bin}" file="${etch-java-runtime.jar}"/>
+ </target>
+
+ <target name="done">
+ <echo>
+
+To run java HelloWorld example, open a cmd window and run these
+commands:
+
+> cd target\bin
+> start java -cp helloworld.jar org.apache.etch.examples.helloworld.MainHelloWorldListener
+> start java -cp helloworld.jar org.apache.etch.examples.helloworld.MainHelloWorldClient
+
+To run csharp example:
+
+> cd target\bin
+> start HelloWorldListener.exe
+> start HelloWorldClient.exe
+
+You can mix and match the various clients and listeners.
+
+ </echo>
+ </target>
+
+ <target name="build-csharp" depends="gensrc-csharp" if="BUILD.csharp" >
+ <csc
+ debug="true"
+ warnLevel="1"
+ unsafe="false"
+ targetType="exe"
+ incremental="false"
+ mainClass = "org.apache.etch.examples.helloworld.MainHelloWorldClient"
+ destFile="${bin}/HelloWorldClient.exe">
+ <src dir="${src-main-csharp}/HelloWorldClientProj" includes="**/*.cs"/>
+ <src dir="${src-main-csharp}/etch.examples.helloworld" includes="**/*.cs"/>
+ <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+ <reference file="${etch.dll}"/>
+ </csc>
+
+ <csc
+ debug="true"
+ warnLevel="1"
+ unsafe="false"
+ targetType="exe"
+ incremental="false"
+ mainClass = "org.apache.etch.examples.helloworld.MainHelloWorldListener"
+ destFile="${bin}/HelloWorldListener.exe">
+ <src dir="${src-main-csharp}/HelloWorldListenerProj" includes="**/*.cs"/>
+ <src dir="${src-main-csharp}/etch.examples.helloworld" includes="**/*.cs"/>
+ <src dir="${gensrc-main-etch-csharp}" includes="**/*.cs"/>
+ <reference file="${etch.dll}"/>
+ </csc>
+
+ <copy todir="${bin}" file="${etch.dll}"/>
+ </target>
+
+ <target name="gensrc" depends="gensrc-java, gensrc-csharp"/>
+
+ <target name="gensrc-java" depends="init">
+ <etch
+ home="${etch.home}"
+ binding="java"
+ quiet="true"
+ outputDir="${gensrc-main-etch-java}"
+ file="${src-main-etch}/HelloWorld.etch"/>
+ </target>
+
+ <target name="gensrc-csharp" depends="init">
+ <etch
+ home="${etch.home}"
+ binding="csharp"
+ quiet="true"
+ outputDir="${gensrc-main-etch-csharp}"
+ file="${src-main-etch}/HelloWorld.etch"/>
+ </target>
+
+ <target name="init">
+ <mkdir dir="${target}"/>
+ <mkdir dir="${generated-sources}"/>
+ <mkdir dir="${gensrc-main-etch-java}"/>
+ <mkdir dir="${gensrc-main-etch-csharp}"/>
+ <mkdir dir="${classes}"/>
+ <mkdir dir="${bin}"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${target}"/>
+ </target>
+</project>
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.c?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.c (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.c Fri Sep 17 13:53:26 2010
@@ -0,0 +1,96 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+
+#include "helloworld_client_impl.h"
+#include "etch_url.h"
+#include "etch_arrayval.h"
+#include "etch_binary_tdo.h"
+#include "etch_exception.h"
+#include "etch_general.h"
+#include "etch_log.h"
+
+#include <stdio.h>
+
+unsigned short CLASSID_HELLOWORLD_CLIENT_IMPL;
+
+
+char* HELLOWORLD_ETCHCIMP = "CIMP";
+
+/* generated signatures */
+int destroy_helloworld_client_implx(void*);
+helloworld_client_impl* init_helloworld_client_impl(struct helloworld_remote_server*, etch_object_destructor);
+
+
+/* - - - - - - - -
+ * instantiation
+ * - - - - - - - -
+ */
+
+/**
+ * new_helloworld_client_impl()
+ * helloworld_client_impl constructor.
+ * add your custom initialization and virtual method overrides here.
+ */
+helloworld_client_impl* new_helloworld_client_impl(struct helloworld_remote_server* server)
+{
+ helloworld_client_impl* pclient /* allocate object and assign default virtuals */
+ = init_helloworld_client_impl(server, destroy_helloworld_client_implx);
+ /* add virtual method overrides, if any, here */
+ //pclient->xxx = implementation
+
+ return pclient;
+}
+
+
+/**
+ * destroy_helloworld_client_implx()
+ * destructor for any user allocated memory.
+ * this code is invoked by the private perf_client_impl destructor,
+ * via perf_client.destroyex(). add code here to destroy any memory you
+ * may have allocated for your custom perf_client implementation.
+ */
+int destroy_helloworld_client_implx(void* data)
+{
+ /*
+ helloworld_client_impl* thisx = (helloworld_client_impl*)data;
+ */
+ /* * * add custom destruction here * * */
+ /* etch_free(thisx->exampleobj); */
+
+ return 0;
+}
+
+/* - - - - - - - - - - - - - - - - - - -
+ * session interface method overrides
+ * - - - - - - - - - - - - - - - - - - -
+ */
+
+ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * implementations of helloworld_client messages from server, if any
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.h?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.h (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_impl.h Fri Sep 17 13:53:26 2010
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+
+#ifndef HELLOWORLD_CLIENT_IMPL_H
+#define HELLOWORLD_CLIENT_IMPL_H
+
+#include "helloworld_client.h"
+#include "etch_transport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern unsigned short CLASSID_HELLOWORLD_CLIENT_IMPL;
+
+//typedef struct helloworld_remote_server helloworld_remote_server;
+
+/**
+ * helloworld_client_impl
+ * your custom implementation of helloworld_client. add methods here
+ * to provide implementations of messages from the client, if any.
+ */
+typedef struct helloworld_client_impl
+{
+ etch_object object;
+
+ i_helloworld_client* helloworld_client_base; /* owned */
+ i_helloworld* ihelloworld; /* not owned */
+ struct helloworld_remote_server* server; /* not owned */
+
+ int (*destroyex) (void*); /* user memory destructor */
+
+ /* - - - - - - - - - - - -
+ * objsession
+ * - - - - - - - - - - - -
+ */
+ i_objsession* iobjsession; /* owned by base */
+ /* note that iobjsession->thisx is set to this helloworld_client_impl* */
+ etch_session_control _session_control;
+ etch_session_notify _session_notify;
+ etch_session_query _session_query;
+
+ /* - - - - - - - - - - - -
+ * base service virtuals
+ * - - - - - - - - - - - -
+ */
+ helloworld_say_hello say_hello;
+
+ void* context;
+
+
+} helloworld_client_impl;
+
+/* constructor */
+helloworld_client_impl* new_helloworld_client_impl (struct helloworld_remote_server*);
+
+#ifdef __cplusplus
+} //extern "C"
+#endif
+
+#endif /* HELLOWORLD_CLIENT_IMPL_H */
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_implx.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_implx.c?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_implx.c (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_implx.c Fri Sep 17 13:53:26 2010
@@ -0,0 +1,100 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+
+/*
+ * helloworld_client_implx.c
+ * $helper.getImplName functions which would ordinarily not be subject to edit.
+ */
+
+#include "helloworld_client_impl.h"
+#include "helloworld_remote_server.h"
+#include "etch_objecttypes.h"
+#include "etch_general.h"
+#include "etch_url.h"
+
+int destroy_helloworld_client_impl(void*);
+
+/* - - - - - - - - - - - - - - - - - - - - - - - -
+ *helloworld_client_impl private construction / destruction
+ * - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+
+/**
+ * init_helloworld_client_impl()
+ * called by helloworld_client_impl constructor to instantiate server implementation
+ * object and initialize with default virtuals.
+ * @param client the remote client, not owned.
+ * @param usermem_dtor destructor for any custom memory allocations.
+ */
+helloworld_client_impl* init_helloworld_client_impl(helloworld_remote_server* server,
+ etch_object_destructor usermem_dtor)
+{
+ helloworld_client_impl* pclient = (helloworld_client_impl*) new_object (sizeof(helloworld_client_impl),
+ ETCHTYPEB_EXECLIENTIMPL, get_dynamic_classid_unique(&CLASSID_HELLOWORLD_CLIENT_IMPL));
+
+ pclient->server = server; /* not owned */
+ ((etch_object*)pclient)->destroy = destroy_helloworld_client_impl; /* private destructor */
+ pclient->destroyex = usermem_dtor; /* user memory destructor */
+
+ /* instantiate base and copy virtuals, if any, to this object */
+ pclient->helloworld_client_base = new_helloworld_client_base(pclient); /* owned */
+
+ pclient->ihelloworld = pclient->helloworld_client_base->ihelloworld;
+
+
+
+
+ pclient->iobjsession = server->server_base->iobjsession;
+ pclient->iobjsession->thisx = pclient; /* set implementor reference */
+ pclient->_session_control = pclient->helloworld_client_base->_session_control;
+ pclient->_session_notify = pclient->helloworld_client_base->_session_notify;
+ pclient->_session_query = pclient->helloworld_client_base->_session_query;
+
+ return pclient;
+}
+
+/**
+ * destroy_perf_server_impl()
+ * perf_server_impl private destructor.
+ * calls back to user destructor to effect cleanup of any perf_server_impl
+ * memory which may have been allocated in custom code added by user.
+ */
+int destroy_helloworld_client_impl (void* data)
+{
+ helloworld_client_impl* thisx = (helloworld_client_impl*)data;
+ if (NULL == thisx) return -1;
+
+ if (!is_etchobj_static_content(thisx))
+ {
+ if(thisx->destroyex)
+ { /* call back to user memory destructor */
+ thisx->destroyex(thisx);
+ }
+ }
+
+ return destroy_objectex((etch_object*)thisx);
+}
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.c?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.c (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.c Fri Sep 17 13:53:26 2010
@@ -0,0 +1,107 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+/*
+ * helloworld_client_main.c
+ */
+
+#include "helloworld_client_main.h"
+#include "etch_objecttypes.h"
+#include "etch_runtime.h"
+#include "etch_arrayval.h"
+#include "etch_nativearray.h"
+#include "etch_binary_tdo.h"
+#include "etch_general.h"
+
+
+/**
+ * new_helloworld_client().
+ * callback constructor for client implementation object.
+ * this callback address is passed to start_helloworld_client() in [main].
+ * @param server the remote server.
+ * @remarks this callback must be supplied, i.e. its functionality cannot be
+ * defaulted, since the client implementation constructor new_helloworld_client_impl()
+ * is not known to start_helloworld_client().
+ */
+static i_helloworld_client* helloworld_client_create(void* factory_thisx, helloworld_remote_server* server)
+{
+ helloworld_client_impl* client = new_helloworld_client_impl(server);
+ return client? client->helloworld_client_base:NULL;
+}
+
+
+/**
+ * main()
+ */
+int main(int argc, char* argv[])
+{
+ etch_status_t etch_status = ETCH_SUCCESS;
+ helloworld_remote_server* remote = NULL;
+ int waitupms = 4000;
+ etch_string result = NULL;
+ helloworld_user* user = NULL;
+
+ wchar_t* uri = L"tcp://127.0.0.1:4004";
+
+ etch_config_t* config = NULL;
+ etch_config_create(&config);
+ // set properties or read file
+
+ etch_status = etch_runtime_initialize(config);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ return 1;
+ }
+
+ etch_status = helloworld_helper_remote_server_create(&remote, uri, NULL, helloworld_client_create);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ }
+
+ etch_status = helloworld_helper_remote_server_start_wait(remote, waitupms);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ }
+
+ user = new_helloworld_user();
+ user->id = 51;
+ user->name = new_stringw(L"Test");
+ result = remote->say_hello(remote, user);
+ wprintf("%s\n",result->v.valw);
+
+ etch_status = helloworld_helper_remote_server_stop_wait(remote, waitupms);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ }
+
+ etch_status = helloworld_helper_remote_server_destroy(remote);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ }
+ etch_config_destroy(config);
+ return 0;
+}
+
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.h?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.h (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_client_main.h Fri Sep 17 13:53:26 2010
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+/*
+ * helloworld_client_main.h
+ * client exe main() private header
+ */
+
+#ifndef HELLOWORLD_CLIENT_MAIN_H
+#define HELLOWORLD_CLIENT_MAIN_H
+
+#include "etch_runtime.h"
+#include "helloworld_helper.h"
+#include "helloworld_client_impl.h"
+#include "helloworld_remote_server.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * helloworld_listener_start(pplistener, uri, waitupms)
+ * Start the listener at the given uri, waiting waitupms microseconds for listener startup.
+ * The created listener is saved at address pointed to by pplistener.
+ */
+extern etch_status_t helloworld_listener_start(i_sessionlistener** pplistener, wchar_t* uri, int waitupms);
+
+/*
+ * helloworld_listener_stop(plistener, waitupms)
+ * Stop the listener given by plistener, waiting waitupms microseconds to stop.
+ */
+extern etch_status_t helloworld_listener_stop(i_sessionlistener* plistener, int waitupms);
+
+#ifdef __cplusplus
+} //extern "C"
+#endif
+
+#endif /* HELLOWORLD_CLIENT_MAIN.H */
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.c?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.c (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.c Fri Sep 17 13:53:26 2010
@@ -0,0 +1,132 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+/*
+ * helloworld_listener_main.c
+ */
+
+#include "helloworld_listener_main.h"
+#include "etch_objecttypes.h"
+#include "etch_runtime.h"
+#include "etch_arrayval.h"
+#include "etch_nativearray.h"
+#include "etch_binary_tdo.h"
+#include "etch_general.h"
+
+
+/**
+ * new_helloworld_server
+ * create an individual client's helloworld_server implementation.
+ * this is java binding's newhelloworldServer().
+ * this is called back from helper.new_helper_accepted_server() (java's newServer).
+ * @param p parameter bundle. caller retains.
+ * @return the i_helloworld_server, whose thisx is the helloworld_server_impl.
+ */
+static void* helloworld_server_create(void* factoryData, void* sessionData)
+{
+ etch_session* session = (etch_session*)sessionData;
+ helloworld_remote_client* client = (helloworld_remote_client*) session->client;
+
+ helloworld_server_impl* newserver = new_helloworld_server_impl(client);
+
+ return newserver->helloworld_server_base;
+}
+
+etch_status_t helloworld_listener_start(i_sessionlistener** pplistener, wchar_t* uri, int waitupms)
+{
+ etch_status_t etch_status = ETCH_SUCCESS;
+
+ etch_status = helloworld_helper_listener_create(pplistener, uri, NULL, helloworld_server_create);
+ if(etch_status == ETCH_SUCCESS)
+ {
+ etch_status = helloworld_helper_listener_start_wait(*pplistener, waitupms);
+ }
+
+ return etch_status;
+}
+
+etch_status_t helloworld_listener_stop(i_sessionlistener* plistener, int waitupms)
+{
+ etch_status_t etch_status = ETCH_SUCCESS;
+
+ etch_status = helloworld_helper_listener_stop_wait(plistener, waitupms);
+ if(etch_status == ETCH_SUCCESS)
+ {
+ helloworld_helper_listener_destroy(plistener);
+ }
+
+ return etch_status;
+}
+
+
+#ifndef NO_ETCH_SERVER_MAIN
+
+/**
+ * main()
+ */
+int main(int argc, char* argv[])
+{
+ etch_status_t etch_status = ETCH_SUCCESS;
+ i_sessionlistener* listener = NULL;
+ int waitupms = 4000;
+
+ wchar_t* uri = L"tcp://0.0.0.0:4001";
+
+ etch_config_t* config = NULL;
+ etch_config_create(&config);
+
+ etch_status = etch_runtime_initialize(config);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ return 1;
+ }
+
+ etch_status = helloworld_listener_start(&listener, uri, waitupms);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ }
+
+ // wait for keypress
+ waitkey();
+
+ etch_status = helloworld_listener_stop(listener, waitupms);
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ }
+
+ etch_status = etch_runtime_shutdown();
+ if(etch_status != ETCH_SUCCESS) {
+ // error
+ return 1;
+ }
+ etch_config_destroy(config);
+ // wait for keypress
+ waitkey();
+
+ return 0;
+}
+
+#endif /* NO_ETCH_SERVER_MAIN */
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.h?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.h (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_listener_main.h Fri Sep 17 13:53:26 2010
@@ -0,0 +1,61 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+/*
+ * helloworld_listener_main.h
+ * server exe main() private header
+ */
+
+#ifndef HELLOWORLD_LISTENER_MAIN_H
+#define HELLOWORLD_LISTENER_MAIN_H
+
+#include "etch_runtime.h"
+#include "helloworld_helper.h"
+#include "helloworld_server_impl.h"
+#include "helloworld_remote_client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * helloworld_listener_start(pplistener, uri, waitupms)
+ * Start the listener at the given uri, waiting waitupms microseconds for listener startup.
+ * The created listener is saved at address pointed to by pplistener.
+ */
+extern etch_status_t helloworld_listener_start(i_sessionlistener** pplistener, wchar_t* uri, int waitupms);
+
+/*
+ * helloworld_listener_stop(plistener, waitupms)
+ * Stop the listener given by plistener, waiting waitupms microseconds to stop.
+ */
+extern etch_status_t helloworld_listener_stop(i_sessionlistener* plistener, int waitupms);
+
+#ifdef __cplusplus
+} //extern "C"
+#endif
+
+#endif /* HELLOWORLD_LISTENER_MAIN.H */
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.c?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.c (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.c Fri Sep 17 13:53:26 2010
@@ -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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+
+#include "helloworld_server_impl.h"
+#include "etch_url.h"
+#include "etch_arrayval.h"
+#include "etch_binary_tdo.h"
+#include "etch_exception.h"
+#include "etch_general.h"
+#include "etch_log.h"
+
+#include <stdio.h>
+
+unsigned short CLASSID_HELLOWORLD_SERVER_IMPL;
+
+
+char* HELLOWORLD_ETCHSIMP = "SIMP";
+
+/* generated signatures */
+int destroy_helloworld_server_implx(void*);
+helloworld_server_impl* init_helloworld_server_impl(struct helloworld_remote_client*, etch_object_destructor);
+
+
+/* - - - - - - - -
+ * instantiation
+ * - - - - - - - -
+ */
+
+/**
+ * new_helloworld_server_impl()
+ * helloworld_server_impl constructor.
+ * add your custom initialization and virtual method overrides here.
+ */
+helloworld_server_impl* new_helloworld_server_impl(struct helloworld_remote_client* client)
+{
+ helloworld_server_impl* pserver /* allocate object and assign default virtuals */
+ = init_helloworld_server_impl(client, destroy_helloworld_server_implx);
+ i_helloworld_server* pserver_base = pserver->helloworld_server_base;
+
+ ((etch_object*)pserver_base)->class_id = get_dynamic_classid_unique(&CLASSID_HELLOWORLD_SERVER_IMPL);
+ /* add virtual method overrides, if any, here */
+ //pserver->xxx = implementation
+
+ return pserver;
+}
+
+
+/**
+ * destroy_helloworld_server_implx()
+ * destructor for any user allocated memory.
+ * this code is invoked by the private perf_client_impl destructor,
+ * via perf_client.destroyex(). add code here to destroy any memory you
+ * may have allocated for your custom perf_client implementation.
+ */
+int destroy_helloworld_server_implx(void* data)
+{
+ /*
+ helloworld_server_impl* thisx = (helloworld_server_impl*)data;
+ */
+ /* * * add custom destruction here * * */
+ /* etch_free(thisx->exampleobj); */
+
+ return 0;
+}
+
+/* - - - - - - - - - - - - - - - - - - -
+ * session interface method overrides
+ * - - - - - - - - - - - - - - - - - - -
+ */
+
+ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ * implementations of helloworld_server messages from server, if any
+ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.h?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.h (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_impl.h Fri Sep 17 13:53:26 2010
@@ -0,0 +1,85 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+
+#ifndef HELLOWORLD_SERVER_IMPL_H
+#define HELLOWORLD_SERVER_IMPL_H
+
+#include "helloworld_server.h"
+#include "etch_transport.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern unsigned short CLASSID_HELLOWORLD_SERVER_IMPL;
+
+//typedef struct helloworld_remote_client helloworld_remote_client;
+
+/**
+ * helloworld_server_impl
+ * your custom implementation of helloworld_server. add methods here
+ * to provide implementations of messages from the client, if any.
+ */
+typedef struct helloworld_server_impl
+{
+ etch_object object;
+
+ i_helloworld_server* helloworld_server_base; /* owned */
+ i_helloworld* ihelloworld; /* not owned */
+ struct helloworld_remote_client* client; /* not owned */
+
+ int (*destroyex) (void*); /* user memory destructor */
+
+ /* - - - - - - - - - - - -
+ * objsession
+ * - - - - - - - - - - - -
+ */
+ i_objsession* iobjsession; /* owned by base */
+ /* note that iobjsession->thisx is set to this helloworld_server_impl* */
+ etch_session_control _session_control;
+ etch_session_notify _session_notify;
+ etch_session_query _session_query;
+
+ /* - - - - - - - - - - - -
+ * base service virtuals
+ * - - - - - - - - - - - -
+ */
+ helloworld_say_hello say_hello;
+
+ void* context;
+
+
+} helloworld_server_impl;
+
+/* constructor */
+helloworld_server_impl* new_helloworld_server_impl (struct helloworld_remote_client*);
+
+#ifdef __cplusplus
+} //extern "C"
+#endif
+
+#endif /* HELLOWORLD_SERVER_IMPL_H */
Added: incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_implx.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_implx.c?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_implx.c (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/c/helloworld_server_implx.c Fri Sep 17 13:53:26 2010
@@ -0,0 +1,105 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+
+// This file automatically generated by:
+// Apache Etch 1.1.0-incubating (LOCAL-0) / c 1.1.0-incubating (LOCAL-0)
+// Fri Aug 28 15:58:20 CEST 2009
+// This file is automatically created and should not be edited!
+
+/*
+ * helloworld_server_implx.c
+ * $helper.getImplName functions which would ordinarily not be subject to edit.
+ */
+
+#include "helloworld_server_impl.h"
+#include "helloworld_remote_client.h"
+#include "etch_objecttypes.h"
+#include "etch_general.h"
+#include "etch_url.h"
+
+int destroy_helloworld_server_impl(void*);
+
+/* - - - - - - - - - - - - - - - - - - - - - - - -
+ *helloworld_server_impl private construction / destruction
+ * - - - - - - - - - - - - - - - - - - - - - - - -
+ */
+
+/**
+ * init_helloworld_server_impl()
+ * called by helloworld_server_impl constructor to instantiate server implementation
+ * object and initialize with default virtuals.
+ * @param client the remote client, not owned.
+ * @param usermem_dtor destructor for any custom memory allocations.
+ */
+helloworld_server_impl* init_helloworld_server_impl(helloworld_remote_client* client,
+ etch_object_destructor usermem_dtor)
+{
+ helloworld_server_impl* pserver = (helloworld_server_impl*) new_object (sizeof(helloworld_server_impl),
+ ETCHTYPEB_EXESERVERIMPL, get_dynamic_classid_unique(&CLASSID_HELLOWORLD_SERVER_IMPL));
+
+ pserver->client = client; /* not owned */
+ ((etch_object*)pserver)->destroy = destroy_helloworld_server_impl; /* private destructor */
+ pserver->destroyex = usermem_dtor; /* user memory destructor */
+
+ /* instantiate base and copy virtuals, if any, to this object */
+ pserver->helloworld_server_base = new_helloworld_server_base(pserver, NULL); /* owned */
+
+ pserver->ihelloworld = pserver->helloworld_server_base->ihelloworld;
+
+
+ pserver->say_hello = pserver->helloworld_server_base->say_hello;
+
+
+ pserver->iobjsession = pserver->helloworld_server_base->iobjsession;
+ pserver->iobjsession->thisx = pserver; /* set implementor reference */
+ pserver->_session_control = pserver->helloworld_server_base->_session_control;
+ pserver->_session_notify = pserver->helloworld_server_base->_session_notify;
+ pserver->_session_query = pserver->helloworld_server_base->_session_query;
+
+ return pserver;
+}
+
+/**
+ * destroy_perf_server_impl()
+ * perf_server_impl private destructor.
+ * calls back to user destructor to effect cleanup of any perf_server_impl
+ * memory which may have been allocated in custom code added by user.
+ */
+int destroy_helloworld_server_impl (void* data)
+{
+ helloworld_server_impl* thisx = (helloworld_server_impl*)data;
+ if (NULL == thisx) return -1;
+
+ if (!is_etchobj_static_content(thisx))
+ {
+ if(thisx->destroyex)
+ { /* call back to user memory destructor */
+ thisx->destroyex(thisx);
+ }
+ if(thisx->helloworld_server_base)
+ {
+ destroy_helloworld_server_base(thisx->helloworld_server_base);
+ }
+ }
+
+ return destroy_objectex((etch_object*)thisx);
+}
Added: incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/HelloWorldClientProj.csproj
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/HelloWorldClientProj.csproj?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/HelloWorldClientProj.csproj (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/HelloWorldClientProj.csproj Fri Sep 17 13:53:26 2010
@@ -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 DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{615F95F2-A645-4BF1-8367-91756BE89514}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>org.apache.etch.examples.helloworld</RootNamespace>
+ <AssemblyName>HelloWorldClient</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</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>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\BaseHelloWorldClient.cs">
+ <Link>BaseHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\BaseHelloWorldServer.cs">
+ <Link>BaseHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorld.cs">
+ <Link>HelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorldClient.cs">
+ <Link>HelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorldHelper.cs">
+ <Link>HelloWorldHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorldServer.cs">
+ <Link>HelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\RemoteHelloWorld.cs">
+ <Link>RemoteHelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\RemoteHelloWorldClient.cs">
+ <Link>RemoteHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\RemoteHelloWorldServer.cs">
+ <Link>RemoteHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\StubHelloWorld.cs">
+ <Link>StubHelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\StubHelloWorldClient.cs">
+ <Link>StubHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\StubHelloWorldServer.cs">
+ <Link>StubHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\ValueFactoryHelloWorld.cs">
+ <Link>ValueFactoryHelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\org.apache.etch.examples.helloworld\ImplHelloWorldClient.cs">
+ <Link>ImplHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\org.apache.etch.examples.helloworld\ImplHelloWorldServer.cs">
+ <Link>ImplHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\org.apache.etch.examples.helloworld\MainHelloWorldClient.cs">
+ <Link>MainHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\..\..\binding-csharp\runtime\src\main\csharp\EtchProj.csproj">
+ <Project>{0E518F2A-3016-4C2F-A21B-9BD52B2DC846}</Project>
+ <Name>EtchProj</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\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>
Added: incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/Properties/AssemblyInfo.cs?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/Properties/AssemblyInfo.cs (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldClientProj/Properties/AssemblyInfo.cs Fri Sep 17 13:53:26 2010
@@ -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. *
+using System.Reflection;
+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("HelloWorld Client")]
+[assembly: AssemblyDescription("HelloWorld Client Executable")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Apache Etch (incubating)")]
+[assembly: AssemblyCopyright("Copyright ? Apache Software Foundation 2009")]
+[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("7369eb5c-6f20-4f29-866b-204e95bdb5cd")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("0.0.0.1")]
+[assembly: AssemblyFileVersion("0.0.0.1")]
Added: incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/HelloWorldListenerProj.csproj
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/HelloWorldListenerProj.csproj?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/HelloWorldListenerProj.csproj (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/HelloWorldListenerProj.csproj Fri Sep 17 13:53:26 2010
@@ -0,0 +1,114 @@
+<?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" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{9FD2F8D3-12C5-4C1A-AB14-437559A7E0F8}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>etch.examples.helloworld</RootNamespace>
+ <AssemblyName>HelloWorldListener</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</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>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\BaseHelloWorldClient.cs">
+ <Link>BaseHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\BaseHelloWorldServer.cs">
+ <Link>BaseHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorld.cs">
+ <Link>HelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorldClient.cs">
+ <Link>HelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorldHelper.cs">
+ <Link>HelloWorldHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\HelloWorldServer.cs">
+ <Link>HelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\RemoteHelloWorld.cs">
+ <Link>RemoteHelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\RemoteHelloWorldClient.cs">
+ <Link>RemoteHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\RemoteHelloWorldServer.cs">
+ <Link>RemoteHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\StubHelloWorld.cs">
+ <Link>StubHelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\StubHelloWorldClient.cs">
+ <Link>StubHelloWorldClient.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\StubHelloWorldServer.cs">
+ <Link>StubHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\target\generated-sources\main\etch\csharp\org.apache.etch.examples.helloworld\ValueFactoryHelloWorld.cs">
+ <Link>ValueFactoryHelloWorld.cs</Link>
+ </Compile>
+ <Compile Include="..\org.apache.etch.examples.helloworld\ImplHelloWorldServer.cs">
+ <Link>ImplHelloWorldServer.cs</Link>
+ </Compile>
+ <Compile Include="..\org.apache.etch.examples.helloworld\MainHelloWorldListener.cs">
+ <Link>MainHelloWorldListener.cs</Link>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\..\..\..\binding-csharp\runtime\src\main\csharp\EtchProj.csproj">
+ <Project>{0E518F2A-3016-4C2F-A21B-9BD52B2DC846}</Project>
+ <Name>EtchProj</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\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>
Added: incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/Properties/AssemblyInfo.cs?rev=998135&view=auto
==============================================================================
--- incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/Properties/AssemblyInfo.cs (added)
+++ incubator/etch/trunk/examples/helloworld/src/main/csharp/HelloWorldListenerProj/Properties/AssemblyInfo.cs Fri Sep 17 13:53:26 2010
@@ -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. *
+using System.Reflection;
+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("HelloWorld Listener")]
+[assembly: AssemblyDescription("HelloWorld Listener Executable")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Apache Etch (incubating)")]
+[assembly: AssemblyCopyright("Copyright ? Apache Software Foundation 2009")]
+[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("c74cf3bd-758b-4e40-9537-e1793f0fdcce")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("0.0.0.1")]
+[assembly: AssemblyFileVersion("0.0.0.1")]