forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
56bb8b4
commit 27c0f3d
Showing
10 changed files
with
116 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 47 additions & 44 deletions
91
.../tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/model/ContentApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,56 @@ | ||
package com.matter.tv.server.model; | ||
|
||
import com.matter.tv.app.api.SupportedCluster; | ||
|
||
import java.util.Collections; | ||
import java.util.Set; | ||
|
||
public class ContentApp { | ||
|
||
private String appName; | ||
private String vendorName; | ||
private int vendorId; | ||
private int productId; | ||
private Set<SupportedCluster> supportedClusters; | ||
private int endpoint; | ||
|
||
public ContentApp(String appName, String vendorName, int vendorId, int productId, Set<SupportedCluster> supportedClusters) { | ||
this.vendorName = vendorName; | ||
this.appName = appName; | ||
this.vendorId = vendorId; | ||
this.productId = productId; | ||
this.supportedClusters = supportedClusters; | ||
} | ||
|
||
public String getAppName() { | ||
return appName; | ||
} | ||
|
||
public String getVendorName() { | ||
return vendorName; | ||
} | ||
|
||
public int getVendorId() { | ||
return vendorId; | ||
} | ||
|
||
public int getProductId() { | ||
return productId; | ||
} | ||
|
||
public int getEndpointId() { | ||
return endpoint; | ||
} | ||
|
||
public void setEndpointId(int endpoint) { | ||
this.endpoint = endpoint; | ||
} | ||
|
||
public Set<SupportedCluster> getSupportedClusters() { | ||
return Collections.unmodifiableSet(supportedClusters); | ||
} | ||
|
||
private String appName; | ||
private String vendorName; | ||
private int vendorId; | ||
private int productId; | ||
private Set<SupportedCluster> supportedClusters; | ||
private int endpoint; | ||
|
||
public ContentApp( | ||
String appName, | ||
String vendorName, | ||
int vendorId, | ||
int productId, | ||
Set<SupportedCluster> supportedClusters) { | ||
this.vendorName = vendorName; | ||
this.appName = appName; | ||
this.vendorId = vendorId; | ||
this.productId = productId; | ||
this.supportedClusters = supportedClusters; | ||
} | ||
|
||
public String getAppName() { | ||
return appName; | ||
} | ||
|
||
public String getVendorName() { | ||
return vendorName; | ||
} | ||
|
||
public int getVendorId() { | ||
return vendorId; | ||
} | ||
|
||
public int getProductId() { | ||
return productId; | ||
} | ||
|
||
public int getEndpointId() { | ||
return endpoint; | ||
} | ||
|
||
public void setEndpointId(int endpoint) { | ||
this.endpoint = endpoint; | ||
} | ||
|
||
public Set<SupportedCluster> getSupportedClusters() { | ||
return Collections.unmodifiableSet(supportedClusters); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 9 additions & 10 deletions
19
examples/tv-app/android/java/src/com/tcl/chip/tvapp/ContentAppEndpointManagerStub.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package com.tcl.chip.tvapp; | ||
|
||
public class ContentAppEndpointManagerStub implements ContentAppEndpointManager{ | ||
public class ContentAppEndpointManagerStub implements ContentAppEndpointManager { | ||
|
||
ContentAppEndpointManager delegate; | ||
ContentAppEndpointManager delegate; | ||
|
||
public ContentAppEndpointManagerStub(ContentAppEndpointManager delegate){ | ||
this.delegate = delegate; | ||
} | ||
|
||
@Override | ||
public String sendCommand(int endpointId, String commandPayload) { | ||
return delegate.sendCommand(endpointId, commandPayload); | ||
} | ||
public ContentAppEndpointManagerStub(ContentAppEndpointManager delegate) { | ||
this.delegate = delegate; | ||
} | ||
|
||
@Override | ||
public String sendCommand(int endpointId, String commandPayload) { | ||
return delegate.sendCommand(endpointId, commandPayload); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters