69 lines
1.7 KiB
TypeScript
69 lines
1.7 KiB
TypeScript
import { DeviceSetupItem } from './DeviceSetupItem';
|
|
/**
|
|
* Input properties.
|
|
*/
|
|
export interface IActivityProps {
|
|
deviceList: Array<DeviceSetupItem>,
|
|
controlDeviceId: string,
|
|
volumeDeviceId: string,
|
|
outputDeviceId: string,
|
|
displayName: string
|
|
useMatrix: boolean,
|
|
}
|
|
|
|
/**
|
|
* Data model class to hold activity related information.
|
|
*/
|
|
export class Activity {
|
|
private _volumeDeviceId: string = "";
|
|
private _outputDeviceId: string = "";
|
|
private _controlDeviceId: string = "";
|
|
private _displayName: string = "";
|
|
private _deviceSetupItems: Array<DeviceSetupItem>;
|
|
private _useMatrix: boolean = false;
|
|
|
|
constructor(props: IActivityProps) {
|
|
this._controlDeviceId = props.controlDeviceId;
|
|
this._outputDeviceId = props.outputDeviceId;
|
|
this._volumeDeviceId = props.volumeDeviceId;
|
|
this._displayName = props.displayName;
|
|
this._deviceSetupItems = props.deviceList;
|
|
this._useMatrix = props.useMatrix
|
|
}
|
|
|
|
/**
|
|
* The device associated with main control.
|
|
*/
|
|
public get controlDeviceId(): string {
|
|
return this._controlDeviceId;
|
|
};
|
|
|
|
/**
|
|
* The device associated with the volume control.
|
|
*/
|
|
public get volumeDeviceId(): string {
|
|
return this._volumeDeviceId
|
|
};
|
|
|
|
/**
|
|
* The device associated with output.
|
|
*/
|
|
public get outputDeviceId(): string {
|
|
return this._outputDeviceId;
|
|
};
|
|
|
|
/**
|
|
* The display name of the activity.
|
|
*/
|
|
public get displayName(): string {
|
|
return this._displayName;
|
|
}
|
|
|
|
public get deviceSetupItems(): Array<DeviceSetupItem> {
|
|
return this._deviceSetupItems
|
|
}
|
|
|
|
public get useMatrix(): boolean {
|
|
return this._useMatrix;
|
|
}
|
|
} |