Commit 9d9e48bd authored by (no author)'s avatar (no author)

This commit was manufactured by cvs2svn to create tag

'OCAP10-I07-May22-2003'.
parent 3853e5c5
// RebootHandler.java
package org.ocap.hardware;
/**
* <p>
* The RebootHandler interface provides a callback method to notify the
* result of a reboot request.
* </p><p>
* The monitor application can set an instance of a class that implements
* this interface to the org.ocap.hardware.Host. See the
* {@link org.ocap.hardware.Host#setRebootHandler} method.
* </p>
*
* @author Brent Foust
* @author Shigeaki Watanabe
*
* @see org.ocap.hardware.Host#setRebootHandler
*/
public interface RebootHandler {
/**
* <p>
* This is a callback method to notify that a reboot is initiated.
* This method shall be called in following cases:
* <ul>
* <li> The org.ocap.hardware.Host.reboot() method is called.
* <li> The Host device initiates a reboot.
* </ul>
* </p><p>
* This method shall be called before the requested reboot is performed
* by the Host device.
* It gives the monitor application an opportunity to clean up
* resources before a reboot.
* The Host device continues the reboot process after this method call
* returns.
* </p>
*/
void notifyReboot();
}
/*
* File: @(#)CopyControlTC1.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #1.
* The asssertion tested in this class is:
* Assertion 1: default behavior of copy control determined by POD
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy freely on analog and digital
* Tune and play a stream (setCCIBits not called)
* Verify that the stream can be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test.hardware;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC1 implements Testlet {
public void runTest(TestContext tx) {
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
* if output was NOT recorded then tx.fail();
*/
/* if we get here then output was recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC1.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #1.
* The asssertion tested in this class is:
* Assertion 1: default behavior of copy control determined by POD
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy freely on analog and digital
* Tune and play a stream (setCCIBits not called)
* Verify that the stream can be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC1 implements Testlet {
public void runTest(TestContext tx) {
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
* if output was NOT recorded then tx.fail();
*/
/* if we get here then output was recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC10.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #10.
* The asssertion tested in this class is:
* Assertion 10: test permission
*
*
* Test Strategy: call setDownRes with application that does not have monitor app
* permission
*
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test.hardware;
import org.ocap.hardware.*;
//import javax.*;
import org.dvb.test.*;
public class CopyControlTC10 implements Testlet{
public void runTest(TestContext tx) {
/* play a stream and wait for user input
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
* if output resolution same as input, then
* tx.fail();
* return;
*/
/* if we get here then output resolution ok
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC10.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #10.
* The asssertion tested in this class is:
* Assertion 10: test permission
*
*
* Test Strategy: call setDownRes with application that does not have monitor app
* permission
*
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test;
import org.ocap.hardware.*;
//import javax.*;
import org.dvb.test.*;
public class CopyControlTC10 implements Testlet{
public void runTest(TestContext tx) {
/* play a stream and wait for user input
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
* if output resolution same as input, then
* tx.fail();
* return;
*/
/* if we get here then output resolution ok
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC2.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #2.
* The asssertion tested in this class is:
* Assertion 2: default behavior of copy control determined by POD
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy never on analog and digital
* Tune and play a stream (setCCIBits not called)
* Verify that the stream can not be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test.hardware;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC2implements Testlet {
public void runTest(TestContext tx) {
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
* if output recorded then tx.fail();
*/
/* if we get here then output was NOT recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC2.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #2.
* The asssertion tested in this class is:
* Assertion 2: default behavior of copy control determined by POD
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy never on analog and digital
* Tune and play a stream (setCCIBits not called)
* Verify that the stream can not be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC2implements Testlet {
public void runTest(TestContext tx) {
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
* if output recorded then tx.fail();
*/
/* if we get here then output was NOT recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC3.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #3.
* The asssertion tested in this class is:
* Assertion 3: behavior of copy control determined by setCCIBits
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy never on analog and digital
* Call setCCIBits()
* Tune and play a stream
* Verify that the stream can be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test.hardware;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC3 implements Testlet {
public void runTest(TestContext tx) {
try {
CopyControl.setCCIBits(true, 0);
}
catch (java.lang.IllegalArgumentException e) {
tx.fail("Illegal argument in setCCIBits", e);
return;
}
catch (java.lang.SecurityException e) {
tx.fail("Need Monitor App permission to call setCCIBit",e);
return;
}
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
*/
/* if we get here then output was recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC3.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #3.
* The asssertion tested in this class is:
* Assertion 3: behavior of copy control determined by setCCIBits
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy never on analog and digital
* Call setCCIBits()
* Tune and play a stream
* Verify that the stream can be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC3 implements Testlet {
public void runTest(TestContext tx) {
try {
CopyControl.setCCIBits(true, 0);
}
catch (java.lang.IllegalArgumentException e) {
tx.fail("Illegal argument in setCCIBits", e);
return;
}
catch (java.lang.SecurityException e) {
tx.fail("Need Monitor App permission to call setCCIBit",e);
return;
}
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
*/
/* if we get here then output was recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC4.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #4.
* The asssertion tested in this class is:
* Assertion 4: behavior of copy control determined by setCCIBits
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy freely on analog and digital
* Call setCCIBits()
* Tune and play a stream
* Verify that the stream can be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test.hardware;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC4 implements Testlet {
/* CCI bits */
/* digital */
static int EMI_COPYNEVER=0x3;
/* analog */
static int APS_ON_4LINE=0xC;
public void runTest(TestContext tx) {
try {
CopyControl.setCCIBits(true, EMI_COPYNEVER | APS_ON_4LINE);
}
catch (java.lang.IllegalArgumentException e) {
tx.fail("Illegal argument in setCCIBits", e);
return;
}
catch (java.lang.SecurityException e) {
tx.fail("Need Monitor App permission to call setCCIBit",e);
return;
}
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
*/
/* if we get here then output was NOT recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC4.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #4.
* The asssertion tested in this class is:
* Assertion 4: behavior of copy control determined by setCCIBits
*
* Test Strategy:
* Set the POD copy protection bits (CCI bits) to copy freely on analog and digital
* Call setCCIBits()
* Tune and play a stream
* Verify that the stream can be recorded on both the digital and analog outputs
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test;
import org.ocap.hardware.*;
import javax.*;
import org.dvb.test.DVBTest;
public class CopyControlTC4 implements Testlet {
/* CCI bits */
/* digital */
static int EMI_COPYNEVER=0x3;
/* analog */
static int APS_ON_4LINE=0xC;
public void runTest(TestContext tx) {
try {
CopyControl.setCCIBits(true, EMI_COPYNEVER | APS_ON_4LINE);
}
catch (java.lang.IllegalArgumentException e) {
tx.fail("Illegal argument in setCCIBits", e);
return;
}
catch (java.lang.SecurityException e) {
tx.fail("Need Monitor App permission to call setCCIBit",e);
return;
}
/* play a stream and wait for user input, which should indicate if the
* output was recorded or not
* tx.playTS(int channel, int sequence, boolean looping);
*
* DVBTest.prompt(java.lang.String id, int controlCode, java.lang.String message)
*/
/* if we get here then output was NOT recorded
*/
tx.success();
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC5.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #5.
* The asssertion tested in this class is:
* Assertion 5: test behavior with invalid parameters
*
* Test Strategy:
* Call setCCIBits() with various invalid parameters
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test.hardware;
import org.ocap.hardware.*;
public class CopyControlTC5 implements Testlet {
public void runTest(TestContext tx) {
try {
CopyControl.setCCIBits(true, 25093);
CopyControl.setCCIBits(true, -34562);
}
catch (java.lang.IllegalArgumentException e) {
tx.success();
return;
}
catch (java.lang.SecurityException e) {
tx.fail("Need Monitor App permission to call setCCIBit",e);
return;
}
/* if we get here then output was NOT recorded
*/
tx.fail("illegal arguments not handled properly");
return;
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC5.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #5.
* The asssertion tested in this class is:
* Assertion 5: test behavior with invalid parameters
*
* Test Strategy:
* Call setCCIBits() with various invalid parameters
*
*/
/** @(#)author: Allen Gordon
* @(#)version: 1.0
* @(#)date: 09/17/02
*/
package org.ocap.test;
import org.ocap.hardware.*;
public class CopyControlTC5 implements Testlet {
public void runTest(TestContext tx) {
try {
CopyControl.setCCIBits(true, 25093);
CopyControl.setCCIBits(true, -34562);
}
catch (java.lang.IllegalArgumentException e) {
tx.success();
return;
}
catch (java.lang.SecurityException e) {
tx.fail("Need Monitor App permission to call setCCIBit",e);
return;
}
/* if we get here then output was NOT recorded
*/
tx.fail("illegal arguments not handled properly");
return;
}
}
\ No newline at end of file
/*
* File: @(#)CopyControlTC6.java 1.0
* Comment: This class implements org.ocap.hardware.CopyControl test case #6.
* The asssertion tested in this class is: