YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.yxc.YxcGroupOperations Class Reference

Link, change, unlink and leave on behalf of the sheet. More...

Collaboration diagram for de.yaacc.yxc.YxcGroupOperations:
Collaboration graph

Classes

interface  Body
 
interface  Environment
 What the operations need from the app around them. More...
 
class  Member
 A device that can take part, found by our own discovery.
 

Public Member Functions

 YxcGroupOperations (Environment environment, YxcSleeper sleeper)
 
synchronized YxcGroupResult applySelection (String serverUdn, Collection< String > selectedClientUdns)
 Makes the group of the server consist of exactly the selected clients.
 
synchronized YxcGroupResult unlinkGroup (String serverUdn)
 Ends the group the device serves; the clients are put back on their earlier inputs.
 
synchronized YxcGroupResult leave (String clientUdn)
 A client leaves its group (also a client that left already but still sits on the link input).
 

Detailed Description

Link, change, unlink and leave on behalf of the sheet.

It sits between the picker and YxcGroupService and adds what the service does not know about the app:

  • it works from the picker's selection: whoever is checked and not in the group is added, whoever is in the group and not checked is removed (the group ends when nobody is left);
  • it never takes a device out of another group: a picked device that is a server, or a client of another group, is refused (decision of the owner; the devices accept such calls without complaint, see docs/tech.md);
  • a client that leaves is put back on the input it had before: it keeps the client role for as long as it sits on the link input. The input is the last one that was not the link input (remembered from the states, so also for groups made with another app), else the first non-link input the device offers;
  • it tells the screen which devices are busy and asks for a fresh read of every involved device afterwards.

One operation at a time. All methods block; the caller runs them on a worker thread.

Member Function Documentation

◆ applySelection()

synchronized YxcGroupResult de.yaacc.yxc.YxcGroupOperations.applySelection ( String serverUdn,
Collection< String > selectedClientUdns )

Makes the group of the server consist of exactly the selected clients.

Parameters
selectedClientUdnsthe devices that are to be the clients, empty to end the group
Here is the call graph for this function:

The documentation for this class was generated from the following file: