diff options
author | Zeeshan Ali <zeenix@gmail.com> | 2008-05-22 15:02:51 +0000 |
---|---|---|
committer | Zeeshan Ali <zeenix@gmail.com> | 2008-05-22 15:02:51 +0000 |
commit | 5fa6af3c82e0aea52438a31e2d10c0f83911c113 (patch) | |
tree | 3f0608dd63b3b47b722db5922e3d360f659a5ef6 /tests | |
parent | 55bc47468bc71409ef8c52bd4e0cba47b1c54b70 (diff) | |
download | gupnp-vala-5fa6af3c82e0aea52438a31e2d10c0f83911c113.tar.gz |
Remove tabs and trailing whitespaces.
git-svn-id: https://svn.o-hand.com/repos/gupnp/trunk/bindings/gupnp-vala@978 d8cb91d7-bff9-0310-92b9-80b65e4482b2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-browser.vala | 66 | ||||
-rw-r--r-- | tests/test-publish.vala | 46 |
2 files changed, 56 insertions, 56 deletions
diff --git a/tests/test-browser.vala b/tests/test-browser.vala index e6ecba3..3d7bb8c 100644 --- a/tests/test-browser.vala +++ b/tests/test-browser.vala @@ -2,38 +2,38 @@ using GLib; using GSSDP; public class Test.BrowserTest : GLib.Object { - - public static int main (string[] args) { - GSSDP.Client client; - - try { - client = new Client (null); - } catch (GLib.Error err) { - GLib.critical (err.message); - return 1; - } - - GSSDP.ResourceBrowser rbrowser = - new ResourceBrowser (client, GSSDP.ALL_RESOURCES); - rbrowser.resource_available += on_resource_available; - rbrowser.resource_unavailable += on_resource_unavailable; - rbrowser.active = true; - - GLib.MainLoop loop = new MainLoop (null, false); - loop.run(); - - return 0; - } - - private static void on_resource_available (GSSDP.ResourceBrowser rbrowser, string usn, GLib.List locations) { - GLib.print ("Resource available:\n USN: %s\n", usn); - for (weak List l = locations; l != null; l = l.next) { - GLib.print (" Location: %s\n", l.data); - } - } - - private static void on_resource_unavailable (GSSDP.ResourceBrowser rbrowser, string usn) { - GLib.print ("Resource unavailable:\n USN: %s\n", usn); - } + + public static int main (string[] args) { + GSSDP.Client client; + + try { + client = new Client (null); + } catch (GLib.Error err) { + GLib.critical (err.message); + return 1; + } + + GSSDP.ResourceBrowser rbrowser = + new ResourceBrowser (client, GSSDP.ALL_RESOURCES); + rbrowser.resource_available += on_resource_available; + rbrowser.resource_unavailable += on_resource_unavailable; + rbrowser.active = true; + + GLib.MainLoop loop = new MainLoop (null, false); + loop.run(); + + return 0; + } + + private static void on_resource_available (GSSDP.ResourceBrowser rbrowser, string usn, GLib.List locations) { + GLib.print ("Resource available:\n USN: %s\n", usn); + for (weak List l = locations; l != null; l = l.next) { + GLib.print (" Location: %s\n", l.data); + } + } + + private static void on_resource_unavailable (GSSDP.ResourceBrowser rbrowser, string usn) { + GLib.print ("Resource unavailable:\n USN: %s\n", usn); + } } diff --git a/tests/test-publish.vala b/tests/test-publish.vala index 1983d05..0ab01c9 100644 --- a/tests/test-publish.vala +++ b/tests/test-publish.vala @@ -2,27 +2,27 @@ using GLib; using GSSDP; public class Test.PublishTest : GLib.Object { - - public static int main (string[] args) { - GSSDP.Client client; - - try { - client = new Client (null); - } catch (GLib.Error err) { - GLib.critical (err.message); - return 1; - } - - GSSDP.ResourceGroup rgroup = new ResourceGroup (client); - rgroup.add_resource_simple - ("upnp:rootdevice", - "uuid:1234abcd-12ab-12ab-12ab-1234567abc12::upnp:rootdevice", - "http://192.168.1.100/"); - rgroup.available = true; - - GLib.MainLoop loop = new MainLoop (null, false); - loop.run(); - - return 0; - } + + public static int main (string[] args) { + GSSDP.Client client; + + try { + client = new Client (null); + } catch (GLib.Error err) { + GLib.critical (err.message); + return 1; + } + + GSSDP.ResourceGroup rgroup = new ResourceGroup (client); + rgroup.add_resource_simple + ("upnp:rootdevice", + "uuid:1234abcd-12ab-12ab-12ab-1234567abc12::upnp:rootdevice", + "http://192.168.1.100/"); + rgroup.available = true; + + GLib.MainLoop loop = new MainLoop (null, false); + loop.run(); + + return 0; + } } |