mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-01 23:59:43 +02:00
rearranged code
This commit is contained in:
parent
505ead13bd
commit
33c9645eef
3 changed files with 13 additions and 14 deletions
|
@ -119,16 +119,16 @@ public class ClientInfo implements JsonSerialisable {
|
|||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getVisibleName() {
|
||||
if ((name != null) && !name.isEmpty())
|
||||
return name;
|
||||
return getHost();
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getLatency() {
|
||||
return latency;
|
||||
}
|
||||
|
|
|
@ -167,6 +167,10 @@ public class Stream implements JsonSerialisable {
|
|||
return query;
|
||||
}
|
||||
|
||||
public void setQuery(HashMap<String, String> query) {
|
||||
this.query = query;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
if (query.containsKey("name"))
|
||||
return query.get("name");
|
||||
|
@ -174,10 +178,6 @@ public class Stream implements JsonSerialisable {
|
|||
return "";
|
||||
}
|
||||
|
||||
public void setQuery(HashMap<String, String> query) {
|
||||
this.query = query;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Stream{" +
|
||||
|
|
|
@ -13,11 +13,8 @@ import java.net.InetAddress;
|
|||
|
||||
public class NsdHelper {
|
||||
|
||||
public interface NsdHelperListener {
|
||||
void onResolved(NsdHelper nsdHelper, NsdServiceInfo serviceInfo);
|
||||
}
|
||||
|
||||
private static final String TAG = "NsdHelper";
|
||||
private static NsdHelper mInstance;
|
||||
private String serviceName;
|
||||
private String serviceType;
|
||||
// private static final String NSD_SERVICE_TYPE = "_http._tcp.";
|
||||
|
@ -28,8 +25,6 @@ public class NsdHelper {
|
|||
private android.net.nsd.NsdManager.ResolveListener mResolveListener = null;
|
||||
private Context mContext;
|
||||
private NsdHelperListener listener = null;
|
||||
private static NsdHelper mInstance;
|
||||
|
||||
private NsdHelper(Context context) {
|
||||
mContext = context;
|
||||
}
|
||||
|
@ -120,5 +115,9 @@ public class NsdHelper {
|
|||
}
|
||||
};
|
||||
}
|
||||
|
||||
public interface NsdHelperListener {
|
||||
void onResolved(NsdHelper nsdHelper, NsdServiceInfo serviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue