Package com.castlabs.android.cas

# Class CasConfiguration

java.lang.Object
com.castlabs.android.cas.CasConfiguration

All Implemented Interfaces:
  `Parcelable`

public class CasConfiguration extends Object implements Parcelable
Basic CAS configuration that can be used to query keys from a widevine proxy.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface android.os.Parcelable

  `Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final int`
  `ageRestriction`
  This is to define the age of this client, and this value will be used to compare with the ECM ageRestriction value, if the age of this client is less than the value in the ECM, the content will be blocked.
  `final int`
  `casID`
  The casID of the headend system, WVCAS is 0x4AD4 by default
  `static final Parcelable.Creator<CasConfiguration>`
  `CREATOR`
  Creator for CasConfiguration to allow it to be parcelable.
  `final int`
  `ecmDelayStart`
  Defines the time to delay to process ECM, the purpose of this value is the fine tune the ECM and content alignment.
  `final String`
  `googleProvisionURL`
  The Google WVCAS Provision URL
  `final byte[]`
  `provisioningBytes`
  ProvisionBytes is a byte array (String) that is the content identifier.
  `final Bundle`
  `requestProperties`
  Bundle that can be used to put additional request (header) parameters that will be send to the DRM backend during license requests.
  `final String`
  `url`
  The proxy URL

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CasConfiguration(String url, String googleProvisionURL, int casID, int ecmDelayStart, int ageRestriction, byte[] provisioningBytes, Bundle requestProperties)`
  Create CAS configuration

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `describeContents()`
  `void`
  `writeToParcel(Parcel dest, int flags)`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### url

    @NonNull public final String url
    The proxy URL

  - ### googleProvisionURL

    @NonNull public final String googleProvisionURL
    The Google WVCAS Provision URL

  - ### casID

    public final int casID
    The casID of the headend system, WVCAS is 0x4AD4 by default

  - ### ecmDelayStart

    public final int ecmDelayStart
    Defines the time to delay to process ECM, the purpose of this value is the fine tune the ECM and content alignment.

  - ### ageRestriction

    public final int ageRestriction
    This is to define the age of this client, and this value will be used to compare with the ECM ageRestriction value, if the age of this client is less than the value in the ECM, the content will be blocked.

  - ### provisioningBytes

    @Nullable public final byte[] provisioningBytes
    ProvisionBytes is a byte array (String) that is the content identifier. This value has to be match with the value defined in Headend for this content, in order to get the correct content license.

  - ### requestProperties

    @Nullable public final Bundle requestProperties
    Bundle that can be used to put additional request (header) parameters that will be send to the DRM backend during license requests.

    Note that all values need to be of type String!

  - ### CREATOR

    public static final Parcelable.Creator<CasConfiguration> CREATOR
    Creator for CasConfiguration to allow it to be parcelable.

- ## Constructor Details

  - ### CasConfiguration

    public CasConfiguration(String url, String googleProvisionURL, int casID, int ecmDelayStart, int ageRestriction, byte[] provisioningBytes, Bundle requestProperties)
    Create CAS configuration
    Parameters:
      `url` - Proxy URL for license request
      `googleProvisionURL` - Google Device Provisioning URL
      `casID` - CAS System ID, default WVCAS_ID 0x4AD4
      `ecmDelayStart` - The delay in ms of starting process ECM data, used to fine tune ECM alignment
      `ageRestriction` - The age defined for the client side to access the content
      `provisioningBytes` - A byte array (String) for CAS system to identity the content, must match with CAS headend configuration
      `requestProperties` - Additional HTTP request header(s) used for CAS license request. Usually used with DRMtoday license request.

- ## Method Details

  - ### writeToParcel

    public void writeToParcel(Parcel dest, int flags)
    Specified by:
      `writeToParcel` in interface `Parcelable`

  - ### describeContents

    public int describeContents()
    Specified by:
      `describeContents` in interface `Parcelable`