1
+ /*
2
+ * Copyright (c) 2022 Project CHIP Authors
3
+ * All rights reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ *
17
+ */
18
+ package com .chip .casting ;
19
+
20
+ public class VideoPlayer
21
+ {
22
+ private long nodeId ;
23
+ private byte fabricIndex ;
24
+ private String deviceName ;
25
+ private short vendorId ;
26
+ private short productId ;
27
+ private short deviceType ;
28
+ private List <ContentApp > contentApps ;
29
+ private boolean isConnected = false ;
30
+
31
+ private boolean isInitialized = false ;
32
+
33
+ public VideoPlayer (long nodeId , byte fabricIndex , String deviceName , short vendorId , short productId , short deviceType , List <ContentApp > contentApps , boolean isConnected ) {
34
+ this .nodeId = nodeId ;
35
+ this .fabricIndex = fabricIndex ;
36
+ this .deviceName = deviceName ;
37
+ this .vendorId = vendorId ;
38
+ this .productId = productId ;
39
+ this .deviceType = deviceType ;
40
+ this .contentApps = contentApps ;
41
+ this .isConnected = isConnected ;
42
+ this .isInitialized = true ;
43
+ }
44
+
45
+ public boolean equals (Object object ) {
46
+ if (this == object ) return true ;
47
+ if (object == null || getClass () != object .getClass ()) return false ;
48
+ if (!super .equals (object )) return false ;
49
+ VideoPlayer that = (VideoPlayer ) object ;
50
+ return nodeId == that .nodeId && fabricIndex == that .fabricIndex ;
51
+ }
52
+
53
+ public int hashCode () {
54
+ return Objects .hash (super .hashCode (), nodeId , fabricIndex );
55
+ }
56
+
57
+ public long getNodeId () {
58
+ return nodeId ;
59
+ }
60
+
61
+ public byte getFabricIndex () {
62
+ return fabricIndex ;
63
+ }
64
+
65
+ public boolean isConnected () {
66
+ return isConnected ;
67
+ }
68
+
69
+ public List <ContentApp > getContentApps () {
70
+ return contentApps ;
71
+ }
72
+
73
+ public String getDeviceName () {
74
+ return deviceName ;
75
+ }
76
+
77
+ public short getVendorId () {
78
+ return vendorId ;
79
+ }
80
+
81
+ public short getProductId () {
82
+ return productId ;
83
+ }
84
+
85
+ public short getDeviceType () {
86
+ return deviceType ;
87
+ }
88
+
89
+ public boolean isInitialized () {
90
+ return isInitialized ;
91
+ }
92
+ }
0 commit comments