SoCo/SoCo — pull request #115 by lawrenceakka (2014-04-30 15:48:51+00:00)
Title: Topology

Here is my version of revised topology code for you all to look at/discuss - #112 refers.

I was keen to get into a position where the user of SoCo does not have to worry about IP addresses or UIDs etc.

This introduces a ZoneGroup class, which look like this:

```python
ZoneGroup(uid='RINCON_000E5879136C01400:58', coordinator='SoCo("192.168.1.101")', members=set([SoCo("192.168.1.101"), SoCo("192.168.1.102")]))
```

Any SoCo instance can tell you what group it is in:

```python
>>>my_player.group
ZoneGroup(
uid='RINCON_000E5879136C01400:58',
coordinator='SoCo("192.168.1.101")',
members=set([SoCo("192.168.1.101"), SoCo("192.168.1.102")])
)
```

From there, you can find the coordinator for the current group:
```python
>>>my_player.group.coordinator
SoCo("192.168.1.101")
```

or, for example, its name:

```python
>>>my_player.group.coordinator.player_name
Kitchen
```

or a set of the members:

```python
>>>my_player.group.members
{SoCo("192.168.1.101"), SoCo("192.168.1.102")}
```

For convenience, ZoneGroup is also a container:
```python
>>>for player in my_player.group:
... print player.player_name
Living Room
Kitchen
```

If you need it, you can get an iterator over all groups on the network:
```python
>>>my_player.all_groups

```

I haven't written any tests yet, and I'm not sure how this works with stereo pairs/playbars/subs