summaryrefslogtreecommitdiffstats
path: root/mono/example
diff options
context:
space:
mode:
Diffstat (limited to 'mono/example')
-rw-r--r--mono/example/.cvsignore4
-rw-r--r--mono/example/BusListener.cs44
-rw-r--r--mono/example/EchoClient.cs19
-rw-r--r--mono/example/EchoServer.cs23
-rw-r--r--mono/example/Echoer.cs16
-rw-r--r--mono/example/Makefile.am22
6 files changed, 0 insertions, 128 deletions
diff --git a/mono/example/.cvsignore b/mono/example/.cvsignore
deleted file mode 100644
index fb4e561d..00000000
--- a/mono/example/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.deps
-Makefile.in
-Makefile
-*.exe
diff --git a/mono/example/BusListener.cs b/mono/example/BusListener.cs
deleted file mode 100644
index d999360f..00000000
--- a/mono/example/BusListener.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-namespace Foo
-{
- using System;
- using DBus;
- using Gtk;
-
- public class BusListener
- {
-
- static void OnNameOwnerChanged (string name,
- string oldOwner,
- string newOwner)
- {
- if (oldOwner == "")
- Console.WriteLine ("{0} created by {1}",
- name, newOwner);
- else if (newOwner == "")
- Console.WriteLine ("{0} released by {1}",
- name, oldOwner);
- else
- Console.WriteLine ("{0} transfered from {1} to {2}",
- name, oldOwner, newOwner);
- }
-
- public static int Main (string [] args)
- {
- Application.Init ();
-
- Connection connection;
- connection = Bus.GetSessionBus ();
-
- BusDriver driver = BusDriver.New (connection);
- driver.NameOwnerChanged += new NameOwnerChangedHandler (OnNameOwnerChanged);
-
- Console.WriteLine ("Listening for name owner changes...");
-
- Application.Run ();
-
- return 0;
- }
- }
-
-
-}
diff --git a/mono/example/EchoClient.cs b/mono/example/EchoClient.cs
deleted file mode 100644
index dc20771a..00000000
--- a/mono/example/EchoClient.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace Foo
-{
- using System;
- using DBus;
-
- public class EchoClient
- {
- public static int Main(string [] args)
- {
- Connection connection = Bus.GetSessionBus();
- Service service = Service.Get(connection, "org.freedesktop.Test");
- Echoer echoer = (Echoer)
- service.GetObject(typeof(Echoer), "/org/freedesktop/Test/Echoer");
- System.Console.WriteLine(echoer.Echo("Hello world!"));
-
- return 0;
- }
- }
-}
diff --git a/mono/example/EchoServer.cs b/mono/example/EchoServer.cs
deleted file mode 100644
index 243a2730..00000000
--- a/mono/example/EchoServer.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-namespace Foo
-{
- using System;
- using DBus;
- using Gtk;
-
- public class EchoServer
- {
- public static int Main(string [] args)
- {
- Application.Init();
-
- Connection connection = Bus.GetSessionBus();
- Service service = new Service(connection, "org.freedesktop.Test");
- Echoer echoer = new Echoer();
- service.RegisterObject(echoer, "/org/freedesktop/Test/Echoer");
-
- Application.Run();
-
- return 0;
- }
- }
-}
diff --git a/mono/example/Echoer.cs b/mono/example/Echoer.cs
deleted file mode 100644
index bc5a843d..00000000
--- a/mono/example/Echoer.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace Foo
-{
- using System;
- using DBus;
-
- [Interface("org.freedesktop.Test.Echoer")]
- public class Echoer
- {
- [Method]
- public virtual string Echo(string message)
- {
- System.Console.WriteLine("I received: " + message);
- return "Reply: " + message;
- }
- }
-}
diff --git a/mono/example/Makefile.am b/mono/example/Makefile.am
deleted file mode 100644
index 9a8ed68e..00000000
--- a/mono/example/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-NOINST_EXES=echo-server.exe echo-client.exe bus-listener.exe
-DISTCLEANFILES=$(NOINST_EXES) $(NOINST_EXES:%=%.mdb)
-
-all: $(NOINST_EXES)
-
-echo-server.exe: EchoServer.cs Echoer.cs
- $(CSC) --debug --target exe -L .. -r:../dbus-sharp.dll -pkg:gtk-sharp -o echo-server.exe $(srcdir)/EchoServer.cs $(srcdir)/Echoer.cs
-
-echo-client.exe: EchoClient.cs Echoer.cs
- $(CSC) --debug --target exe -L .. -r:../dbus-sharp.dll -o echo-client.exe $(srcdir)/EchoClient.cs $(srcdir)/Echoer.cs
-
-bus-listener.exe: BusListener.cs
- $(CSC) --debug --target exe -L .. -r:../dbus-sharp.dll -pkg:gtk-sharp -o bus-listener.exe $(srcdir)/BusListener.cs
-
-
-clean:
- rm -f $(NOINST_EXES) $(NOINST_EXES:%=%.mdb)
-
-install: all
-
-EXTRA_DIST=EchoServer.cs EchoClient.cs Echoer.cs BusListener.cs
-