mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
refs(models): deprecate unused ZoneRequest member helpers (refs #511)
RemoveMember, ClearMembers and HasMember have no production callers: the zone remove paths now use /removeZoneSlave instead of a /setZone rebuild, and standalone is done by dissolving the zone. Mark them Deprecated ahead of removal in the next commit (keeps history legible). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
720d2abc5c
commit
94496d5d4b
+13
-3
@@ -86,7 +86,11 @@ func (zr *ZoneRequest) AddMemberByDeviceID(deviceID string) {
|
||||
zr.Members = append(zr.Members, member)
|
||||
}
|
||||
|
||||
// RemoveMember removes a device from the zone configuration
|
||||
// RemoveMember removes a device from the zone configuration.
|
||||
//
|
||||
// Deprecated: unused. Zone members are removed with the /removeZoneSlave
|
||||
// endpoint (client.RemoveZoneSlave), not by rebuilding the zone via /setZone, so
|
||||
// this helper has no callers. To be removed. See #511.
|
||||
func (zr *ZoneRequest) RemoveMember(deviceID string) {
|
||||
for i, member := range zr.Members {
|
||||
if member.DeviceID == deviceID {
|
||||
@@ -96,12 +100,18 @@ func (zr *ZoneRequest) RemoveMember(deviceID string) {
|
||||
}
|
||||
}
|
||||
|
||||
// ClearMembers removes all members from the zone (creates standalone configuration)
|
||||
// ClearMembers removes all members from the zone (creates standalone configuration).
|
||||
//
|
||||
// Deprecated: unused. To make a device standalone, dissolve the zone instead
|
||||
// (client.DissolveZone, i.e. NewZoneRequest(master) with no members). To be
|
||||
// removed. See #511.
|
||||
func (zr *ZoneRequest) ClearMembers() {
|
||||
zr.Members = []MemberEntry{}
|
||||
}
|
||||
|
||||
// HasMember checks if a device is in the zone configuration
|
||||
// HasMember checks if a device is in the zone configuration.
|
||||
//
|
||||
// Deprecated: unused. To be removed. See #511.
|
||||
func (zr *ZoneRequest) HasMember(deviceID string) bool {
|
||||
for _, member := range zr.Members {
|
||||
if member.DeviceID == deviceID {
|
||||
|
||||
Reference in New Issue
Block a user