Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

7    Multimedia Properties

Multimedia

Exploring Palm OS®

This chapter describes multimedia functions related to properties.

The header file MMProperty.h declares the API that this chapter describes.

Multimedia Property Functions and Macros ^TOP^

MMPropertyEnumerate Function ^TOP^

Purpose

Iterates through the supported values of a particular property of an object.

Declared In

MMProperty.h

Prototype

status_t MMPropertyEnumerate (
   int32_t id,
   int32_t property,
   int32_t *ioIterator,
   MMTypeCode typeCode,
   void *outValue,
   int32_t *ioLength
)

Parameters

id
A valid object ID.
property
A valid property key.
ioIterator
Pointer to the value returned by the previous call to this function. On the first call to this function, set this value to P_MM_ENUM_BEGIN. When the set of iterated values is exhausted, this function sets this value to P_MM_ENUM_END.
typeCode
The expected type of data. Specify one of the constants listed in "MMTypeCode."
outValue
On input, a pointer to a buffer capable of storing the specified type of data. On output, a pointer to the value, if it was found and enough storage space was provided.
ioLength
On input, if typeCode specifies a variable-length value with no delimiter (P_MM_TYPE_RAW,), then this is a pointer to the size of the outValue buffer in bytes; otherwise this may be NULL. On output, a pointer to the actual size of the value.

Returns

The following result codes:

errNone
No error.
sysErrParamErr
The specified object or property is invalid.
sysErrBadIndex
The iterator value is invalid or past the last item in the set.
sysErrBadType
The specified typeCode does not match the property's type.
sysErrNotAllowed
Cannot enumerate this property.
memErrNotEnoughSpace
The outValue buffer was filled to capacity with a partial value and ioLength is set to indicate the required capacity.

MMPropertyGet Function ^TOP^

Purpose

Returns the value of an object property.

Declared In

MMProperty.h

Prototype

status_t MMPropertyGet (
   int32_t id,
   int32_t property,
   MMTypeCode typeCode,
   void *outValue,
   int32_t *ioValueLen
)

Parameters

id
A valid object ID.
property
A valid property key.
typeCode
The expected type of data. Specify one of the constants listed in "MMTypeCode."
outValue
On input, a pointer to a buffer capable of storing the specified type of data. On output, a pointer to the value, if it was found and enough storage space was provided.
ioLength
On input, if typeCode specifies a variable-length value with no delimiter (P_MM_TYPE_RAW,), then this is a pointer to the size of the outValue buffer in bytes; otherwise this may be NULL. On output, a pointer to the actual size of the value.

Returns

The following result codes:

errNone
No error.
sysErrParamErr
The specified object or property is invalid.
sysErrBadType
The specified typeCode does not match the property's type.
memErrNotEnoughSpace
The outValue buffer was filled to capacity with a partial value and ioLength is set to indicate the required capacity.

See Also

MMPropertySet()

MMPropertyInfo Function ^TOP^

Purpose

Returns metadata about a property.

Declared In

MMProperty.h

Prototype

status_t MMPropertyInfo (
   int32_t id,
   MMPropInfoType infoType,
   int32_t property,
   MMTypeCode typeCode,
   void *outValue,
   int32_t *ioValueLen
)

Parameters

id
A valid object ID.
infoType
The type of information to return. Specify one of the constants listed in "MMPropInfoType."
property
A valid property key.
typeCode
The expected type of data. Specify one of the constants listed in "MMTypeCode."
outValue
On input, a pointer to a buffer capable of storing the specified type of data. On output, a pointer to the value, if it was found and enough storage space was provided.
ioLength
On input, if typeCode specifies a variable-length value with no delimiter (P_MM_TYPE_RAW,), then this is a pointer to the size of the outValue buffer in bytes; otherwise this may be NULL. On output, a pointer to the actual size of the value.

Returns

The following result codes:

errNone
No error.
sysErrParamErr
The specified object or property is invalid.
sysErrBadType
The specified typeCode does not match the property's type.
memErrNotEnoughSpace
The outValue buffer was filled to capacity with a partial value and ioLength is set to indicate the required capacity.

See Also

MMPropertyGet()

MMPropertySet Function ^TOP^

Purpose

Sets an object property value.

Declared In

MMProperty.h

Prototype

status_t MMPropertySet (
   int32_t id,
   int32_t property,
   MMTypeCode typeCode,
   const void *value,
   uint32_t length
)

Parameters

id
A valid object ID.
property
A valid property key.
typeCode
The expected type of data. Specify one of the constants listed in "MMTypeCode."
value
A pointer to the value to set for the property.
length
If typeCode specifies a variable-length value with no delimiter (P_MM_TYPE_RAW,), then this indicates the size of the value in bytes. Otherwise, length is ignored and should be set to 0.

Returns

The following result codes:

errNone
No error.
sysErrParamErr
The specified object or property is invalid.
sysErrBadType
The specified typeCode does not match the property's type.

See Also

MMPropertyGet()