Important: The information in this document is obsolete and should not be used for new development.
QuickTime 6 introduces a group of new APIs that provide a mechanism to preflight operations on content that may be restricted. What this means is that, by utilizing these calls, you can determine which QuickTime functions are restricted for the current movie, that is, which operations will fail.
These calls also allow developers to see what restrictions are enforced for a particular version of QuickTime. Previously, in earlier versions of QuickTime, there was no mechanism in place to report restrictions on no save or kiosk movies. Now in QuickTime 6, you can use these new restriction APIs, discussed in this section.
Returns the restrictions, if any, specified on a given movie.
OSErr QTGetMovieRestrictions ( Movie theMovie, QTRestrictionSet *outRestrictionSet, UInt32 *outSeed);
The movie for this operation.
A pointer to a variable that holds a reference to a restriction set.
A pointer to a long integer. Each change to the restriction set will update this value.
If there are no restrictions, this routine returns NIL. You can use seed count to detect changes.
The following is a list of the currently defined restrictions
now available in QTContentRestrictions.h:
enum { |
kQTRestrictionClassSave = 'save', |
kQTRestrictionSaveDontAddMovieResource = (1L << 0), |
kQTRestrictionSaveDontFlatten = (1L << 1), |
kQTRestrictionSaveDontExport = (1L << 2), |
kQTRestrictionSaveDontExtract = (1L << 3), // don't allow any form of // extraction of content |
kQTRestrictionClassEdit = 'edit', |
kQTRestrictionEditDontCopy = (1L << 0), // disable copy |
kQTRestrictionEditDontCut = (1L << 1), // disable cut |
kQTRestrictionEditDontPaste = (1L << 2), // disable paste |
kQTRestrictionEditDontClear = (1L << 3), // disable clear |
kQTRestrictionEditDontModify = (1L << 4), // don't allow modification |
// of content |
kQTRestrictionEditDontExtract = (1L << 5) // don't allow any form of |
// extraction of content |
}; |
There is also an error called qtOperationNotAuthorizedErr that
can be returned if an operation is performed on content that is
restricted. Normally, you should use the QuickTime Restrictions
API described in this section to preflight operations to determine
whether or not to perform the operation. If a restricted operation
is attempted, it will fail and will return this error.
qtOperationNotAuthorizedErr = -2168 |
Introduced in QuickTime 6.
C interface file: Movies.h
Movies.h
Use this routine to determine what restrictions are enforced by the currently running version of QuickTime.
QTGetSupportedRestrictions (OSType inRestrictionClass, UInt32 * outRestrictionIDs) ;
Movies.h
Returns the information about the restrictions designated by the specified restriction set.
OSErr QTRestrictionsGetInfo ( QTRestrictionSet inRestrictionSet, long *outRestrictionClassCount, long *outSeed);
The restricted set.
A value holding the number of classes currently in the restriction set.
A pointer to a long integer. Each change to the restriction set will update this value.
If you want to determine all of the restrictions, use this routine to determine the count.
Introduced in QuickTime 6.
C interface file: Movies.h
Movies.h
Returns the restricted items.
OSErr QTRestrictionsGetItem (QTRestrictionSet inRestrictionSet, OSType inRestrictionClass, UInt32 * outRestrictions);
The restricted set.
The restricted class.
A pointer to a long integer holding flags that indicate individual restrictions.
If you have no restrictions, the flags returned will be 0. If class is not available, it won’t return an error, but restrictions will be set to 0.
Introduced in QuickTime 6.
C interface file: Movies.h
Movies.h
Creates a universal unique (UUID)128-bit number.
OSErr QTCreateUUID ( QTUUID * outUUID, long creationFlags);
A pointer to the unique universal 128-bit number.
This routine is used to create a universal unique identifier.
Introduced in QuickTime 6.
C interface file: Movies.h
Movies.h
Compares two 128-bit numbers.
Boolean QTEqualUUIDs (const QTUUID * uuid1, const QTUUID *uuid2);
A pointer to the first 128-bit number.
A pointer to the second 128-bit number.
This routine is used to compare two universal unique identifiers.
Introduced in QuickTime 6.
C interface file: Movies.h
Movies.h
Last updated: 2002-07-01