Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Sonos .NET Class Library
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
carlr  
View profile  
 More options Mar 16 2008, 2:13 pm
From: carlr <ca...@norrbom.nu>
Date: Sun, 16 Mar 2008 11:13:58 -0700 (PDT)
Local: Sun, Mar 16 2008 2:13 pm
Subject: Sonos .NET Class Library
Hi,

New here, just wanted to share a .NET Class Library for Sonos control.
Read more and download and try it out from: http://www.norrbom.nu

Please bear in mind that it's and early alpha build, but anyone is
more than welcome to try it out in their projects.

/Carl


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
djMax  
View profile  
 More options Apr 29 2008, 10:22 am
From: djMax <djM...@gmail.com>
Date: Tue, 29 Apr 2008 07:22:03 -0700 (PDT)
Local: Tues, Apr 29 2008 10:22 am
Subject: Re: Sonos .NET Class Library
Can you post the source for this library somewhere?  I'm going to try
and use it but there are some things I want to change.  (Happy to
provide them back, it'd just speed up my development if I didn't have
to go back and forth)

As a first example, DeviceFinder.FindZonePlayers should not return
"object", it should return an actual type with properties that
indicate what was found.

On Mar 16, 2:13 pm, carlr <ca...@norrbom.nu> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
djMax  
View profile  
 More options Apr 29 2008, 10:36 am
From: djMax <djM...@gmail.com>
Date: Tue, 29 Apr 2008 07:36:51 -0700 (PDT)
Local: Tues, Apr 29 2008 10:36 am
Subject: Re: Sonos .NET Class Library
I'm in C#, so this isn't an easy translation, but here's my version of
FindZonePlayers.  I'm using log4net from the Apache Foundation, which
I highly recommend you switch to rather than rolling your own logging.

public class DeviceFinder
{
public class ZonePlayerInfo
{
        public ZonePlayerInfo(string name, string id)
        {
                Name = name;
                DeviceId = id;
        }

        public string DeviceId { get; private set; }
        public string Name { get; private set; }

}

public List<ZonePlayerInfo> FindZonePlayers()
{
        object obj2;
        UPnPDeviceFinder finder = new UPnPDeviceFinderClass();
        object[] vInActionArgs = new object[1];
        object[] objArray2 = new object[1];
        try
        {
                UPnPDevices devices = finder.FindByType("urn:schemas-upnp-
org:device:ZonePlayer:1", 0);
                if (devices.Count == 0)
                {
                        return null;
                }
                var zones = new List<ZonePlayerInfo>();
                object[] attrs = new object[1];
                foreach (UPnPDevice device in devices)
                {
                        device.Services["urn:upnp-
org:serviceId:DeviceProperties"].InvokeAction("GetZoneAttributes",
vInActionArgs, ref attrs);
                        zones.Add(new ZonePlayerInfo(attrs[0], device.UniqueDeviceName));
                }
                return zones;
        }
        catch (Exception exception)
        {
                _Log.Warn("FindZonePlayers failed", exception);
                return null;
        }


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google