Commit ed5ee1b2 authored by oposso's avatar oposso

prelim DVR-I05 stubs 042809

parents
This diff is collapsed.
package org.ocap.dvr;
import java.util.Date;
import javax.tv.service.Service;
import org.dvb.application.AppID;
import org.davic.net.tuning.NetworkInterface;
import org.ocap.storage.ExtendedFileAccessPermissions;
/**
* This class represents an application request for buffering. An application
* can call the <code>createInstance</code> method to create a request.
*/
public abstract class BufferingRequest
{
/**
* Protected constructor, not to be used by applications.
*/
protected BufferingRequest()
{
}
/**
* Creates a BufferingRequest object.
*
* @param service The service to buffer.
* @param minDuration Minimum duration in seconds to buffer.
* @param maxDuration Maximum duration in seconds to buffer.
* @param efap Extended file access permissions for this request. If this
* parameter is null, no write permissions are given to this request.
* Read permissions for <code>BufferingRequest</code> instances are
* always world regardless of read permissions set by this parameter.
* @throws IllegalArgumentException if the service parameter is not a valid
* <code>Service</code>, or if <code>minDuration</code> is less than
* {@link OcapRecordingManager#getSmallestTimeShiftDuration}, or if
* <code>maxDuration</code> is less than <code>minDuration</code>.
*/
public static BufferingRequest createInstance(Service service,
long minDuration,
long maxDuration,
ExtendedFileAccessPermissions efap)
{
return null;
}
/**
* Gets the Service this request is attempting to buffer.
*
* @return Service being buffered for this request.
*/
public abstract Service getService();
/**
* Sets the Service this request is attempting to buffer.
*
* @param service The <code>Service</code> to buffer for this request.
*
* @throws IllegalArgumentException if the parameter is not a valid
* <code>Service</code>.
* @throws SecurityException if the calling applications does not have one
* of the write ExtendedFileAccessPermissions set by the
* <code>createInstance</code> or
* <code>setExtendedFileAccessPermissions</code> methods.
*/
public abstract void setService(Service service);
/**
* Gets the minimum content buffering duration for this request.
*
* @return The minimum content buffering duration in seconds.
*/
public abstract long getMinimumDuration();
/**
* Sets the minimum duration of content that SHALL be buffered for this
* request. If this method necessitates a buffer re-size the implementation
* MAY flush the contents of the buffer.
*
* @param minDuration Minimum duration in seconds.
*
* @throws IllegalArgumentException If the parameter is greater than the current
* value and Host device does not have enough space to meet the request, or if
* the parameter is greater than the maximum duration set by the
* <code>createInstance</code> or <code>setMaximumDuration</code> methods,
* or if the parameter is less than the duration returned by
* {@link OcapRecordingManager#getSmallestTimeShiftDuration}.
*
* @throws SecurityException if the calling application does not have one
* of the write ExtendedFileAccessPermissions set by the
* <code>createInstance</code> or
* <code>setExtendedFileAccessPermissions</code> methods.
*/
public abstract void setMinimumDuration(long minDuration);
/**
* Gets the maximum duration to buffer for this request. Returns the
* value set by the <code>createInstance</code> or
* <code>setMaximumDuration</code> methods.
*
* @return Maximum duration in seconds.
*/
public abstract long getMaxDuration();
/**
* Sets the maximum duration of content that MAY be buffered for this
* <code>BufferingRequest</code>. Informs the implementation that
* storing more content than this is not needed by the application
* owning this <code>BufferingRequest</code>.
*
* @param duration The maximum duration in seconds.
*
* @throws IllegalArgumentException if the duration parameter is negative
* or if the parameter is less than the minimum duration set by the
* <code>createInstance</code> or <code>setMaximumDuration</code>
* methods, or if the parameter is less than the duration returned by
* {@link OcapRecordingManager#getSmallestTimeShiftDuration}.
* @throws SecurityException if the calling application does not have one
* of the write ExtendedFileAccessPermissions set by the
* <code>createInstance</code> or
* <code>setExtendedFileAccessPermissions</code> methods.
*/
public abstract void setMaxDuration(long duration);
/**
* Gets the ExtendedFileAccessPermissions for this request.
*
* @return The ExtendedFileAccessPermissions.
*/
public abstract ExtendedFileAccessPermissions getExtendedFileAccessPermissions();
/**
* Sets the ExtendedFileAccessPermissions for this request.
*
* @param efap The ExtendedFileAccessPermissions for this request.
*
* @throws IllegalArgumentException if the parameter is null;
* @throws SecurityException if the calling application is not the creator
* of this request.
*/
public abstract void setExtendedFileAccessPermissions(
ExtendedFileAccessPermissions efap);
/**
* Gets the AppID of the application that created the request. If null is
* returned the implementation created the request.
*
* @return AppID of the owning application.
*/
public abstract AppID getAppID();
}
This diff is collapsed.
package org.ocap.dvr;
import org.ocap.shared.dvr.RecordedService;
/**
* This interface represents a RecordedService in OCAP. The object returned when
* an applications calls the getService method on a RecordingRequest will be an instance of
* this interface.
*/
public interface OcapRecordedService extends RecordedService
{
/**
* Get the bit-rate used for encoding and storage of this recorded service.
*
* @return Bit-rate in bytes per second.
*/
public long getRecordedBitRate();
/**
* Gets the size of the recording in bytes.
*
* @return Space occupied by the recording in bytes.
*/
public long getRecordedSize();
/**
* Determines if the recording can be decrypted by the implementation
* on the current network.
*
* @return True if the recording can be decrypted, otherwise returns false.
**/
public boolean isDecryptable();
/**
* Determines if the recording has a format which can be decoded
* for presentation by the implementation, e.g., the bit rate,
* resolution, and encoding are supported.
*
* @return True if the recording can be decoded, otherwise returns false.
**/
public boolean isDecodable();
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
package org.ocap.dvr;
import org.ocap.shared.dvr.LeafRecordingRequest;
import org.ocap.shared.dvr.ParentRecordingRequest;
import org.ocap.shared.dvr.navigation.RecordingList;
import org.ocap.shared.dvr.AccessDeniedException;
/**
* This interface represents a LeafRecordingRequest in OCAP.
* <p>
* When the implementation detects a schedule conflict, it either resolves
* the conflict using the Application priority of the conflicting recordings,
* or invokes the
* {@link org.ocap.resource.ResourceContentionHandler} if one is set. The
* resolution of the conflict by the implementation or the
* ResourceContentionHandler will result in some of the overlapping
* recordings to be pending without conflict and some to be pending
* with conflict.
*/
public interface OcapRecordingRequest extends LeafRecordingRequest
{
/**
* This recording request is a test recording request. Actual recording
* is not initiated for recording requests in this state.
* RecordingRequests in this state do not transition to other states.
* No events are generated when a recording request is added or deleted
* in this state. A recording in this state is a leaf recording request.
* Recordings in this states are the leaf recording requests
* corresponding to invocation of the RecordingManager.record(..)
* method with the priority value in OcapRecordingProperties set to
* TEST_RECORDING.
*/
public static final int TEST_STATE = 9;
/**
* This recording request was cancelled. Transitioned to when the
* cancel method completes successfully.
*/
public static final int CANCELLED_STATE = 10;
/**
* Cancels a pending recording request. The recording request will be not
* be deleted from the database after the successful invocation of this
* method. Successful completion places this recording request in the
* CANCELLED_STATE.
*
* Canceling a recording request may resolve one or more conflicts. In
* this case some pending recordings with conflicts would be changed to
* pending without conflicts.
*
* @throws AccessDeniedException if the calling application is not
* permitted to perform this operation by RecordingRequest specific
* security attributes.
* @throws SecurityException if the calling application does not have
* RecordingPermission("cancel",..) or RecordingPermission("*",..)
* @throws IllegalStateException if the state of the recording is not in
* PENDING_STATE_NO_CONFLICT_STATE or PENDING_WITH_CONFLICT_STATE.
*/
public void cancel() throws AccessDeniedException;
/**
* Gets the estimated space, in bytes, required for the recording.
*
* @return Space required for the recording in bytes. This method
* returns zero if the recordings is in failed state.
*/
public long getSpaceRequired();
/**
* Gets any other RecordingRequest that overlaps with the duration of this
* recording request. This method will return null unless the recording
* request is in the PENDING_WITH_CONFLICTS_STATE,
* PENDING_NO_CONFLICTS_STATE, IN_PROGRESS_INSUFFICIENT_SPACE_STATE or
* IN_PROGRESS_STATE. The returned list will contain only overlapping
* recording requests for which the application has read access permission.
* The RecordingList returned is only a copy of the list of overlapping
* entries at the time of this method call. This list is not updated if
* there are any changes. A new call to this method will be required to get
* the updated list.
*
* @return a RecordingList
*/
public RecordingList getOverlappingEntries();
/**
* Returns whether the destined <code>MediaStorageVolume</code> for this
* recording is present and ready or not.
*
* @return If the <code>MediaStorageVolume</code> destination of this
* recording request can be written to, assuming write permission,
* then this method returns true, otherwise it returns
* false. If the <code>getDestination</code> method returns null then
* the destination <code>MediaStorageVolume</code> is a default volume
* on a default storage device as determined by the implementation.
*/
public boolean isStorageReady();
/**
* Sets the parent for this recording request. If the parent parameter is
* null this leaf is orphaned from any previously set parent. If the parent
* parameter is null and this leaf does not have a parent, this method
* does nothing and returns successfully. If the parameter is not null and
* the parent was already set by any method, this leaf is removed from the
* previously set parent and added to the parent parameter. Unless otherwise
* noted, the state of the previously set parent will not be affected.
*
* If, as a result of this method invocation, this
* <code>OcapRecordingRequest</code> is removed from a
* <code>ParentRecordingRequest</code> which is in the
* COMPLETELY_RESOLVED_STATE, and which contains no other
* <code>RecordingRequest</code>s, that <code>ParentRecordingRequest</code>
* SHALL be transitioned to the PARTIALLY_RESOLVED_STATE.
*
* If, as a result of this method invocation, this
* <code>OcapRecordingRequest</code>
* is removed from a <code>ParentRecordingRequest</code> which is in the
* CANCELLED_STATE and which contains no additional
* <code>RecordingRequest</code>s,
* that <code>ParentRecordingRequest</code> SHALL be deleted from the
* recording database.
*
* @param parent The new parent of this leaf recording request or null if the
* leaf is to be orphaned.
* @param resolutionParentState The state into which the parent recording
* parameter shall be transitioned to as a result of this method
* invocation. If the parent parameter in this method is null, this
* parameter is ignored.
*
* @throws SecurityException if the calling application does not have
* RecordingPermission("modify",..) or RecordingPermission("*",..).
* @throws IllegalStateException if the parent parameter is in the
* CANCELLED_STATE.
*/
public void setParent(ParentRecordingRequest parent, int resolutionParentState);
}
This diff is collapsed.
package org.ocap.dvr;
import java.io.Serializable;
import org.ocap.shared.dvr.RecordingSpec;
import org.ocap.shared.dvr.RecordingProperties;
/**
* Specifies a recording request that can be resolved only by an application
* defined request resolution handler.
*/
public class PrivateRecordingSpec extends RecordingSpec
{
/**
* Constructor
* @param requestData private data the format of which is known only
* to the application.
* @param properties the definition of how the recording is to be done
*/
public PrivateRecordingSpec(Serializable requestData,
RecordingProperties properties)
{
super(properties);
}
/**
* Returns the private data stored in this recording spec
* @return the private data passed into the constructor
*/
public Serializable getPrivateData()
{
return null;
}
}
This diff is collapsed.
package org.ocap.dvr;
import org.ocap.shared.dvr.RecordingRequest;
import java.util.EventObject;
/**
* Event notifying that a scheduled recording is about to occur. This event
* is triggered for <code>LeafRecordingRequest</code>s in pending states.
*/
public class RecordingAlertEvent extends EventObject
{
/**
* Constructs the event.
*
* @param source The <code>RecordingRequest</code> that
* caused the event.
*/
public RecordingAlertEvent(RecordingRequest source)
{
super(source);
}
/**
* Returns the <code>RecordingRequest</code> that caused the event.
*
* @return The <code>RecordingRequest</code> that caused the event.
*/
public RecordingRequest getRecordingRequest()
{
return(RecordingRequest)super.getSource();
}
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_13) on Wed Apr 22 14:01:04 MDT 2009 -->
<TITLE>
RecordingAlertListener
</TITLE>
<META NAME="date" CONTENT="2009-04-22">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="RecordingAlertListener";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/ocap/dvr/RecordingAlertEvent.html" title="class in org.ocap.dvr"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/ocap/dvr/RecordingPlaybackListener.html" title="interface in org.ocap.dvr"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/ocap/dvr/RecordingAlertListener.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="RecordingAlertListener.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.ocap.dvr</FONT>
<BR>
Interface RecordingAlertListener</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD>java.util.EventListener</DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>RecordingAlertListener</B><DT>extends java.util.EventListener</DL>
</PRE>
<P>
Listener for Recording Alerts.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/ocap/dvr/RecordingAlertListener.html#recordingAlert(org.ocap.dvr.RecordingAlertEvent)">recordingAlert</A></B>(<A HREF="../../../org/ocap/dvr/RecordingAlertEvent.html" title="class in org.ocap.dvr">RecordingAlertEvent</A>&nbsp;e)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notifies the <code>RecordingAlertListener</code> that a scheduled
acitivity is about to happen.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="recordingAlert(org.ocap.dvr.RecordingAlertEvent)"><!-- --></A><H3>
recordingAlert</H3>
<PRE>
void <B>recordingAlert</B>(<A HREF="../../../org/ocap/dvr/RecordingAlertEvent.html" title="class in org.ocap.dvr">RecordingAlertEvent</A>&nbsp;e)</PRE>
<DL>
<DD>Notifies the <code>RecordingAlertListener</code> that a scheduled
acitivity is about to happen.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>e</CODE> - The generated event.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">